From 4929206865ad6123c70ff2fca7c571e38089a01b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 20 Aug 2012 23:37:46 +0400 Subject: Automate setups creation --- README_SETUP.txt | 26 ++++++++++++++++++++++++++ setup/linux/README.txt | 17 +++++++++++++++++ setup/linux/traccar.sh | 35 ++++++++++++++++++++++++++--------- setup/windows/README.txt | 19 +++++++++++++++++++ setup/windows/traccar.iss | 8 ++++---- setup/windows/traccar.sh | 18 ++++++++++++++++++ 6 files changed, 110 insertions(+), 13 deletions(-) create mode 100644 README_SETUP.txt create mode 100644 setup/linux/README.txt create mode 100644 setup/windows/README.txt create mode 100755 setup/windows/traccar.sh diff --git a/README_SETUP.txt b/README_SETUP.txt new file mode 100644 index 000000000..57cff29fc --- /dev/null +++ b/README_SETUP.txt @@ -0,0 +1,26 @@ +WINDOWS + +Dependencies: +- wine +- innoextract + +Get innoextract on Ubuntu: +- sudo add-apt-repository ppa:arx/release +- sudo apt-get update +- sudo apt-get install innoextract + +Create setup: +1. Download "wrapper-delta-pack-*.tar.gz" from http://wrapper.tanukisoftware.com/doc/english/download.jsp +2. Download "isetup-*.exe" from http://www.jrsoftware.org/isdl.php +3. Copy files to "traccar/setup/windows" +4. Change directory to "traccar/setup/windows" +5. Run "./traccar.sh" + +LINUX + +Create setup: +1. Download "wrapper-delta-pack-*.tar.gz" from http://wrapper.tanukisoftware.com/doc/english/download.jsp +3. Copy files to "traccar/setup/linux" +4. Change directory to "traccar/setup/linux" +5. Run "./traccar.sh" + diff --git a/setup/linux/README.txt b/setup/linux/README.txt new file mode 100644 index 000000000..878890c3a --- /dev/null +++ b/setup/linux/README.txt @@ -0,0 +1,17 @@ +== DESCRIPTION == + +Web page - http://www.traccar.org + +Author - Anton Tananaev (anton.tananaev@gmail.com) + +Traccar software is licensed under the Apache License 2.0. + +== INSTALL == + +1. Run traccar.run (sudo ./traccar.run) +2. Start daemon (sudo /opt/traccar/bin/traccar start) + +== UNINSTALL == + +1. Remove traccar from init (sudo /opt/traccar/bin/traccar remove) +2. Remove traccar directory (sudo rm -R /opt/traccar) diff --git a/setup/linux/traccar.sh b/setup/linux/traccar.sh index 45e638b31..bcba7bb5a 100755 --- a/setup/linux/traccar.sh +++ b/setup/linux/traccar.sh @@ -2,7 +2,10 @@ app='/opt/traccar' -rm -f -R out +tar -xzf wrapper-delta-pack-*.tar.gz +mv wrapper-delta-pack-*/ wrapper/ + +rm -rf out mkdir out mkdir out/bin @@ -11,18 +14,14 @@ mkdir out/data mkdir out/lib mkdir out/logs -cp wrapper/bin/wrapper out/bin cp wrapper/src/bin/sh.script.in out/bin/traccar -cp wrapper/lib/libwrapper.so out/lib cp wrapper/lib/wrapper.jar out/lib cp wrapper/src/conf/wrapper.conf.in out/conf/wrapper.conf -cp tracker-server.jar out -cp lib/* out/lib +cp ../../target/tracker-server.jar out +cp ../../target/lib/* out/lib cp linux.cfg out/conf -chmod +x out/bin/traccar - sed -i 's/@app.name@/traccar/g' out/bin/traccar sed -i 's/@app.long.name@/traccar/g' out/bin/traccar @@ -33,7 +32,25 @@ sed -i 's/@app.name@/traccar/g' out/conf/wrapper.conf sed -i 's/@app.long.name@/traccar/g' out/conf/wrapper.conf sed -i 's/@app.description@/traccar/g' out/conf/wrapper.conf -makeself out traccar.run "traccar" "mkdir /opt/traccar; cp -f -R * /opt/traccar; /opt/traccar/bin/traccar install" +# linux 32 + +cp wrapper/bin/wrapper-linux-x86-32 out/bin/wrapper +cp wrapper/lib/libwrapper-linux-x86-32.so out/lib/libwrapper.so +chmod +x out/bin/traccar + +makeself out traccar.run "traccar" "mkdir $app; cp -rf * $app; $app/bin/traccar install" +zip traccar-linux-32.zip traccar.run README.txt + +# linux 64 + +cp wrapper/bin/wrapper-linux-x86-64 out/bin/wrapper +cp wrapper/lib/libwrapper-linux-x86-64.so out/lib/libwrapper.so +chmod +x out/bin/traccar + +makeself out traccar.run "traccar" "mkdir $app; cp -rf * $app; $app/bin/traccar install" +zip traccar-linux-64.zip traccar.run README.txt -rm -f -R out +rm traccar.run +rm -rf out +rm -rf wrapper diff --git a/setup/windows/README.txt b/setup/windows/README.txt new file mode 100644 index 000000000..499ff4960 --- /dev/null +++ b/setup/windows/README.txt @@ -0,0 +1,19 @@ +== DESCRIPTION == + +Web page - http://www.traccar.org + +Author - Anton Tananaev (anton.tananaev@gmail.com) + +Traccar software is licensed under the Apache License 2.0. + +== INSTALL == + +1. Download and install JRE if you do not have it (http://www.java.com/download) +2. Run setup.exe and follow instructions + +NOTE: For 64-bit Windows you have to install 32-bit JRE. + +== UNINSTALL == + +1. Remove Traccar program from Control Panel +2. Remove Traccar directory (by default in Program Files) diff --git a/setup/windows/traccar.iss b/setup/windows/traccar.iss index 9aad6cf8b..fc9ccfc99 100644 --- a/setup/windows/traccar.iss +++ b/setup/windows/traccar.iss @@ -12,16 +12,16 @@ Name: "{app}\lib" Name: "{app}\logs" [Files] -Source: "wrapper\bin\wrapper.exe"; DestDir: "{app}\bin" +Source: "wrapper\bin\wrapper-windows-x86-32.exe"; DestDir: "{app}\bin"; DestName: "wrapper.exe" Source: "wrapper\src\bin\App.bat.in"; DestDir: "{app}\bin"; DestName: "Traccar.bat" Source: "wrapper\src\bin\InstallApp-NT.bat.in"; DestDir: "{app}\bin"; DestName: "InstallTraccar-NT.bat" Source: "wrapper\src\bin\UninstallApp-NT.bat.in"; DestDir: "{app}\bin"; DestName: "UninstallTraccar-NT.bat" -Source: "wrapper\lib\wrapper.dll"; DestDir: "{app}\lib"; +Source: "wrapper\lib\wrapper-windows-x86-32.dll"; DestDir: "{app}\lib"; DestName: "wrapper.dll" Source: "wrapper\lib\wrapper.jar"; DestDir: "{app}\lib"; Source: "wrapper\src\conf\wrapper.conf.in"; DestDir: "{app}\conf"; DestName: "wrapper.conf"; AfterInstall: ConfigureWrapper -Source: "tracker-server.jar"; DestDir: "{app}" -Source: "lib\*"; DestDir: "{app}\lib" +Source: "..\..\target\tracker-server.jar"; DestDir: "{app}" +Source: "..\..\target\lib\*"; DestDir: "{app}\lib" Source: "windows.cfg"; DestDir: "{app}\conf"; AfterInstall: ConfigureApplication [Run] diff --git a/setup/windows/traccar.sh b/setup/windows/traccar.sh new file mode 100755 index 000000000..e72a130f1 --- /dev/null +++ b/setup/windows/traccar.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +tar -xzf wrapper-delta-pack-*.tar.gz +mv wrapper-delta-pack-*/ wrapper/ + +innoextract isetup-*.exe + +wine app/ISCC.exe traccar.iss +mv Output/setup.exe . + +zip traccar-windows-32.zip setup.exe README.txt + +rm setup.exe +rm -rf Output +rm -rf wrapper +rm -rf app +rm -rf tmp + -- cgit v1.2.3