Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added recursive delete function and fixed bug where uninstaller was n…
…ot properly removing all of qgis (why anyone would want to remove it anyway is beyond me...) Added RecursiveDelete.nsh to assist in above fix Renamed qgis_window_geometry.nsi to qgis_window_geometry.nsh for better file nameing consistency git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6222 c8812cc2-4d05-0410-92ff-de0c093fc19c
- Loading branch information
timlinux
committed
Dec 9, 2006
1 parent
560f918
commit 6887df0
Showing
4 changed files
with
80 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
|
||
; ################################################################ | ||
; appends \ to the path if missing | ||
; example: !insertmacro GetCleanDir "c:\blabla" | ||
; Pop $0 => "c:\blabla\" | ||
!macro GetCleanDir INPUTDIR | ||
; ATTENTION: USE ON YOUR OWN RISK! | ||
; Please report bugs here: http://stefan.bertels.org/ | ||
!define Index_GetCleanDir 'GetCleanDir_Line${__LINE__}' | ||
Push $R0 | ||
Push $R1 | ||
StrCpy $R0 "${INPUTDIR}" | ||
StrCmp $R0 "" ${Index_GetCleanDir}-finish | ||
StrCpy $R1 "$R0" "" -1 | ||
StrCmp "$R1" "\" ${Index_GetCleanDir}-finish | ||
StrCpy $R0 "$R0\" | ||
${Index_GetCleanDir}-finish: | ||
Pop $R1 | ||
Exch $R0 | ||
!undef Index_GetCleanDir | ||
!macroend | ||
|
||
; ################################################################ | ||
; similar to "RMDIR /r DIRECTORY", but does not remove DIRECTORY itself | ||
; example: !insertmacro RemoveFilesAndSubDirs "$INSTDIR" | ||
!macro RemoveFilesAndSubDirs DIRECTORY | ||
; ATTENTION: USE ON YOUR OWN RISK! | ||
; Please report bugs here: http://stefan.bertels.org/ | ||
!define Index_RemoveFilesAndSubDirs 'RemoveFilesAndSubDirs_${__LINE__}' | ||
|
||
Push $R0 | ||
Push $R1 | ||
Push $R2 | ||
|
||
!insertmacro GetCleanDir "${DIRECTORY}" | ||
Pop $R2 | ||
FindFirst $R0 $R1 "$R2*.*" | ||
${Index_RemoveFilesAndSubDirs}-loop: | ||
StrCmp $R1 "" ${Index_RemoveFilesAndSubDirs}-done | ||
StrCmp $R1 "." ${Index_RemoveFilesAndSubDirs}-next | ||
StrCmp $R1 ".." ${Index_RemoveFilesAndSubDirs}-next | ||
IfFileExists "$R2$R1\*.*" ${Index_RemoveFilesAndSubDirs}-directory | ||
; file | ||
Delete "$R2$R1" | ||
goto ${Index_RemoveFilesAndSubDirs}-next | ||
${Index_RemoveFilesAndSubDirs}-directory: | ||
; directory | ||
RMDir /r "$R2$R1" | ||
${Index_RemoveFilesAndSubDirs}-next: | ||
FindNext $R0 $R1 | ||
Goto ${Index_RemoveFilesAndSubDirs}-loop | ||
${Index_RemoveFilesAndSubDirs}-done: | ||
FindClose $R0 | ||
|
||
Pop $R2 | ||
Pop $R1 | ||
Pop $R0 | ||
!undef Index_RemoveFilesAndSubDirs | ||
!macroend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.