Skip to content

Commit

Permalink
minor simplification of installer
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Rotter committed Mar 10, 2021
1 parent 47053cd commit 7e8d331
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion resources/nsis/NSIS.definitions.nsh.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
!define APP_VERSION "@APP_VERSION@"
!define APP_NAME "@APP_NAME@"
!define EXE_NAME "@EXE_NAME@"
;!define README_FILE "README"
!define LICENSE_FILE "@PWD@\..\..\resources\text\COPYING_GNU_GPL"
!define MUI_ICON "@PWD@\..\..\resources\graphics\@APP_LOW_NAME@.ico"
!define MUI_UNICON "@PWD@\..\..\resources\graphics\@APP_LOW_NAME@.ico"
Expand Down
6 changes: 2 additions & 4 deletions resources/nsis/NSIS.template.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SetCompressor /SOLID /FINAL lzma

; Default installation folder.
InstallDir "C:\${APP_NAME}"
InstallDirRegKey HKCU "Software\${APP_NAME}" "Install Directory"
InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" "InstallLocation"

; Require administrator access.
RequestExecutionLevel admin
Expand Down Expand Up @@ -131,16 +131,14 @@ NotInstalled:
ExecWait '"$INSTDIR\vc_redist.x64.exe" /install /passive /quiet'
Delete "$INSTDIR\vc_redist.x64.exe"

; Store installation folder.
WriteRegStr HKCU "Software\${APP_NAME}" "Install Directory" $INSTDIR

; Create uninstaller.
WriteUninstaller "$INSTDIR\Uninstall.exe"

; Add to Add/Remove programs.
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" "DisplayName" "${APP_NAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" "DisplayIcon" "$INSTDIR\${EXE_NAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" "DisplayVersion" "${APP_VERSION}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" "InstallLocation" "$INSTDIR"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" /S"
SectionEnd
Expand Down

0 comments on commit 7e8d331

Please sign in to comment.