Hi All,
I am working on a summary page for my installer. I created the dialog using the cool soft designer and included the code in my installer as a SummaryPage.nsh file. I usually separate out custom UI to make the main nsi file look cleaner. I also put any other custom functions also into .nsh files and include them in my main nsi.
So, in one of my custom dialogs I have a couple ports that the user enters and am trying to show that in the summary page as a label. In my custom page where the ports are declared I have the following code, during pageleave I have the following set:
${NSD_GetText} $hCtl_FoundationDialog_TextBox1 $HTTPPortNumber
${NSD_GetText} $hCtl_FoundationDialog_TextBox2 $HTTPSPortNumber
How can I use this $HTTPPortNumber and $HTTPSPortNumber in my Summary dialog?
If I include the whole Summary Dialog in my nsi file it works fine, something like this:
${NSD_CreateLabel} 136.91u 69.54u 84.91u 14.15u "$HTTPSPortNumber"
Pop $hCtl_SummaryDialog_Label8
${NSD_CreateLabel} 136.91u 55.38u 84.91u 14.15u "$HTTPPortNumber"
Pop $hCtl_SummaryDialog_Label7
I see that there is no option in a .nsh file to do an include like we do in the .nsi files.
Any suggestions will be appreciated.
--Pavan
Summary screen passing variables
6 posts
There is no real difference between nsi and nsh files, the compiler does not care.
Anders,
!include abc.nsh does not working inside an nsh file. The error says "could not find abc.nsh" even though it's there in the same directory.
!include abc.nsh does not working inside an nsh file. The error says "could not find abc.nsh" even though it's there in the same directory.
I also checked that variables declared out of functions and sections are by default global. The variables that I wanted in the summary page are declared in my .nsi outside of the sections and functions. WHen I use these variables in my .nsh file. i notice that after compilation , there are warnings saying "unlnown variable/constant $HTTPPort detected. ignoring(include\SummaryPage.nsh)
Declare the variable before including the nsh.
Awesome Anders!! that worked. Thanks a ton!