From 3e374bbd9c2a8f610f9432415d62f94e6fcf8ec7 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 5 Mar 2015 22:19:48 +0100 Subject: [PATCH] Fix win build scripts --- .../io/bitsquare/app/gui/UpdateProcess.java | 2 +- package/instructions.txt | 24 +++++++++++++++++++ package/linux/create_app.sh | 17 +++++-------- package/mac/create_app.sh | 2 +- 4 files changed, 32 insertions(+), 13 deletions(-) create mode 100644 package/instructions.txt diff --git a/gui/src/main/java/io/bitsquare/app/gui/UpdateProcess.java b/gui/src/main/java/io/bitsquare/app/gui/UpdateProcess.java index a406e62a00..7464f38317 100644 --- a/gui/src/main/java/io/bitsquare/app/gui/UpdateProcess.java +++ b/gui/src/main/java/io/bitsquare/app/gui/UpdateProcess.java @@ -52,7 +52,7 @@ public class UpdateProcess { private static final Logger log = LoggerFactory.getLogger(UpdateProcess.class); // Edit version for updateFX - private static final int BUILD_VERSION = 2; + private static final int BUILD_VERSION = 1; private static final List UPDATE_SIGNING_KEYS = Crypto.decode("025AA74490F66D195D42D49070D821C96A137496C070A924E5AAB0D6EE8549457E"); private static final String UPDATES_BASE_URL = "http://bitsquare.io/updateFX/"; diff --git a/package/instructions.txt b/package/instructions.txt new file mode 100644 index 0000000000..2205302ab2 --- /dev/null +++ b/package/instructions.txt @@ -0,0 +1,24 @@ +Binary build instructions with Update FX: + +Binary build: + +1. Set version numbers in UpdateProcess, BitsquareAppMain and pom files. Check in changes. +2. Remove previous build files under gui/updatefx. Use wallet file form backup if not there. Run setup.sh. Key in UpdateProcess must be same as reported in +console. +3. Run create_app.sh +4. Upload index to server +5. Build windows binary. Copy wallet file from backup if not there. Clean all before. Edit version numbers (not automated in win bat file) +6. Build Linux binary. + +Update new jar file: +1. Change build version number in UpdateProcess and pom files. Check in changes. +2. Run update.sh +3. Upload bpatch file and index to server +4. Run update at windows and linux + + +Todo: +- Support 32bit builds +- Make version handling in bat and linux.sh file automatic (regex from mac file fails on ubuntu) +- Signing +- Threshold signature for updates \ No newline at end of file diff --git a/package/linux/create_app.sh b/package/linux/create_app.sh index eed98e5c03..fe46b4dd1a 100644 --- a/package/linux/create_app.sh +++ b/package/linux/create_app.sh @@ -4,21 +4,13 @@ cd ../../ set -e -# Extract the version number. buildVersion is used for ever increasing integer at UpdateFX. fullVersion contains major and minor version + buildVersion -buildVersion=$( sed -n 's/^.*final int BUILD_VERSION = //p' gui/src/main/java/io/bitsquare/app/gui/UpdateProcess.java ) -# remove trailing; -buildVersion="${buildVersion:0:${#buildVersion}-1}" -fullVersion=$( sed -n 's/^.*final String VERSION = "//p' gui/src/main/java/io/bitsquare/app/gui/BitsquareAppMain.java ) -# remove trailing "; -fullVersion="${fullVersion:0:${#fullVersion}-2}" - -echo buildVersion = $buildVersion -echo fullVersion = $fullVersion +# Edit versions +buildVersion=1 +fullVersion=0.1.1 mvn clean package -DskipTests -Dmaven.javadoc.skip=true cp gui/target/shaded.jar gui/updatefx/builds/$buildVersion.jar -# edit url java -jar ./updatefx/updatefx-app-1.2.jar --url=http://bitsquare.io/updateFX/ gui/updatefx # Note: fakeroot needs to be installed on linux @@ -42,3 +34,6 @@ $JAVA_HOME/bin/javapackager \ cd package/linux # TODO: Figure out where LICENSE file goes so distros don't complain about "low quality" packages. +# -BlicenseFile=LICENSE comlains about missing file (Bundler DEB Installer skipped because of a configuration problem: Specified license file is missing. +# Advice to fix: Make sure that references a file in the app resources, and that it is relative to the +# basedir.) diff --git a/package/mac/create_app.sh b/package/mac/create_app.sh index 42d777ac14..e467e248ad 100644 --- a/package/mac/create_app.sh +++ b/package/mac/create_app.sh @@ -10,7 +10,7 @@ buildVersion=$( sed -n 's/^.*final int BUILD_VERSION = //p' gui/src/main/java/io buildVersion="${buildVersion:0:${#buildVersion}-1}" fullVersion=$( sed -n 's/^.*final String VERSION = "//p' gui/src/main/java/io/bitsquare/app/gui/BitsquareAppMain.java ) # remove trailing "; -fullVersion="${fullVersion:0:${#fullVersion}-2}" +fullVersion="${fullVersion:0:${#fullVersion}-2}".$buildVersion echo buildVersion = $buildVersion echo fullVersion = $fullVersion