View Single Post
Old 10th March 2005, 10:24   #161
geoffrey_4js
Junior Member
 
Join Date: Jan 2005
Location: Strasbourg - FRANCE
Posts: 43
Send a message via ICQ to geoffrey_4js Send a message via Yahoo to geoffrey_4js
It's me again

In my custom dialog, I've tried to use InstallOptionsEx but I can't extract the INI file.

With InstallOptions.dll, I was doing that in tne .init function :
code:

Function DlgJvmDetection.onInit
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "${INCLUDES_DLGS_DIR}\DlgJvmDetection.ini" "DlgJvmDetection.ini"
FunctionEnd



And I've tried :
code:

Function DlgJvmDetection.onInit
InitPluginsDir
File /oname=$PLUGINSDIR\DlgJvmDetection.ini DlgJvmDetection.ini
FunctionEnd


code:

Function DlgJvmDetection.onInit
File /oname=${INCLUDES_DLGS_DIR}\DlgJvmDetection.ini DlgJvmDetection.ini
FunctionEnd



But I get a "File: "DlgJvmDetection.ini" -> no files found." error in both of the case.

EDIT : Ok, I've look inside system.nsh and solve my problem :
code:

Function DlgJvmDetection.onInit
InitPluginsDir
File "/oname=$PLUGINSDIR\DlgJvmDetection.ini" "${INCLUDES_DLGS_DIR}\DlgJvmDetection.ini"
FunctionEnd




EDIT 2 : I achieve to made all work together , thx for your help.
All I had to do is to add two macros (the two I was using with InstallOptions) :
code:
!macro MUI_INSTALLOPTION****INITDIALOG FILE

!verbose push
!verbose ${MUI_VERBOSE}

InstallOptionsEx::initDialog /NOUNLOAD "$PLUGINSDIR\${FILE}"

!verbose pop

!macroend



code:
!macro MUI_INSTALLOPTION****SHOW

!verbose push
!verbose ${MUI_VERBOSE}

InstallOptionsEx::show
Pop $MUI_TEMP1

!verbose pop

!macroend



I've got (a last ?) question : for the moment, I put those macro in DlgJvmDetection.nsi containing the callbacks functions and some functions to go with my custom page INI (DlgJvmDetection.ini).

I will probably have to use InstallOptionEx in other custom pages so what is better :
- to put those macros in system.nsh
- to create a system_ex.nsh containing the macro specific to InstallOptionEx ??

Last edited by geoffrey_4js; 10th March 2005 at 11:29.
geoffrey_4js is offline   Reply With Quote