Skip to content

Commit

Permalink
(GH-641) Support for more installer types
Browse files Browse the repository at this point in the history
Added support for the following installer types

- Ghost
- InstallForJ
- izPack
  • Loading branch information
ferventcoder committed Feb 20, 2016
1 parent 4350be9 commit d5cd67f
Show file tree
Hide file tree
Showing 6 changed files with 170 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/chocolatey/chocolatey.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
<Compile Include="AssemblyExtensions.cs" />
<Compile Include="infrastructure.app\domain\GenericRegistryKey.cs" />
<Compile Include="infrastructure.app\domain\GenericRegistryValue.cs" />
<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\RegistryValueKindType.cs" />
<Compile Include="infrastructure\commandline\ReadKeyTimeout.cs" />
<Compile Include="infrastructure\commands\Execute.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 @@ -23,6 +23,10 @@ public enum InstallerType
Nsis,
InnoSetup,
InstallShield,
Ghost,
InstallForJ,
IzPack,
Squirrel,
Zip,
SevenZip,
HotfixOrSecurityUpdate,
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>
/// Ghost Installer Options
/// </summary>
/// <remarks>
/// http://www.ethalone.com/products.html /
/// https://web.archive.org/web/20070812133050/http://www.ethalone.com/cgi-bin/ib/ikonboard.cgi?act=ST;f=2;t=195
/// Ghost has no logging or language options. The command line usage is very little.
/// </remarks>
public class GhostInstaller : InstallerBase
{
public GhostInstaller()
{
InstallExecutable = "\"{0}\"".format_with(InstallTokens.INSTALLER_LOCATION);
SilentInstall = "-s";
NoReboot = "";
LogFile = "";
CustomInstallLocation = "";
Language = "";
OtherInstallOptions = "";
UninstallExecutable = "\"{0}\"".format_with(InstallTokens.UNINSTALLER_LOCATION);
SilentUninstall = "-u -s";
OtherUninstallOptions = "";
ValidInstallExitCodes = new List<int>
{
0
};
ValidUninstallExitCodes = new List<int>
{
0
};
}

public override InstallerType InstallerType { get { return InstallerType.Ghost; } }
}
}
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>
/// InstallForJ Installer Options
/// </summary>
/// <remarks>
/// https://www.ej-technologies.com/products/install4j/overview.html
/// http://resources.ej-technologies.com/install4j/help/doc/
/// http://resources.ej-technologies.com/install4j/help/doc/helptopics/installers/options.html
/// </remarks>
public class InstallForJInstaller : InstallerBase
{
public InstallForJInstaller()
{
InstallExecutable = "\"{0}\"".format_with(InstallTokens.INSTALLER_LOCATION);
SilentInstall = "-q";
NoReboot = "";
LogFile = ""; //logging is done automatically to i4j_nlog_* file in temp directory - http://resources.ej-technologies.com/install4j/help/doc/helptopics/installers/errors.html
CustomInstallLocation = "-dir \"{0}\"".format_with(InstallTokens.CUSTOM_INSTALL_LOCATION);
Language = "";
OtherInstallOptions = "-overwrite"; // -wait 60
UninstallExecutable = "\"{0}\"".format_with(InstallTokens.UNINSTALLER_LOCATION);
SilentUninstall = "-q";
OtherUninstallOptions = "";
ValidInstallExitCodes = new List<int>
{
0
};
ValidUninstallExitCodes = new List<int>
{
0
};
}

public override InstallerType InstallerType { get { return InstallerType.InstallForJ; } }
}
}
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>
/// izPack Installer Options
/// </summary>
/// <remarks>
/// http://izpack.org/
/// https://izpack.atlassian.net/wiki/display/IZPACK/Installer+Runtime+Options
/// https://izpack.atlassian.net/wiki/display/IZPACK/Unattended+Installations
/// </remarks>
public class IzPackInstaller : InstallerBase
{
public IzPackInstaller()
{
InstallExecutable = "java";
SilentInstall = "-jar \"{0}\" -options-system".format_with(InstallTokens.INSTALLER_LOCATION);
NoReboot = "";
LogFile = "";
CustomInstallLocation = "-DINSTALL_PATH=\"{0}\"".format_with(InstallTokens.CUSTOM_INSTALL_LOCATION);
Language = "";
OtherInstallOptions = "";
UninstallExecutable = "java"; //currently untested
SilentUninstall = "-jar \"{0}\"".format_with(InstallTokens.UNINSTALLER_LOCATION);
OtherUninstallOptions = "";
ValidInstallExitCodes = new List<int>
{
0
};
ValidUninstallExitCodes = new List<int>
{
0
};
}

public override InstallerType InstallerType { get { return InstallerType.IzPack; } }
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2011 - Present RealDimensions Software, LLC
// 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.
Expand Down

0 comments on commit d5cd67f

Please sign in to comment.