Jump to content
Korean Random

neosecure

User
  • Posts

    4
  • Joined

  • Last visited

Posts posted by neosecure

  1. procedure ResizeComponentsPage(CurPageID: Integer);

    begin

    case CurPageID of

    wpSelectComponents:

    begin

    .........

    end;

     

    procedure CurPageChanged(CurPageID: Integer);

    begin

    ResizeComponentsPage(CurPageID);

    end;

     

    //=======================================================================

    // AtotIK... I appreciate your kindness :)

    // I add "ResizeComponentsPage()"

    // But,... there is no change.

    // For example, https://www.dropbox.com/s/4a9blb9q6keoer2/cats.jpg

    // When the components page is loaded, I want to increase the Width size.

    // Is there a way?

    // Only the width of the components page ...

    // I ask for help again.

    // Have a good day ! :)

    //=======================================================================

     

     

    [setup]

    AppName=My Program

    AppVersion=1.5

    DefaultDirName={pf}My Program

    DefaultGroupName=My Program

    UninstallDisplayIcon={app}MyProg.exe

    OutputDir=userdocs:Inno Setup Examples Output

     

     

    [Types]

    Name: "full"; Description: "Full installation"

    Name: "compact"; Description: "Compact installation"

    Name: "custom"; Description: "Custom installation"; Flags: iscustom

     

    [Components]

    Name: "program"; Description: "Program Files"; Types: full compact custom; Flags: fixed

    Name: "help"; Description: "Help File"; Types: full

    Name: "readme"; Description: "Readme File"; Types: full

    Name: "readmeen"; Description: "English"; Flags: exclusive

    Name: "readmede"; Description: "German"; Flags: exclusive

     

    var

    AboutButton: TNewButton;

     

    procedure AboutButtonOnClick(Sender: TObject);

    begin

    MsgBox('This is a demo of how to create a button!', mbInformation, mb_Ok);

    end;

     

    procedure CreateAboutButton(ParentForm: TSetupForm; CancelButton: TNewButton);

    begin

    AboutButton := TNewButton.Create(ParentForm);

    AboutButton.Left := ParentForm.ClientWidth - CancelButton.Left - CancelButton.Width;

    AboutButton.Top := CancelButton.Top;

    AboutButton.Width := CancelButton.Width;

    AboutButton.Height := CancelButton.Height;

    AboutButton.Caption := '&About...';

    AboutButton.OnClick := @AboutButtonOnClick;

    AboutButton.Parent := ParentForm;

    end;

     

     

    procedure InitializeWizard1();

    begin

    CreateAboutButton(WizardForm, WizardForm.CancelButton);

    end;

     

    type

    TPositionStorage = array of Integer;

     

    var

    CompPageModified: Boolean;

    CompPagePositions: TPositionStorage;

     

    procedure SaveComponentsPage(out Storage: TPositionStorage);

    begin

    SetArrayLength(Storage, 11);

     

    Storage[0] := WizardForm.Height;

    Storage[1] := WizardForm.NextButton.Top;

    Storage[2] := WizardForm.BackButton.Top;

    Storage[3] := WizardForm.CancelButton.Top;

    Storage[4] := WizardForm.ComponentsList.Height;

    Storage[5] := WizardForm.OuterNotebook.Height;

    Storage[6] := WizardForm.InnerNotebook.Height;

    Storage[7] := WizardForm.Bevel.Top;

    Storage[8] := WizardForm.BeveledLabel.Top;

    Storage[9] := WizardForm.ComponentsDiskSpaceLabel.Top;

    Storage[10] := AboutButton.Top;

    end;

     

    procedure LoadComponentsPage(const Storage: TPositionStorage;

    HeightOffset: Integer);

    begin

    if GetArrayLength(Storage) <> 11 then

    RaiseException('Invalid storage array length.');

     

    WizardForm.Height := Storage[0] + HeightOffset;

    WizardForm.NextButton.Top := Storage[1] + HeightOffset;

    WizardForm.BackButton.Top := Storage[2] + HeightOffset;

    WizardForm.CancelButton.Top := Storage[3] + HeightOffset;

    WizardForm.ComponentsList.Height := Storage[4] + HeightOffset;

    WizardForm.OuterNotebook.Height := Storage[5] + HeightOffset;

    WizardForm.InnerNotebook.Height := Storage[6] + HeightOffset;

    WizardForm.Bevel.Top := Storage[7] + HeightOffset;

    WizardForm.BeveledLabel.Top := Storage[8] + HeightOffset;

    WizardForm.ComponentsDiskSpaceLabel.Top := Storage[9] + HeightOffset;

    AboutButton.Top := Storage[10] + HeightOffset;

    end;

     

    procedure InitializeWizard2();

    begin

    CompPageModified := False;

    end;

     

    //--- procedure CurPageChanged(CurPageID: Integer);

    //--- I add this ...

     

    procedure ResizeComponentsPage(CurPageID: Integer);

    begin

    if CurpageID = wpSelectComponents then

    begin

    SaveComponentsPage(CompPagePositions);

    LoadComponentsPage(CompPagePositions, 200);

    CompPageModified := True;

    end

    else

    if CompPageModified then

    begin

    LoadComponentsPage(CompPagePositions, 0);

    CompPageModified := False;

    end;

    end;

     

     

    procedure CurPageChanged(CurPageID: Integer);

    begin

    ResizeComponentsPage(CurPageID);

    end;

     

    procedure InitializeWizard();

    begin

    InitializeWizard1();

    InitializeWizard2();

    end;

  2. Hello Everyone.

    I need help....

    When the components page is loaded, I want to increase the Width size.

    And.... In addition.

    I want to adjust the location of the 'About' button. 

     

    Could anyone help me? Thanks so much in advanced.

     

    [setup]
    AppName=My Program
    AppVersion=1.5
    DefaultDirName={pf}My Program
    DefaultGroupName=My Program
    UninstallDisplayIcon={app}MyProg.exe
    OutputDir=userdocs:Inno Setup Examples Output


    [Types]
    Name: "full"; Description: "Full installation"
    Name: "compact"; Description: "Compact installation"
    Name: "custom"; Description: "Custom installation"; Flags: iscustom

    [Components]
    Name: "program"; Description: "Program Files"; Types: full compact custom; Flags: fixed
    Name: "help"; Description: "Help File"; Types: full
    Name: "readme"; Description: "Readme File"; Types: full
    Name: "readmeen"; Description: "English"; Flags: exclusive
    Name: "readmede"; Description: "German"; Flags: exclusive


    procedure AboutButtonOnClick(Sender: TObject);
    begin
    MsgBox('This is a demo of how to create a button!', mbInformation, mb_Ok);
    end;

    procedure CreateAboutButton(ParentForm: TSetupForm; CancelButton: TNewButton);
    var
    AboutButton: TNewButton;
    begin
    AboutButton := TNewButton.Create(ParentForm);
    AboutButton.Left := ParentForm.ClientWidth - CancelButton.Left - CancelButton.Width;
    AboutButton.Top := CancelButton.Top;
    AboutButton.Width := CancelButton.Width;
    AboutButton.Height := CancelButton.Height;
    AboutButton.Caption := '&About...';
    AboutButton.OnClick := @AboutButtonOnClick;
    AboutButton.Parent := ParentForm;
    end;


    procedure InitializeWizard1();
    begin
    CreateAboutButton(WizardForm, WizardForm.CancelButton);
    end;

    type
    TPositionStorage = array of Integer;

    var
    CompPageModified: Boolean;
    CompPagePositions: TPositionStorage;

    procedure SaveComponentsPage(out Storage: TPositionStorage);
    begin
    SetArrayLength(Storage, 10);

    Storage[0] := WizardForm.Height;
    Storage[1] := WizardForm.NextButton.Top;
    Storage[2] := WizardForm.BackButton.Top;
    Storage[3] := WizardForm.CancelButton.Top;
    Storage[4] := WizardForm.ComponentsList.Height;
    Storage[5] := WizardForm.OuterNotebook.Height;
    Storage[6] := WizardForm.InnerNotebook.Height;
    Storage[7] := WizardForm.Bevel.Top;
    Storage[8] := WizardForm.BeveledLabel.Top;
    Storage[9] := WizardForm.ComponentsDiskSpaceLabel.Top;
    end;

    procedure LoadComponentsPage(const Storage: TPositionStorage;
    HeightOffset: Integer);
    begin
    if GetArrayLength(Storage) <> 10 then
    RaiseException('Invalid storage array length.');

    WizardForm.Height := Storage[0] + HeightOffset;
    WizardForm.NextButton.Top := Storage[1] + HeightOffset;
    WizardForm.BackButton.Top := Storage[2] + HeightOffset;
    WizardForm.CancelButton.Top := Storage[3] + HeightOffset;
    WizardForm.ComponentsList.Height := Storage[4] + HeightOffset;
    WizardForm.OuterNotebook.Height := Storage[5] + HeightOffset;
    WizardForm.InnerNotebook.Height := Storage[6] + HeightOffset;
    WizardForm.Bevel.Top := Storage[7] + HeightOffset;
    WizardForm.BeveledLabel.Top := Storage[8] + HeightOffset;
    WizardForm.ComponentsDiskSpaceLabel.Top := Storage[9] + HeightOffset;
    end;

    procedure InitializeWizard2();
    begin
    CompPageModified := False;
    end;

    procedure CurPageChanged(CurPageID: Integer);
    begin
    if CurpageID = wpSelectComponents then
    begin
    SaveComponentsPage(CompPagePositions);
    LoadComponentsPage(CompPagePositions, 200);
    CompPageModified := True;
    end
    else
    if CompPageModified then
    begin
    LoadComponentsPage(CompPagePositions, 0);
    CompPageModified := False;
    end;
    end;

    procedure InitializeWizard();
    begin
    InitializeWizard1();
    InitializeWizard2();
    end;
     
  3. Hello Everyone.

    I need help.

    I do not know russian language . however, i understand your article and post with the google translator.

     

    [Files]


    ;Source: "{app}\res_mods\configs\xvm\Aslain\battleLoading,3.xc"; DestDir: "{app}\res_mods\configs\xvm\Aslain"; DestName: "battleLoading.xc"; Check: "IsComponentNotSelected('am/addons/panels/BattleLoading')"; MinVersion: 0.0,5.0; Flags: ignoreversion
    ;Source: "{app}\res_mods\configs\xvm\Aslain\playersPanel,4.xc"; DestDir: "{app}\res_mods\configs\xvm\Aslain"; DestName: "playersPanel.xc"; Check: "IsComponentNotSelected('am/addons/panels/PlayersPanel')"; MinVersion: 0.0,5.0; Flags: ignoreversion
    ;Source: "{app}\res_mods\configs\xvm\Aslain\texts,3.xc"; DestDir: "{app}\res_mods\configs\xvm\Aslain"; DestName: "texts.xc"; Check: "IsComponentNotSelected('am/addons/panels/PlayersPanel')"; MinVersion: 0.0,5.0; Flags: ignoreversion
    ;Source: "{app}\res_mods\configs\xvm\Aslain\statisticForm,3.xc"; DestDir: "{app}\res_mods\configs\xvm\Aslain"; DestName: "statisticForm.xc"; Check: "IsComponentNotSelected('am/addons/panels/StatisticsTab')"; MinVersion: 0.0,5.0; Flags: ignoreversion
     

     

    //=================================================================================================

     

    This is File section in Aslain modpack. I wondered " IsComponentNotSelected() "

     

    Maybe...

    Any Component is not selected, shoud use default config(ex;battleloading,3.xc).

     

    And.... How do i make this function or procedure?

    Can Somebody help me?

×
×
  • Create New...