Archive: MUI_WELCOME_PAGE and icon changing dynamically


MUI_WELCOME_PAGE and icon changing dynamically
Hello,

I am new to NSIS so it may have been already shown.

I have a NSIS script that has to be updated. I want to make a generic setup.exe file that will look at a .ini file for information (ie name, product version)

I want to load data into a variable (PRODUCT NAME)

var PRODUCT_NAME
!define MUI_ICON "Contrib\$PRODUCT_NAME\$PRODUCT_NAME.ico"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "license.txt"

Product name variable is initialized in the .onGUIInit function. But when trying to compile, it says i have an error when I call this macro:
!insertmacro MUI_PAGE_WELCOME


What could be the work around?
Only use the Icon function in the .onGUIInit function and take of the !define MUI_ICON?


You cannot have a variable in the icon. That's a resource embedded in the installer file itself. Think about it, when you want to see its icon in explorer, how will it be able to read the INI file if it wasn't even executed?


I think you want to use a !define, like this topic shows:
http://forums.winamp.com/showthread.php?threadid=272109

Stu