Skip to content

Commit a74faf3

Browse files
committed
Installer: Add QT GUI to Windows installer.
Add new QT GUI -component to the installer. The component installs QT libraries, GUI executable and shortcut to Start-menu.
1 parent 2a7470e commit a74faf3

1 file changed

Lines changed: 36 additions & 16 deletions

File tree

win_installer/cppcheck.iss

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; cppcheck InnoSetup installer script
2-
; Copyright (c) 2009 Kimmo Varis
2+
; Copyright (C) 2007-2009 Daniel Marjamäki and Cppcheck team.
33

44
; This program is free software: you can redistribute it and/or modify
55
; it under the terms of the GNU General Public License as published by
@@ -22,10 +22,13 @@
2222
#define AppVersion "1.32"
2323
#define MyAppURL "http://cppcheck.wiki.sourceforge.net/"
2424
#define MyAppExeName "cppcheck.exe"
25+
#define QTGuiExe "gui.exe"
26+
#define QTGuiName "cppcheck GUI"
2527

26-
; Set this macro to point to folder where VS runtimes are
28+
; Set this macro to point to folder where VS and QT runtimes are
2729
; Runtime files are not included in repository so you need to
28-
; get them from elsewhere (e.g. from VS installation).
30+
; get them from elsewhere. VS runtimes come with VS installation. QT runtimes
31+
; you must compile yourself.
2932
#define RuntimesFolder "..\..\Runtimes"
3033

3134
[Setup]
@@ -66,6 +69,18 @@ WizardImageStretch=false
6669
[Languages]
6770
Name: english; MessagesFile: compiler:Default.isl
6871

72+
[Types]
73+
Name: full; Description: Full installation
74+
Name: compact; Description: Compact installation
75+
Name: custom; Description: Custom installation; Flags: iscustom
76+
77+
; We have two components:
78+
; - Core contains all C-runtimes, command line executable and basic documents
79+
; - QTGui contains QT libraries and QT-based GUI
80+
[Components]
81+
Name: Core; Description: Core files (command line executable); Types: full custom compact; Flags: fixed
82+
Name: QTGui; Description: QT-based GUI [Experimental]; Types: full
83+
6984
[Tasks]
7085
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
7186
Name: modifypath; Description: &Add {#MyAppName} folder to your system path; Flags: unchecked
@@ -75,26 +90,31 @@ Name: modifypath; Description: &Add {#MyAppName} folder to your system path; Fla
7590
Type: files; Name: {app}\COPYING
7691

7792
[Files]
78-
Source: ..\Build\Release\cppcheck.exe; DestDir: {app}; Flags: ignoreversion
79-
Source: ..\COPYING; DestDir: {app}; DestName: COPYING.txt; Flags: ignoreversion
80-
Source: ..\readme.txt; DestDir: {app}; Flags: ignoreversion
81-
Source: ..\AUTHORS; DestDir: {app}; DestName: AUTHORS.txt; Flags: ignoreversion
93+
Source: ..\Build\Release\cppcheck.exe; DestDir: {app}; Flags: ignoreversion; Components: Core
94+
Source: ..\gui\Release\gui.exe; DestDir: {app}; Flags: ignoreversion; Components: QTGui
95+
Source: ..\COPYING; DestDir: {app}; DestName: COPYING.txt; Flags: ignoreversion; Components: Core
96+
Source: ..\readme.txt; DestDir: {app}; Flags: ignoreversion; Components: Core
97+
Source: ..\AUTHORS; DestDir: {app}; DestName: AUTHORS.txt; Flags: ignoreversion; Components: Core
8298
; VS runtimes
83-
Source: {#RuntimesFolder}\Microsoft.VC90.CRT.manifest; DestDir: {app}
84-
Source: {#RuntimesFolder}\msvcp90.dll; DestDir: {app}
85-
Source: {#RuntimesFolder}\msvcr90.dll; DestDir: {app}
99+
Source: {#RuntimesFolder}\Microsoft.VC90.CRT.manifest; DestDir: {app}; Components: Core
100+
Source: {#RuntimesFolder}\msvcp90.dll; DestDir: {app}; Components: Core
101+
Source: {#RuntimesFolder}\msvcr90.dll; DestDir: {app}; Components: Core
102+
; QT runtimes
103+
Source: {#RuntimesFolder}\QtCore4.dll; DestDir: {app}; Components: QTGui
104+
Source: {#RuntimesFolder}\QtGui4.dll; DestDir: {app}; Components: QTGui
86105

87106
[Icons]
88107
; As cppcheck is a program run from command prompt, make icons to open
89108
; command prompt in install folder
90-
Name: {group}\{#MyAppName}; Filename: {sys}\cmd.exe; WorkingDir: {app}
91-
Name: {group}\{cm:ProgramOnTheWeb,{#MyAppName}}; Filename: {#MyAppURL}
92-
Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe}
109+
Name: {group}\{#MyAppName}; Filename: {sys}\cmd.exe; WorkingDir: {app}; Components: Core
110+
Name: {group}\{#QTGuiName}; Filename: {app}\{#QTGuiExe}; WorkingDir: {app}; Components: QTGui
111+
Name: {group}\{cm:ProgramOnTheWeb,{#MyAppName}}; Filename: {#MyAppURL}; Components: Core
112+
Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe}; Components: Core
93113
; Desktop icon
94-
Name: {commondesktop}\{#MyAppName}; Filename: {sys}\cmd.exe; WorkingDir: {app}; Tasks: desktopicon
114+
Name: {commondesktop}\{#MyAppName}; Filename: {sys}\cmd.exe; WorkingDir: {app}; Tasks: desktopicon; Components: Core
95115
; Doc icons
96-
Name: {group}\Authors; Filename: {app}\AUTHORS.txt; IconFileName: {win}\NOTEPAD.EXE
97-
Name: {group}\Copying; Filename: {app}\COPYING.txt; IconFileName: {win}\NOTEPAD.EXE
116+
Name: {group}\Authors; Filename: {app}\AUTHORS.txt; IconFileName: {win}\NOTEPAD.EXE; Components: Core
117+
Name: {group}\Copying; Filename: {app}\COPYING.txt; IconFileName: {win}\NOTEPAD.EXE; Components: Core
98118

99119
[Code]
100120
function ModPathDir(): TArrayOfString;

0 commit comments

Comments
 (0)