More build script tweaking
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
param (
|
||||
[Parameter(Mandatory=$true)][string]$version,
|
||||
[Parameter(Mandatory=$true)][string]$prev,
|
||||
[Parameter(Mandatory=$true)][string]$server
|
||||
[Parameter(Mandatory=$true)][string]$server,
|
||||
[Parameter(Mandatory=$true)][string]$macserver
|
||||
)
|
||||
|
||||
Write-Host "[Initializing]"
|
||||
@@ -15,6 +16,28 @@ Remove-Item -Recurse -Force -ErrorAction Ignore ./bin
|
||||
Remove-Item -Recurse -Force -ErrorAction Ignore ./debug
|
||||
Remove-Item -Recurse -Force -ErrorAction Ignore ./release
|
||||
|
||||
# Create the version.h file
|
||||
echo "#define APP_VERSION `"$version`"" > src/version.h
|
||||
echo ""
|
||||
|
||||
|
||||
echo "[Building on Mac]"
|
||||
Write-Host -NoNewline "Copying files.........."
|
||||
ssh $macserver "rm -rf /tmp/zqwbuild"
|
||||
ssh $macserver "mkdir /tmp/zqwbuild"
|
||||
scp -r * ${macserver}:/tmp/zqwbuild | Out-Null
|
||||
Write-Host "[OK]"
|
||||
ssh $macserver "cd /tmp/zqwbuild && APP_VERSION=$version QT_PATH=~/Qt/5.11.2/clang_64/ ZCASH_DIR=~/github/zcash bash src/scripts/mkmacdmg.sh"
|
||||
if (!$?) {
|
||||
Write-Output "[Error]"
|
||||
exit 1;
|
||||
}
|
||||
New-Item artifacts -itemtype directory -Force | Out-Null
|
||||
scp ${macserver}:/tmp/zqwbuild/artifacts/* artifacts/ | Out-Null
|
||||
Write-Host ""
|
||||
|
||||
|
||||
echo "[Building Linux/Windows]"
|
||||
Write-Host -NoNewline "Copying files.........."
|
||||
ssh $server "rm -rf /tmp/zqwbuild"
|
||||
ssh $server "mkdir /tmp/zqwbuild"
|
||||
@@ -45,7 +68,8 @@ Write-Host -NoNewline "Checking Build........."
|
||||
if (! (Test-Path ./artifacts/linux-zec-qt-wallet-v$version.tar.gz) -or
|
||||
! (Test-Path ./artifacts/Windows-zec-qt-wallet-v$version.zip) -or
|
||||
! (Test-Path ./artifacts/zec-qt-wallet-v$version.deb) -or
|
||||
! (Test-Path ./artifacts/zec-qt-wallet-v$version.msi)) {
|
||||
! (Test-Path ./artifacts/zec-qt-wallet-v$version.msi) -or
|
||||
! (Test-Path ./artifacts/zec-qt-wallet-v$version.dmg) ) {
|
||||
Write-Host "[Error]"
|
||||
exit 1;
|
||||
}
|
||||
|
||||
@@ -5,40 +5,48 @@ if [ -z $QT_PATH ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [ -z $ZCASH_DIR ]; then
|
||||
echo "ZCASH_PATH is not set. Please set it to the base directory of a compiled zcashd";
|
||||
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 ../zcash/src/zcashd ]; then
|
||||
echo "Could not find compiled zcashd in ../zcash/src/.";
|
||||
if [ ! -f $ZCASH_DIR/src/zcashd ]; then
|
||||
echo "Could not find compiled zcashd in $ZCASH_DIR/src/.";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
export PATH=$PATH:/usr/local/bin
|
||||
|
||||
#Clean
|
||||
echo -n "Cleaning............"
|
||||
echo -n "Cleaning..............."
|
||||
make distclean >/dev/null 2>&1
|
||||
rm -f artifacts/zec-qt-wallet-v$APP_VERSION.dmg
|
||||
echo "[OK]"
|
||||
|
||||
|
||||
echo -n "Building............"
|
||||
echo -n "Building..............."
|
||||
# Build
|
||||
$QT_PATH/bin/qmake zec-qt-wallet.pro CONFIG+=release >/dev/null
|
||||
make -j4 >/dev/null
|
||||
echo "[OK]"
|
||||
|
||||
#Qt deploy
|
||||
echo -n "Deploying..........."
|
||||
echo -n "Deploying.............."
|
||||
mkdir artifacts >/dev/null 2>&1
|
||||
rm -f artifcats/zec-qt-wallet.dmg >/dev/null 2>&1
|
||||
rm -f artifacts/rw* >/dev/null 2>&1
|
||||
cp ../zcash/src/zcashd zec-qt-wallet.app/Contents/MacOS/
|
||||
cp $ZCASH_DIR/src/zcashd zec-qt-wallet.app/Contents/MacOS/
|
||||
cp $ZCASH_DIR/src/zcash-cli zec-qt-wallet.app/Contents/MacOS/
|
||||
$QT_PATH/bin/macdeployqt zec-qt-wallet.app
|
||||
echo "[OK]"
|
||||
|
||||
|
||||
echo -n "Building dmg........"
|
||||
echo -n "Building dmg..........."
|
||||
# create-dmg --volname "zec-qt-wallet-v$APP_VERSION" --volicon "res/logo.icns" --window-pos 200 120 --icon "zec-qt-wallet.app" 200 190 --app-drop-link 600 185 --hide-extension "zec-qt-wallet.app" --window-size 800 400 --hdiutil-quiet --background res/dmgbg.png artifacts/zec-qt-wallet.dmg zec-qt-wallet.app >/dev/null
|
||||
mkdir bin/dmgbuild >/dev/null 2>&1
|
||||
sed "s/RELEASE_VERSION/${APP_VERSION}/g" res/appdmg.json > bin/dmgbuild/appdmg.json
|
||||
|
||||
@@ -56,7 +56,7 @@ make distclean >/dev/null 2>&1
|
||||
echo "[OK]"
|
||||
|
||||
echo ""
|
||||
echo "[Linux " `lsb_release -r` "]"
|
||||
echo "[Building on" `lsb_release -r` "]"
|
||||
|
||||
echo -n "Configuring............"
|
||||
$QT_STATIC/bin/qmake zec-qt-wallet.pro -spec linux-clang CONFIG+=release > /dev/null
|
||||
|
||||
Reference in New Issue
Block a user