mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 12:30:32 +00:00
- Added check for dependencies, which can be installed from the builder. - Replaced CosmosTask with CosmosBuildDefinition, which is much simpler. - The builder can be opened without any command line arguments. - If the VS path is not specified as a command line argument, it can be selected in a dialog.
29 lines
946 B
C#
29 lines
946 B
C#
using System.IO;
|
|
using Microsoft.Win32;
|
|
|
|
namespace Cosmos.Build.Builder.Services
|
|
{
|
|
internal class InnoSetupService : IInnoSetupService
|
|
{
|
|
private const string InnoSetupRegistryKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 5_is1";
|
|
|
|
public string GetInnoSetupInstallationPath()
|
|
{
|
|
using (var localMachineKey32 = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32))
|
|
{
|
|
using (var key = localMachineKey32.OpenSubKey(InnoSetupRegistryKey, false))
|
|
{
|
|
if (key?.GetValue("InstallLocation") is string innoSetupPath)
|
|
{
|
|
if (Directory.Exists(innoSetupPath))
|
|
{
|
|
return innoSetupPath;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|
|
}
|