Skip to content

Commit

Permalink
installer script
Browse files Browse the repository at this point in the history
now will uninstall previous version, to update easily
  • Loading branch information
alvarogonzalezferrer committed May 20, 2023
1 parent fc0b5a6 commit ac6c12c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions releases_binary/scrcpy_light_launcher_installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ UninstPage instfiles

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

;---- Uninstall previous version ----
; The "" makes the section hidden.
Section "" SecUninstallPrevious
Call UninstallPrevious
SectionEnd


; The stuff to install
Section "Scrcpy light launcher (required)"

Expand Down Expand Up @@ -73,18 +80,11 @@ Section "Start Menu Shortcuts"

SectionEnd

;---- Uninstall previous version ----
; The "" makes the section hidden.
Section "" SecUninstallPrevious

Call UninstallPrevious

SectionEnd

; helper to uninstall previous versions
Function UninstallPrevious

; Check for uninstaller.
ReadRegStr $R0 HKLM Software\scrcpy_light_launcher "InstallDir"
ReadRegStr $R0 HKLM Software\scrcpy_light_launcher "Install_Dir"

${If} $R0 == ""
DetailPrint "No previous installation detected."
Expand Down

0 comments on commit ac6c12c

Please sign in to comment.