Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: installer/src/innosetup-exe/64BitTwoArch.iss

Issue 6202981292703744: Whole installer (Closed)
Patch Set: Created June 24, 2014, 7:27 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 [Setup]
2 AppName=Adblock Plus IE
3 AppVersion={#version}
4 CreateAppDir=No
5 DisableStartupPrompt=Yes
6 DisableDirPage=Yes
7 DisableProgramGroupPage=Yes
8 DisableReadyPage=Yes
9 DisableFinishedPage=Yes
10 DisableWelcomePage=Yes
11 Uninstallable=No
12 ArchitecturesInstallIn64BitMode=x64
13 OutputDir=..\..\build
14 OutputBaseFilename=adblockplusie-{#version}
15 SignTool=signtool
16
17 [Files]
18 ; Install adblockplusie-FINAL-x64.msi if running in 64-bit mode,
19 ; adblockplusie-FINAL-ia32.msi otherwise.
20 Source: "..\..\build\x64\adblockplusie-{#version}-multilanguage-x64.msi"; DestDi r: "{tmp}"; Check: Is64BitInstallMode
21 Source: "..\..\build\ia32\adblockplusie-{#version}-multilanguage-ia32.msi"; Dest Dir: "{tmp}"; Check: not Is64BitInstallMode
22
23 [Run]
24 Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\adblockplusie-{#version}-multil anguage-x64.msi"""; Check: Is64BitInstallMode
25 Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\adblockplusie-{#version}-multil anguage-ia32.msi"""; Check: not Is64BitInstallMode
26
27 [Code]
28 // Make sure InnoSetup always runs in silent mode, the UI is provided by the
29 // MSI. Origin of the code is https://stackoverflow.com/a/21577388/785541.
30 #ifdef UNICODE
31 #define AW "W"
32 #else
33 #define AW "A"
34 #endif
35 type
36 HINSTANCE = THandle;
37
38 function ShellExecute(hwnd: HWND; lpOperation: string; lpFile: string;
39 lpParameters: string; lpDirectory: string; nShowCmd: Integer): HINSTANCE;
40 external 'ShellExecute{#AW}@shell32.dll stdcall';
41
42 function InitializeSetup: Boolean;
43 begin
44 // if this instance of the setup is not silent which is by running
45 // setup binary without /SILENT parameter, stop the initialization
46 Result := WizardSilent;
47 // if this instance is not silent, then...
48 if not Result then
49 begin
50 // re-run the setup with /SILENT parameter; because executing of
51 // the setup loader is not possible with ShellExec function, we
52 // need to use a WinAPI workaround
53 if ShellExecute(0, '', ExpandConstant('{srcexe}'), '/SILENT', '',
54 SW_SHOW) <= 32
55 then
56 // if re-running this setup to silent mode failed, let's allow
57 // this non-silent setup to be run
58 Result := True;
59 end;
60 end;
OLDNEW

Powered by Google App Engine
This is Rietveld