Welcome, Guest
Username Password: Remember me
  • Page:
  • 1

TOPIC: individual dialog

individual dialog 3 years, 11 months ago #345

  • Alarska
  • OFFLINE
  • Gold Boarder
  • Posts: 216
  • Karma: 0
Hi,

I'd like to integrate a individual designed dialog in my setup. This works, but I can't find out how to do this things:

1. The dialog should only appear if a specific language is selected respectively other text should be displayed on the form.

2. The dialog should only appear if a specific module-container / setup-type has been selected.

Unfortunately I've got no idea of delphi (i think this is the right language) . So I would be very glad for help. Thanks in advance!



(PS: I would be very glad about possibility to individualize the WaitCAB message/language too... )

Re:individual dialog 3 years, 11 months ago #346

  • nick_tg
  • OFFLINE
  • Moderator
  • Karma: 5
Hi,

1.

function ActiveLanguage: String;

Returns a string containing the wizards language. The prototype of language string is langX where X is the index of the language is languages section.
For example if you have 3 languages, English, German and Italian in that order and the user selects German then language string will be lang1, if English then lang0

2.

function IsComponentSelected(const Components: String): Boolean;

Returns True if the specified component is selected.

Now, let's explain the naming conversion of modules-components.

CAB Creator Module -> CABCREATOR
Win32 Module -> WIN32X
Direct Copy Module -> DCMX
CAB Collection Module -> CABCOLLECTIONX
Mobile SQL -> MSQLX
NET CF2 -> NETCF2X
Container -> CONTAINERX

The X is the creation order of each module. For example the first created win32 module is WIN320 the second WIN321, the first Container is CONTAINER0, the second CONTAINER1 and so on.

function WizardSetupType(const Description: Boolean): String;

If Description is False then returns the name, if true then returns the name of the setup type selected by the user.

Now, every dialog have some events. One of them is the OnSouldSkipPage.
When this event returns true, then this dialog will not be shown, if False then will be shown.

Click somewhere in the form, then double click in this event and a new event will be created. Now put this code in the code editor:

function myCustomForm_FormOnShouldSkipPage(Page: TWizardPage): Boolean;
begin
  //  Set the default behaviour not to shown
  Result:=True;
  // Check the language
  if ActiveLanguage='lang1' then
  begin
    Result := False;
  end;
  // Check for Setup Type
  if WizardSetupType(False)='Full' then
  begin
    Result:=False;
  end;
  //  Check for component
  if IsComponentSelected('CABCOLLECTION0') then
  begin
    Result:=False;
  end;
end;


Hope that helped.
For anything else, just ask


PS: I was extremely busy with the new version, as you can see was redesigned from scratch. I'll do it, promise


Regards,
Nick Protopapas

Re:individual dialog 3 years, 10 months ago #369

  • Alarska
  • OFFLINE
  • Gold Boarder
  • Posts: 216
  • Karma: 0
Hi, helped very much.
Another question: Is there a way to copy a custom dialog from one ppcic project to another or do I have to create it there again?
Thanks!

PS: The vote on the new interface doesn't work...
  • Page:
  • 1
Time to create page: 0.31 seconds