diff --git a/desmume/src/cocoa/DeSmuME (Legacy).xcodeproj/project.pbxproj b/desmume/src/cocoa/DeSmuME (Legacy).xcodeproj/project.pbxproj index 9ba7bf300..195d2a210 100644 --- a/desmume/src/cocoa/DeSmuME (Legacy).xcodeproj/project.pbxproj +++ b/desmume/src/cocoa/DeSmuME (Legacy).xcodeproj/project.pbxproj @@ -2736,7 +2736,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/../../\"\nREV=`svnversion -n`\nprintf \"// REVISION TRACKING\\n\\\n// This file is auto-generated.\\n\\\n// Do not commit this file to the code repository!\\n\\\n#define SVN_REV $REV\\n\\\n#define SVN_REV_STR \\\"$REV\\\"\\n\" > ./src/svnrev.h"; + shellScript = "cd \"${SRCROOT}\"\nsh \"svnrev.sh\""; }; ABE76A9B15E090C100F458AE /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2750,7 +2750,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/../../\"\nREV=`svnversion -n`\nprintf \"// REVISION TRACKING\\n\\\n// This file is auto-generated.\\n\\\n// Do not commit this file to the code repository!\\n\\\n#define SVN_REV $REV\\n\\\n#define SVN_REV_STR \\\"$REV\\\"\\n\" > ./src/svnrev.h"; + shellScript = "cd \"${SRCROOT}\"\nsh \"svnrev.sh\""; }; ABE76A9D15E090CE00F458AE /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2764,7 +2764,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/../../\"\nREV=`svnversion -n`\nprintf \"// REVISION TRACKING\\n\\\n// This file is auto-generated.\\n\\\n// Do not commit this file to the code repository!\\n\\\n#define SVN_REV $REV\\n\\\n#define SVN_REV_STR \\\"$REV\\\"\\n\" > ./src/svnrev.h"; + shellScript = "cd \"${SRCROOT}\"\nsh \"svnrev.sh\""; }; ABE76A9F15E090E500F458AE /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2778,7 +2778,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/../../\"\nREV=`svnversion -n`\nprintf \"// REVISION TRACKING\\n\\\n// This file is auto-generated.\\n\\\n// Do not commit this file to the code repository!\\n\\\n#define SVN_REV $REV\\n\\\n#define SVN_REV_STR \\\"$REV\\\"\\n\" > ./src/svnrev.h"; + shellScript = "cd \"${SRCROOT}\"\nsh \"svnrev.sh\""; }; ABE76AA115E090FA00F458AE /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2792,7 +2792,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/../../\"\nREV=`svnversion -n`\nprintf \"// REVISION TRACKING\\n\\\n// This file is auto-generated.\\n\\\n// Do not commit this file to the code repository!\\n\\\n#define SVN_REV $REV\\n\\\n#define SVN_REV_STR \\\"$REV\\\"\\n\" > ./src/svnrev.h"; + shellScript = "cd \"${SRCROOT}\"\nsh \"svnrev.sh\""; }; ABE76AA315E0910700F458AE /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2806,7 +2806,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/../../\"\nREV=`svnversion -n`\nprintf \"// REVISION TRACKING\\n\\\n// This file is auto-generated.\\n\\\n// Do not commit this file to the code repository!\\n\\\n#define SVN_REV $REV\\n\\\n#define SVN_REV_STR \\\"$REV\\\"\\n\" > ./src/svnrev.h"; + shellScript = "cd \"${SRCROOT}\"\nsh \"svnrev.sh\""; }; ABE76AA515E0911E00F458AE /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2820,7 +2820,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/../../\"\nREV=`svnversion -n`\nprintf \"// REVISION TRACKING\\n\\\n// This file is auto-generated.\\n\\\n// Do not commit this file to the code repository!\\n\\\n#define SVN_REV $REV\\n\\\n#define SVN_REV_STR \\\"$REV\\\"\\n\" > ./src/svnrev.h"; + shellScript = "cd \"${SRCROOT}\"\nsh \"svnrev.sh\""; }; /* End PBXShellScriptBuildPhase section */ diff --git a/desmume/src/cocoa/DeSmuME (XCode 3).xcodeproj/project.pbxproj b/desmume/src/cocoa/DeSmuME (XCode 3).xcodeproj/project.pbxproj index 166d27859..69b945351 100644 --- a/desmume/src/cocoa/DeSmuME (XCode 3).xcodeproj/project.pbxproj +++ b/desmume/src/cocoa/DeSmuME (XCode 3).xcodeproj/project.pbxproj @@ -2884,7 +2884,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/../../\"\nREV=`svnversion -n`\nprintf \"// REVISION TRACKING\\n\\\n// This file is auto-generated.\\n\\\n// Do not commit this file to the code repository!\\n\\\n#define SVN_REV $REV\\n\\\n#define SVN_REV_STR \\\"$REV\\\"\\n\" > ./src/svnrev.h"; + shellScript = "cd \"${SRCROOT}\"\nsh \"svnrev.sh\""; }; AB2F3B7B15CF9C6000858373 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2958,7 +2958,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/../../\"\nREV=`svnversion -n`\nprintf \"// REVISION TRACKING\\n\\\n// This file is auto-generated.\\n\\\n// Do not commit this file to the code repository!\\n\\\n#define SVN_REV $REV\\n\\\n#define SVN_REV_STR \\\"$REV\\\"\\n\" > ./src/svnrev.h"; + shellScript = "cd \"${SRCROOT}\"\nsh \"svnrev.sh\""; }; ABE76A7C15E0902700F458AE /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2972,7 +2972,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/../../\"\nREV=`svnversion -n`\nprintf \"// REVISION TRACKING\\n\\\n// This file is auto-generated.\\n\\\n// Do not commit this file to the code repository!\\n\\\n#define SVN_REV $REV\\n\\\n#define SVN_REV_STR \\\"$REV\\\"\\n\" > ./src/svnrev.h"; + shellScript = "cd \"${SRCROOT}\"\nsh \"svnrev.sh\""; }; ABE76A7E15E0903E00F458AE /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2986,7 +2986,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/../../\"\nREV=`svnversion -n`\nprintf \"// REVISION TRACKING\\n\\\n// This file is auto-generated.\\n\\\n// Do not commit this file to the code repository!\\n\\\n#define SVN_REV $REV\\n\\\n#define SVN_REV_STR \\\"$REV\\\"\\n\" > ./src/svnrev.h"; + shellScript = "cd \"${SRCROOT}\"\nsh \"svnrev.sh\""; }; ABE76A8015E0904E00F458AE /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -3000,7 +3000,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/../../\"\nREV=`svnversion -n`\nprintf \"// REVISION TRACKING\\n\\\n// This file is auto-generated.\\n\\\n// Do not commit this file to the code repository!\\n\\\n#define SVN_REV $REV\\n\\\n#define SVN_REV_STR \\\"$REV\\\"\\n\" > ./src/svnrev.h"; + shellScript = "cd \"${SRCROOT}\"\nsh \"svnrev.sh\""; }; /* End PBXShellScriptBuildPhase section */ diff --git a/desmume/src/cocoa/DeSmuME (XCode 4).xcodeproj/project.pbxproj b/desmume/src/cocoa/DeSmuME (XCode 4).xcodeproj/project.pbxproj index 341b92a27..123d4f34e 100644 --- a/desmume/src/cocoa/DeSmuME (XCode 4).xcodeproj/project.pbxproj +++ b/desmume/src/cocoa/DeSmuME (XCode 4).xcodeproj/project.pbxproj @@ -2126,7 +2126,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/../../\"\nREV=`svnversion -n`\nprintf \"// REVISION TRACKING\\n\\\n// This file is auto-generated.\\n\\\n// Do not commit this file to the code repository!\\n\\\n#define SVN_REV $REV\\n\\\n#define SVN_REV_STR \\\"$REV\\\"\\n\" > ./src/svnrev.h"; + shellScript = "cd \"${SRCROOT}\"\nsh \"svnrev.sh\""; }; AB2DF23415E0838600B4D0BC /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2140,7 +2140,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/../../\"\nREV=`svnversion -n`\nprintf \"// REVISION TRACKING\\n\\\n// This file is auto-generated.\\n\\\n// Do not commit this file to the code repository!\\n\\\n#define SVN_REV $REV\\n\\\n#define SVN_REV_STR \\\"$REV\\\"\\n\" > ./src/svnrev.h"; + shellScript = "cd \"${SRCROOT}\"\nsh \"svnrev.sh\""; }; AB2DF23515E0839D00B4D0BC /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2154,7 +2154,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/../../\"\nREV=`svnversion -n`\nprintf \"// REVISION TRACKING\\n\\\n// This file is auto-generated.\\n\\\n// Do not commit this file to the code repository!\\n\\\n#define SVN_REV $REV\\n\\\n#define SVN_REV_STR \\\"$REV\\\"\\n\" > ./src/svnrev.h"; + shellScript = "cd \"${SRCROOT}\"\nsh \"svnrev.sh\""; }; AB75221714C79884009B97B3 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; diff --git a/desmume/src/cocoa/DeSmuME (Xcode 5).xcodeproj/project.pbxproj b/desmume/src/cocoa/DeSmuME (Xcode 5).xcodeproj/project.pbxproj index adc6b21be..f5d7e44d6 100644 --- a/desmume/src/cocoa/DeSmuME (Xcode 5).xcodeproj/project.pbxproj +++ b/desmume/src/cocoa/DeSmuME (Xcode 5).xcodeproj/project.pbxproj @@ -2126,7 +2126,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/../../\"\nREV=`svnversion -n`\nprintf \"// REVISION TRACKING\\n\\\n// This file is auto-generated.\\n\\\n// Do not commit this file to the code repository!\\n\\\n#define SVN_REV $REV\\n\\\n#define SVN_REV_STR \\\"$REV\\\"\\n\" > ./src/svnrev.h"; + shellScript = "cd \"${SRCROOT}\"\nsh \"svnrev.sh\""; }; AB2DF23415E0838600B4D0BC /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2140,7 +2140,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/../../\"\nREV=`svnversion -n`\nprintf \"// REVISION TRACKING\\n\\\n// This file is auto-generated.\\n\\\n// Do not commit this file to the code repository!\\n\\\n#define SVN_REV $REV\\n\\\n#define SVN_REV_STR \\\"$REV\\\"\\n\" > ./src/svnrev.h"; + shellScript = "cd \"${SRCROOT}\"\nsh \"svnrev.sh\""; }; AB2DF23515E0839D00B4D0BC /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2154,7 +2154,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/../../\"\nREV=`svnversion -n`\nprintf \"// REVISION TRACKING\\n\\\n// This file is auto-generated.\\n\\\n// Do not commit this file to the code repository!\\n\\\n#define SVN_REV $REV\\n\\\n#define SVN_REV_STR \\\"$REV\\\"\\n\" > ./src/svnrev.h"; + shellScript = "cd \"${SRCROOT}\"\nsh \"svnrev.sh\""; }; AB75221714C79884009B97B3 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; diff --git a/desmume/src/cocoa/svnrev.sh b/desmume/src/cocoa/svnrev.sh new file mode 100644 index 000000000..30c007a01 --- /dev/null +++ b/desmume/src/cocoa/svnrev.sh @@ -0,0 +1,27 @@ +# Copyright (C) 2013 DeSmuME team +# +# This file is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the this software. If not, see . + +cd "${SRCROOT}/../../" + +REV=`svnversion -n | sed -e 's/[[:alpha:]]//g' -e 's/^[[:digit:]]*://'` +if test "$REV" == "" ; then + REV="0" +fi + +printf "// REVISION TRACKING\n\ +// This file is auto-generated.\n\ +// Do not commit this file to the code repository!\n\ +#define SVN_REV $REV\n\ +#define SVN_REV_STR \"$REV\"\n" > ./src/svnrev.h \ No newline at end of file