aboutsummaryrefslogtreecommitdiffstats
path: root/Scripts
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-10-14 18:13:44 +0000
committerstuconnolly <stuart02@gmail.com>2010-10-14 18:13:44 +0000
commitc3fbbd781e061210637df6781ed10896e90485d2 (patch)
tree1507bba8f606c2fc47e52256d4d81ad1526754f8 /Scripts
parent890022a6a462a2e7792379e316fa3866e737ff5c (diff)
downloadsequelpro-c3fbbd781e061210637df6781ed10896e90485d2.tar.gz
sequelpro-c3fbbd781e061210637df6781ed10896e90485d2.tar.bz2
sequelpro-c3fbbd781e061210637df6781ed10896e90485d2.zip
Tidy up build settings, by ensuring they are consistent across all targets, specifically the compiler used. Also add a very basic Makefile to ease builds from the command line during build testing.
Diffstat (limited to 'Scripts')
-rwxr-xr-xScripts/build.sh40
-rwxr-xr-xScripts/localize.sh56
2 files changed, 57 insertions, 39 deletions
diff --git a/Scripts/build.sh b/Scripts/build.sh
index 88641238..149705cb 100755
--- a/Scripts/build.sh
+++ b/Scripts/build.sh
@@ -13,7 +13,6 @@
BUILD_PRODUCT="${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}"
-
echo 'Updating build version...'
# Add the build/bundle version
@@ -25,44 +24,7 @@ rm -rf "${BUILD_PRODUCT}/Contents/Frameworks/BWToolkitFramework.framework/Versio
# Perform localisation updates for 'Release' or 'Distribution' builds
if [[ "$CONFIGURATION" == 'Release' || "$CONFIGURATION" == 'Distribution' ]]
then
-
- echo "Running genstrings to update 'Localizable.strings'..."
-
- # Update 'Localizable.strings' by running genstrings(1)
- GENSTRINGS_ERRORS=$(genstrings -o "${SRCROOT}/Resources/English.lproj" "${SRCROOT}/Source/"*.m)
-
- # Check for genstrings errors
- if [[ ${GENSTRINGS_ERRORS} -ne 0 ]]
- then
- echo "error: genstrings exited with error: ${GENSTRINGS_ERRORS}"
- fi
-
- echo "Updating nib and xib localisations..."
-
- # Generate up-to-date nib .strings files for localisation
- find "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"/**/*.nib | while read nibFile
- do
- stringsFilePath="${SOURCE_ROOT}/Resources/English.lproj/`basename "${nibFile}" .nib`.strings"
- xibFile=`basename "${nibFile}" .nib`.xib
- xibFilePath=`echo "${SOURCE_ROOT}"/Interfaces/**/"${xibFile}"`
- if [[ -e ${xibFilePath} ]]
- then
- xibfileModDate=`stat -f "%m" "${xibFilePath}"`
- if [[ -e ${stringsFilePath} ]]
- then
- stringsFileModDate=`stat -f "%m" "${stringsFilePath}"`
- else
- stringsFileModDate=0
- fi
- if [[ ${xibfileModDate} -gt ${stringsFileModDate} ]]
- then
- printf "\tLocalising ${xibFile}...\n";
- ibtool --generate-stringsfile "${stringsFilePath}~" "${xibFilePath}"
- "${BUILT_PRODUCTS_DIR}"/xibLocalizationPostprocessor "${stringsFilePath}~" "${stringsFilePath}"
- rm "${stringsFilePath}~"
- fi
- fi
- done
+ "${SRCROOT}/Scripts/localize.sh"
fi
# Trim the application if this is a 'Release' or 'Distribution' build
diff --git a/Scripts/localize.sh b/Scripts/localize.sh
new file mode 100755
index 00000000..911cf8ea
--- /dev/null
+++ b/Scripts/localize.sh
@@ -0,0 +1,56 @@
+#! /bin/ksh
+
+## $Id$
+##
+## Author: Created by Rowan Beentje.
+## Copyright (c) 2010 Sequel Pro Team. All rights reserved.
+##
+## Paramters: <none>
+##
+## Description: Localizes all of the application's NIB files. This script should only be run by Xcode.
+
+echo "Running genstrings to update 'Localizable.strings'..."
+
+# Update 'Localizable.strings' by running genstrings(1)
+GENSTRINGS_ERRORS=$(genstrings -o "${SRCROOT}/Resources/English.lproj" "${SRCROOT}/Source/"*.m)
+
+# Check for genstrings errors
+if [[ ${GENSTRINGS_ERRORS} -ne 0 ]]
+then
+ echo "error: genstrings exited with error: ${GENSTRINGS_ERRORS}"
+fi
+
+echo "Updating nib and xib localisations..."
+
+# Generate up-to-date nib .strings files for localisation
+find "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"/**/*.nib | while read nibFile
+do
+ stringsFilePath="${SOURCE_ROOT}/Resources/English.lproj/`basename "${nibFile}" .nib`.strings"
+ xibFile=`basename "${nibFile}" .nib`.xib
+ xibFilePath=`echo "${SOURCE_ROOT}"/Interfaces/**/"${xibFile}"`
+
+ if [[ -e ${xibFilePath} ]]
+ then
+ xibfileModDate=`stat -f "%m" "${xibFilePath}"`
+
+ if [[ -e ${stringsFilePath} ]]
+ then
+ stringsFileModDate=`stat -f "%m" "${stringsFilePath}"`
+ else
+ stringsFileModDate=0
+ fi
+
+ if [[ ${xibfileModDate} -gt ${stringsFileModDate} ]]
+ then
+ printf "\tLocalising ${xibFile}...\n";
+
+ ibtool --generate-stringsfile "${stringsFilePath}~" "${xibFilePath}"
+
+ "${BUILT_PRODUCTS_DIR}"/xibLocalizationPostprocessor "${stringsFilePath}~" "${stringsFilePath}"
+
+ rm "${stringsFilePath}~"
+ fi
+ fi
+done
+
+exit 0