Archive: Custom page not shown with LZMA


Custom page not shown with LZMA
  I have a custom page that I want to display with InstallOptions just after the MUI_PAGE_DIRECTORY page.

When I compress my setup with ZLIB, everything works fine.
But when I use LZMA /SOLID, the page is not displayed (in fact the MUI_PAGE_DIRECTORY page is shown twice).

I suppose it is because the ini file is not extracted at this time of the setup.

Is there a way to correct this problem?


Please include an example. It's impossible to know what the problem is without any details.


In fact my custom page is shown after 10 seconds !
But before that the InstDir page is shown a second time (the buttons next and cancel change).

Here is my code:


SetCompressor /SOLID lzma


>!include "MUI.nsh"
>!include "logiclib.nsh"
>!include "TextFunc.nsh"
>!include "WordFunc.nsh"

>!define PRODUCT_NAME "Etebac Engine"
>!define PRODUCT_VERSION "2.0"
>!define MUI_COMPONENTSPAGE_NODESC

Name "${PRODUCT_NAME}"
>BrandingText "Copyright © 2005-2006 Test and Go"
>OutFile "EtebacEngineSetup.exe"

>InstallDir "c:\TGJSERVER\"

ReserveFile "
ip.ini"

!insertmacro MUI_PAGE_DIRECTORY
Page custom OtherParams
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_LANGUAGE "French"

Function OtherParams
!insertmacro MUI_HEADER_TEXT "Personnalisation des fichiers" "Saisissez le port COM du modem"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ip.ini"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ip.ini"
!insertmacro MUI_INSTALLOPTIONS_READ $PORT_COM "ip.ini" "Field 2" "State" ;Port COM du modem
!insertmacro MUI_HEADER_TEXT "Personnalisation des fichiers" "Remplacement des paramètres"
FunctionEnd
>

Is that a complete example? The extraction of ip.ini shouldn't take long unless you have more files in there.


Yes of course, it's just the important part of my setup.
In fact, I have more than 30 MB of files in my setup.


Then you need to at least include the entire script. You've removed crucial parts of the example.

Without seeing the entire script, I can only guess you have File commands before the ReserveFile command in the script. Move ReserveFile above all File commands and use the MUI_RESERVEFILE_INSTALLOPTIONS macro as well. It would also probably be a good idea to extract the INI file only once in .onInit.


Thank you, it works fine once I have added the macro MUI_RESERVEFILE_INSTALLOPTIONS