Skip to content
⌘ NSIS Forum Archive

MUI_WELCOME_PAGE and icon changing dynamically

3 posts

luthar#

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?
kichik#
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?
Afrow UK#
I think you want to use a !define, like this topic shows:
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.


Stu