Old 3rd January 2013, 13:37   #1
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
MUI macros not working anymore in my script

i've been away from nsis from months, in fact i haven't even touched my old windows machine lately. however, i found myself in the position that i needed to update an old script of mine, but all of a sudden it produces errors that didn't happen before.

code:
!insertmacro: MUI_PAGE_LICENSE
Error in macro MUI_INTERFACE on macroline 54
Error in macro MUI_PAGE_INIT on macroline 3
Error in macro MUI_PAGE_LICENSE on macroline 5



it took me a while to figure out, that for unknown reasons, the nsis projected which is sitting in a dropbox folder, suffered from synchronization problems. my custom ui, basically a modified MUI_nodesc, was 0kb in size. i changed the ui in the script to MUI_nodesc, but the problem persists. any ideas what could be the problem, all other resources by my script are intact. nothing was changed on the license page or the license itself since i last compiled my project successfully.

edit: interestingly, the standard MUI compiles the script
Yathosho is offline   Reply With Quote
Old 3rd January 2013, 19:01   #2
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 549
Send a message via ICQ to T.Slappy
1) Why colon after !insertmacro ???
2) MUI_PAGE_LICENSE requires license file (parameter)

Cool looking installers with custom design: www.graphical-installer.com
Create Setup Pages easily: www.install-designer.com
Build installers in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.4 Sydney: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 3rd January 2013, 20:11   #3
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
Quote:
Originally Posted by T.Slappy View Post
1) Why colon after !insertmacro ???
ah, that was copied from the makensis window, it's not my actual code

Quote:
2) MUI_PAGE_LICENSE requires license file (parameter)
my actual code goes like this (and as i said, it worked for years!)

code:
!define MUI_COMPONENTSPAGE_CHECKBITMAP "ui\yi-${LOWERCASE}.bmp"
!define MUI_ICON "ui\yi-${LOWERCASE}.ico"
!define MUI_UI "ui\nodesc.exe"
!define MUI_LICENSEPAGE
!define MUI_LICENSEPAGE_BGCOLOR "FFFFFF"
!define MUI_INSTFILESPAGE_COLORS "000000 FFFFFF"
!define MUI_INSTFILESPAGE_PROGRESSBAR "colored smooth"
!define MUI_BGCOLOR "0x1b1b1b"
...
!define MUI_LICENSEPAGE_TEXT_BOTTOM "$(LabelLicense)"
!define MUI_LICENSEPAGE_CHECKBOX
!insertmacro MUI_PAGE_LICENSE "license.txt"

Yathosho is offline   Reply With Quote
Old 3rd January 2013, 21:48   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,321
"!define MUI_LICENSEPAGE" is supposed to do what?

Anyway, I know the ChangeUI command does not output errors in all cases so make sure those UI exe files are not corrupt...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 4th January 2013, 10:51   #5
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
Quote:
Originally Posted by Anders View Post
"!define MUI_LICENSEPAGE" is supposed to do what?
frankly, i don't know (or remember). it has been there since march 2009 and it never produced a problem in the 20 versions that came out since. anyway, commenting that line doesn't change a thing as i still get the same error from the compiler.

reinstalled nsis to make sure MUI_nodesc isn't corrupted. no success. did the same in a clean vm. no success.
Yathosho is offline   Reply With Quote
Old 4th January 2013, 11:22   #6
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
well, nevermind. i simply copied my gui modifications to modern.exe (at the cost of extra 2kb). i don't know what's wrong all of a sudden with modern_nodesc.exe, everybody knows nothing in nsis changed in over 4 years.
Yathosho is offline   Reply With Quote
Old 4th January 2013, 21:24   #7
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 549
Send a message via ICQ to T.Slappy
Heh, one more time - Correct syntax is:
!insertmacro MUI_PAGE_LICENSE "License.rtf"

You used !define MUI_LICENSEPAGE (without parameter) which is definitely wrong for MUI2 (I think it is for MUI1).

You cannot use MUI stuff in MUI2 script - either include MUI.nsh (and do not use MUI2 stuff) or update whole script to MUI2 ( so rewrite most of MUI1 commands).

Cool looking installers with custom design: www.graphical-installer.com
Create Setup Pages easily: www.install-designer.com
Build installers in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.4 Sydney: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 6th January 2013, 07:50   #8
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
MUI1 and MUI2 use exactly the same commands. Only the internal implementation is different (IO vs nsDialogs), and MUI2 adds some variables for nsDialogs-based welcome/finish page customization.

The MUI_LICENSEPAGE define was never used by MUI, as far as I know. It probably never did anything.
MSG is offline   Reply With Quote
Old 8th January 2013, 21:06   #9
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
Quote:
Originally Posted by T.Slappy View Post
!insertmacro MUI_PAGE_LICENSE "License.rtf"
take a good look, that's exactly what i've been using in the last line. apparently and for unknown reason, there was a define that does nothing - and it had nothing to do with nsis no longer compiling my script.
Yathosho is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

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