Tuukka Norri avatar Tuukka Norri committed 92bad4f

Version numbers will now be set automatically (fixes #206)
- The bundle version number will be the BaseTen version.
- The short version number will be the SVN revision.
- Also fixed iPhone SDK names.

Comments (0)

Files changed (12)

BaseTen.xcodeproj/project.pbxproj

 				535443EE0D634A47002A6C47 /* Sources */,
 				535444080D634A47002A6C47 /* Frameworks */,
 				5354440E0D634A47002A6C47 /* Set icon */,
+				53CA7BC411903F9100DDBD5B /* Set version numbers */,
 			);
 			buildRules = (
 				53F5B8170E32B97C000F527B /* PBXBuildRule */,
 			shellScript = "cd \"$SRCDIR\"\nsource Tools/run_doxygen.sh";
 			showEnvVarsInLog = 0;
 		};
+		53CA7BC411903F9100DDBD5B /* Set version numbers */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Set version numbers";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "source Tools/set-version-numbers.sh";
+			showEnvVarsInLog = 0;
+		};
 		53ED0E6310355F94000CFECF /* Copy PostgreSQL Headers */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
 				PRIVATE_HEADERS_FOLDER_PATH = BaseTen;
 				PRODUCT_NAME = BaseTen;
 				PUBLIC_HEADERS_FOLDER_PATH = BaseTen;
-				SDKROOT = iphoneos2.0;
+				SDKROOT = iphoneos3.2;
 				WARNING_CFLAGS = "-Wall";
 			};
 			name = Debug;
 				PRIVATE_HEADERS_FOLDER_PATH = BaseTen;
 				PRODUCT_NAME = BaseTen;
 				PUBLIC_HEADERS_FOLDER_PATH = BaseTen;
-				SDKROOT = iphoneos2.0;
+				SDKROOT = iphoneos3.2;
 				WARNING_CFLAGS = "-Wall";
 				ZERO_LINK = NO;
 			};
 				GCC_DYNAMIC_NO_PIC = NO;
 				GCC_OPTIMIZATION_LEVEL = 0;
 				PRODUCT_NAME = "PostgreSQL-arm";
-				SDKROOT = iphoneos2.0;
+				SDKROOT = iphoneos3.2;
 			};
 			name = Debug;
 		};
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				GCC_ENABLE_FIX_AND_CONTINUE = NO;
 				PRODUCT_NAME = "PostgreSQL-arm";
-				SDKROOT = iphoneos2.0;
+				SDKROOT = iphoneos3.2;
 				ZERO_LINK = NO;
 			};
 			name = Release;
 				PRIVATE_HEADERS_FOLDER_PATH = BaseTen;
 				PRODUCT_NAME = BaseTen;
 				PUBLIC_HEADERS_FOLDER_PATH = BaseTen;
-				SDKROOT = iphoneos2.0;
+				SDKROOT = iphoneos3.2;
 				WARNING_CFLAGS = "-Wall";
 			};
 			name = Coverage;
 				GCC_DYNAMIC_NO_PIC = NO;
 				GCC_OPTIMIZATION_LEVEL = 0;
 				PRODUCT_NAME = "PostgreSQL-arm";
-				SDKROOT = iphoneos2.0;
+				SDKROOT = iphoneos3.2;
 			};
 			name = Coverage;
 		};

BaseTenAppKit/BaseTenAppKit.xcodeproj/project.pbxproj

 				535444710D634D9C002A6C47 /* Sources */,
 				5354447F0D634D9C002A6C47 /* Frameworks */,
 				535444830D634D9C002A6C47 /* Set icon */,
+				53CA7BD61190404A00DDBD5B /* Set version numbers */,
 			);
 			buildRules = (
 			);
 			shellScript = "ICON_FOLDER_PATH=\"$PROJECT_DIR\"/../Resources/BaseTenFrameworkIcon\n\nif [ ! -e \"$ICON_FOLDER_PATH\" ]\nthen\n\tditto -xk \"$PROJECT_DIR\"/../Resources/BaseTenFrameworkIcon.zip \"$ICON_FOLDER_PATH\" \"$PROJECT_DIR\"/../Resources/\nfi\nsh \"$PROJECT_DIR\"/../Tools/set_icon.sh \"$ICON_FOLDER_PATH\" \"$TARGET_BUILD_DIR\"/\"$WRAPPER_NAME\"\n";
 			showEnvVarsInLog = 0;
 		};
+		53CA7BD61190404A00DDBD5B /* Set version numbers */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Set version numbers";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "pushd ..\nsource Tools/set-version-numbers.sh";
+			showEnvVarsInLog = 0;
+		};
 /* End PBXShellScriptBuildPhase section */
 
 /* Begin PBXSourcesBuildPhase section */
