2002-08-02 10:01:35 +00:00
!define VER_MAJOR 2
2002-08-26 16:56:33 +00:00
!define VER_MINOR 0a7
2002-08-28 19:45:45 +00:00
!define NAME " NSIS "
2002-08-02 10:01:35 +00:00
2002-08-28 19:45:45 +00:00
!verbose 3
!include " ${NSISDIR} \Examples\WinMessages.nsh "
!verbose 4
2002-08-02 10:01:35 +00:00
2002-08-28 19:45:45 +00:00
!define CURRENTPAGE $9
!define TEMP1 $R0
!define TEMP2 $R1
2002-08-02 10:01:35 +00:00
Name " NSIS "
Caption " Nullsoft Install System - Setup "
2002-08-02 12:45:31 +00:00
OutFile ..\ nsis${VER_MAJOR} ${VER_MINOR} .exe
2002-08-02 10:01:35 +00:00
SetCompressor bzip2
2002-08-28 19:45:45 +00:00
InstallColors /windows
InstProgressFlags smooth
2002-08-27 18:34:21 +00:00
XPStyle on
2002-08-28 19:45:45 +00:00
ChangeUI all " ${NSISDIR} \Contrib\UIs\modernsimple.exe "
SetFont Tahoma 8
CheckBitmap " ${NSISDIR} \Contrib\Icons\modern.bmp "
2002-08-02 10:01:35 +00:00
2002-08-28 19:45:45 +00:00
LicenseText " Scroll down to see the rest of the agreement. "
2002-08-02 10:01:35 +00:00
LicenseData ..\ license.txt
2002-08-28 19:45:45 +00:00
2002-08-02 10:01:35 +00:00
ComponentText " This will install the Nullsoft Install System v${VER_MAJOR}.${VER_MINOR} on your computer: "
2002-08-28 19:45:45 +00:00
InstType " Full "
InstType " Normal "
InstType " Lite "
2002-08-02 10:01:35 +00:00
AutoCloseWindow false
ShowInstDetails show
ShowUninstDetails show
DirText " Please select a location to install NSIS (or use the default): "
SetOverwrite on
SetDateSave on
InstallDir $PROGRAMFILES \ NSIS
InstallDirRegKey HKLM SOFTWARE\ NSIS " "
Section " NSIS development system (required) "
SectionIn 1 2 3 RO
SetOutPath $INSTDIR
SetOverwrite try
2002-08-02 12:45:31 +00:00
Delete $INSTDIR \ makensis- bz2.exe
2002-08-02 10:01:35 +00:00
File ..\ makensis.exe
File ..\ makensisw.exe
File ..\ makensis.htm
File ..\ license.txt
SetOverwrite off
File ..\ nsisconf.nsi
SectionEnd
Section " NSIS Examples (recommended) "
SectionIn 1 2 3
SetOutPath $INSTDIR \ Examples
SetOverwrite try
Delete $INSTDIR \ * .nsh
Delete $INSTDIR \ viewhtml.nsi
Delete $INSTDIR \ waplugin.nsi
Delete $INSTDIR \ example* .nsi
Delete $INSTDIR \ * test.nsi
Delete $INSTDIR \ primes.nsi
Delete $INSTDIR \ functions.htm
File ..\ Examples\ makensis.nsi
File ..\ Examples\ example1.nsi
File ..\ Examples\ example2.nsi
File ..\ Examples\ viewhtml.nsi
File ..\ Examples\ waplugin.nsi
File ..\ Examples\ bigtest.nsi
File ..\ Examples\ primes.nsi
File ..\ Examples\ rtest.nsi
File ..\ Examples\ gfx.nsi
2002-08-08 10:21:51 +00:00
File ..\ Examples\ one- section .nsi
2002-08-26 16:56:33 +00:00
File ..\ Examples\ languages.nsi
2002-08-02 10:01:35 +00:00
File ..\ Examples\ WinMessages.nsh
File ..\ Examples\ branding.nsh
File ..\ Examples\ functions.htm
2002-08-26 16:56:33 +00:00
SetOutPath " $INSTDIR \Examples\Modern UI "
File " ..\Examples\Modern UI\Screenshot.png "
File " ..\Examples\Modern UI\Readme.png "
File " ..\Examples\Modern UI\Readme.html "
File " ..\Examples\Modern UI\License.txt "
File " ..\Examples\Modern UI\Example.nsi "
2002-08-02 10:01:35 +00:00
SectionEnd
Section " NSI Development Shell Extensions "
SectionIn 1 2 3
; back up old value of .nsi
ReadRegStr $1 HKCR " .nsi " " "
StrCmp $1 " " Label1
StrCmp $1 " NSISFile " Label1
WriteRegStr HKCR " .nsi " " backup_val " $1
Label1 :
WriteRegStr HKCR " .nsi " " " " NSISFile "
WriteRegStr HKCR " NSISFile " " " " NSI Script File "
WriteRegStr HKCR " NSISFile\shell " " " " open "
WriteRegStr HKCR " NSISFile\DefaultIcon " " " $INSTDIR \ makensis.exe, 0
WriteRegStr HKCR " NSISFile\shell\open\command " " " 'notepad.exe "%1"'
WriteRegStr HKCR " NSISFile\shell\compile " " " " Compile NSI "
WriteRegStr HKCR " NSISFile\shell\compile\command " " " '"$INSTDIR\makensisw.exe" "$INSTDIR\makensis.exe" /CD "%1"'
WriteRegStr HKCR " NSISFile\shell\compile-bz2 " " " " Compile NSI (with bz2) "
WriteRegStr HKCR " NSISFile\shell\compile-bz2\command " " " '"$INSTDIR\makensisw.exe" "$INSTDIR\makensis.exe" /CD /X"SetCompressor bzip2" "%1"'
SectionEnd
Section " Start Menu + Desktop Icons "
SectionIn 1 2 3
SetOutPath $SMPROGRAMS \ NSIS
Delete " $SMPROGRAMS \NSIS\NSIS Home Page.lnk "
WriteINIStr " $SMPROGRAMS \NSIS\NSIS Home Page.url " " InternetShortcut " " URL " " http://www.nullsoft.com/free/nsis/ "
CreateShortCut " $SMPROGRAMS \NSIS\Uninstall NSIS.lnk " " $INSTDIR \uninst-nsis.exe "
CreateShortCut " $SMPROGRAMS \NSIS\NSIS Documentation.lnk " " $INSTDIR \makensis.htm "
CreateShortCut " $SMPROGRAMS \NSIS\NSIS Program Directory.lnk " " $INSTDIR "
Delete " $SMPROGRAMS \NSIS\NSI Online Template Generator.lnk "
WriteINIStr " $SMPROGRAMS \NSIS\NSI Online Template Generator.url " " InternetShortcut " " URL " " http://www.firehose.net/free/nsis/makensitemplate.phtml "
SetOutPath $INSTDIR
CreateShortCut " $DESKTOP \MakeNSIS.lnk " " $INSTDIR \Makensisw.exe " '"$INSTDIR\makensis.exe" /CD'
SectionEnd
SubSection " Contrib "
Section " Extra Icons "
SectionIn 1 2
SetOutPath $INSTDIR \ Contrib\ Icons
SetOverwrite try
Delete $INSTDIR \ Contrib\ * .ico
Delete $INSTDIR \ Contrib\ * .bmp
File ..\ Contrib\ Icons\ * .ico
File ..\ Contrib\ Icons\ * .bmp
SetOutPath $INSTDIR
SectionEnd
Section " Extra UIs "
SectionIn 1 2
SetOutPath $INSTDIR \ Contrib\ UIs
SetOverwrite try
File ..\ Contrib\ UIs\ * .exe
SetOutPath $INSTDIR
SectionEnd
2002-08-05 13:55:59 +00:00
Section " Language files "
2002-08-04 20:25:10 +00:00
SectionIn 1 2
SetOutPath " $INSTDIR \Contrib\Language files "
SetOverwrite try
File " ..\Contrib\Language files\*.nlf "
2002-08-26 16:56:33 +00:00
SetOutPath $INSTDIR \ Bin
File ..\ Bin\ MakeLangID.exe
2002-08-04 20:25:10 +00:00
SetOutPath $INSTDIR
SectionEnd
2002-08-02 10:01:35 +00:00
Section " Splash "
SectionIn 1 2
SetOutPath $INSTDIR \ Contrib\ Splash
SetOverwrite try
File ..\ Contrib\ Splash\ splash.c
File ..\ Contrib\ Splash\ splash.dsp
File ..\ Contrib\ Splash\ splash.dsw
File ..\ Contrib\ splash\ splash.txt
SetOutPath $INSTDIR \ Bin
File ..\ Bin\ splash.exe
IfFileExists $SMPROGRAMS \ NSIS 0 NoShortCuts
CreateDirectory $SMPROGRAMS \ NSIS\ Contrib
CreateShortCut " $SMPROGRAMS \NSIS\Contrib\Splash Screen Help.lnk " " $INSTDIR \contrib\splash\splash.txt "
CreateShortCut " $SMPROGRAMS \NSIS\Contrib\Splash project workspace.lnk " " $INSTDIR \source\splash\splash.dsw "
NoShortCuts :
SectionEnd
2002-08-05 14:31:50 +00:00
Section " Splash w/transparency "
SectionIn 1 2
SetOutPath $INSTDIR \ Bin
2002-08-26 18:07:23 +00:00
SetOverwrite try
File ..\ Bin\ magiclime.txt
2002-08-05 14:31:50 +00:00
File ..\ Bin\ magiclime.exe
SectionEnd
2002-08-02 10:01:35 +00:00
Section " Zip2Exe "
SectionIn 1 2
DetailPrint " Extracting zip2exe source "
SetDetailsPrint textonly
RMDir /r $INSTDIR \ Source\ Zip2Exe
SetOutPath $INSTDIR \ Contrib\ zip2exe
SetOverwrite try
File ..\ Contrib\ zip2exe\ * .cpp
File ..\ Contrib\ zip2exe\ * .ico
File ..\ Contrib\ zip2exe\ * .h
File ..\ Contrib\ zip2exe\ * .rc
File ..\ Contrib\ zip2exe\ * .dsw
File ..\ Contrib\ zip2exe\ * .dsp
SetOutPath $INSTDIR \ Contrib\ zip2exe\ zlib
File ..\ Contrib\ zip2exe\ zlib \ * .*
SetOutPath $INSTDIR \ Bin
File ..\ Bin\ zip2exe.exe
SetDetailsPrint both
IfFileExists $SMPROGRAMS \ NSIS 0 NoShortCuts
CreateDirectory $SMPROGRAMS \ NSIS\ Contrib
Delete " $SMPROGRAMS \Bin\NSIS\ZIP2EXE converter.lnk "
Delete " $SMPROGRAMS \NSIS\ZIP2EXE project workspace.lnk "
CreateShortCut " $SMPROGRAMS \NSIS\Contrib\ZIP2EXE converter.lnk " " $INSTDIR \Bin\zip2exe.exe "
CreateShortCut " $SMPROGRAMS \NSIS\Contrib\ZIP2EXE project workspace.lnk " " $INSTDIR \source\zip2exe\zip2exe.dsw "
NoShortCuts :
SectionEnd
Section " InstallOptions "
SectionIn 1 2
SetOutPath $INSTDIR \ Contrib\ InstallOptions
SetOverwrite try
File ..\ contrib\ installoptions\ io.dsp
File ..\ contrib\ installoptions\ io.dsw
File ..\ contrib\ installoptions\ test.ini
File ..\ contrib\ installoptions\ test.nsi
File ..\ contrib\ installoptions\ InstallerOptions.cpp
File ..\ contrib\ installoptions\ * .rc
File ..\ contrib\ installoptions\ * .h
File " ..\contrib\installoptions\Install Options.html "
2002-08-28 18:28:48 +00:00
SetOutPath $INSTDIR \ Plugins
2002-08-28 18:57:32 +00:00
File ..\ Plugins\ InstallOptions.dll
2002-08-02 10:01:35 +00:00
IfFileExists $SMPROGRAMS \ NSIS 0 NoShortCuts
CreateDirectory $SMPROGRAMS \ NSIS\ Contrib
CreateShortCut " $SMPROGRAMS \NSIS\Contrib\InstallOptions Readme.lnk " " $INSTDIR \contrib\InstallOptions\install options.html "
CreateShortCut " $SMPROGRAMS \NSIS\Contrib\InstallOptions project workspace.lnk " " $INSTDIR \contrib\InstallOptions\io.dsw "
NoShortCuts :
SectionEnd
Section " NSIS-DL "
SectionIn 1 2
SetOutPath $INSTDIR \ Contrib\ NSISdl
SetOverwrite try
File ..\ contrib\ NSISdl\ nsisdl.dsw
File ..\ contrib\ NSISdl\ nsisdl.dsp
File ..\ contrib\ NSISdl\ * .cpp
File ..\ contrib\ NSISdl\ * .h
File ..\ contrib\ NSISdl\ * .rc
File ..\ contrib\ NSISdl\ ReadMe.txt
2002-08-28 18:28:48 +00:00
SetOutPath $INSTDIR \ Plugins
2002-08-28 18:57:32 +00:00
File ..\ Plugins\ nsisdl.dll
2002-08-02 10:01:35 +00:00
IfFileExists $SMPROGRAMS \ NSIS 0 NoShortCuts
CreateDirectory $SMPROGRAMS \ NSIS\ Contrib
CreateShortCut " $SMPROGRAMS \NSIS\Contrib\NSIS-DL Readme.lnk " " $INSTDIR \contrib\NSISDL\ReadMe.txt "
CreateShortCut " $SMPROGRAMS \NSIS\Contrib\NSIS-DL project workspace.lnk " " $INSTDIR \contrib\NSISDL\nsisdl.dsw "
NoShortCuts :
SectionEnd
SubSectionEnd
SubSection " Source code "
Section " NSIS Source Code "
SectionIn 1
DetailPrint " Extracting source code.... "
SetDetailsPrint textonly
SetOutPath $INSTDIR \ Source
SetOverwrite try
File ..\ Source\ * .cpp
File ..\ Source\ * .c
File ..\ Source\ * .h
File ..\ Source\ script1.rc
File ..\ Source\ Makefile
File ..\ Source\ makenssi.dsp
File ..\ Source\ makenssi.dsw
File ..\ Source\ icon .ico
SetOutPath $INSTDIR \ Source\ zlib
File ..\ Source\ zlib \ * .*
SetOutPath $INSTDIR \ Source\ bzip2
File ..\ Source\ bzip2 \ * .*
SetOutPath $INSTDIR \ Source\ exehead
File ..\ Source\ exehead\ * .c
File ..\ Source\ exehead\ * .h
File ..\ Source\ exehead\ exehead.xml
File ..\ Source\ exehead\ resource.rc
File ..\ Source\ exehead\ * .dsp
File ..\ Source\ exehead\ Makefile
File ..\ Source\ exehead\ nsis.ico
File ..\ Source\ exehead\ uninst.ico
File ..\ Source\ exehead\ bitmap1.bmp
File ..\ Source\ exehead\ bin2h.exe
IfFileExists $SMPROGRAMS \ NSIS 0 NoSourceShortCuts
CreateShortCut " $SMPROGRAMS \NSIS\MakeNSIS project workspace.lnk " " $INSTDIR \source\makenssi.dsw "
NoSourceShortCuts :
SetDetailsPrint both
SectionEnd
SubSection " Contrib "
Section " ExDLL Source "
SectionIn 1
SetOutPath $INSTDIR \ Contrib\ ExDLL
SetOverwrite try
File ..\ contrib\ exdll\ exdll.c
File ..\ contrib\ exdll\ exdll.dpr
File ..\ contrib\ exdll\ exdll.dsp
File ..\ contrib\ exdll\ exdll.dsw
SetOutPath $INSTDIR
IfFileExists $SMPROGRAMS \ NSIS 0 NoShortCuts
CreateDirectory $SMPROGRAMS \ NSIS\ Contrib
CreateShortCut " $SMPROGRAMS \NSIS\Contrib\ExDLL project workspace.lnk " " $INSTDIR \contrib\ExDLL\exdll.dsw "
NoShortCuts :
SectionEnd
Section " MakeNSISW Source "
SectionIn 1
SetOutPath $INSTDIR \ Contrib\ Makensisw
SetOverwrite try
File ..\ contrib\ makensisw\ * .cpp
File ..\ contrib\ makensisw\ * .xml
File ..\ contrib\ makensisw\ * .h
File ..\ contrib\ makensisw\ * .ds?
File ..\ contrib\ makensisw\ * .rc
File ..\ contrib\ makensisw\ * .txt
#File ..\contrib\makensisw\Makefile
IfFileExists $SMPROGRAMS \ NSIS 0 NoShortCuts
CreateDirectory $SMPROGRAMS \ NSIS\ Contrib
CreateShortCut " $SMPROGRAMS \NSIS\Contrib\MakeNSISW project workspace.lnk " " $INSTDIR \contrib\MakeNsisw\makensisw.dsw "
CreateShortCut " $SMPROGRAMS \NSIS\Contrib\MakeNSISW readme.lnk " " $INSTDIR \contrib\MakeNsisw\readme.txt "
NoShortCuts :
SectionEnd
SubSectionEnd
SubSectionEnd
Section - post
WriteRegStr HKLM SOFTWARE\ NSIS " " $INSTDIR
WriteRegStr HKLM " Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS " " DisplayName " " NSIS Development Kit (remove only) "
WriteRegStr HKLM " Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS " " UninstallString " '"$INSTDIR\uninst-nsis.exe"'
SetOutPath $INSTDIR
IfFileExists $SMPROGRAMS \ NSIS " " nofunshit
ExecShell open '$SMPROGRAMS\NSIS'
Sleep 500
BringToFront
nofunshit :
Delete $INSTDIR \ uninst- nsis.exe
WriteUninstaller $INSTDIR \ uninst- nsis.exe
2002-08-28 19:45:45 +00:00
IntOp ${CURRENTPAGE} ${CURRENTPAGE} + 1
Call SetHeader
2002-08-02 10:01:35 +00:00
SectionEnd
Function .onInstSuccess
MessageBox MB_YESNO | MB_ICONQUESTION " Setup has completed. View readme file now? " IDNO NoReadme
ExecShell open '$INSTDIR\makensis.htm'
NoReadme :
FunctionEnd
2002-08-28 19:45:45 +00:00
Function .onInitDialog
Push ${TEMP1}
FindWindow ${TEMP1} " #32770 " " " $HWNDPARENT
StrCmp ${CURRENTPAGE} 1 " " + 4
GetDlgItem ${TEMP1} ${TEMP1} 1040
SendMessage ${TEMP1} ${WM_SETTEXT} 0 " If you accept all the terms of the agreement, choose I Agree to continue. If you choose Cancel, Setup will close. You must accept the agreement to install ${NAME}. "
Goto done
StrCmp ${CURRENTPAGE} 2 " " + 4
GetDlgItem ${TEMP1} ${TEMP1} 1042
SendMessage ${TEMP1} ${WM_SETTEXT} 0 " Description "
Goto done
StrCmp ${CURRENTPAGE} 3 " " + 3
GetDlgItem ${TEMP1} ${TEMP1} 1041
SendMessage ${TEMP1} ${WM_SETTEXT} 0 " Destination Folder "
done :
Pop ${TEMP1}
FunctionEnd
Function .onNextPage
Push ${TEMP1}
Push ${TEMP2}
StrCmp ${CURRENTPAGE} " " " " no_set_outer
GetDlgItem ${TEMP1} $HWNDPARENT 1037
CreateFont ${TEMP2} " Tahoma " 16 1000
SendMessage ${TEMP1} ${WM_SETFONT} ${TEMP2} 0
SetStaticBkColor ${TEMP1} 0x00FFFFFF
GetDlgItem ${TEMP1} $HWNDPARENT 1038
SetStaticBkColor ${TEMP1} 0x00FFFFFF
GetDlgItem ${TEMP1} $HWNDPARENT 1034
SetStaticBkColor ${TEMP1} 0x00FFFFFF
GetDlgItem ${TEMP1} $HWNDPARENT 1039
SetStaticBkColor ${TEMP1} 0x00FFFFFF
no_set_outer :
IntOp ${CURRENTPAGE} ${CURRENTPAGE} + 1
Call SetHeader
Pop ${TEMP2}
Pop ${TEMP1}
FunctionEnd
Function .onPrevPage
IntOp ${CURRENTPAGE} ${CURRENTPAGE} - 1
Call SetHeader
FunctionEnd
Function SetHeader
Push ${TEMP1}
Push ${TEMP2}
GetDlgItem ${TEMP1} $HWNDPARENT 1037
GetDlgItem ${TEMP2} $HWNDPARENT 1038
StrCmp ${CURRENTPAGE} 1 " " + 4
SendMessage ${TEMP1} ${WM_SETTEXT} 0 " License Agreement "
SendMessage ${TEMP2} ${WM_SETTEXT} 0 " Please review the license terms before installing ${NAME}. "
Goto done
StrCmp ${CURRENTPAGE} 2 " " + 4
SendMessage ${TEMP1} ${WM_SETTEXT} 0 " Choose Components "
SendMessage ${TEMP2} ${WM_SETTEXT} 0 " Choose the components you want to install. "
Goto done
StrCmp ${CURRENTPAGE} 3 " " + 4
SendMessage ${TEMP1} ${WM_SETTEXT} 0 " Choose Install Location "
SendMessage ${TEMP2} ${WM_SETTEXT} 0 " Choose the folder in which to install ${NAME} in. "
Goto done
StrCmp ${CURRENTPAGE} 4 " " + 4
SendMessage ${TEMP1} ${WM_SETTEXT} 0 " Installing "
SendMessage ${TEMP2} ${WM_SETTEXT} 0 " Please wait while ${NAME} is being installed. "
Goto done
StrCmp ${CURRENTPAGE} 5 " " + 3
SendMessage ${TEMP1} ${WM_SETTEXT} 0 " Finished "
SendMessage ${TEMP2} ${WM_SETTEXT} 0 " Setup was completed successfully. "
done :
Pop ${TEMP1}
Pop ${TEMP2}
FunctionEnd
Function .onUserAbort
MessageBox MB_YESNO | MB_ICONQUESTION " Are you sure you want to quit the NSIS Setup? " IDYES quit
Abort
quit :
FunctionEnd
2002-08-02 10:01:35 +00:00
UninstallText " This will uninstall NSIS from your system: "
Section Uninstall
IfFileExists $INSTDIR \ makensis.exe skip_confirmation
MessageBox MB_YESNO " It does not appear that NSIS is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended) " IDYES skip_confirmation
Abort " Uninstall aborted by user "
skip_confirmation :
ReadRegStr $1 HKCR " .nsi " " "
StrCmp $1 " NSISFile " 0 NoOwn ; only do this if we own it
ReadRegStr $1 HKCR " .nsi " " backup_val "
StrCmp $1 " " 0 RestoreBackup ; if backup == "" then delete the whole key
DeleteRegKey HKCR " .nsi "
Goto NoOwn
RestoreBackup :
WriteRegStr HKCR " .nsi " " " $1
DeleteRegValue HKCR " .nsi " " backup_val "
NoOwn :
DeleteRegKey HKCR " NSISFile "
DeleteRegKey HKLM " Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS "
DeleteRegKey HKLM SOFTWARE\ NSIS
Delete $SMPROGRAMS \ NSIS\ Contrib\ * .lnk
Delete $SMPROGRAMS \ NSIS\ Contrib\ * .url
RMDir $SMPROGRAMS \ NSIS\ Contrib
RMDir /r $INSTDIR \ Contrib
Delete $SMPROGRAMS \ NSIS\ * .lnk
Delete $SMPROGRAMS \ NSIS\ * .url
RMDir $SMPROGRAMS \ NSIS
Delete $DESKTOP \ MakeNSIS.lnk
Delete $INSTDIR \ makensis* .exe
Delete $INSTDIR \ Bin\ zip2exe.exe
Delete $INSTDIR \ Bin\ installoptions.exe
2002-08-28 18:28:48 +00:00
Delete $INSTDIR \ Plugins\ installoptions.dll
2002-08-02 10:01:35 +00:00
Delete $INSTDIR \ Bin\ splash.txt
Delete $INSTDIR \ Bin\ splash.exe
2002-08-26 16:56:33 +00:00
Delete $INSTDIR \ Bin\ magiclime.exe
2002-08-26 18:07:23 +00:00
Delete $INSTDIR \ Bin\ magiclime.txt
2002-08-28 18:28:48 +00:00
Delete $INSTDIR \ Plugins\ nsisdl.dll
2002-08-26 16:56:33 +00:00
Delete $INSTDIR \ Bin\ MakeLangID.exe
2002-08-02 10:01:35 +00:00
Delete $INSTDIR \ makensis.htm
Delete $INSTDIR \ Examples\ functions.htm
Delete $INSTDIR \ makensis.rtf
Delete $INSTDIR \ uninst- nsis.exe
Delete $INSTDIR \ nsisconf.nsi
Delete $INSTDIR \ Examples\ makensis.nsi
Delete $INSTDIR \ Examples\ example1.nsi
Delete $INSTDIR \ Examples\ example2.nsi
Delete $INSTDIR \ Examples\ waplugin.nsi
Delete $INSTDIR \ Examples\ viewhtml.nsi
Delete $INSTDIR \ Examples\ bigtest.nsi
Delete $INSTDIR \ Examples\ primes.nsi
Delete $INSTDIR \ Examples\ rtest.nsi
Delete $INSTDIR \ Examples\ uglytest.nsi
Delete $INSTDIR \ Examples\ spin.nsi
Delete $INSTDIR \ Examples\ wafull.nsi
2002-08-26 16:56:33 +00:00
Delete $INSTDIR \ Examples\ languages.nsi
2002-08-02 10:01:35 +00:00
Delete $INSTDIR \ Examples\ upgradedll.nsh
Delete $INSTDIR \ Examples\ WinMessages.nsh
2002-08-26 16:56:33 +00:00
Delete " $INSTDIR \Examples\Modern UI\Screenshot.png "
Delete " $INSTDIR \Examples\Modern UI\Readme.png "
Delete " $INSTDIR \Examples\Modern UI\Readme.html "
Delete " $INSTDIR \Examples\Modern UI\License.txt "
Delete " $INSTDIR \Examples\Modern UI\Example.nsi "
2002-08-02 10:01:35 +00:00
Delete $INSTDIR \ main.ico
Delete $INSTDIR \ makensis- license.txt
Delete $INSTDIR \ license.txt
Delete $INSTDIR \ uninst.ico
Delete $INSTDIR \ bitmap1.bmp
Delete $INSTDIR \ bitmap2.bmp
RMDir /r $INSTDIR \ Source
RMDir /r $INSTDIR \ Bin
2002-08-28 18:28:48 +00:00
RMDir /r $INSTDIR \ Plugins
2002-08-02 10:01:35 +00:00
RMDir /r $INSTDIR \ Examples
RMDir $INSTDIR
; if $INSTDIR was removed, skip these next ones
IfFileExists $INSTDIR 0 Removed
MessageBox MB_YESNO | MB_ICONQUESTION \
" Remove all files in your NSIS directory? (If you have anything you created that you want to keep, click No) " IDNO Removed
Delete $INSTDIR \ * .* ; this would be skipped if the user hits no
RMDir /r $INSTDIR
IfFileExists $INSTDIR 0 Removed
MessageBox MB_OK | MB_ICONEXCLAMATION " Note: $INSTDIR could not be removed. "
Removed :
2002-08-28 19:45:45 +00:00
IntOp ${CURRENTPAGE} ${CURRENTPAGE} + 1
Call un.SetHeader
2002-08-02 10:01:35 +00:00
SectionEnd
2002-08-28 19:45:45 +00:00
Function un.onNextPage
Push ${TEMP1}
Push ${TEMP2}
StrCmp ${CURRENTPAGE} " " " " no_set_outer
GetDlgItem ${TEMP1} $HWNDPARENT 1037
CreateFont ${TEMP2} " Tahoma " 16 1000
SendMessage ${TEMP1} ${WM_SETFONT} ${TEMP2} 0
SetStaticBkColor ${TEMP1} 0x00FFFFFF
GetDlgItem ${TEMP1} $HWNDPARENT 1038
SetStaticBkColor ${TEMP1} 0x00FFFFFF
GetDlgItem ${TEMP1} $HWNDPARENT 1034
SetStaticBkColor ${TEMP1} 0x00FFFFFF
GetDlgItem ${TEMP1} $HWNDPARENT 1039
SetStaticBkColor ${TEMP1} 0x00FFFFFF
no_set_outer :
IntOp ${CURRENTPAGE} ${CURRENTPAGE} + 1
Call un.SetHeader
Pop ${TEMP2}
Pop ${TEMP1}
FunctionEnd
Function un.SetHeader
Push ${TEMP1}
Push ${TEMP2}
GetDlgItem ${TEMP1} $HWNDPARENT 1037
GetDlgItem ${TEMP2} $HWNDPARENT 1038
StrCmp ${CURRENTPAGE} 1 " " + 4
SendMessage ${TEMP1} ${WM_SETTEXT} 0 " Uninstall ${NAME} "
SendMessage ${TEMP2} ${WM_SETTEXT} 0 " Remove ${NAME} from your system. "
Goto done
StrCmp ${CURRENTPAGE} 2 " " + 4
SendMessage ${TEMP1} ${WM_SETTEXT} 0 " Uninstalling "
SendMessage ${TEMP2} ${WM_SETTEXT} 0 " Please wait while ${NAME} is being uninstalled. "
Goto done
StrCmp ${CURRENTPAGE} 3 " " + 3
SendMessage ${TEMP1} ${WM_SETTEXT} 0 " Finished "
SendMessage ${TEMP2} ${WM_SETTEXT} 0 " ${NAME} has been removed from your system. "
done :
Pop ${TEMP2}
Pop ${TEMP1}
FunctionEnd