Bonjour,
Je me suis rendu compte que quand j'ajoutais une seconde langue dans la section [ Languages ] Inno Setup n'exécute plus ma fonction "InitializeSetup" dans la section [ Code ]
Donc si je mets en commentaire la ligne 41 "Name: en..." ou la ligne 42 "Name: fr..." il exécute la fonction "InitializeSetup"
Avez-vous une idée pour résoudre ce problème ?
Merci
Voici mon code
Code : 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 ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "My Program" #define MyAppVersion "1.5" #define MyAppPublisher "My Company, Inc." #define MyAppURL "http://www.example.com/" #define MyAppExeName "MyProg.exe" [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={{B1F19772-8C01-4630-A5E3-E6425AFC9923} AppName={#MyAppName} AppVersion={#MyAppVersion} ;AppVerName={#MyAppName} {#MyAppVersion} ;AppPublisher={#MyAppPublisher} ;AppPublisherURL={#MyAppURL} ;AppSupportURL={#MyAppURL} ;AppUpdatesURL={#MyAppURL} DefaultDirName={pf}\{#MyAppName} ;DefaultGroupName={#MyAppName} OutputDir=E:\VS2010\Setup\test OutputBaseFilename=setup Compression=lzma SolidCompression=yes ;[Tasks] ;Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] Source: "C:\Program Files (x86)\Inno Setup 5\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion ; NOTE: Dont use "Flags: ignoreversion" on any shared system files [Run] Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent [Languages] Name: en; MessagesFile: "compiler:Default.isl" Name: fr; MessagesFile: "compiler:Languages\French.isl" ;Name: du; MessagesFile: "compiler:Languages\Dutch.isl" [CustomMessages] mysqlalready=Error : MySQL install folder exists already! ;fr.mysqlalready=Erreur : le dossier dinstallation MySQL existe dj! [ Code ] function InitializeSetup(): Boolean; begin result := true; if (DirExists(ExpandConstant('{pf}')+'\MySQL\')) or (DirExists(ExpandConstant('{pf64}')+'\MySQL\')) then begin MsgBox(ExpandConstant('{cm:mysqlalready}'), mbError, MB_OK); result := False; Exit end; end;
Partager