fix whitespace
This commit is contained in:
5
.editorconfig
Normal file
5
.editorconfig
Normal file
@@ -0,0 +1,5 @@
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
@@ -1,10 +1,15 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
VisualStudioVersion = 14.0.24720.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuikPak", "QuikPak\QuikPak.csproj", "{906448E0-73EA-4283-BAB1-4C81EEFC4EFA}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FA4A9552-C278-45F3-90E7-BBE88F75C254}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.editorconfig = .editorconfig
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -1,89 +1,86 @@
|
||||
using System;
|
||||
using CommandLine;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CommandLine;
|
||||
using Newtonsoft.Json;
|
||||
using WixSharp;
|
||||
|
||||
namespace QuikPak
|
||||
{
|
||||
class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var options = new Options();
|
||||
class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var options = new Options();
|
||||
var result = Parser.Default.ParseArguments(args, options);
|
||||
if(!result) return;
|
||||
if(!System.IO.File.Exists(options.Config))
|
||||
{
|
||||
Console.Error.WriteLine("Error Config.json does not exist");
|
||||
}
|
||||
if(!System.IO.Directory.Exists(options.Path))
|
||||
{
|
||||
Console.Error.WriteLine("path to pack does not exist");
|
||||
}
|
||||
var config = JsonConvert.DeserializeObject<Config>(System.IO.File.ReadAllText(options.Config));
|
||||
var addresses = new List<WebSite.WebAddress>();
|
||||
|
||||
foreach(var Endpoint in config.Endpoints)
|
||||
{
|
||||
var attr = new Attributes()
|
||||
{
|
||||
{ "Port", Endpoint.Port.ToString() },
|
||||
{ "Secure", Endpoint.Secure? "yes": "no" }
|
||||
};
|
||||
if(!string.IsNullOrWhiteSpace(Endpoint.DnsName))
|
||||
{
|
||||
attr["Header"] = Endpoint.DnsName;
|
||||
if(!result) return;
|
||||
if(!System.IO.File.Exists(options.Config))
|
||||
{
|
||||
Console.Error.WriteLine("Error Config.json does not exist");
|
||||
}
|
||||
if(!System.IO.Directory.Exists(options.Path))
|
||||
{
|
||||
Console.Error.WriteLine("path to pack does not exist");
|
||||
}
|
||||
var config = JsonConvert.DeserializeObject<Config>(System.IO.File.ReadAllText(options.Config));
|
||||
var addresses = new List<WebSite.WebAddress>();
|
||||
|
||||
foreach(var Endpoint in config.Endpoints)
|
||||
{
|
||||
var attr = new Attributes()
|
||||
{
|
||||
{ "Port", Endpoint.Port.ToString() },
|
||||
{ "Secure", Endpoint.Secure? "yes": "no" }
|
||||
};
|
||||
if(!string.IsNullOrWhiteSpace(Endpoint.DnsName))
|
||||
{
|
||||
attr["Header"] = Endpoint.DnsName;
|
||||
}
|
||||
addresses.Add(new WebSite.WebAddress() {
|
||||
Attributes = attr
|
||||
addresses.Add(new WebSite.WebAddress()
|
||||
{
|
||||
Attributes = attr
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
var project = new Project(config.Name)
|
||||
{
|
||||
Dirs = new[]
|
||||
{
|
||||
new Dir(new Id("IISMain"), config.Name + "_" +config.Version.ToString() +"_Web",
|
||||
new Files(System.IO.Path.Combine(options.Path, "**")),
|
||||
new File(options.Config,
|
||||
new IISVirtualDir
|
||||
{
|
||||
Name = config.Name + "_Web_VDIR",
|
||||
WebSite = new WebSite(config.Name)
|
||||
{
|
||||
InstallWebSite = true,
|
||||
Description = config.Name,
|
||||
Addresses = addresses.ToArray(),
|
||||
},
|
||||
WebAppPool = new WebAppPool(config.Name)
|
||||
})
|
||||
)
|
||||
|
||||
},
|
||||
Version = new Version(config.Version) { },
|
||||
GUID = new Guid(config.Id),
|
||||
UI = WUI.WixUI_ProgressOnly,
|
||||
OutFileName = config.Name,
|
||||
PreserveTempFiles = true,
|
||||
UpgradeCode = new Guid(config.UpgradeCode),
|
||||
|
||||
};
|
||||
project.Properties.Add(new Property("REINSTALLMODE", "dmus"));
|
||||
project.MajorUpgrade = new MajorUpgrade() { AllowDowngrades = true};
|
||||
//project.MajorUpgradeStrategy = new MajorUpgradeStrategy() {
|
||||
|
||||
// UpgradeVersions = new VersionRange() {
|
||||
// IncludeMinimum = true,
|
||||
// IncludeMaximum = false,
|
||||
// Minimum = "0.0.0.1",
|
||||
// Maximum = "99.0.0.0"
|
||||
// } };
|
||||
Compiler.BuildMsi(project);
|
||||
}
|
||||
}
|
||||
}
|
||||
var project = new Project(config.Name)
|
||||
{
|
||||
Dirs = new[]
|
||||
{
|
||||
new Dir(new Id("IISMain"), config.Name + "_" +config.Version.ToString() +"_Web",
|
||||
new Files(System.IO.Path.Combine(options.Path, "**")),
|
||||
new File(options.Config,
|
||||
new IISVirtualDir
|
||||
{
|
||||
Name = config.Name + "_Web_VDIR",
|
||||
WebSite = new WebSite(config.Name)
|
||||
{
|
||||
InstallWebSite = true,
|
||||
Description = config.Name,
|
||||
Addresses = addresses.ToArray(),
|
||||
},
|
||||
WebAppPool = new WebAppPool(config.Name)
|
||||
})
|
||||
)
|
||||
},
|
||||
Version = new Version(config.Version) { },
|
||||
GUID = new Guid(config.Id),
|
||||
UI = WUI.WixUI_ProgressOnly,
|
||||
OutFileName = config.Name,
|
||||
PreserveTempFiles = true,
|
||||
UpgradeCode = new Guid(config.UpgradeCode),
|
||||
};
|
||||
project.Properties.Add(new Property("REINSTALLMODE", "dmus"));
|
||||
project.MajorUpgrade = new MajorUpgrade() { AllowDowngrades = true };
|
||||
//project.MajorUpgradeStrategy = new MajorUpgradeStrategy() {
|
||||
// UpgradeVersions = new VersionRange() {
|
||||
// IncludeMinimum = true,
|
||||
// IncludeMaximum = false,
|
||||
// Minimum = "0.0.0.1",
|
||||
// Maximum = "99.0.0.0"
|
||||
// } };
|
||||
Compiler.BuildMsi(project);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user