aboutsummaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
Diffstat (limited to 'setup')
-rwxr-xr-xsetup/package.sh19
-rw-r--r--setup/windows/traccar.iss11
2 files changed, 12 insertions, 18 deletions
diff --git a/setup/package.sh b/setup/package.sh
index afc8cbe26..d4629f088 100755
--- a/setup/package.sh
+++ b/setup/package.sh
@@ -7,14 +7,6 @@ fi
# GENERAL REQUIREMENTS
-# Check web application
-if [ -e "traccar-web.war" ]; then
- echo "Web application archive found"
-else
- echo "Put traccar-web.war into this directory"
- exit 0
-fi
-
# Check wrapper
if ls wrapper-delta-pack-*.tar.gz 1> /dev/null 2>&1; then
echo "Java wrapper package found"
@@ -119,6 +111,7 @@ mkdir out/conf
mkdir out/data
mkdir out/lib
mkdir out/logs
+mkdir out/web
cp wrapper/src/bin/sh.script.in out/bin/traccar
cp wrapper/lib/wrapper.jar out/lib
@@ -129,14 +122,14 @@ chmod +x out/bin/traccar
cp ../target/tracker-server.jar out
cp ../target/lib/* out/lib
-cp traccar-web.war out
-cp linux/traccar.cfg out/conf
+cp -r ../target/web/* out/web
+cp linux/traccar.xml out/conf
sed -i 's/@app.name@/traccar/g' out/bin/traccar
sed -i 's/@app.long.name@/traccar/g' out/bin/traccar
sed -i '/wrapper.java.classpath.1/i\wrapper.java.classpath.2=../tracker-server.jar' out/conf/wrapper.conf
-sed -i "/wrapper.app.parameter.1/i\wrapper.app.parameter.2=$app/conf/traccar.cfg" out/conf/wrapper.conf
+sed -i "/wrapper.app.parameter.1/i\wrapper.app.parameter.2=$app/conf/traccar.xml" out/conf/wrapper.conf
sed -i 's/<YourMainClass>/org.traccar.Main/g' out/conf/wrapper.conf
sed -i 's/@app.name@/traccar/g' out/conf/wrapper.conf
sed -i 's/@app.long.name@/traccar/g' out/conf/wrapper.conf
@@ -174,13 +167,13 @@ zip -j traccar-linux-arm-$1.zip traccar.run linux/README.txt
# MACOSX PACKAGE
-rm out/conf/traccar.cfg
+rm out/conf/traccar.xml
rm out/bin/wrapper-linux-armel-32
rm out/bin/wrapper-linux-armhf-32
rm out/lib/libwrapper-linux-armel-32.so
rm out/lib/libwrapper-linux-armhf-32.so
-cp macosx/traccar.cfg out/conf
+cp macosx/traccar.xml out/conf
cp wrapper/bin/wrapper-macosx-universal-64 out/bin/wrapper
cp wrapper/lib/libwrapper-macosx-universal-64.jnilib out/lib/libwrapper.jnilib
diff --git a/setup/windows/traccar.iss b/setup/windows/traccar.iss
index f25d7da46..709ba4c8b 100644
--- a/setup/windows/traccar.iss
+++ b/setup/windows/traccar.iss
@@ -10,6 +10,7 @@ Name: "{app}\conf"
Name: "{app}\data"
Name: "{app}\lib"
Name: "{app}\logs"
+Name: "{app}\web"
[Files]
Source: "..\wrapper\bin\wrapper-windows-x86-32.exe"; DestDir: "{app}\bin"; DestName: "wrapper.exe"
@@ -22,8 +23,8 @@ Source: "..\wrapper\src\conf\wrapper.conf.in"; DestDir: "{app}\conf"; DestName:
Source: "..\..\target\tracker-server.jar"; DestDir: "{app}"
Source: "..\..\target\lib\*"; DestDir: "{app}\lib"
-Source: "..\traccar-web.war"; DestDir: "{app}"
-Source: "traccar.cfg"; DestDir: "{app}\conf"; AfterInstall: ConfigureApplication
+Source: "..\..\web\*"; DestDir: "{app}\web"
+Source: "traccar.xml"; DestDir: "{app}\conf"; AfterInstall: ConfigureApplication
[Run]
Filename: "{app}\bin\InstallTraccar-NT.bat"
@@ -63,7 +64,7 @@ var
begin
LoadStringFromFile(ExpandConstant(CurrentFileName), S);
Insert('wrapper.java.classpath.2=../tracker-server.jar' + #13#10, S, Pos('wrapper.java.classpath.1', S));
- Insert(ExpandConstant('wrapper.app.parameter.2="{app}\conf\traccar.cfg"') + #13#10, S, Pos('wrapper.app.parameter.1', S));
+ Insert(ExpandConstant('wrapper.app.parameter.2="{app}\conf\traccar.xml"') + #13#10, S, Pos('wrapper.app.parameter.1', S));
StringChangeEx(S, '<YourMainClass>', 'org.traccar.Main', true);
StringChangeEx(S, '@app.name@', 'Traccar', true);
StringChangeEx(S, '@app.long.name@', 'Traccar', true);
@@ -77,8 +78,8 @@ var
S: String;
begin
LoadStringFromFile(ExpandConstant(CurrentFileName), S);
- StringChangeEx(S, '[DATABASE]', ExpandConstant('{app}\data\database'), true);
- StringChangeEx(S, '[WAR]', ExpandConstant('{app}\traccar-web.war'), true);
+ StringChangeEx(S, '[WEB]', ExpandConstant('{app}\web'), true);
StringChangeEx(S, '[LOG]', ExpandConstant('{app}\logs\tracker-server.log'), true);
+ StringChangeEx(S, '[DATABASE]', ExpandConstant('{app}\data\database'), true);
SaveStringToFile(ExpandConstant(CurrentFileName), S, false);
end;