View Single Post
Old 7th February 2011, 13:09   #10
vjrabanelly
Junior Member
 
Join Date: Feb 2011
Posts: 7
Thumbs up Adding MUI2 and an instFiles page resolved my problem!

Thank you very much ZmAn3! Your script helped me a lot!

I wasn't using an InstFiles page, so NSIS didn't execute the install section. I did it on purpose since I didn't want any instFiles page, but I didn't know it wouldn't accept to show a custom UI in this case. So I added some lines to add an InstFiles page with MUI and it did the trick :

code:
!include "MUI2.nsh"

!define MUI_UI "myCustomUI.exe"

!insertmacro MUI_PAGE_INSTFILES



Then, to go back to where I was before (no instFiles page), I added a code which makes my installer quit before loading instFiles page, just as it was doing before :
code:
!define MUI_PAGE_CUSTOMFUNCTION_PRE instFilesPre ; Just before "!insertmacro MUI_PAGE_INSTFILES"

Function instFilesPre
Quit
FunctionEnd



All my code is executed in the leave function of my previous custom page, not in install section.
So now I can resize the UI with ResHacker or ResEdit the way I want it and NSIS takes it into account when compiling!

Thanks again!

Bye

Valentin
vjrabanelly is offline   Reply With Quote