fix builds

This commit is contained in:
DenioD
2019-10-29 17:42:41 +01:00
10 changed files with 59 additions and 130 deletions

View File

@@ -35,21 +35,11 @@ if [ -z $QT_PATH ]; then
exit 1;
fi
if [ -z $hush_DIR ]; then
echo "hush_DIR is not set. Please set it to the base directory of a compiled hushd";
exit 1;
fi
if [ -z $APP_VERSION ]; then
echo "APP_VERSION is not set. Please set it to the current release version of the app";
exit 1;
fi
if [ ! -f $hush_DIR/src/hushd ]; then
echo "Could not find compiled hushd in $hush_DIR/src/.";
exit 1;
fi
if ! cat src/version.h | grep -q "$APP_VERSION"; then
echo "Version mismatch in src/version.h"
exit 1
@@ -60,14 +50,14 @@ export PATH=$PATH:/usr/local/bin
#Clean
echo -n "Cleaning..............."
make distclean >/dev/null 2>&1
rm -f artifacts/macOS-silentdragon-v$APP_VERSION.dmg
rm -f artifacts/macOS-silentdragonlite-v$APP_VERSION.dmg
echo "[OK]"
echo -n "Configuring............"
# Build
QT_STATIC=$QT_PATH src/scripts/dotranslations.sh >/dev/null
$QT_PATH/bin/qmake silentdragonlite.pro CONFIG+=release >/dev/null
$QT_PATH/bin/qmake silentdragon-lite.pro CONFIG+=release >/dev/null
echo "[OK]"
@@ -78,27 +68,17 @@ echo "[OK]"
#Qt deploy
echo -n "Deploying.............."
mkdir artifacts >/dev/null 2>&1
rm -f artifcats/silentdragon.dmg >/dev/null 2>&1
rm -f artifcats/Silentdragonlite.dmg >/dev/null 2>&1
rm -f artifacts/rw* >/dev/null 2>&1
cp $hush_DIR/src/hushd silentdragon.app/Contents/MacOS/
cp $hush_DIR/src/hush-cli silentdragon.app/Contents/MacOS/
$QT_PATH/bin/macdeployqt silentdragon.app
$QT_PATH/bin/macdeployqt Silentdragonlite.app
echo "[OK]"
echo -n "Building dmg..........."
mv silentdragon.app silentdragon.app
create-dmg --volname "silentdragon-v$APP_VERSION" --volicon "res/logo.icns" --window-pos 200 120 --icon "silentdragon.app" 200 190 --app-drop-link 600 185 --hide-extension "silentdragon.app" --window-size 800 400 --hdiutil-quiet --background res/dmgbg.png artifacts/macOS-silentdragon-v$APP_VERSION.dmg silentdragon.app >/dev/null 2>&1
mv silentdragonlite.app Silentdragonlite.app
create-dmg --volname "SilentDragonLite-v$APP_VERSION" --volicon "res/logo.icns" --window-pos 200 120 --icon "SilentDragonLite.app" 200 190 --app-drop-link 600 185 --hide-extension "SilentDragonLite.app" --window-size 800 400 --hdiutil-quiet --background res/dmgbg.png artifacts/macOS-SilentDragonLite-v$APP_VERSION.dmg SilentDragonLite.app >/dev/null 2>&1
#mkdir bin/dmgbuild >/dev/null 2>&1
#sed "s/RELEASE_VERSION/${APP_VERSION}/g" res/appdmg.json > bin/dmgbuild/appdmg.json
#cp res/logo.icns bin/dmgbuild/
#cp res/dmgbg.png bin/dmgbuild/
#cp -r silentdragon.app bin/dmgbuild/
#appdmg --quiet bin/dmgbuild/appdmg.json artifacts/macOS-silentdragon-v$APP_VERSION.dmg >/dev/null
if [ ! -f artifacts/macOS-silentdragon-v$APP_VERSION.dmg ]; then
if [ ! -f artifacts/macOS-SilentDragonLite-v$APP_VERSION.dmg ]; then
echo "[ERROR]"
exit 1
fi