Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions Java/RT-RP Install Script - JAVA.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Name "Reverse Tethering RePack"

; The file to write
OutFile "C:\Users\$PROFILE\Desktop\RT-RP Installer (Java).exe"
OutFile "$DESKTOP\RT-RP Installer (Java).exe"

; Request application privileges for Windows Vista and higher
RequestExecutionLevel admin
Expand All @@ -23,12 +23,15 @@ RequestExecutionLevel admin
Unicode True

; The default installation directory
InstallDir $PROGRAMFILES\RTRP
InstallDir $PROGRAMFILES64\RTRP

; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\RTRP" "Install_Dir"

; Path to the folder containing files to pack - relative to this script
!define SRCDIR "Source"

;--------------------------------

; Pages
Expand All @@ -52,9 +55,12 @@ Section "Java Runtime & Core Files (required)"

; Put file there

File /r "C:\Users\KUIJEN\Desktop\Source\"
File /r "${SRCDIR}\"

Execwait "$INSTDIR\Support\Java Runtime Installer.exe"
; Install Java Runtime if bundled
IfFileExists "$INSTDIR\Support\Java Runtime Installer.exe" 0 skipJava
ExecWait "$INSTDIR\Support\Java Runtime Installer.exe"
skipJava:

; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\RTRP "Install_Dir" "$INSTDIR"
Expand Down Expand Up @@ -117,13 +123,12 @@ Function .onInstSuccess
IfFileExists "$INSTDIR\Text Files\README.txt" openReadMe


; Delete regardless of whether readme exists or not
; Delete legacy config filename if present
Delete "$DOCUMENTS\RT-RP Config.txt"
Return

openReadMe:
ExecShell "open" "$INSTDIR\Text Files\README.txt"
Delete "$DOCUMENTS\RT-RP Config.txt"
Delete "$DOCUMENTS\RT-RP Config.ini"
Return
FunctionEnd
Loading