Changeset 8785


Ignore:
Timestamp:
Jul 7, 2009, 12:32:40 AM (13 years ago)
Author:
livings124
Message:

the Mac build will now use the standard update version script

Location:
trunk
Files:
1 deleted
2 edited

Legend:

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

    r8696 r8785  
    18251825                        runOnlyForDeploymentPostprocessing = 0;
    18261826                        shellPath = /bin/sh;
    1827                         shellScript = "sh macosx/version.sh";
     1827                        shellScript = "sh update-version-h.sh";
    18281828                };
    18291829                BE75C3510C729EE100DBEFE0 /* ShellScript */ = {
  • trunk/update-version-h.sh

    r8631 r8785  
    11#!/bin/sh
     2# Generate files to be included: only overwrite them if changed so make
     3# won't rebuild everything unless necessary
     4replace_if_differs ()
     5{
     6    if cmp $1 $2 > /dev/null 2>&1; then
     7      rm -f $1
     8    else
     9      mv -f $1 $2
     10    fi
     11}
     12
    213echo "creating libtransmission/version.h"
    314
     
    617peer_id_prefix=`grep m4_define configure.ac | sed "s/[][)(]/,/g" | grep peer_id_prefix  | cut -d , -f 6`
    718
    8 if [ -d .svn ]; then
    9     svn_revision=`svnversion -n | cut -d: -f1 | cut -dM -f1 | cut -dS -f1`
     19
     20# If this is a svn tree, and svnversion is available in PATH, use it to
     21# grab the version.
     22if [ -d ".svn" ] && type svnversion >/dev/null 2>&1; then
     23    svn_revision=`svnversion -n . | cut -d: -f1 | cut -dM -f1 | cut -dS -f1`
    1024else
    11     svn_revision=`awk '/\\$Id: /{ if ($4>i) i=$4 } END {print i}' */*.cc */*.[chm]`
     25    # Give up and check the source files
     26    svn_revision=`awk '/\\$Id: /{ if ($4>i) i=$4 } END {print i}' */*.cc */*.[chm] */*.po`
    1227fi
    1328
    14 cat > libtransmission/version.h << EOF
     29cat > libtransmission/version.h.new << EOF
    1530#define PEERID_PREFIX         "${peer_id_prefix}"
    1631#define USERAGENT_PREFIX      "${user_agent_prefix}"
     
    1934#define SHORT_VERSION_STRING  "${user_agent_prefix}"
    2035#define LONG_VERSION_STRING   "${user_agent_prefix} (${svn_revision})"
     36#define VERSION_STRING_INFOPLIST  ${user_agent_prefix}
    2137EOF
     38
     39# Add a release definition
     40case "${peer_id_prefix}" in
     41    *X-) echo '#define TR_BETA_RELEASE       "BETA"' ;;
     42    *Z-) echo '#define TR_NIGHTLY_RELEASE    "NIGHTLY"' ;;
     43    *)   echo '#define TR_STABLE_RELEASE     "STABLE"' ;;
     44esac >> "libtransmission/version.h.new"
     45
     46replace_if_differs libtransmission/version.h.new libtransmission/version.h
Note: See TracChangeset for help on using the changeset viewer.