Fix setup:

Added mariaDb installation
This commit is contained in:
Lucio Maranta
2019-04-12 13:05:27 +02:00
parent 56bf12dcb3
commit a5cc072d4e
+41 -7
View File
@@ -49,6 +49,7 @@ VersionInfoCopyright={#MyAppPublisher}
;WizardImageFile=C:\Programmi\Inno Setup 5\WizModernImage-IS.bmp
;WizardSmallImageFile=C:\Programmi\Inno Setup 5\CMS.bmp
WindowVisible=false
PrivilegesRequired=admin
; Setup installation type
[Types]
@@ -89,6 +90,7 @@ english.InstallingMariaDB = Installing MariaDB
italian.InstallingDotNet = Installando .Net
english.InstallingDotNet = Installing .Net
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone; Components: Demo Fanuc Osai Siemens
Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: checkablealone; Components: Demo Fanuc Osai Siemens
@@ -121,9 +123,9 @@ Source: "{#WwwRootPath}\assets\*"; DestDir: "{app}\view\assets\"; Flags: recurse
Source: "{#WwwRootPath}\scripts\*"; DestDir: "{app}\view\scripts\"; Flags: recursesubdirs ignoreversion; Components: Demo Fanuc Osai Siemens
;.Net Installer
Source: {#DotNetInstallerPath}\{#DotNetInstallerName}; DestDir: {tmp}; Flags: deleteafterinstall;
Source: {#MariaDBInstallerPath}\{#MariaDBInstallerName}; DestDir: {tmp}; Flags: deleteafterinstall;
;Check: FrameworkIsNotInstalled
;Source: {#DotNetInstallerPath}\{#DotNetInstallerName}; DestDir: {tmp}; Flags: deleteafterinstall;
Source: {#DotNetInstallerPath}\{#DotNetInstallerName}; DestDir: {tmp}; Flags: deleteafterinstall; Check: FrameworkIsNotInstalled
Source: {#MariaDBInstallerPath}\{#MariaDBInstallerName}; DestDir: {tmp}; Flags: deleteafterinstall;
[Icons]
; Default icons
@@ -139,12 +141,12 @@ Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}; Filen
[Run]
; Install .net
Filename: {tmp}\{#DotNetInstallerName}; Description: {cm:InstallDotNet}; WorkingDir:{tmp}; StatusMsg: {cm:InstallingDotNet}
Filename: {tmp}\{#DotNetInstallerName}; Description: {cm:InstallDotNet}; WorkingDir:{tmp}; StatusMsg: {cm:InstallingDotNet}; Check: FrameworkIsNotInstalled
; Install MariaDb
;Filename: {tmp}\{#MariaDBInstallerName}; Description: {cm:InstallDotNet}; WorkingDir:{tmp}; StatusMsg: {cm:InstallingMariaDB}
Filename: "msiexec.exe"; Description: {cm:InstallDotNet}; WorkingDir:{tmp}; StatusMsg: {cm:InstallingMariaDB}; Parameters: "/i {tmp}\{#MariaDBInstallerName}"
[Code]
///////////// SiemensPath ///////////////////////////////
///////////// SiemensPath ///////////////////////////////
function SiemensPath(S: String): string;
var
sSiemensPath: string;
@@ -165,4 +167,36 @@ begin
end;
Result := sSiemensPath ;
end;
end;
function FrameworkIsNotInstalled: Boolean;
begin;
Result := not RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\.NETFramework\policy\v4.0');
end;
//procedure InstallFramework;
//var
// ResultCode: Integer;
//begin
// WizardForm.StatusLabel.Caption := CustomMessage('InstallingDotNet');
// WizardForm.ProgressGauge.Style := npbstMarquee;
// if not Exec(ExpandConstant('{tmp}\{#DotNetInstallerName}'), '/noreboot', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
// begin
// MsgBox('.NET installation failed with code: ' + IntToStr(ResultCode) + '.',
// mbError, MB_OK);
// end;
//end;
//
//procedure InstallMariaDB;
//var
// ResultCode: Integer;
//begin
// WizardForm.StatusLabel.Caption := CustomMessage('InstallingMariaDB');
// WizardForm.ProgressGauge.Style := npbstMarquee;
// if not Exec(ExpandConstant('msiexec.exe'), '/i {tmp}\{#MariaDBInstallerName}', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
// begin
// MsgBox('MariaDb failed with code: ' + IntToStr(ResultCode) + '.',
// mbError, MB_OK);
// end;
//end;
//