bisq/desktop/package/macosx/create_app.sh

96 lines
2.5 KiB
Bash
Raw Normal View History

#!/bin/bash
cd $(dirname $0)/../../
mkdir -p deploy
set -e
2018-12-03 00:38:44 +01:00
version="0.9.0"
cd ..
./gradlew :desktop:build -x test shadowJar
cd desktop
2018-09-04 13:03:09 +02:00
EXE_JAR=build/libs/desktop-$version-all.jar
2015-12-30 14:30:24 +01: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
2018-11-28 21:18:36 +01:00
# Sometimes $tmp/module-info.class is not available. TODO check why and if still needed
rm -f $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
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.
# jar file created from https://github.com/ManfredKarrer/tools
java -jar ./package/macosx/tools-1.0.jar $EXE_JAR
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
#vmPath=/Users/christoph/Documents/Workspaces/Java
vmPath=/Volumes
2018-09-21 11:39:52 -05:00
linux64=$vmPath/vm_shared_ubuntu
win64=$vmPath/vm_shared_windows
2017-12-20 01:12:18 +01:00
mkdir -p $linux64 $win64
cp $EXE_JAR "deploy/Bisq-$version.jar"
2017-12-20 01:12:18 +01:00
# copy app jar to VM shared folders
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
cp $EXE_JAR "$win64/Bisq.jar"
2017-12-20 01:12:18 +01: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.
rm -rf "$linux64/package"
rm -rf "$win64/package"
2018-05-11 16:49:03 +02:00
mkdir -p "$linux64/package"
mkdir -p "$win64/package"
cp -r package/linux "$linux64/package"
cp -r package/windows "$win64/package"
2018-05-11 16:49:03 +02:00
2018-05-11 16:23:48 +02:00
if [ -z "$JAVA_HOME" ]; then
JAVA_HOME=$(/usr/libexec/java_home)
fi
# 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"
$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 \
-Bmac.CFBundleName=Bisq \
-Bicon=package/macosx/Bisq.icns \
-Bruntime="$JAVA_HOME/jre" \
-native dmg \
2017-06-27 02:50:31 +02:00
-name Bisq \
-title Bisq \
-vendor Bisq \
-outdir deploy \
2018-09-11 20:09:22 +02:00
-srcdir deploy \
-srcfiles "Bisq-$version.jar" \
-appclass bisq.desktop.app.BisqAppMain \
-outfile Bisq \
-v
2017-11-08 11:11:51 -05:00
open deploy
cd package/macosx