Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 10th April 2017, 16:53   #1
Marbled
Junior Member
 
Join Date: Dec 2015
Posts: 19
Problem setting language depending things when doing a silent install...

Hi!

I have a multi-language install program which, overall, works pretty well except for a few lingering issues...

One of them is doing a silent install with a language specified on the command line.

To specify the language on the command line I and a "/L=<LANGUAGE>" switch.

This seems to work properly, the problem seems to be with what I do with the language I set that way.

The install language changes a few things, one of which is the install directory.

To change the install directory when the install is not silent I set a MUI_PAGE_CUSTOMFUNCTION_PRE before MUI_PAGE_DIRECTORY and this does the job well.

Figuring I would have a problem when the install is silent I ran the same function I set for MUI_PAGE_CUSTOMFUNCTION_PRE if I detect the install is silent (${If} ${Silent}).

The problem I think I have is that I run this from onInit() and if I understood well the language stuff has not yet been fully initialized there.

What can I do to have that function run correctly both from a normal install and a silent install?

This install uses MUI2 by the way...

Thank you and have a nice day!

Nick
Marbled is offline   Reply With Quote
Old 11th April 2017, 01:32   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,559
Create a hidden section (before the other sections in your .nsi) that calls your function or call it at the start of your first section.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 13th April 2017, 18:02   #3
Marbled
Junior Member
 
Join Date: Dec 2015
Posts: 19
Thank you Anders, it works wonderfully!

Have a nice day!

Nick
Marbled is offline   Reply With Quote
Reply
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