Changeset 6890


Ignore:
Timestamp:
Oct 12, 2008, 11:31:20 PM (13 years ago)
Author:
livings124
Message:

Xcode will now preprocess the Info.plist for us; simplify the version script to avoid creating the unneeded (afaict) version.mk

Location:
trunk
Files:
1 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Transmission.xcodeproj/project.pbxproj

    r6886 r6890  
    22432243                                IBC_FLATTEN_NIBS = YES;
    22442244                                IBC_NOTICES = NO;
     2245                                INFOPLIST_FILE = "$(SRCROOT)/macosx/Info.plist";
     2246                                INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-CC";
     2247                                INFOPLIST_PREFIX_HEADER = "$(SRCROOT)/libtransmission/version.h";
     2248                                INFOPLIST_PREPROCESS = YES;
    22452249                                MACOSX_DEPLOYMENT_TARGET = 10.4;
    22462250                                OTHER_CFLAGS = "$(inherited)";
     
    23702374                                GCC_WARN_UNUSED_VARIABLE = NO;
    23712375                                IBC_NOTICES = NO;
     2376                                INFOPLIST_FILE = "$(SRCROOT)/macosx/Info.plist";
     2377                                INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-CC";
     2378                                INFOPLIST_PREFIX_HEADER = "$(SRCROOT)/libtransmission/version.h";
     2379                                INFOPLIST_PREPROCESS = YES;
    23722380                                MACOSX_DEPLOYMENT_TARGET = 10.4;
    23732381                                OTHER_LDFLAGS = "";
     
    24002408                                GCC_WARN_UNUSED_VARIABLE = NO;
    24012409                                IBC_NOTICES = NO;
     2410                                INFOPLIST_FILE = "$(SRCROOT)/macosx/Info.plist";
     2411                                INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-CC";
     2412                                INFOPLIST_PREFIX_HEADER = "$(SRCROOT)/libtransmission/version.h";
     2413                                INFOPLIST_PREPROCESS = YES;
    24022414                                MACOSX_DEPLOYMENT_TARGET = 10.4;
    24032415                                OTHER_LDFLAGS = "";
  • trunk/macosx/version.sh

    r6783 r6890  
    1111USERAGENT_PREFIX="1.34+"
    1212
    13 
    1413SVN_REVISION=`find ./macosx ./libtransmission -name "*\.[chmp]" -o -name "*\.cpp" -o -name "*\.po" -o -name "*\.sh" | \
    1514              xargs grep "\$Id:" | \
    1615              grep -v third-party | \
    1716              cut -d"$Id:" -f3 | cut -d" " -f3 | sort -n | tail -n 1`
    18 
    19 if [[ "x${PEERID_PREFIX//0-/}" != "x$PEERID_PREFIX" ]]
    20 then
    21     STABLE_RELEASE=yes
    22 else
    23     STABLE_RELEASE=no
    24 fi
    2517 
    2618# Generate files to be included: only overwrite them if changed so make
     
    3527}
    3628
    37 # Generate version.mk
    38 cat > macosx/version.mk.new << EOF
    39 VERSION_REVISION    = "$SVN_REVISION"
    40 VERSION_STRING      = "$USERAGENT_PREFIX ($SVN_REVISION)"
    41 STABLE_RELEASE      = "$STABLE_RELEASE"
    42 EOF
    43 replace_if_differs macosx/version.mk.new macosx/version.mk
    44 
    4529# Generate version.h
    4630cat > libtransmission/version.h.new << EOF
    47 #define PEERID_PREFIX         "$PEERID_PREFIX"
    48 #define USERAGENT_PREFIX      "$USERAGENT_PREFIX"
    49 #define SVN_REVISION          "$SVN_REVISION"
    50 #define SHORT_VERSION_STRING  "$USERAGENT_PREFIX"
    51 #define LONG_VERSION_STRING   "$USERAGENT_PREFIX ($SVN_REVISION)"
     31#define PEERID_PREFIX             "$PEERID_PREFIX"
     32#define USERAGENT_PREFIX          "$USERAGENT_PREFIX"
     33#define SVN_REVISION              "$SVN_REVISION"
     34#define SHORT_VERSION_STRING      "$USERAGENT_PREFIX"
     35#define LONG_VERSION_STRING       "$USERAGENT_PREFIX ($SVN_REVISION)"
     36
     37#define VERSION_STRING_INFOPLIST  $USERAGENT_PREFIX
     38#define BUNDLE_VERSION_INFOPLIST  $SVN_REVISION
    5239EOF
    5340replace_if_differs libtransmission/version.h.new libtransmission/version.h
    5441
    55 # Generate Info.plist from Info.plist.in
    56 sed -e "s/%%BUNDLE_VERSION%%/$SVN_REVISION/" -e "s/%%SHORT_VERSION_STRING%%/$USERAGENT_PREFIX/" \
    57         < macosx/Info.plist.in > macosx/Info.plist.new
    58 replace_if_differs macosx/Info.plist.new macosx/Info.plist
    59 
    6042exit 0
Note: See TracChangeset for help on using the changeset viewer.