Old 27th June 2011, 18:06   #1
FlacoPolo
Junior Member
 
Join Date: Jun 2011
Posts: 2
Post problem with Custom UI from a tutorial

I was following this tutorial [Using HM NIS Edit to create custom pages] and when I tried to compile it with the code below I got that error (the quoted text)

code:

The Resulting .nsi script
View Source


Quote:
!insertmacro: MUI_INSTALLOPTIONS_EXTRACT_AS
!error: MUI_INSTALLOPTIONS_* macros are no longer a part of MUI2. Include InstallOptions.nsh and use INSTALLOPTIONS_* macros instead. It is also recommended to upgrade to nsDialogs.
Error in macro MUI_INSTALLOPTIONS_EXTRACT_AS on macroline 2
Error in script "C:\Users\Luciano\Documents\NSIS custom page tutorial\WelcomeFinish.nsi" on line 12 -- aborting creation process
then I fixed the code according to the log, and now I get this new error. (which i dont know how to fix.)

code:

The .nsi script after the changes
View Source


Quote:
!insertmacro: INSTALLOPTIONS_EXTRACT_AS
InitPluginsDir
File: "UserPass.ini"->"$PLUGINSDIR\UserPass" [compress] 241/475 bytes
!insertmacro: INSTALLOPTIONS_WRITE
WriteINIStr: [Settings] RTL=$(^RTL) in $PLUGINSDIR\UserPass
!insertmacro: end of INSTALLOPTIONS_WRITE
!insertmacro: end of INSTALLOPTIONS_EXTRACT_AS
FunctionEnd
Name: "Modern UI Test"
OutFile: "WelcomeFinish.exe"
InstallDir: "$LOCALAPPDATA\Modern UI Test"
InstallRegKey: "HKCU\Software\Modern UI Test\"
!define: "MUI_ABORTWARNING"=""
!define: "MUI_CUSTOMFUNCTION_GUIINIT"="onGUIInit"
Function: "UsernamePasswordPage"
!insertmacro: MUI_HEADER_TEXT
!insertmacro: end of MUI_HEADER_TEXT
!insertmacro: INSTALLOPTIONS_DISPLAY
Push: $0
File: "InstallOptions.dll"->"$PLUGINSDIR\InstallOptions.dll" [compress] 8005/14848 bytes
Plugin Command: dialog $PLUGINSDIR\UserPass
Pop: $0
Pop: $0
!insertmacro: end of INSTALLOPTIONS_DISPLAY
!insertmacro: INSTALLOPTIONS_READ
Usage: ReadINIStr $(user_var: output) ini_file section entry_name
Error in macro INSTALLOPTIONS_READ on macroline 2
Error in script "C:\Users\Luciano\Documents\NSIS custom page tutorial\WelcomeFinish.nsi" on line 49 -- aborting creation process
BTW: This is the .ini file for the page ui

Could somebody tell me what am I doing wrong, and what would be the right way to do it?
FlacoPolo is offline   Reply With Quote
Old 27th June 2011, 19:30   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
InstallOptions works with MUI1, so you can probably go back to the first script you pasted and include mui instead of mui2.

But much more than that you should use nsDialogs. InstallOptions and MUI1 are deprecated. This means that HM NIS edit is also deprecated. There's actually a nice dialog designer GUI for nsDialogs these days, if you don't want to code your custom pages manually (see NSIS Dialog Designer thread).
MSG is offline   Reply With Quote
Old 27th June 2011, 19:40   #3
FlacoPolo
Junior Member
 
Join Date: Jun 2011
Posts: 2
Thanks for the advise, I will start to read some docs!!
FlacoPolo is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
custom, nsis, page, tutorial

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump