From 93a42d6dc4471523b49418cdd1663efd60812480 Mon Sep 17 00:00:00 2001 From: Rob Reynolds Date: Tue, 24 May 2016 18:51:20 -0500 Subject: [PATCH] (GH-641) Add more installer types - PackageForTheWeb - Setup Factory - Wise Installer --- src/chocolatey/chocolatey.csproj | 3 + .../domain/InstallerType.cs | 4 ++ .../installers/PackageForTheWebInstaller.cs | 54 ++++++++++++++++ .../installers/SetupFactoryInstaller.cs | 63 +++++++++++++++++++ .../domain/installers/WiseInstaller.cs | 61 ++++++++++++++++++ 5 files changed, 185 insertions(+) create mode 100644 src/chocolatey/infrastructure.app/domain/installers/PackageForTheWebInstaller.cs create mode 100644 src/chocolatey/infrastructure.app/domain/installers/SetupFactoryInstaller.cs create mode 100644 src/chocolatey/infrastructure.app/domain/installers/WiseInstaller.cs diff --git a/src/chocolatey/chocolatey.csproj b/src/chocolatey/chocolatey.csproj index cd6690128b..2c4a7e3f45 100644 --- a/src/chocolatey/chocolatey.csproj +++ b/src/chocolatey/chocolatey.csproj @@ -90,8 +90,11 @@ + + + diff --git a/src/chocolatey/infrastructure.app/domain/InstallerType.cs b/src/chocolatey/infrastructure.app/domain/InstallerType.cs index 874ea7f434..f78e8159c1 100644 --- a/src/chocolatey/infrastructure.app/domain/InstallerType.cs +++ b/src/chocolatey/infrastructure.app/domain/InstallerType.cs @@ -28,9 +28,13 @@ public enum InstallerType IzPack, BitRock, Squirrel, + PackageForTheWeb, + SetupFactory, + Wise, QtInstaller, Zip, SevenZip, + SevenZipInstaller, HotfixOrSecurityUpdate, ServicePack } diff --git a/src/chocolatey/infrastructure.app/domain/installers/PackageForTheWebInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/PackageForTheWebInstaller.cs new file mode 100644 index 0000000000..40ad7bfe17 --- /dev/null +++ b/src/chocolatey/infrastructure.app/domain/installers/PackageForTheWebInstaller.cs @@ -0,0 +1,54 @@ +// 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.installers +{ + using System.Collections.Generic; + + /// + /// PackageForTheWeb Options + /// + /// + /// + public class PackageForTheWebInstaller : InstallerBase + { + public PackageForTheWebInstaller() + { + InstallExecutable = "\"{0}\"".format_with(InstallTokens.INSTALLER_LOCATION); + SilentInstall = "/s"; + NoReboot = ""; + LogFile = ""; + CustomInstallLocation = ""; + Language = ""; + OtherInstallOptions = ""; + UninstallExecutable = "\"{0}\"".format_with(InstallTokens.UNINSTALLER_LOCATION); + SilentUninstall = "/s"; + OtherUninstallOptions = ""; + ValidInstallExitCodes = new List + { + 0 + }; + ValidUninstallExitCodes = new List + { + 0 + }; + } + + public override InstallerType InstallerType + { + get { return InstallerType.PackageForTheWeb; } + } + } +} diff --git a/src/chocolatey/infrastructure.app/domain/installers/SetupFactoryInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/SetupFactoryInstaller.cs new file mode 100644 index 0000000000..4f1b4eec2a --- /dev/null +++ b/src/chocolatey/infrastructure.app/domain/installers/SetupFactoryInstaller.cs @@ -0,0 +1,63 @@ +// 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.installers +{ + using System.Collections.Generic; + + /// + /// SetupFactory Options + /// + /// + /// http://www.indigorose.com/webhelp/suf9/Program_Reference/Command_Line_Options.htm + /// + /// While we can override the extraction path, it should already be overridden + /// because we are overriding the TEMP variable + /// + public class SetupFactoryInstaller : InstallerBase + { + public SetupFactoryInstaller() + { + InstallExecutable = "\"{0}\"".format_with(InstallTokens.INSTALLER_LOCATION); + SilentInstall = "/S"; + NoReboot = ""; + LogFile = ""; + // http://www.indigorose.com/forums/threads/23686-How-to-Set-the-Default-Application-Directory + // http://www.indigorose.com/webhelp/suf70/Program_Reference/Screen_Types/Select_Install_Folder/Properties.htm + // http://www.indigorose.com/webhelp/suf70/Program_Reference/Variables/Session_Variables.htm#AppFolder + // todo: basically we need an environment variable for AppFolder + CustomInstallLocation = ""; + Language = ""; + //OtherInstallOptions = "\"/T:{0}\"".format_with(InstallTokens.TEMP_LOCATION); + OtherInstallOptions = ""; + UninstallExecutable = "\"{0}\"".format_with(InstallTokens.UNINSTALLER_LOCATION); + SilentUninstall = "/S"; + OtherUninstallOptions = ""; + ValidInstallExitCodes = new List + { + 0 + }; + ValidUninstallExitCodes = new List + { + 0 + }; + } + + public override InstallerType InstallerType + { + get { return InstallerType.SetupFactory; } + } + } +} diff --git a/src/chocolatey/infrastructure.app/domain/installers/WiseInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/WiseInstaller.cs new file mode 100644 index 0000000000..1aca1953dd --- /dev/null +++ b/src/chocolatey/infrastructure.app/domain/installers/WiseInstaller.cs @@ -0,0 +1,61 @@ +// 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.installers +{ + using System.Collections.Generic; + + /// + /// WISE Options + /// + /// + /// https://support.symantec.com/en_US/article.HOWTO5865.html + /// http://www.itninja.com/blog/view/wise-setup-exe-switches + /// + /// While we can override the extraction path, it should already be overridden + /// because we are overriding the TEMP variable + /// + public class WiseInstaller : InstallerBase + { + public WiseInstaller() + { + InstallExecutable = "\"{0}\"".format_with(InstallTokens.INSTALLER_LOCATION); + SilentInstall = "/s"; + NoReboot = ""; + LogFile = ""; + // http://www.itninja.com/question/wise-package-install-switches-for-install-path + CustomInstallLocation = ""; + Language = ""; + OtherInstallOptions = ""; + UninstallExecutable = "\"{0}\"".format_with(InstallTokens.UNINSTALLER_LOCATION); + SilentUninstall = "/s"; + // http://www.symantec.com/connect/blogs/wisescript-command-line-options + OtherUninstallOptions = "\"{0}\\Uninstall.Log\"".format_with(InstallTokens.TEMP_LOCATION); + ValidInstallExitCodes = new List + { + 0 + }; + ValidUninstallExitCodes = new List + { + 0 + }; + } + + public override InstallerType InstallerType + { + get { return InstallerType.Wise; } + } + } +}