IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Outils Delphi Discussion :

Problème script inno setup


Sujet :

Outils Delphi

  1. #1
    Nouveau Candidat au Club
    Inscrit en
    Août 2007
    Messages
    8
    Détails du profil
    Informations forums :
    Inscription : Août 2007
    Messages : 8
    Points : 1
    Points
    1
    Par défaut Problème script inno setup
    Bonjour,
    je vous expose mon problème.
    Il y a une erreur dans le script qui suit qui fait qu'il est impossible de le compiler.
    Je souhaiterait savoir si l'un d'entre vous pouvais éclairé ma lanterne en me disant ce qui ne va pas

    ; Script generated by the Inno Setup Script Wizard.
    ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

    [Setup]
    ; NOTE: The value of AppId uniquely identifies this application.
    ; Do not use the same AppId value in installers for other applications.
    ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
    AppId={{9F0EADB8-DD8C-44AE-9144-E33F13CD9142}
    AppName=Pulse Gaming GUI
    AppVerName=Pulse Gaming GUI V1.1
    AppPublisher=Lowmach1ne
    AppPublisherURL=http://www.pulsegaming.eu
    AppSupportURL=http://www.pulsegaming.eu
    AppUpdatesURL=http://www.pulsegaming.eu
    DefaultDirName={reg:HKCU\Software\Valve\Steam,SteamPath|{pf}\steam}\steamapps\{code:GetDirPath2|Steam}\Counter-Strike Source
    DefaultGroupName=Pulse Gaming GUI
    DisableProgramGroupPage=yes
    LicenseFile=C:\Documents and Settings\Administrateur\Bureau\gpl.txt
    InfoBeforeFile=C:\Documents and Settings\Administrateur\Bureau\before.txt
    InfoAfterFile=C:\Documents and Settings\Administrateur\Bureau\after.txt
    OutputDir=C:\Documents and Settings\Administrateur\Bureau\PulseGaming-gui-v1.1
    OutputBaseFilename=setup-Pulsegaming-gui-v1-1-beta
    SetupIconFile=C:\Documents and Settings\Administrateur\Bureau\5012.ico
    Compression=lzma/max
    SolidCompression=yes
    PrivilegesRequired=admin
    VersionInfoVersion=1.1
    VersionInfoCompany=PulseGaming.eu
    VersionInfoDescription=Gui pour counter strike source
    VersionInfoCopyright=Lowmach1ne
    VersionInfoProductName=Lowmach1ne
    VersionInfoProductVersion=1.1
    AppCopyright=Copyright© 2009 Lowmach1ne

    [Languages]
    Name: "french"; MessagesFile: "compiler:Languages\French.isl"

    [Files]
    Source: "{app}\*"; DestDir: "{app}\backup"; Flags: external skipifsourcedoesntexist uninsneveruninstall
    Source: "C:\Documents and Settings\Administrateur\Bureau\PulseGaming-gui-v1.1\Counter-Strike Source\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
    ; NOTE: Don't use "Flags: ignoreversion" on any shared system files

    [Icons]
    Name: "{group}\{cm:ProgramOnTheWeb,Pulse Gaming GUI}"; Filename: "http://www.pulsegaming.eu"
    Name: "{group}\{cm:UninstallProgram,Pulse Gaming GUI}"; Filename: "{uninstallexe}"

    [Run]
    Filename: "{app}\cstrike\prereg.bat"; Description: "{cm:LaunchProgram,Pulse Gaming GUI v1.1}"; Flags: shellexec;

    [Code]
    Procedure URLLabelOnClick(Sender: TObject);
    var
    ErrorCode: Integer;
    begin
    ShellExec('open', 'http://www.pulsegaming.eu', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
    end;

    var
    UserPage: TInputQueryWizardPage;

    procedure CreateTheWizardPages;
    begin
    { Create the pages }

    UserPage := CreateInputQueryPage(wpInfoBefore,
    'Login Steam', 'Quel est votre login Steam?',
    'Ce logiciel vous demande votre login steam et non votre password.');
    UserPage.Add('Steam:', False);
    UserPage.Values[0] := GetPreviousData('Steam', '');

    end;

    procedure RegisterPreviousData(PreviousDataKey: Integer);
    var
    UsageMode: String;
    begin
    { Store the settings so we can restore them next time }
    SetPreviousData(PreviousDataKey, 'Steam', UserPage.Values[0]);
    end;

    function NextButtonClick(CurPageID: Integer): Boolean;
    var
    I: Integer;
    begin
    { Validate certain pages before allowing the user to proceed }
    if CurPageID = UserPage.ID then begin
    if UserPage.Values[0] = '' then begin
    MsgBox('Vous devez entrer votre login steam.', mbError, MB_OK);
    Result := False;
    end else begin
    Result := True;
    end;
    end else
    Result := True;
    end;

    function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo,
    MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
    var
    S: String;
    begin
    { Fill the 'Ready Memo' with the normal settings and the custom settings }
    S := '';
    S := S + 'Personal Information:' + NewLine;
    S := S + Space + UserPage.Values[0] + NewLine;

    S := S + NewLine + NewLine;

    S := S + MemoDirInfo + NewLine;

    Result := S;
    end;

    function GetDirPath2(Param: String): String;
    begin
    if Param = 'Steam' then
    Result := UserPage.Values[0];
    end;

    procedure InitializeWizard();
    var
    URLLabel: TNewStaticText;
    begin
    CreateTheWizardPages;
    URLLabel := TNewStaticText.Create(WizardForm);
    URLLabel.Caption := 'www.pulsegaming.eu';
    URLLabel.Cursor := crHand;
    URLLabel.OnClick := @URLLabelOnClick;
    URLLabel.Parent := WizardForm;
    { Alter Font *after* setting Parent so the correct defaults are inherited first }
    URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
    URLLabel.Font.Color := clBlue;
    URLLabel.Top := WizardForm.ClientHeight - URLLabel.Height - 15;
    URLLabel.Left := ScaleX(20);
    end;
    Merci

  2. #2
    Membre chevronné Avatar de philnext
    Profil pro
    Inscrit en
    Octobre 2002
    Messages
    1 552
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2002
    Messages : 1 552
    Points : 1 780
    Points
    1 780
    Par défaut
    C'est quoi ton message d'erreur ?

  3. #3
    Nouveau Candidat au Club
    Inscrit en
    Août 2007
    Messages
    8
    Détails du profil
    Informations forums :
    Inscription : Août 2007
    Messages : 8
    Points : 1
    Points
    1
    Par défaut
    bonjour,

    mon message d'erreur est:
    Line 117

    could not call proc.

    et sa me surligne en rouge la ligne:

    Result := UserPage.Values[0];

  4. #4
    Expert éminent
    Avatar de ThierryAIM
    Homme Profil pro
    Inscrit en
    Septembre 2002
    Messages
    3 673
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 61
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Secteur : Industrie

    Informations forums :
    Inscription : Septembre 2002
    Messages : 3 673
    Points : 8 524
    Points
    8 524
    Par défaut
    Dans la section Setup, la première a être exécutée, tu fais appel par code à une variable qui n'existe pas encore: UserPage.Values
    Vous vous posez une question, la réponse est peut-être ici :
    Toutes les FAQs VB
    Les Cours et Tutoriels VB6/VBScript
    Les Sources VB6


    Je ne réponds pas aux questions techniques par MP. Utilisez les forums. Merci de votre compréhension

  5. #5
    Nouveau Candidat au Club
    Inscrit en
    Août 2007
    Messages
    8
    Détails du profil
    Informations forums :
    Inscription : Août 2007
    Messages : 8
    Points : 1
    Points
    1
    Par défaut
    Merci.

    Mais comment réglé le problème ?

  6. #6
    Nouveau Candidat au Club
    Inscrit en
    Août 2007
    Messages
    8
    Détails du profil
    Informations forums :
    Inscription : Août 2007
    Messages : 8
    Points : 1
    Points
    1
    Par défaut
    Re.

    Avec un truc de se genre la c'est possible de palier a se problème ?

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    function GetDirPath2(Param: String): String;
    begin
      // Pointer variables are not set to nil by default
      if Assigned(UserPage.Values[0])
      then Result := UserPage.Values[0]
      else Result := 'Votre Login';
    end;

  7. #7
    Nouveau Candidat au Club
    Inscrit en
    Août 2007
    Messages
    8
    Détails du profil
    Informations forums :
    Inscription : Août 2007
    Messages : 8
    Points : 1
    Points
    1
    Par défaut
    ; Script generated by the Inno Setup Script Wizard.
    ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
    Code Inno Setup : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
     
    [Setup]
    ; NOTE: The value of AppId uniquely identifies this application.
    ; Do not use the same AppId value in installers for other applications.
    ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
    AppId={{9F0EADB8-DD8C-44AE-9144-E33F13CD9142}
    AppName=Pulse Gaming GUI {code:GetDirPath2}
    AppVerName=Pulse Gaming GUI V1.1
    AppPublisher=Lowmach1ne
    AppPublisherURL=http://www.pulsegaming.eu
    AppSupportURL=http://www.pulsegaming.eu
    AppUpdatesURL=http://www.pulsegaming.eu
    DefaultDirName={reg:HKCU\Software\Valve\Steam,SteamPath|{pf}\steam}\steamapps\{code:GetDirPath2}\Counter-Strike Source
    DefaultGroupName=Pulse Gaming GUI
    DisableProgramGroupPage=yes
    LicenseFile=C:\Documents and Settings\Administrateur\Bureau\gpl.txt
    InfoBeforeFile=C:\Documents and Settings\Administrateur\Bureau\before.txt
    InfoAfterFile=C:\Documents and Settings\Administrateur\Bureau\after.txt
    OutputDir=C:\Documents and Settings\Administrateur\Bureau\PulseGaming-gui-v1.1
    OutputBaseFilename=setup-Pulsegaming-gui-v1-1-beta
    SetupIconFile=C:\Documents and Settings\Administrateur\Bureau\5012.ico
    Compression=bzip
    SolidCompression=yes
    PrivilegesRequired=admin
    VersionInfoVersion=1.1
    VersionInfoCompany=PulseGaming.eu
    VersionInfoDescription=Gui pour counter strike source
    VersionInfoCopyright=Lowmach1ne
    VersionInfoProductName=Lowmach1ne
    VersionInfoProductVersion=1.1
    AppCopyright=Copyright© 2009 Lowmach1ne
    ChangesEnvironment=yes
    UsePreviousAppDir=no
     
     
    [Languages]
    Name: "french"; MessagesFile: "compiler:Languages\French.isl"
     
    [Files]
    Source: "{app}\*"; DestDir: "{app}\backup"; Flags: external skipifsourcedoesntexist uninsneveruninstall
    Source: "C:\Documents and Settings\Administrateur\Bureau\PulseGaming-gui-v1.1\Counter-Strike Source\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
    ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
     
    [Icons]
    Name: "{group}\{cm:ProgramOnTheWeb,Pulse Gaming GUI}"; Filename: "http://www.pulsegaming.eu"
    Name: "{group}\{cm:UninstallProgram,Pulse Gaming GUI}"; Filename: "{uninstallexe}"
     
    [Run]
    Filename: "{app}\cstrike\prereg.bat"; Description: "{cm:LaunchProgram,Pulse Gaming GUI v1.1}"; Flags: shellexec;
     
    [Tasks]
     
     
    [ Code]
    Procedure URLLabelOnClick(Sender: TObject);
    var
      ErrorCode: Integer;
    begin
      ShellExec('open', 'http://www.pulsegaming.eu', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
    end;
     
    var
      UserPage: TInputQueryWizardPage;
     
    procedure CreateTheWizardPages;
    begin
      { Create the pages }
     
      UserPage := CreateInputQueryPage(wpInfoBefore,
        'Login Steam', 'Quel est votre login Steam?',
        'Ce logiciel vous demande votre login steam et non votre password.');
      UserPage.Add('Steam:', False);
      UserPage.Values[0] := GetPreviousData('Steam', '');
     
    end;
     
    procedure RegisterPreviousData(PreviousDataKey: Integer);
    var
      UsageMode: String;
    begin
      { Store the settings so we can restore them next time }
      SetPreviousData(PreviousDataKey, 'Steam', UserPage.Values[0]);
    end;
     
    function NextButtonClick(CurPageID: Integer): Boolean;
    var
      I: Integer;
    begin
      { Validate certain pages before allowing the user to proceed }
      if CurPageID = UserPage.ID then begin
        if UserPage.Values[0] = '' then begin
          MsgBox('Vous devez entrer votre login steam.', mbError, MB_OK);
          Result := False;
        end else begin
          Result := True;
        end;
      end else
        Result := True;
    end;
     
    function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo,
      MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
    var
      S: String;
    begin
      { Fill the 'Ready Memo' with the normal settings and the custom settings }
      S := '';
      S := S + 'Votre Login Steam:' + NewLine;
      S := S + Space + UserPage.Values[0] + NewLine;
     
      S := S + NewLine + NewLine;
     
      S := S + MemoDirInfo + NewLine;
     
      Result := S;
    end;
     
    {function GetDirPath2(Param: String): String;
    begin
      if Param = 'Steam' then
        Result := UserPage.Values[0];
    end;}
     
    function GetDirPath2(Param: String): String;
    begin
      // Pointer variables are not set to nil by default
      if Assigned(UserPage)
      then Result := UserPage.Values[0]
      else Result := 'Votre Login';
    end;
     
     
    procedure InitializeWizard();
    var
      URLLabel: TNewStaticText;
    begin
      CreateTheWizardPages;
      URLLabel := TNewStaticText.Create(WizardForm);
      URLLabel.Caption := 'www.pulsegaming.eu';
      URLLabel.Cursor := crHand;
      URLLabel.OnClick := @URLLabelOnClick;
      URLLabel.Parent := WizardForm;
      { Alter Font *after* setting Parent so the correct defaults are inherited first }
      URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
      URLLabel.Font.Color := clBlue;
      URLLabel.Top := WizardForm.ClientHeight - URLLabel.Height - 15;
      URLLabel.Left := ScaleX(20);
    end;

    Ceci est ma dernière version, il ne me reste plus que a faire en sorte que la valeur DefaultDirName soit modifier apres la page UserPage

    Merci

Discussions similaires

  1. Script inno setup
    Par ninouchfis dans le forum Autres Logiciels
    Réponses: 4
    Dernier message: 14/11/2012, 15h33
  2. Réponses: 7
    Dernier message: 01/05/2011, 10h08
  3. Problème avec Inno Setup
    Par avyrex dans le forum Installation, Déploiement et Sécurité
    Réponses: 0
    Dernier message: 18/10/2009, 18h11
  4. Inno setup scripting
    Par john.fender dans le forum Outils
    Réponses: 7
    Dernier message: 12/04/2006, 17h20

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo