Fix installer
This commit is contained in:
@@ -1,23 +1,23 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
VERSION=$(grep '<version>' ../pom.xml | head -1 | egrep -o '[0-9.]+')
|
|
||||||
echo Generating installer script for pairgoth-$VERSION
|
echo Generating installer script for pairgoth-$VERSION
|
||||||
|
|
||||||
# root files
|
# cleanup
|
||||||
rm -rf target/*
|
rm -rf target/*
|
||||||
|
|
||||||
|
# parse version
|
||||||
|
VERSION=$(grep '<version>' ../pom.xml | head -1 | egrep -o '[0-9.]+')
|
||||||
|
|
||||||
|
# files
|
||||||
cp -r resources/files target
|
cp -r resources/files target
|
||||||
|
|
||||||
# icon
|
|
||||||
cp resources/pairgoth.ico target/files
|
|
||||||
|
|
||||||
# java library
|
|
||||||
mkdir -p target/files/lib
|
mkdir -p target/files/lib
|
||||||
|
cp resources/pairgoth.ico target/files
|
||||||
cp ../application/target/pairgoth-engine.jar target/files/lib
|
cp ../application/target/pairgoth-engine.jar target/files/lib
|
||||||
|
cp -r resources/data target/data
|
||||||
|
|
||||||
# jre
|
# jre
|
||||||
unzip -d target/files resources/jre.zip
|
unzip -d target/files resources/jre.zip
|
||||||
|
|
||||||
# installer script
|
# installer script
|
||||||
sed -r -e "s/@VERSION@/$VERSION.0.0/g" resources/installer.nsi > target/installer.nsi
|
sed -r -e "s/@VERSION@/$VERSION.0.0/g" resources/installer.nsi > target/installer.nsi
|
||||||
|
|
||||||
cat target/installer.nsi | makensis -V4 -
|
cat target/installer.nsi | makensis -V4 -
|
||||||
|
1
installer/resources/data/ratings/EGF-20240410.json
Normal file
1
installer/resources/data/ratings/EGF-20240410.json
Normal file
File diff suppressed because one or more lines are too long
1
installer/resources/data/ratings/FFG-20240412.json
Normal file
1
installer/resources/data/ratings/FFG-20240412.json
Normal file
File diff suppressed because one or more lines are too long
Binary file not shown.
1
installer/resources/files/pairgoth.bat
Normal file
1
installer/resources/files/pairgoth.bat
Normal file
@@ -0,0 +1 @@
|
|||||||
|
jre\bin\java.exe lib\pairgoth-engine.jar
|
@@ -1,2 +0,0 @@
|
|||||||
auth = none
|
|
||||||
|
|
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
!define INSTALL_DIR "$PROGRAMFILES64\${APP_NAME}"
|
!define INSTALL_DIR "$PROGRAMFILES64\${APP_NAME}"
|
||||||
!define INSTALL_TYPE "SetShellVarContext all"
|
!define INSTALL_TYPE "SetShellVarContext all"
|
||||||
|
!define DATA_DIR "$LocalAppdata\Pairgoth"
|
||||||
!define REG_ROOT "HKLM"
|
!define REG_ROOT "HKLM"
|
||||||
!define REG_APP_PATH "Software\Microsoft\Windows\CurrentVersion\App Paths\${MAIN_APP_EXE}"
|
!define REG_APP_PATH "Software\Microsoft\Windows\CurrentVersion\App Paths\${MAIN_APP_EXE}"
|
||||||
!define UNINSTALL_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}"
|
!define UNINSTALL_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}"
|
||||||
@@ -86,6 +87,11 @@ InstallDir "${INSTALL_DIR}"
|
|||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
!include "StrFunc.nsh"
|
||||||
|
${Using:StrFunc} StrRep
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
|
||||||
Section -MainProgram
|
Section -MainProgram
|
||||||
${INSTALL_TYPE}
|
${INSTALL_TYPE}
|
||||||
|
|
||||||
@@ -93,6 +99,20 @@ Section -MainProgram
|
|||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
File /r "target/files/"
|
File /r "target/files/"
|
||||||
|
|
||||||
|
${StrRep} $1 "${DATA_DIR}" "\" "/"
|
||||||
|
|
||||||
|
FileOpen $0 "pairgoth.properties" w
|
||||||
|
FileWrite $0 "auth = none"
|
||||||
|
FileWrite $0 "$\r$\n"
|
||||||
|
FileWrite $0 "store.file.path = $1/tournamentfiles"
|
||||||
|
FileWrite $0 "$\r$\n"
|
||||||
|
FileWrite $0 "ratings.path = $1/ratings"
|
||||||
|
FileWrite $0 "$\r$\n"
|
||||||
|
FileClose $0
|
||||||
|
SetOutPath "${DATA_DIR}"
|
||||||
|
File /r "target/data/"
|
||||||
|
SetOutPath "$INSTDIR"
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
Reference in New Issue
Block a user