-
Notifications
You must be signed in to change notification settings - Fork 905
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* stable: (GH-296) add 1605 for valid MSI exit code (GH-305) Installer Type Validate Exit Code (GH-305) Find the installer type every time (maint) formatting (GH-304) Auto Installer allow system cleanup (GH-305) Clean up installer types
- Loading branch information
Showing
11 changed files
with
145 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// Copyright © 2011 - Present RealDimensions Software, LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
namespace chocolatey.infrastructure.app.domain | ||
{ | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
public abstract class InstallerBase : IInstaller | ||
{ | ||
public abstract InstallerType InstallerType { get; } | ||
|
||
public string InstallExecutable { get; protected set; } | ||
public string SilentInstall { get; protected set; } | ||
public string NoReboot { get; protected set; } | ||
public string LogFile { get; protected set; } | ||
public string OtherInstallOptions { get; protected set; } | ||
public string CustomInstallLocation { get; protected set; } | ||
public string Language { get; protected set; } | ||
public string UninstallExecutable { get; protected set; } | ||
public string SilentUninstall { get; protected set; } | ||
public string OtherUninstallOptions { get; protected set; } | ||
public IEnumerable<int> ValidInstallExitCodes { get; protected set; } | ||
public IEnumerable<int> ValidUninstallExitCodes { get; protected set; } | ||
|
||
public virtual string build_install_command_arguments(bool customInstallLocation, bool languageRequested) | ||
{ | ||
var args = new StringBuilder(); | ||
args.AppendFormat("{0} {1} {2}", SilentInstall, NoReboot, LogFile); | ||
if (languageRequested) args.AppendFormat(" {0}", Language); | ||
args.AppendFormat(" {0}", OtherInstallOptions); | ||
|
||
// custom install location must be last for NSIS | ||
if (customInstallLocation) args.AppendFormat(" {0}", CustomInstallLocation); | ||
|
||
return args.ToString(); | ||
} | ||
|
||
public virtual string build_uninstall_command_arguments() | ||
{ | ||
return "{0} {1} {2} {3}".format_with(SilentUninstall, NoReboot, LogFile, OtherUninstallOptions); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.