Fix installer

This commit is contained in:
Claude Brisson
2024-04-12 20:27:54 +02:00
parent bd6a9cebda
commit 51f642a2d0
10 changed files with 31 additions and 10 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
jre\bin\java.exe lib\pairgoth-engine.jar

View File

@@ -1,2 +0,0 @@
auth = none

View File

@@ -16,6 +16,7 @@
!define INSTALL_DIR "$PROGRAMFILES64\${APP_NAME}"
!define INSTALL_TYPE "SetShellVarContext all"
!define DATA_DIR "$LocalAppdata\Pairgoth"
!define REG_ROOT "HKLM"
!define REG_APP_PATH "Software\Microsoft\Windows\CurrentVersion\App Paths\${MAIN_APP_EXE}"
!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
${INSTALL_TYPE}
@@ -93,6 +99,20 @@ Section -MainProgram
SetOutPath "$INSTDIR"
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
######################################################################