Skip to content

Commit

Permalink
(canton7GH-614) Add skipdotnet installer command line option
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCakeIsNaOH committed Jan 8, 2021
1 parent 47d908e commit 6aaa84a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chocolatey/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definitio
$packageName= 'SyncTrayzor'
$file = (Join-Path $toolsDir 'SyncTrayzorSetup-x86.exe')
$file64 = (Join-Path $toolsDir 'SyncTrayzorSetup-x64.exe')
$silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-'
$silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /SKIPDOTNET'
$fileType = 'exe'
$validExitCodes = @(0)

Expand Down
20 changes: 19 additions & 1 deletion installer/common.iss
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,31 @@ begin
end
end;
function CmdLineParamNotExists(const Value: string): Boolean;
var
I: Integer;
begin
Result := True;
for I := 1 to ParamCount do
if CompareText(ParamStr(I), Value) = 0 then
begin
Result := False;
Exit;
end;
end;
function NoSkipDotNet(): Boolean;
begin
Result := CmdLineParamNotExists('/SKIPDOTNET');
end;
function PrepareToInstall(var NeedsRestart: Boolean): String;
begin
// 'NeedsRestart' only has an effect if we return a non-empty string, thus aborting the installation.
// If the installers indicate that they want a restart, this should be done at the end of installation.
// Therefore we set the global 'restartRequired' if a restart is needed, and return this from NeedRestart()
if DotNetIsMissing() then
if DotNetIsMissing() And NoSkipDotNet() then
begin
Result := InstallDotNet();
end;
Expand Down

0 comments on commit 6aaa84a

Please sign in to comment.