aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xScripts/build.sh38
-rw-r--r--sequel-pro.xcodeproj/project.pbxproj4
2 files changed, 41 insertions, 1 deletions
diff --git a/Scripts/build.sh b/Scripts/build.sh
new file mode 100755
index 00000000..80fef06f
--- /dev/null
+++ b/Scripts/build.sh
@@ -0,0 +1,38 @@
+#! /bin/ksh
+
+## $Id$
+##
+## Author: Stuart Connolly (stuconnolly.com)
+## Copyright (c) 2009 Stuart Connolly. All rights reserved.
+##
+## Paramters: <none>
+##
+## Description: Generic Sequel Pro build script. This script is intended to replace entering lots of code
+## into Xcode's 'Run Scripts' build phase to make it easier to work with. As such this script
+## can only be run by Xcode.
+
+# Add the build/bundle version
+"${SRCROOT}/Scripts/build-version.pl"
+
+# Trim the application if this is a 'Release' or 'Distribution' build
+if [[ "$CONFIGURATION" == 'Release' || "$CONFIGURATION" == 'Distribution' ]]
+then
+ "${SRCROOT}/Scripts/trim-application.sh" -p "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}" -a
+fi
+
+# Perform distribution specific tasks if this is a 'Distribution' build
+if [ "$CONFIGURATION" == 'Distribution' ]
+then
+ "${SRCROOT}/Scripts/package-application.sh" -p "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}"
+fi
+
+# Development build code signing
+if [ "$CONFIGURATION" == 'Debug' ]
+then
+ codesign -s 'Sequel Pro Development' "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}" 2> /dev/null
+
+ # Run a fake command to silence errors
+ touch "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}"
+fi
+
+exit 0
diff --git a/sequel-pro.xcodeproj/project.pbxproj b/sequel-pro.xcodeproj/project.pbxproj
index e19ea483..6fe3c131 100644
--- a/sequel-pro.xcodeproj/project.pbxproj
+++ b/sequel-pro.xcodeproj/project.pbxproj
@@ -339,6 +339,7 @@
1703EF3F0F0B0742005BBE7E /* syntax.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = syntax.html; sourceTree = "<group>"; };
1703EF400F0B0742005BBE7E /* tables.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = tables.html; sourceTree = "<group>"; };
17128B8A0FE6E0210035DD75 /* QLPreviewPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QLPreviewPanel.h; sourceTree = "<group>"; };
+ 1713122F109C7DF600FB465F /* build.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = build.sh; sourceTree = "<group>"; };
17292441107AC41000B21980 /* SPXMLExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPXMLExporter.h; sourceTree = "<group>"; };
17292442107AC41000B21980 /* SPXMLExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPXMLExporter.m; sourceTree = "<group>"; };
172A650F0F7BED7A001E861A /* SPConsoleMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPConsoleMessage.h; sourceTree = "<group>"; };
@@ -892,6 +893,7 @@
1761FD9C0EF0486A00331368 /* Scripts */ = {
isa = PBXGroup;
children = (
+ 1713122F109C7DF600FB465F /* build.sh */,
1761FD9D0EF0488900331368 /* build-version.pl */,
178934980F30CDA10097539A /* trim-application.sh */,
17B7B698101611C800F057DE /* build-mysql-client.sh */,
@@ -1664,7 +1666,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# Add build/bundle version\n\"${SRCROOT}/Scripts/build-version.pl\"\n\n# Trim application if release or dist build\nif test \"$CONFIGURATION\" == 'Release' || test \"$CONFIGURATION\" == 'Distribution'\nthen\n\t\"${SRCROOT}/Scripts/trim-application.sh\" -p \"${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}\" -a\nfi\n\n# Perform distribution tasks on a dist build\nif [ \"$CONFIGURATION\" == 'Distribution' ]\nthen\n\t\"${SRCROOT}/Scripts/package-application.sh\" -p \"${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}\"\nfi\n\n# Development code signing\nif [ \"$CONFIGURATION\" == 'Debug' ]\nthen\n\tcodesign -s \"Sequel Pro Development\" \"${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}\" 2>/dev/null\n\t# Run a fake command to silence errors\n\ttouch \"${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}\"\nfi\n";
+ shellScript = "# Run build tasks\n\"${SRCROOT}/Scripts/build.sh\"\n";
};
380F4ED70FC0B50500B0BFD7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;