I need to execute a pascal code before that the Select Setup language Dialog is shown , unfortunately the InitializeSetup event is executed after.
function InitializeSetup(): Boolean; //This event occurs to late
begin
DoSomething();
Result := True;
end;
So it's possible execute a script code before of the Select Setup language Dialog is shown?
I had similar problem, and I thought about different workarounds: style all setup manually, or make inner localization, but they all looked so doomed from the beginning. Select Setup language Dialog
I have forked issrc, built it locally, and looked at the main.pas of the Setup project. I see the idea behind doing as it is now : people may wanna use {Language}
in InitializeSetup
, so its called after the AskForLanguage
method.
To just check the idea I made small changes to main.pas: call AskForLanguage
after CodeRunner
inited and InitializeSetup
called. I got VCL'ed Select Setup Language dialog, but not all - NON Client Area wasnt VCL'ed:
I've tried to inherit the language form not from the TForm
class but from the TSetupForm
, or call it in the middle of setup or make other changes - with no result. If anybody know why it's not VCL'ed - tell me please!
Then I read the Custom Window Frame Using DWM article and just made the form border bsNone
and got this:
So for now I'm fine with it. That form not styled before many pages of styled setup was so... annoying.
If we wanna do it a right way, I guess all that needs to be done - is moving CodeRunner
init before AskForLanguage
, and add a custom code function like StyleInit
or so. Then all will be happy: {Language}
will be available in InitializeSetup
and Dialog will be VCL'ed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With