|
|
#1 |
|
Junior Member
Join Date: Apr 2007
Posts: 5
|
Hello,
I am trying to display a custom page in my installer. It is reading the ini file using a path in the script. Everything works fine when I run the installer from the same folder as the script (meaning all the referenced paths are correct from that folder). As soon as I move my installer to a different location, say desktop and run it, I can view all the pages, display my license (that was a relative path too) but my custom page is not displayed. The installer hangs and doesn't read my ini file. Interesting enough, if I copy all my folders from my orig location to desktop (matching the relative path to ini from desktop now) it starts working. Shouldn't my compiler comprress the ini file into the output .exe at the time of compiling? Seems like the exe is not able to find the ini here. Any help would be greatly appreciated. Thanks, Kaz |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
It's hard to tell w/o seeing your code, but if I had to guess, you are not extracting the page file in the correct place (or maybe not at all.)
If you are using the classic interface, use this in your .onInit function code: and this in your page's show function: code: |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Apr 2007
Posts: 5
|
Thanks a lot for your response!!
Here is my relevant code. I'm kinda using both MUI and Old style (had difficulty with MUI only..) ReserveFile "..\V1_final_code\hostinput.ini" !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS ... ... ;custom input page LangString HOSTPORT_TITLE ${LANG_ENGLISH} "Enter your Host name and Port #." LangString HOSTPORT_SUBTITLE ${LANG_ENGLISH} " " Page custom HostPortPage Function .onInit ;my input ini file ;!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "hostinput.ini" "HostPort" InitPluginsDir File /oname=$PLUGINSDIR\hostinput.ini "..\V1_final_code\hostinput.ini" FunctionEnd Function HostPortPage !insertmacro MUI_HEADER_TEXT "$(HostPort_TITLE)" "$(HostPort_SUBTITLE)" Push ${TEMP1} again: InstallOptions::dialog "..\V1_final_code\hostinput.ini" Pop ${TEMP1} ReadINIStr ${Hostname} "..\V1_final_code\hostinput.ini" "Field 2" "State" ReadINIStr ${Port} "..\V1_final_code\hostinput.ini" "Field 4" "State" ... ... ty!! Kaz |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Apr 2007
Posts: 5
|
ah.. nevermind... I got it.
Had to do: InstallOptions::dialog "$PLUGINSDIR\hostinput.ini" instead of my relative path. Thanks for the help!! Kaz |
|
|
|
|
|
#5 |
|
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
This works, but a better way would be to use the included MUI macros.
According to the MUI docs: To include a custom page, use MUI_INSTALLOPTIONS_EXTRACT. To display a custom page use MUI_INSTALLOPTIONS_DISPLAY. And if you want a return value from the page, you can use MUI_INSTALLOPTIONS_DISPLAY_RETURN or MUI_INSTALLOPTIONS_SHOW_RETURN (The return value is set to the stack and you can then pop from there.) |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|