Commit 2ee0eb79 authored by Claudio Valerio's avatar Claudio Valerio

Mac Os X : Defined variable for conditional build

parent 7cd7af2d
...@@ -136,8 +136,12 @@ $LRELEASE "$APPLICATION_NAME.pro" ...@@ -136,8 +136,12 @@ $LRELEASE "$APPLICATION_NAME.pro"
# generate Makefiles # generate Makefiles
notify "Generating Makefile ..." notify "Generating Makefile ..."
QMAKE_CMD="$QMAKE $APPLICATION_NAME.pro -spec macx-g++"
if [ "$1" == "1010" ]; then
QMAKE_CMD="$QMAKE \"DEFINES+=OS_NEWER_THAN_OR_EQUAL_TO_1010\" $APPLICATION_NAME.pro -spec macx-g++"
else
QMAKE_CMD="$QMAKE $APPLICATION_NAME.pro -spec macx-g++"
fi
$QMAKE_CMD $QMAKE_CMD
# build # build
...@@ -169,8 +173,8 @@ if [ $? != 0 ]; then ...@@ -169,8 +173,8 @@ if [ $? != 0 ]; then
abort "compilation failed" abort "compilation failed"
fi fi
DMG="$APPLICATION_NAME.dmg" DMG="$APPLICATION_NAME.dmg"
VOLUME="/Volumes/$APPLICATION_NAME" VOLUME="/Volumes/$APPLICATION_NAME"
APP="$PRODUCT_DIR/$APPLICATION_NAME.app" APP="$PRODUCT_DIR/$APPLICATION_NAME.app"
DSYM_NAME="$APPLICATION_NAME (r$SVN_REVISION).dSYM" DSYM_NAME="$APPLICATION_NAME (r$SVN_REVISION).dSYM"
...@@ -232,7 +236,6 @@ $DMGUTIL --set --iconsize=96 --toolbar=false --icon=resources/macx/OpenBoard.icn ...@@ -232,7 +236,6 @@ $DMGUTIL --set --iconsize=96 --toolbar=false --icon=resources/macx/OpenBoard.icn
$DMGUTIL --set --x=20 --y=60 --width=580 --height=440 "$VOLUME" $DMGUTIL --set --x=20 --y=60 --width=580 --height=440 "$VOLUME"
$DMGUTIL --set --x=180 --y=120 "$VOLUME/`basename \"$APP\"`" $DMGUTIL --set --x=180 --y=120 "$VOLUME/`basename \"$APP\"`"
$DMGUTIL --set --x=400 --y=120 "$VOLUME/Applications" $DMGUTIL --set --x=400 --y=120 "$VOLUME/Applications"
#$DMGUTIL --set --x=180 --y=280 "$VOLUME/ReleaseNotes.pdf"
$DMGUTIL --close --volume="$APPLICATION_NAME" "$DMG" $DMGUTIL --close --volume="$APPLICATION_NAME" "$DMG"
...@@ -244,7 +247,13 @@ if [ ! -d "${PRODUCT_DIR}" ]; then ...@@ -244,7 +247,13 @@ if [ ! -d "${PRODUCT_DIR}" ]; then
mkdir -p "${PRODUCT_DIR}" mkdir -p "${PRODUCT_DIR}"
fi fi
mv "$DMG" "${PRODUCT_DIR}"
if [ "$1" == "1010" ]; then
mv "$DMG" "${PRODUCT_DIR}/OpenBoard_for_1010.dmg"
else
mv "$DMG" "${PRODUCT_DIR}"
fi
exit 0 exit 0
...@@ -93,6 +93,7 @@ void UBPlatformUtils::init() ...@@ -93,6 +93,7 @@ void UBPlatformUtils::init()
void UBPlatformUtils::setDesktopMode(bool desktop) void UBPlatformUtils::setDesktopMode(bool desktop)
{ {
#ifndef OS_NEWER_THAN_OR_EQUAL_TO_1010
OSStatus (*functor)(SystemUIMode, SystemUIOptions) = (OSStatus (*)(SystemUIMode, SystemUIOptions))originalSetSystemUIMode; OSStatus (*functor)(SystemUIMode, SystemUIOptions) = (OSStatus (*)(SystemUIMode, SystemUIOptions))originalSetSystemUIMode;
if (desktop) if (desktop)
...@@ -103,7 +104,7 @@ void UBPlatformUtils::setDesktopMode(bool desktop) ...@@ -103,7 +104,7 @@ void UBPlatformUtils::setDesktopMode(bool desktop)
{ {
functor(kUIModeAllHidden, 0); functor(kUIModeAllHidden, 0);
} }
#endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment