Added Inno Setup script to create a installer for Windows

master
adrido 2015-10-27 04:12:10 +01:00
parent c0d6870299
commit 12c37f0731
5 changed files with 158 additions and 0 deletions

158
InnoSetupScript.iss Normal file
View File

@ -0,0 +1,158 @@
; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Minetest Mapper Gui"
#define MyAppVersion GetFileVersion('..\build-MinetestMapperGui-Desktop_Qt_5_4_1_MSVC2013_32bit-Release\release\MinetestMapperGui.exe')
#define MyAppPublisher "adrido"
#define MyAppURL "https://bitbucket.org/adrido/minetestmappergui"
#define MyAppExeName "MinetestMapperGui.exe"
;change this folder to use a diffrent qt-version
#define QtSourceDir = "C:\Qt\5.4\msvc2013"
#define QtBuildDir = "D:\Projekte\Qt_Projekte\build-MinetestMapperGui-Desktop_Qt_5_4_1_MSVC2013_32bit-Release\release"
#define MtMapperDir = "D:\Programme\minetestmapper-20150301-win32"
[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={{B51924E7-DBDF-4329-BBFA-AB842493474E}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=Setup {#MyAppName} x32
MinVersion=0,5.01sp3
UninstallDisplayIcon={app}\MinetestMapperGui.exe
WizardSmallImageFile=.\images\WizardSmallImage.bmp
WizardImageFile=.\images\WizardImage.bmp
InfoBeforeFile=.\LICENSE
VersionInfoDescription={#MyAppName} Setup
VersionInfoVersion={#MyAppVersion}
VersionInfoTextVersion={#MyAppVersion}
VersionInfoProductName={#MyAppName}
VersionInfoProductVersion={#MyAppVersion}
VersionInfoCopyright=2015 adrido; CC BY 3.0
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\MinetestMapperGui.exe"; IconIndex: 0
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\MinetestMapperGui.exe"; IconIndex: 0; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
[Components]
Name: "minetestmappergui"; Description: "Minetest Mapper GUI (required)"; Types: full compact custom; Flags: fixed
Name: "msvcr2013"; Description: "Microsoft Visual C++ 2013 Redistributable (required)"; Types: full compact custom; Flags: fixed; Check: VCRedistNeedsInstall
Name: "minetestmapper_cmd"; Description: "Minetestmapper by Rogier 5 (Recommended)"; Types: full compact custom; Flags: checkablealone
Name: "color_txt_files"; Description: "colors.txt files (Recommended)"; Types: full; Flags: checkablealone
[Files]
Source: "{#MtMapperDir}\bin\leveldb.dll"; DestDir: "{app}\mapper\"; Flags: ignoreversion; Components: minetestmapper_cmd
Source: "{#MtMapperDir}\bin\libfreetype-6.dll"; DestDir: "{app}\mapper\"; Flags: ignoreversion; Components: minetestmapper_cmd
Source: "{#MtMapperDir}\bin\libgcc_s_sjlj-1.dll"; DestDir: "{app}\mapper\"; Flags: ignoreversion; Components: minetestmapper_cmd
Source: "{#MtMapperDir}\bin\libgd.dll"; DestDir: "{app}\mapper\"; Flags: ignoreversion; Components: minetestmapper_cmd
Source: "{#MtMapperDir}\bin\libpng16.dll"; DestDir: "{app}\mapper\"; Flags: ignoreversion; Components: minetestmapper_cmd
Source: "{#MtMapperDir}\bin\libsqlite3.dll"; DestDir: "{app}\mapper\"; Flags: ignoreversion; Components: minetestmapper_cmd
Source: "{#MtMapperDir}\bin\libstdc++-6.dll"; DestDir: "{app}\mapper\"; Flags: ignoreversion; Components: minetestmapper_cmd
Source: "{#MtMapperDir}\bin\minetestmapper.exe"; DestDir: "{app}\mapper\"; Flags: ignoreversion; Components: minetestmapper_cmd
Source: "{#MtMapperDir}\bin\zlib1.dll"; DestDir: "{app}\mapper\"; Flags: ignoreversion; Components: minetestmapper_cmd
Source: "{#QtSourceDir}\bin\icudt53.dll"; DestDir: "{app}"; Flags: ignoreversion 32bit; Components: minetestmappergui
Source: "{#QtSourceDir}\bin\icuin53.dll"; DestDir: "{app}"; Flags: ignoreversion 32bit; Components: minetestmappergui
Source: "{#QtSourceDir}\bin\icuuc53.dll"; DestDir: "{app}"; Flags: ignoreversion 32bit; Components: minetestmappergui
Source: "{#QtSourceDir}\bin\libEGL.dll"; DestDir: "{app}"; Flags: ignoreversion 32bit; Components: minetestmappergui
Source: "{#QtBuildDir}\MinetestMapperGui.exe"; DestDir: "{app}"; Flags: ignoreversion 32bit; Components: minetestmappergui
Source: "C:\Windows\System32\msvcp120.dll"; DestDir: "{app}"; Flags: ignoreversion 32bit; Components: msvcr2013
Source: "C:\Windows\System32\msvcr120.dll"; DestDir: "{app}"; Flags: ignoreversion 32bit; Components: msvcr2013
Source: "{#QtSourceDir}\bin\Qt5Core.dll"; DestDir: "{app}"; Flags: ignoreversion 32bit; Components: minetestmappergui
Source: "{#QtSourceDir}\bin\Qt5Gui.dll"; DestDir: "{app}"; Flags: ignoreversion 32bit; Components: minetestmappergui
Source: "{#QtSourceDir}\bin\Qt5Svg.dll"; DestDir: "{app}"; Flags: ignoreversion 32bit; Components: minetestmappergui
Source: "{#QtSourceDir}\bin\Qt5Widgets.dll"; DestDir: "{app}"; Flags: ignoreversion 32bit; Components: minetestmappergui
Source: "{#QtSourceDir}\bin\Qt5WinExtras.dll"; DestDir: "{app}"; Flags: ignoreversion 32bit; Components: minetestmappergui
Source: "{#MtMapperDir}\colors\colors-average-alpha.txt"; DestDir: "{app}\colors\"; Flags: ignoreversion; Components: color_txt_files; Permissions: everyone-full
Source: "{#MtMapperDir}\colors\colors-cumulative-alpha.txt"; DestDir: "{app}\colors\"; Flags: ignoreversion; Components: color_txt_files; Permissions: everyone-full
Source: "{#MtMapperDir}\colors\colors.txt"; DestDir: "{app}\colors\"; Flags: ignoreversion; Components: color_txt_files; Permissions: everyone-full
Source: "{#MtMapperDir}\colors\heightmap-colors-rainbow.txt"; DestDir: "{app}\colors\"; Flags: ignoreversion; Components: color_txt_files; Permissions: everyone-full
Source: "{#MtMapperDir}\colors\heightmap-colors.txt"; DestDir: "{app}\colors\"; Flags: ignoreversion; Components: color_txt_files; Permissions: everyone-full
Source: "{#MtMapperDir}\colors\heightmap-nodes.txt"; DestDir: "{app}\colors\"; Flags: ignoreversion; Components: color_txt_files; Permissions: everyone-full
Source: "{#QtBuildDir}\languages\de.png"; DestDir: "{app}\languages\"; Flags: ignoreversion
Source: "{#QtBuildDir}\languages\en.png"; DestDir: "{app}\languages\"; Flags: ignoreversion
Source: "{#QtBuildDir}\languages\gui_de.qm"; DestDir: "{app}\languages\"; Flags: ignoreversion
Source: "{#QtBuildDir}\languages\gui_en.qm"; DestDir: "{app}\languages\"; Flags: ignoreversion
Source: "{#QtBuildDir}\languages\qtbase_de.qm"; DestDir: "{app}\languages\"; Flags: ignoreversion
Source: "{#QtSourceDir}\plugins\iconengines\qsvgicon.dll"; DestDir: "{app}\plugins\iconengines\"; Flags: ignoreversion; Components: minetestmappergui
Source: "{#QtSourceDir}\plugins\imageformats\qsvg.dll"; DestDir: "{app}\plugins\imageformats\"; Flags: ignoreversion; Components: minetestmappergui
Source: "{#QtSourceDir}\plugins\platforms\qwindows.dll"; DestDir: "{app}\plugins\platforms\"; Flags: ignoreversion; Components: minetestmappergui
[Dirs]
Name: "{app}\colors\colors"; Components: color_txt_files
Name: "{app}\plugins\iconengines\"
Name: "{app}\plugins\imageformats\"
Name: "{app}\plugins\platforms\"
[INI]
;create qt.conf file and specify the plugins path
Filename: "{app}\qt.conf"; Section: "Paths"; Key: "Plugins"; String: "plugins";
[UninstallDelete]
Type: files; Name: "{app}\qt.conf"
Type: dirifempty; Name: "{app}"
[Code]
#IFDEF UNICODE
#DEFINE AW "W"
#ELSE
#DEFINE AW "A"
#ENDIF
type
INSTALLSTATE = Longint;
const
INSTALLSTATE_INVALIDARG = -2; // An invalid parameter was passed to the function.
INSTALLSTATE_UNKNOWN = -1; // The product is neither advertised or installed.
INSTALLSTATE_ADVERTISED = 1; // The product is advertised but not installed.
INSTALLSTATE_ABSENT = 2; // The product is installed for a different user.
INSTALLSTATE_DEFAULT = 5; // The product is installed for the current user.
vcredist2013_url = 'http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe';
vcredist2013_url_x64 = 'http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe';
VC_2013_REDIST = '{13A4EE12-23EA-3371-91EE-EFB36DDFFF3E}'; //Microsoft.VS.VC_RuntimeMinimumVSU_x86,v12
VC_2013_REDIST_x64 = '{A749D8E6-B613-3BE3-8F5F-045C84EBA29B}'; //Microsoft.VS.VC_RuntimeMinimumVSU_amd64,v12
function MsiQueryProductState(szProduct: string): INSTALLSTATE;
external 'MsiQueryProductState{#AW}@msi.dll stdcall';
function VCVersionInstalled(const ProductID: string): Boolean;
begin
Result := MsiQueryProductState(ProductID) = INSTALLSTATE_DEFAULT;
end;
function VCRedistNeedsInstall: Boolean;
begin
// here the Result must be True when you need to install your VCRedist
// or False when you don't need to, so now it's upon you how you build
// this statement, the following won't install your VC redist only when
// the Visual C++ 2010 Redist (x86) and Visual C++ 2010 SP1 Redist(x86)
// are installed for the current user
Result := not (VCVersionInstalled(VC_2013_REDIST) and
VCVersionInstalled(VC_2013_REDIST));
end;

BIN
images/WizardImage.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

BIN
images/WizardSmallImage.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
languages/de.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 891 B

BIN
languages/en.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB