Old 25th November 2010, 15:19   #1
Junior Member
Join Date: Nov 2010
Posts: 10
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
File "\\...\${ProductFolder}\MyFile.dll

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 InstallFile "${TargetFolder}" ; Where Target folder is correctly set.
SetRebootFlag true

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...
bsayakhom is offline   Reply With Quote
Old 25th November 2010, 15:28   #2
Senior Member
Join Date: Mar 2006
Location: Dallas
Posts: 462
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.
demiller9 is offline   Reply With Quote
Old 26th November 2010, 08:36   #3
Junior Member
Join Date: Nov 2010
Posts: 10
That works !

Thanks for your support
bsayakhom is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump