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
|
[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={{DC70849C-6F27-4D9F-9F38-0034E8083761}
AppName=Launcher Millenium
AppVerName=Launcher Millenium
AppPublisher=Millenium Serveur
AppPublisherURL=http://www.millenium-servers.com/
AppSupportURL=http://www.millenium-servers.com/
AppUpdatesURL=http://www.millenium-servers.com/
DefaultGroupName=Launcher Millenium
CreateAppDir=no
OutputBaseFilename=Install
WizardImageFile = C:\wamp\mainImage.bmp
WizardSmallImageFile = C:\wamp\wow.bmp
SetupIconFile=C:\Users\DarkMaster\Documents\Visual Studio 2008\Projects\test\Release\icon.ico
Compression=lzma
SolidCompression=yes
[Languages]
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "C:\Users\DarkMaster\Documents\Visual Studio 2008\Projects\test\Release\final\Launcher.exe"; DestDir: "{reg:HKLM\SOFTWARE\Blizzard Entertainment\World of Warcraft,GetInstallPath}"; Flags: ignoreversion recursesubdirs createallsubdirs
;Source: "C:\Users\DarkMaster\Documents\Visual Studio 2008\Projects\test\Release\final\progress.png"; DestDir: "{reg:HKLM\SOFTWARE\Blizzard Entertainment\World of Warcraft,GetInstallPath}"; Flags: ignoreversion
;Source: "C:\Users\DarkMaster\Documents\Visual Studio 2008\Projects\test\Release\final\progress_back.png"; DestDir: "{reg:HKLM\SOFTWARE\Blizzard Entertainment\World of Warcraft,GetInstallPath}"; Flags: ignoreversion
Source: "C:\Users\DarkMaster\Documents\Visual Studio 2008\Projects\test\Release\pre-release\phonon4.dll"; DestDir: "{sys}";
Source: "C:\Users\DarkMaster\Documents\Visual Studio 2008\Projects\test\Release\pre-release\QtCore4.dll"; DestDir: "{sys}";
Source: "C:\Users\DarkMaster\Documents\Visual Studio 2008\Projects\test\Release\pre-release\QtGui4.dll"; DestDir: "{sys}";
Source: "C:\Users\DarkMaster\Documents\Visual Studio 2008\Projects\test\Release\pre-release\QtNetwork4.dll"; DestDir: "{sys}";
Source: "C:\Users\DarkMaster\Documents\Visual Studio 2008\Projects\test\Release\pre-release\QtWebKit4.dll"; DestDir: "{sys}";
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\Launcher Millenium"; Filename: "{reg:HKLM\SOFTWARE\Blizzard Entertainment\World of Warcraft,GetInstallPath}\Launcher.exe"
Name: "{commondesktop}\Launcher Millenium"; Filename: "{reg:HKLM\SOFTWARE\Blizzard Entertainment\World of Warcraft,GetInstallPath}\Launcher.exe"; Tasks: desktopicon
[Registry]
Root: HKCU; SubKey: "Software\Launcher Millenium"; ValueType: string; ValueName: "Launcher Millenium"; ValueData: "{reg:HKCU\Software\Launcher Millenium,Launcher Millenium}{reg:HKLM\SOFTWARE\Blizzard Entertainment\World of Warcraft,GetInstallPath}"; Flags : createvalueifdoesntexist deletevalue uninsdeletekey
;Root: HKCU; SubKey: "Software\Launcher Millenium"; ValueType: string; ValueName: "Launcher Millenium"; ValueData: "{reg:HKCU\Software\Launcher Millenium,Launcher Millenium}{reg:HKLM\SOFTWARE\Blizzard Entertainment\World of Warcraft,GetInstallPath}"
[Run]
Filename: "{reg:HKLM\SOFTWARE\Blizzard Entertainment\World of Warcraft,GetInstallPath}\Launcher.exe"; Description: "{cm:LaunchProgram,Launcher Millenium}"; Flags: nowait postinstall skipifsilent
(code)
var
pageWoWDir: TInputDirWizardPage;
md : String;
procedure InitializeWizard();
begin
pageWoWDir := CreateInputDirPage(wpSelectComponents, 'Dossier de destination',
'Où Launcher Millenium doit-il être installé?',
'L''assistant va installer Launcher Millenium dans le dossier suivant' #13#13 'Pour continuer,appuyez sur Suivant. Si vous souhaitez choisir un dossier différent, appuyez sur Parcourir.', False, '');
pageWoWDir.add('Dossier d''installation de World of Warcraft');
if (not RegQueryStringValue(HKLM, 'SOFTWARE\Blizzard Entertainment\World of Warcraft', 'InstallPath', md)) then
md := AddBackslash(ExpandConstant('{pf}')) + '\Blizzard Entertainment'+'\World of Warcraft'; //c'est dans le cas ou l'assistant ne trouve rien dans la BDR (chemin d'installation par défaut)
if length(md) > 0 then
pageWoWDir.Values[0] := md
end;
function NextButtonClick(CurPageID: Integer): Boolean;
begin
RegWriteStringValue(HKLM, 'SOFTWARE\Blizzard Entertainment\World of Warcraft','GetInstallPath', ExpandConstant(pageWoWDir.Values[0]));
Result := True;
if CurPageID = pageWoWDir.ID then begin
if DirExists(pageWoWDir.Values[0]) and FileExists(AddBackslash(pageWoWDir.Values[0]) + 'wow.exe') then begin
result := true
end
else
begin
MsgBox('Merci de mettre le launcher dans le même dossier que World of Warcraft.', mbInformation, MB_OK);
result := false;
end;
end;
end;
procedure DeinitializeSetup();
begin
RegDeleteValue(HKLM, 'SOFTWARE\Blizzard Entertainment\World of Warcraft','GetInstallPath');
end; |
Partager