From a5cc072d4e7d544413e847f27636d89a2deb3985 Mon Sep 17 00:00:00 2001 From: Lucio Maranta Date: Fri, 12 Apr 2019 13:05:27 +0200 Subject: [PATCH] Fix setup: Added mariaDb installation --- Step/SetupActive.iss | 48 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/Step/SetupActive.iss b/Step/SetupActive.iss index 044f6f65..c74cf6da 100644 --- a/Step/SetupActive.iss +++ b/Step/SetupActive.iss @@ -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; \ No newline at end of file +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; +// \ No newline at end of file