noescom
24th June 2003 14:10 UTC
Inserting a page into the uninstaller
I'm trying to add an option page to the NSIS uninstaller. I'm able to display the page, but i somehow can't show any controls on it. What i have (the test.ini resides in the same directory as the UnInstall.exe):
;--------------------------------
;Modern UI Configuration
!define MUI_UNCUSTOMPAGECOMMANDS
!define MUI_UNINSTALLER
!define MUI_UNCONFIRMPAGE
;--------------------------------
;Uinstaller Custom Pages
!insertmacro MUI_UNPAGECOMMAND_CONFIRM
UninstPage custom un.UnInstallOptions
!insertmacro MUI_UNPAGECOMMAND_INSTFILES
;--------------------------------
;Uninstaller Options Callback
Function un.UnInstallOptions
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "test.ini"
FunctionEnd
;--------------------------------
;Uninstaller Section
Section "Uninstall"
Delete "$INSTDIR\Uninstall.exe"
RMDir "$INSTDIR"
SectionEnd
Any clues what i'm doing wrong?
Floris
Joost Verburg
24th June 2003 14:22 UTC
1) Can you attach the INI file?
1) To make custom pages a little easier, upgrade to Modern UI 1.65 (latest development version) and use the new page macro's: http://forums.winamp.com/showthread....hreadid=136615
noescom
24th June 2003 14:42 UTC
test.ini
Here's the test.ini (renamed to .txt to allow uploading). I'll checkout the new MUI version. Thnx.
Joost Verburg
24th June 2003 15:27 UTC
You forgot to extract the INI file in un.onInit (using the MUI_INSTALLOPTIONS_EXTRACT macro).
noescom
24th June 2003 15:36 UTC
That worked!
Thanks. The following did the trick.
Function un.onInit
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "test.ini"
FunctionEnd
Because EXTRACT is in the macro name, i assumed the macro extracts (e.g. unzips) the test.ini file from the uninstaller. So this is not the case. Instead it seems to convert the contents of test.ini into some internal data structure. And you don't need to distribute test.ini as i assumed.
Thanks for the help and keep up the good work!
Floris
Joost Verburg
24th June 2003 16:24 UTC
It does extract the INI file to the plug-ins directory, a temporary directory where the INI files and plug-ins are stored.