Archive: Installing DLL file to use in Custom Page Dialog


Installing DLL file to use in Custom Page Dialog
Hi !

I'm trying to install specific files, with a dynamic source path. The problem Is that I need to install this file in the PLUGINSDIR folder, so I used SetOutPath $PLUGINSDIR.

!macro InstallFile ProductFolder
SetOutPath $PLUGINSDIR
File "\\...\${ProductFolder}\MyFile.dll
!macroend

My custom Page is defined and called in another Macro SetupProject.

I used another script to call the InstallFile macro, in the .onInit function, which also call the MUI_LANGDLL_DISPLAY Macro for multilingual installer (as an option top build my setup).

If both macros are called, evrything works, and Myfile.dll is correctly copied to temporary Pluginsdir folder.

If the MUI_LANGDLL_DISPLAY macro calling line is commented, nothing happens, and my file is not copied.


Function .onInit
;!insertmacro MUI_LANGDLL_DISPLAY
!insertmacro InstallFile "${TargetFolder}" ; Where Target folder is correctly set.
SetRebootFlag true
FunctionEnd

So basically, my question is why the macro works in one case and not in the other.

2nd question : Where else do you think I should Call my macro, considering that the following command SetOutPath $PLUGINSDIR has to set in sections or functions ? and as it has to be first called before the macro which called my Custom Page dialog ?

Any help is welcome, because I tried to use global variables between functions and macro with no success...


You have to have a InitPluginsDir command before you can use SetOutPath $PluginsDir. MUI_LANGDLL_DISPLAY probably has that in it, which explains why it works when it is not commented.


That works !

Thanks for your support