aboutsummaryrefslogtreecommitdiff
path: root/setup/package.sh
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-09-17 21:22:34 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-09-17 21:22:46 +1200
commit1432d04a7be8397becd5c88f9e1f075861acbfdc (patch)
treefa7a4b6619ffee11a4eac9d28f5ab56d4d1fe3d0 /setup/package.sh
parent99bf70e274fbfb03e0f65c564d7c9f5bdaf115c4 (diff)
downloadtrackermap-server-1432d04a7be8397becd5c88f9e1f075861acbfdc.tar.gz
trackermap-server-1432d04a7be8397becd5c88f9e1f075861acbfdc.tar.bz2
trackermap-server-1432d04a7be8397becd5c88f9e1f075861acbfdc.zip
Update packaging scripts
Diffstat (limited to 'setup/package.sh')
-rwxr-xr-xsetup/package.sh96
1 files changed, 51 insertions, 45 deletions
diff --git a/setup/package.sh b/setup/package.sh
index ed897c201..9441e91e8 100755
--- a/setup/package.sh
+++ b/setup/package.sh
@@ -22,27 +22,23 @@ check_requirement () {
fi
}
-check_requirement "ls ../../ext-6.2.0" "Missing ../../ext-6.2.0 (https://www.sencha.com/legal/GPL/)"
-check_requirement "ls innosetup-*.exe" "Missing isetup-*.exe (http://www.jrsoftware.org/isdl.php)"
+check_requirement "ls ../../ext-6.2.0" "Missing ExtJS (https://www.sencha.com/legal/GPL/)"
+check_requirement "ls innosetup-*.exe" "Missing Inno Setup (http://www.jrsoftware.org/isdl.php)"
+check_requirement "ls java-*.windows.x86_64.zip" "Missing Windows 64 Java (https://github.com/ojdkbuild/ojdkbuild)"
+check_requirement "ls jdk-*-linux-x64.zip" "Missing Linux 64 Java (https://github.com/ojdkbuild/contrib_jdk10u-ci/releases)"
+check_requirement "ls jdk-*-linux-armhf.zip" "Missing Linux ARM Java (https://github.com/ojdkbuild/contrib_jdk10u-aarch32-ci/releases)"
check_requirement "which sencha" "Missing sencha cmd package (https://www.sencha.com/products/extjs/cmd-download/)"
-check_requirement "which wine" "Missing wine package"
-check_requirement "which innoextract" "Missing innoextract package"
-check_requirement "which makeself" "Missing makeself package"
+check_requirement "which unzip" "Missing unzip"
+check_requirement "which wine" "Missing wine"
+check_requirement "which innoextract" "Missing innoextract"
+check_requirement "which makeself" "Missing makeself"
+check_requirement "which jlink" "Missing jlink"
prepare () {
../traccar-web/tools/minify.sh
- innoextract innosetup-*.exe
- echo "If you got any errors here try isetup version 5.5.5 (or check supported versions using 'innoextract -v')"
-}
-
-cleanup () {
- rm ../traccar-web/web/app.min.js
-
- rm -r app/
-}
+ mkdir -p out/{conf,data,lib,logs,web,schema,templates}
-copy_files () {
cp ../target/tracker-server.jar out
cp ../target/lib/* out/lib
cp ../schema/* out/schema
@@ -50,55 +46,65 @@ copy_files () {
cp -r ../traccar-web/web/* out/web
cp default.xml out/conf
cp traccar.xml out/conf
-}
-package_windows () {
- mkdir -p out/{conf,data,lib,logs,web,schema,templates}
+ innoextract innosetup-*.exe
+ echo "If you got any errors here try isetup version 5.5.5 (or check supported versions using 'innoextract -v')"
+}
- copy_files
+cleanup () {
+ rm ../traccar-web/web/app.min.js
- wine app/ISCC.exe traccar.iss
+ rm -r out
+ rm -r tmp
+ rm -r app
+}
- zip -j traccar-windows-$VERSION.zip Output/traccar-setup.exe README.txt
+package_other () {
+ cp README.txt out
+ cd out
+ zip -r ../traccar-other-$VERSION.zip *
+ cd ..
+ rm out/README.txt
+}
+package_windows () {
+ unzip -o java-*.windows.x86_64.zip
+ jlink --module-path java-*.windows.x86_64/jmods --add-modules java.se.ee --output out/jre
+ rm -rf java-*.windows.x86_64
+ wine app/ISCC.exe traccar.iss
+ rm -rf out/jre
+ zip -j traccar-windows-64-$VERSION.zip Output/traccar-setup.exe README.txt
rm -r Output
- rm -r tmp
- rm -r out
}
package_unix () {
- mkdir -p out/{conf,data,lib,logs,web,schema,templates}
- copy_files
-
- cp java-test/test.jar out
cp setup.sh out
- cp other/traccar.service out
- makeself --notemp out traccar.run "traccar" ./setup.sh
-
- zip -j traccar-linux-$VERSION.zip traccar.run README.txt
+ cp traccar.service out
+ unzip -o jdk-*-linux-x64.zip
+ jlink --module-path jdk-*-linux-x64/jmods --add-modules java.se.ee --output out/jre
+ rm -rf jdk-*-linux-x64
+ makeself --notemp out traccar.run "traccar" ./setup.sh
+ rm -rf out/jre
+ zip -j traccar-linux-64-$VERSION.zip traccar.run README.txt
rm traccar.run
- rm -r out
-}
-
-package_universal () {
- mkdir -p out/{conf,data,lib,logs,web,schema,templates}
-
- copy_files
-
- cp README.txt out
- cd out
- zip -r ../traccar-other-$VERSION.zip *
- cd ..
+ unzip -o jdk-*-linux-armhf.zip
+ jlink --module-path jdk-*-linux-armhf/jmods --add-modules java.se.ee --output out/jre
+ rm -rf jdk-*-linux-armhf
+ makeself --notemp out traccar.run "traccar" ./setup.sh
+ rm -rf out/jre
+ zip -j traccar-linux-arm-$VERSION.zip traccar.run README.txt
+ rm traccar.run
- rm -rf out/
+ rm out/setup.sh
+ rm out/traccar.service
}
prepare
+package_other
package_windows
package_unix
-package_universal
cleanup