Skip to content

Commit

Permalink
(chocolateyGH-641) Add BitRock / QT / Squirrel Installers
Browse files Browse the repository at this point in the history
Add installer types for

- BitRock Installer
- QT Installer
- Squirrel
  • Loading branch information
ferventcoder committed May 1, 2016
1 parent 079b914 commit 01e338e
Show file tree
Hide file tree
Showing 6 changed files with 171 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 @@ -86,9 +86,12 @@
<Compile Include="infrastructure.app\commands\ChocolateyInfoCommand.cs" />
<Compile Include="infrastructure.app\domain\GenericRegistryKey.cs" />
<Compile Include="infrastructure.app\domain\GenericRegistryValue.cs" />
<Compile Include="infrastructure.app\domain\installers\BitRockInstaller.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\installers\QtInstaller.cs" />
<Compile Include="infrastructure.app\domain\installers\SquirrelInstaller.cs" />
<Compile Include="infrastructure.app\domain\RegistryValueKindType.cs" />
<Compile Include="infrastructure.app\events\HandlePackageResultCompletedMessage.cs" />
<Compile Include="infrastructure.app\services\FileTypeDetectorService.cs" />
Expand Down
2 changes: 2 additions & 0 deletions src/chocolatey/infrastructure.app/domain/InstallerType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public enum InstallerType
Ghost,
InstallForJ,
IzPack,
BitRock,
Squirrel,
QtInstaller,
Zip,
SevenZip,
HotfixOrSecurityUpdate,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// 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>
/// BitRock Installer Options
/// </summary>
/// <remarks>
/// http://blog.bitrock.com/2009/10/unattended-mode.html
/// http://installbuilder.bitrock.com/docs/installbuilder-userguide.html#_unattended_mode
/// http://installbuilder.bitrock.com/docs/installbuilder-userguide/ar01s13.html
/// </remarks>
public class BitRockInstaller : InstallerBase
{
public BitRockInstaller()
{
InstallExecutable = "\"{0}\"".format_with(InstallTokens.INSTALLER_LOCATION);
SilentInstall = "--mode unattended";
// http://answers.bitrock.com/questions/215/how-can-i-restart-the-computer-after-installation-has-completed
NoReboot = "";
LogFile = "";
// http://installbuilder.bitrock.com/docs/installbuilder-userguide.html#_command_line_parameters
// http://answers.bitrock.com/questions/57/how-do-i-specify-a-different-default-installation-directory-for-unix-and-windows
CustomInstallLocation = "--installdir {0}".format_with(InstallTokens.CUSTOM_INSTALL_LOCATION);
Language = "";
OtherInstallOptions = "--unattendedmodeui none";
UninstallExecutable = "\"{0}\"".format_with(InstallTokens.UNINSTALLER_LOCATION);
SilentUninstall = "--mode unattended";
OtherUninstallOptions = "--unattendedmodeui none";
ValidInstallExitCodes = new List<int>
{
0
};
ValidUninstallExitCodes = new List<int>
{
0
};
}

public override InstallerType InstallerType { get { return InstallerType.BitRock; } }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public MsiInstaller()
// http://msdn.microsoft.com/en-us/library/aa371101.aspx
NoReboot = "/norestart"; //REBOOT=ReallySuppress
LogFile = "/l*v \"{0}\\MSI.Install.log\"".format_with(InstallTokens.PACKAGE_LOCATION);
// http://msdn.microsoft.com/en-us/library/aa372064.aspx
// https://msdn.microsoft.com/en-us/library/aa372064.aspx
// http://apprepack.blogspot.com/2012/08/installdir-vs-targetdir.html
CustomInstallLocation = "TARGETDIR=\"{0}\"".format_with(InstallTokens.CUSTOM_INSTALL_LOCATION);
// http://msdn.microsoft.com/en-us/library/aa370856.aspx
Language = "ProductLanguage={0}".format_with(InstallTokens.LANGUAGE);
Expand Down
55 changes: 55 additions & 0 deletions src/chocolatey/infrastructure.app/domain/installers/QtInstaller.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// 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>
/// QT Installer Options
/// </summary>
/// <remarks>
/// https://doc.qt.io/qtinstallerframework/index.html
/// http://doc.qt.io/qtinstallerframework/operations.html
/// </remarks>
public class QtInstaller : InstallerBase
{
public QtInstaller()
{
InstallExecutable = "\"{0}\"".format_with(InstallTokens.INSTALLER_LOCATION);
SilentInstall = "";
NoReboot = "";
LogFile = "";
//http://doc.qt.io/qtinstallerframework/ifw-globalconfig.html
//CustomInstallLocation = "targetdir={0}".format_with(InstallTokens.CUSTOM_INSTALL_LOCATION);
CustomInstallLocation = "";
Language = "";
OtherInstallOptions = "";
UninstallExecutable = "\"{0}\"".format_with(InstallTokens.UNINSTALLER_LOCATION);
SilentUninstall = "";
OtherUninstallOptions = "";
ValidInstallExitCodes = new List<int>
{
0
};
ValidUninstallExitCodes = new List<int>
{
0
};
}

public override InstallerType InstallerType { get { return InstallerType.QtInstaller; } }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// 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>
/// Squirrel Installer Options
/// </summary>
/// <remarks>
/// https://github.com/Squirrel/Squirrel.Windows/blob/92e7af66b1593f951527dd88289a4ed1bee4bcdd/src/Update/Program.cs#L109
/// </remarks>
public class SquirrelInstaller : InstallerBase
{
public SquirrelInstaller()
{
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.Squirrel; } }
}
}

0 comments on commit 01e338e

Please sign in to comment.