Skip to content

Commit

Permalink
(GH-641) Add more installer types
Browse files Browse the repository at this point in the history
- PackageForTheWeb
- Setup Factory
- Wise Installer
  • Loading branch information
ferventcoder committed May 24, 2016
1 parent a42afbd commit 93a42d6
Show file tree
Hide file tree
Showing 5 changed files with 185 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/chocolatey/chocolatey.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,11 @@
<Compile Include="infrastructure.app\domain\installers\GhostInstaller.cs" />
<Compile Include="infrastructure.app\domain\installers\InstallForJInstaller.cs" />
<Compile Include="infrastructure.app\domain\installers\IzPackInstaller.cs" />
<Compile Include="infrastructure.app\domain\installers\PackageForTheWebInstaller.cs" />
<Compile Include="infrastructure.app\domain\installers\QtInstaller.cs" />
<Compile Include="infrastructure.app\domain\installers\SetupFactoryInstaller.cs" />
<Compile Include="infrastructure.app\domain\installers\SquirrelInstaller.cs" />
<Compile Include="infrastructure.app\domain\installers\WiseInstaller.cs" />
<Compile Include="infrastructure.app\domain\RegistryValueKindType.cs" />
<Compile Include="infrastructure.app\events\HandlePackageResultCompletedMessage.cs" />
<Compile Include="infrastructure.app\services\FileTypeDetectorService.cs" />
Expand Down
4 changes: 4 additions & 0 deletions src/chocolatey/infrastructure.app/domain/InstallerType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ public enum InstallerType
IzPack,
BitRock,
Squirrel,
PackageForTheWeb,
SetupFactory,
Wise,
QtInstaller,
Zip,
SevenZip,
SevenZipInstaller,
HotfixOrSecurityUpdate,
ServicePack
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

/// <summary>
/// PackageForTheWeb Options
/// </summary>
/// <remarks>
/// </remarks>
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<int>
{
0
};
ValidUninstallExitCodes = new List<int>
{
0
};
}

public override InstallerType InstallerType
{
get { return InstallerType.PackageForTheWeb; }
}
}
}
Original file line number Diff line number Diff line change
@@ -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;

/// <summary>
/// SetupFactory Options
/// </summary>
/// <remarks>
/// 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
/// </remarks>
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<int>
{
0
};
ValidUninstallExitCodes = new List<int>
{
0
};
}

public override InstallerType InstallerType
{
get { return InstallerType.SetupFactory; }
}
}
}
Original file line number Diff line number Diff line change
@@ -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;

/// <summary>
/// WISE Options
/// </summary>
/// <remarks>
/// 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
/// </remarks>
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<int>
{
0
};
ValidUninstallExitCodes = new List<int>
{
0
};
}

public override InstallerType InstallerType
{
get { return InstallerType.Wise; }
}
}
}

0 comments on commit 93a42d6

Please sign in to comment.