2015-03-05 20:36:42 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-05-06 15:37:06 +02:00
|
|
|
cd $(dirname $0)/../../
|
|
|
|
|
2018-03-10 17:50:04 +01:00
|
|
|
mkdir -p deploy
|
2015-03-05 20:36:42 +01:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2018-08-22 13:06:28 +02:00
|
|
|
version="0.8.0"
|
2015-03-05 20:36:42 +01:00
|
|
|
|
2018-09-11 19:00:45 +02:00
|
|
|
cd ..
|
|
|
|
./gradlew :desktop:build -x test shadowJar
|
|
|
|
cd desktop
|
2018-05-06 15:37:06 +02:00
|
|
|
|
2018-09-04 13:03:09 +02:00
|
|
|
EXE_JAR=build/libs/desktop-$version-all.jar
|
2015-12-30 14:30:24 +01:00
|
|
|
|
2018-09-18 13:54:20 +02:00
|
|
|
# we need to strip out Java 9 module configuration used in the fontawesomefx library as it causes the javapackager to stop,
|
|
|
|
# because of this existing module information, although it is not used as a module.
|
|
|
|
echo Unzipping jar to delete module config
|
|
|
|
tmp=build/libs/tmp
|
|
|
|
unzip -o -q $EXE_JAR -d $tmp
|
|
|
|
rm $tmp/module-info.class
|
|
|
|
rm $EXE_JAR
|
|
|
|
echo Zipping jar again without module config
|
|
|
|
cd $tmp; zip -r -q -X "../desktop-$version-all.jar" *
|
|
|
|
cd ../../../; rm -rf $tmp
|
|
|
|
|
2018-05-25 22:03:42 +02:00
|
|
|
echo SHA 256 before stripping jar file:
|
|
|
|
shasum -a256 $EXE_JAR | awk '{print $1}'
|
|
|
|
|
|
|
|
# We make a deterministic jar by stripping out comments with date, etc.
|
2018-06-26 00:34:37 +02:00
|
|
|
# jar file created from https://github.com/ManfredKarrer/tools
|
2018-09-21 19:24:49 +02:00
|
|
|
java -jar ./package/macosx/tools-1.0.jar $EXE_JAR
|
2018-05-25 22:03:42 +02:00
|
|
|
|
|
|
|
echo SHA 256 after stripping jar file to get a deterministic jar:
|
|
|
|
shasum -a256 $EXE_JAR | awk '{print $1}' | tee deploy/Bisq-$version.jar.txt
|
|
|
|
|
2018-09-21 18:39:52 +02:00
|
|
|
# vmPath=/Volumes
|
|
|
|
vmPath=/Users/dev
|
|
|
|
linux32=$vmPath/vm_shared_ubuntu14_32bit
|
|
|
|
linux64=$vmPath/vm_shared_ubuntu
|
|
|
|
win32=$vmPath/vm_shared_windows_32bit
|
|
|
|
win64=$vmPath/vm_shared_windows
|
2017-12-20 01:12:18 +01:00
|
|
|
|
2018-03-21 05:44:04 +01:00
|
|
|
mkdir -p $linux32 $linux64 $win32 $win64
|
|
|
|
|
2018-05-06 15:37:06 +02:00
|
|
|
cp $EXE_JAR "deploy/Bisq-$version.jar"
|
2017-12-20 01:12:18 +01:00
|
|
|
|
|
|
|
# copy app jar to VM shared folders
|
2018-05-06 15:37:06 +02:00
|
|
|
cp $EXE_JAR "$linux32/Bisq-$version.jar"
|
|
|
|
cp $EXE_JAR "$linux64/Bisq-$version.jar"
|
2017-12-20 01:12:18 +01:00
|
|
|
# At windows we don't add the version nr as it would keep multiple versions of jar files in app dir
|
2018-05-06 15:37:06 +02:00
|
|
|
cp $EXE_JAR "$win32/Bisq.jar"
|
|
|
|
cp $EXE_JAR "$win64/Bisq.jar"
|
2017-12-20 01:12:18 +01:00
|
|
|
|
2018-05-11 18:16:05 +02:00
|
|
|
# copy bouncycastle jars to VM shared folders
|
2018-07-04 13:42:05 +02:00
|
|
|
# bc_lib1=bcpg-jdk15on-1.56.jar
|
|
|
|
# cp build/app/lib/$bc_lib1 "$linux32/$bc_lib1"
|
|
|
|
# cp build/app/lib/$bc_lib1 "$linux64/$bc_lib1"
|
|
|
|
# cp build/app/lib/$bc_lib1 "$win32/$bc_lib1"
|
|
|
|
# cp build/app/lib/$bc_lib1 "$win64/$bc_lib1"
|
|
|
|
|
|
|
|
# bc_lib2=bcprov-jdk15on-1.56.jar
|
|
|
|
# cp build/app/lib/$bc_lib2 "$linux32/$bc_lib2"
|
|
|
|
# cp build/app/lib/$bc_lib2 "$linux64/$bc_lib2"
|
|
|
|
# cp build/app/lib/$bc_lib2 "$win32/$bc_lib2"
|
|
|
|
# cp build/app/lib/$bc_lib2 "$win64/$bc_lib2"
|
2018-05-11 18:16:05 +02:00
|
|
|
|
2018-05-11 16:23:48 +02:00
|
|
|
# Copy packager scripts to VM. No need to checkout the source as we only are interested in the build scripts.
|
2018-05-11 18:33:05 +02:00
|
|
|
rm -rf "$linux32/package"
|
|
|
|
rm -rf "$linux64/package"
|
|
|
|
rm -rf "$win32/package"
|
|
|
|
rm -rf "$win64/package"
|
2018-05-11 16:49:03 +02:00
|
|
|
|
2018-05-11 18:33:05 +02:00
|
|
|
mkdir -p "$linux32/package"
|
|
|
|
mkdir -p "$linux64/package"
|
|
|
|
mkdir -p "$win32/package"
|
|
|
|
mkdir -p "$win64/package"
|
|
|
|
|
|
|
|
cp -r package/linux "$linux32/package"
|
|
|
|
cp -r package/linux "$linux64/package"
|
|
|
|
cp -r package/windows "$win32/package"
|
|
|
|
cp -r package/windows "$win64/package"
|
2018-05-11 16:49:03 +02:00
|
|
|
|
2018-05-11 16:23:48 +02:00
|
|
|
|
2018-03-21 05:44:04 +01:00
|
|
|
if [ -z "$JAVA_HOME" ]; then
|
|
|
|
JAVA_HOME=$(/usr/libexec/java_home)
|
|
|
|
fi
|
2016-03-28 02:00:22 +02:00
|
|
|
|
2018-11-25 03:01:38 +01:00
|
|
|
# Open jdk does not has the java packager.
|
|
|
|
# JAVA_HOME=/Library/Java/JavaVirtualMachines/oracle_jdk-10.0.2.jdk/Contents/Home
|
|
|
|
|
2016-07-07 13:18:24 +02:00
|
|
|
echo "Using JAVA_HOME: $JAVA_HOME"
|
2018-11-25 03:01:38 +01:00
|
|
|
|
2015-03-05 20:36:42 +01:00
|
|
|
$JAVA_HOME/bin/javapackager \
|
|
|
|
-deploy \
|
2016-06-29 13:08:07 +02:00
|
|
|
-BappVersion=$version \
|
2018-07-04 13:42:41 +02:00
|
|
|
-Bmac.CFBundleIdentifier=io.bisq.CAT \
|
2018-05-07 05:27:19 +02:00
|
|
|
-Bmac.CFBundleName=Bisq \
|
2018-09-21 19:24:49 +02:00
|
|
|
-Bicon=package/macosx/Bisq.icns \
|
2016-06-27 23:06:20 +02:00
|
|
|
-Bruntime="$JAVA_HOME/jre" \
|
2015-03-05 20:36:42 +01:00
|
|
|
-native dmg \
|
2017-06-27 02:50:31 +02:00
|
|
|
-name Bisq \
|
|
|
|
-title Bisq \
|
|
|
|
-vendor Bisq \
|
2018-03-10 17:50:04 +01:00
|
|
|
-outdir deploy \
|
2018-09-11 20:09:22 +02:00
|
|
|
-srcdir deploy \
|
|
|
|
-srcfiles "Bisq-$version.jar" \
|
2018-03-12 09:20:30 +01:00
|
|
|
-appclass bisq.desktop.app.BisqAppMain \
|
2017-06-27 10:53:47 +02:00
|
|
|
-outfile Bisq
|
2017-11-08 17:11:51 +01:00
|
|
|
|
2018-03-10 17:50:04 +01:00
|
|
|
open deploy
|
2017-11-14 23:48:15 +01:00
|
|
|
|
2018-09-21 19:24:49 +02:00
|
|
|
cd package/macosx
|