Added some more deps.
This commit is contained in:
parent
285a3b3a3c
commit
506bfab427
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -10,3 +10,6 @@
|
|||||||
[submodule "resources/scripts/nsis"]
|
[submodule "resources/scripts/nsis"]
|
||||||
path = resources/scripts/nsis
|
path = resources/scripts/nsis
|
||||||
url = https://github.com/martinrotter/nsis.git
|
url = https://github.com/martinrotter/nsis.git
|
||||||
|
[submodule "resources/scripts/findreplace"]
|
||||||
|
path = resources/scripts/findreplace
|
||||||
|
url = https://github.com/martinrotter/findreplace.git
|
||||||
|
@ -169,10 +169,11 @@ LangString DESC_StartMenuShortcuts ${LANG_ENGLISH} "Start Menu Shortcuts for ${A
|
|||||||
|
|
||||||
; Uninstaller section.
|
; Uninstaller section.
|
||||||
Section "Uninstall"
|
Section "Uninstall"
|
||||||
; Remove core application files & directories.
|
; Here remove all files, but skip "data" folder.
|
||||||
@CPACK_NSIS_DELETE_FILES@
|
Push "$INSTDIR"
|
||||||
@CPACK_NSIS_DELETE_DIRECTORIES@
|
Push "data"
|
||||||
|
Call RmDirsButOne
|
||||||
|
|
||||||
; Remove uninstaller.
|
; Remove uninstaller.
|
||||||
Delete "$INSTDIR\Uninstall.exe"
|
Delete "$INSTDIR\Uninstall.exe"
|
||||||
|
|
||||||
@ -192,17 +193,43 @@ SectionEnd
|
|||||||
;--------------------------------
|
;--------------------------------
|
||||||
; Custom functions.
|
; Custom functions.
|
||||||
|
|
||||||
|
Function RmDirsButOne
|
||||||
|
Exch $R0 ; exclude dir
|
||||||
|
Exch
|
||||||
|
Exch $R1 ; route dir
|
||||||
|
Push $R2
|
||||||
|
Push $R3
|
||||||
|
|
||||||
|
ClearErrors
|
||||||
|
FindFirst $R3 $R2 "$R1\*.*"
|
||||||
|
IfErrors Exit
|
||||||
|
|
||||||
|
Top:
|
||||||
|
StrCmp $R2 "." Next
|
||||||
|
StrCmp $R2 ".." Next
|
||||||
|
StrCmp $R2 $R0 Next
|
||||||
|
IfFileExists "$R1\$R2\*.*" 0 Next
|
||||||
|
RmDir /r "$R1\$R2"
|
||||||
|
|
||||||
|
#Goto Exit ;uncomment this to stop it being recursive (delete only one dir)
|
||||||
|
|
||||||
|
Next:
|
||||||
|
ClearErrors
|
||||||
|
FindNext $R3 $R2
|
||||||
|
IfErrors Exit
|
||||||
|
Goto Top
|
||||||
|
|
||||||
|
Exit:
|
||||||
|
FindClose $R3
|
||||||
|
|
||||||
|
Pop $R3
|
||||||
|
Pop $R2
|
||||||
|
Pop $R1
|
||||||
|
Pop $R0
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
; Executed when installer starts.
|
; Executed when installer starts.
|
||||||
Function .onInit
|
Function .onInit
|
||||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||||
SectionSetFlags ${Core} $0
|
SectionSetFlags ${Core} $0
|
||||||
FunctionEnd
|
|
||||||
|
|
||||||
; Conditional saving to registry.
|
|
||||||
Function ConditionalAddToRegisty
|
|
||||||
Pop $0
|
|
||||||
Pop $1
|
|
||||||
StrCmp "$0" "" ConditionalAddToRegisty_EmptyString
|
|
||||||
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" "$1" "$0"
|
|
||||||
ConditionalAddToRegisty_EmptyString:
|
|
||||||
FunctionEnd
|
FunctionEnd
|
1
resources/scripts/findreplace
Submodule
1
resources/scripts/findreplace
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit b72408bece60b888a9257da2039441b221803a19
|
Loading…
x
Reference in New Issue
Block a user