Skip to content
⌘ NSIS Forum Archive

Display the content of a file in a modern UI

5 posts

Asier#

Display the content of a file in a modern UI

Hello all,

I'm new to this forum, so this question might be already answered, but I just couldn't find any thread about it:

I want to display the content of a file describing the application to install. I would like to show it under the welcome text of the MUI_PAGE_WELCOME, or in a new page of the wizard. How can I do it? I don't want to display the application description inside the license.

Thanks in advance,
Brummelchen#
>> I don't want to display the application description inside the license.

2-License page...
was discussed earlier here...

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.

or
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.


HTH
deguix#
You can edit the file "ioSpecial.ini" using a code inside .onGUIInit function or using !define MUI_PAGE_CUSTOMFUNCTION_PRE "function" before !insertmacro MUI_PAGE_WELCOME, and putting the code to edit it inside "function".
Asier#
Thanks to all. I've managed to insert the text of the file in the Welcome page. I'm using a variable, which keeps some lines of the file, and then change the welcome page:

Var Description
!define MUI_WELCOMEPAGE_TEXT "$(MUI_TEXT_WELCOME_INFO_TEXT)\r\n\r\n------------------\r\n$Description"
!insertmacro MUI_PAGE_WELCOME
...

I've created a ReadLabelFile function:

Function ReadLabelFile
Push $0
Push $1
Push $2

InitPluginsDir
File /oname=$PLUGINSDIR\label "cnc\label"
FileOpen $0 "$PLUGINSDIR\label" "r"

FileRead $0 $1 ;Code
(...)
StrCpy $Description "$Description\r\n$1"
FileRead $0 $1 ;Date
(...)
FileClose $0

Pop $2
Pop $1
Pop $0
FunctionEnd