Add a comment to this file

BaseTenAppKit/English.lproj/InfoPlist.strings

Binary file modified.

BaseTenAppKit/Info.plist

 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
 	<key>CFBundleDevelopmentRegion</key>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>1.0</string>
+	<string>1</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1</string>
 	<key>NSPrincipalClass</key>
 	<string></string>
 </dict>

BaseTenAssistant/BaseTenAssistant.xcodeproj/project.pbxproj

 				53341E910F6A6C9700EA666F /* Index help */,
 				8D11072C0486CEB800E47090 /* Sources */,
 				8D11072E0486CEB800E47090 /* Frameworks */,
+				53CA7B681190391800DDBD5B /* Set version numbers */,
 			);
 			buildRules = (
 				531C01780E32AF7900E43208 /* PBXBuildRule */,
 			shellScript = "source \"$SRCROOT/../Tools/index-assistant-help.sh\"";
 			showEnvVarsInLog = 0;
 		};
+		53CA7B681190391800DDBD5B /* Set version numbers */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Set version numbers";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "pushd ..\nsource Tools/set-version-numbers.sh";
+			showEnvVarsInLog = 0;
+		};
 		53F83767107A85F20017FB36 /* Copy Dependencies */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
Add a comment to this file

BaseTenAssistant/English.lproj/InfoPlist.strings

Binary file modified.

BaseTenAssistant/Info.plist

 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>1.0</string>
+	<string>1</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1</string>
 	<key>NSMainNibFile</key>
 	<string>MainMenu</string>
 	<key>NSPrincipalClass</key>
Add a comment to this file

InterfaceBuilderPlugin/English.lproj/InfoPlist.strings

Binary file modified.

InterfaceBuilderPlugin/InterfaceBuilderPlugin.xcodeproj/project.pbxproj

 				8D1AC96E0486D14A00FE50C9 /* Frameworks */,
 				53C8C30A0CEDD31000676C98 /* Run install_name_tool */,
 				53C8C30C0CEDD34500676C98 /* Set plug-in icon */,
+				53CA7BE21190409800DDBD5B /* Set version numbers */,
 			);
 			buildRules = (
 			);
 			shellScript = "#\n# Copies items from per project build directories (if they exist) to this project's build directory,\n# so they can be copied by other build phases.\n#\n\nBASE_TEN_FRAMEWORK=\"$PROJECT_DIR/../build/$BUILD_STYLE/BaseTen.framework\"\n\nif [ -e \"$BASE_TEN_FRAMEWORK\" ] && [ \"$BASE_TEN_FRAMEWORK\" -nt \"$BUILT_PRODUCTS_DIR/BaseTen.framework\" ]\nthen\n\trm -rf \"$BUILT_PRODUCTS_DIR/BaseTen.framework\"\n\tcp -pfR \"$BASE_TEN_FRAMEWORK\" \"$BUILT_PRODUCTS_DIR\"\nfi\n\n\nBASE_TEN_APPKIT_FRAMEWORK=\"$PROJECT_DIR/../BaseTenAppKit/build/$BUILD_STYLE/BaseTenAppKit.framework\"\n\nif [ -e \"$BASE_TEN_APPKIT_FRAMEWORK\" ] && [ \"$BASE_TEN_APPKIT_FRAMEWORK\" -nt \"$BUILT_PRODUCTS_DIR/BaseTenAppKit.framework\" ]\nthen\n\trm -rf \"$BUILT_PRODUCTS_DIR/BaseTenAppKit.framework\"\n\tcp -pfR \"$BASE_TEN_APPKIT_FRAMEWORK\" \"$BUILT_PRODUCTS_DIR\"\nfi\n\n\n";
 			showEnvVarsInLog = 0;
 		};
+		53CA7BE21190409800DDBD5B /* Set version numbers */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Set version numbers";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "pushd ..\nsource Tools/set-version-numbers.sh";
+			showEnvVarsInLog = 0;
+		};
 /* End PBXShellScriptBuildPhase section */
 
 /* Begin PBXSourcesBuildPhase section */
Add a comment to this file

Resources/English.lproj/InfoPlist.strings

Binary file modified.

Resources/Info.plist

 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
 	<key>CFBundleDevelopmentRegion</key>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>1.0</string>
+	<string>1</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1</string>
 	<key>NSPrincipalClass</key>
 	<string></string>
 </dict>

Tools/set-version-numbers.sh

+source Tools/defines.sh
+
+REV=`/usr/bin/svnversion -nc ${PROJECT_DIR} | /usr/bin/sed -e 's/^[^:]*://;s/[A-Za-z]//'`
+/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${REV}" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
+/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${baseten_version}" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.