forked from hush/SilentDragonPaper
Aditya Kulkarni
5 years ago
3 changed files with 124 additions and 1 deletions
@ -0,0 +1,56 @@ |
|||
#!/bin/bash |
|||
|
|||
# This is meant to be run inside the docker container for the compile environment |
|||
|
|||
|
|||
# Accept the variables as command line arguments as well |
|||
POSITIONAL=() |
|||
while [[ $# -gt 0 ]] |
|||
do |
|||
key="$1" |
|||
|
|||
case $key in |
|||
-v|--version) |
|||
APP_VERSION="$2" |
|||
shift # past argument |
|||
shift # past value |
|||
;; |
|||
*) # unknown option |
|||
POSITIONAL+=("$1") # save it in an array for later |
|||
shift # past argument |
|||
;; |
|||
esac |
|||
done |
|||
set -- "${POSITIONAL[@]}" # restore positional parameters |
|||
|
|||
|
|||
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 |
|||
|
|||
cd /opt/zecpaperwallet/ui |
|||
source ~/.cargo/env |
|||
|
|||
# We need to run qmake before we run disclean |
|||
/opt/Qt/5.11.2/static/bin/qmake papersapling.pro CONFIG+=release |
|||
make distclean |
|||
rm -rf artifacts/linux-zecpaperwallet-v$APP_VERSION |
|||
mkdir -p artifacts/linux-zecpaperwallet-v$APP_VERSION |
|||
/opt/Qt/5.11.2/static/bin/qmake papersapling.pro CONFIG+=release |
|||
make -j4 |
|||
|
|||
strip zecpaperwalletui |
|||
cp zecpaperwalletui artifacts/linux-zecpaperwallet-v$APP_VERSION |
|||
|
|||
# Run qmake before distclean |
|||
/opt/mxe/usr/bin/x86_64-w64-mingw32.static-qmake-qt5 papersapling.pro CONFIG+=release |
|||
make distclean |
|||
rm -rf artifacts/Windows-zecpaperwallet-v$APP_VERSION |
|||
mkdir -p artifacts/Windows-zecpaperwallet-v$APP_VERSION |
|||
/opt/mxe/usr/bin/x86_64-w64-mingw32.static-qmake-qt5 papersapling.pro CONFIG+=release |
|||
make -j4 |
|||
|
|||
strip release/zecpaperwalletui.exe |
|||
cp release/zecpaperwalletui.exe artifacts/Windows-zecpaperwallet-v$APP_VERSION |
|||
|
@ -0,0 +1,64 @@ |
|||
#!/bin/bash |
|||
|
|||
# Accept the variables as command line arguments as well |
|||
POSITIONAL=() |
|||
while [[ $# -gt 0 ]] |
|||
do |
|||
key="$1" |
|||
|
|||
case $key in |
|||
-v|--version) |
|||
APP_VERSION="$2" |
|||
shift # past argument |
|||
shift # past value |
|||
;; |
|||
*) # unknown option |
|||
POSITIONAL+=("$1") # save it in an array for later |
|||
shift # past argument |
|||
;; |
|||
esac |
|||
done |
|||
set -- "${POSITIONAL[@]}" # restore positional parameters |
|||
|
|||
|
|||
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 |
|||
|
|||
# This should be set as an environment variable |
|||
if [ -z $QT_PATH ]; then |
|||
echo "QT_PATH is not set. Please set it to the base directory of Qt"; |
|||
exit 1; |
|||
fi |
|||
QT_STATIC=$QT_PATH/clang_64/bin |
|||
|
|||
# Build for MacOS first |
|||
|
|||
# Clean |
|||
echo -n "Cleaning..............." |
|||
make distclean >/dev/null 2>&1 |
|||
rm -rf artifacts/macOS-zecpaperwallet-v$APP_VERSION |
|||
mkdir -p artifacts/macOS-zecpaperwallet-v$APP_VERSION |
|||
echo "[OK]" |
|||
|
|||
|
|||
echo -n "Configuring............" |
|||
# Build |
|||
$QT_STATIC/qmake papersapling.pro CONFIG+=release >/dev/null |
|||
echo "[OK]" |
|||
|
|||
|
|||
echo -n "Building..............." |
|||
make -j4 >/dev/null |
|||
echo "[OK]" |
|||
|
|||
#Qt deploy |
|||
echo -n "Deploying.............." |
|||
$QT_STATIC/macdeployqt zecpaperwalletui.app |
|||
cp -r zecpaperwalletui.app artifacts/macOS-zecpaperwallet-v$APP_VERSION/ |
|||
echo "[OK]" |
|||
|
|||
# Run inside docker container |
|||
docker run --rm -v ${PWD}/..:/opt/zecpaperwallet zecwallet/compileenv:v0.7 bash -c "cd /opt/zecpaperwallet/ui && ./mkdockerwinlinux.sh -v $APP_VERSION" |
|||
|
Loading…
Reference in new issue