diff --git a/wininst/developer_scripts/ReplaceInFile.nsh b/wininst/developer_scripts/ReplaceInFile.nsh deleted file mode 100644 index 97f912e7dbd..00000000000 --- a/wininst/developer_scripts/ReplaceInFile.nsh +++ /dev/null @@ -1,71 +0,0 @@ -# Author: Robert Kehl -# Source: http://nsis.sourceforge.net/ReplaceInFile -# -!macro ReplaceInFile SOURCE_FILE SEARCH_TEXT REPLACEMENT - Push "${SOURCE_FILE}" - Push "${SEARCH_TEXT}" - Push "${REPLACEMENT}" - Call RIF -!macroend - -Function RIF - - ClearErrors ; want to be a newborn - - Exch $0 ; REPLACEMENT - Exch - Exch $1 ; SEARCH_TEXT - Exch 2 - Exch $2 ; SOURCE_FILE - - Push $R0 ; SOURCE_FILE file handle - Push $R1 ; temporary file handle - Push $R2 ; unique temporary file name - Push $R3 ; a line to sar/save - Push $R4 ; shift puffer - - IfFileExists $2 +1 RIF_error ; knock-knock - FileOpen $R0 $2 "r" ; open the door - - GetTempFileName $R2 ; who's new? - FileOpen $R1 $R2 "w" ; the escape, please! - - RIF_loop: ; round'n'round we go - FileRead $R0 $R3 ; read one line - IfErrors RIF_leaveloop ; enough is enough - RIF_sar: ; sar - search and replace - Push "$R3" ; (hair)stack - Push "$1" ; needle - Push "$0" ; blood - Call StrReplace ; do the bartwalk - StrCpy $R4 "$R3" ; remember previous state - Pop $R3 ; gimme s.th. back in return! - StrCmp "$R3" "$R4" +1 RIF_sar ; loop, might change again! - FileWrite $R1 "$R3" ; save the newbie - Goto RIF_loop ; gimme more - - RIF_leaveloop: ; over'n'out, Sir! - FileClose $R1 ; S'rry, Ma'am - clos'n now - FileClose $R0 ; me 2 - - Delete "$2.old" ; go away, Sire - Rename "$2" "$2.old" ; step aside, Ma'am - Rename "$R2" "$2" ; hi, baby! - - ClearErrors ; now i AM a newborn - Goto RIF_out ; out'n'away - - RIF_error: ; ups - s.th. went wrong... - SetErrors ; ...so cry, boy! - - RIF_out: ; your wardrobe? - Pop $R4 - Pop $R3 - Pop $R2 - Pop $R1 - Pop $R0 - Pop $2 - Pop $0 - Pop $1 - -FunctionEnd \ No newline at end of file diff --git a/wininst/dont_submit b/wininst/dont_submit index 61079b0a04b..df67f056760 100644 --- a/wininst/dont_submit +++ b/wininst/dont_submit @@ -11,5 +11,4 @@ script_cgal_3_3.nsh script_cgal_3_3.nsi TextLog.nsh WriteEnvStr.nsh -ReplaceInFile.nsh zirkel.bmp