diff --git a/QuikPak.sln b/QuikPak.sln
index 797f63a..102fdde 100644
--- a/QuikPak.sln
+++ b/QuikPak.sln
@@ -8,6 +8,9 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FA4A9552-C278-45F3-90E7-BBE88F75C254}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
+ build.cmd = build.cmd
+ config.json = config.json
+ Readme.md = Readme.md
EndProjectSection
EndProject
Global
diff --git a/QuikPak/Options.cs b/QuikPak/Options.cs
index 7c865d3..02196d9 100644
--- a/QuikPak/Options.cs
+++ b/QuikPak/Options.cs
@@ -1,17 +1,25 @@
-using System;
+using CommandLine;
+using CommandLine.Text;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
-using CommandLine;
namespace QuikPak
{
- public class Options
- {
- [Option('x', "path", Required = true, HelpText = "path to files")]
- public string Path { get; set; }
- [Option('c', "config", Required = true, HelpText = "path to a config")]
- public string Config { get; set; }
- }
-}
+ public class Options
+ {
+ [Option('x', "path", Required = true, HelpText = "path to files")]
+ public string Path { get; set; }
+
+ [Option('c', "config", Required = true, HelpText = "path to a config")]
+ public string Config { get; set; }
+
+ [HelpOption]
+ public string GetUsage()
+ {
+ return HelpText.AutoBuild(this);
+ }
+ }
+}
\ No newline at end of file
diff --git a/QuikPak/Program.cs b/QuikPak/Program.cs
index 4af49df..8a8bdd8 100644
--- a/QuikPak/Program.cs
+++ b/QuikPak/Program.cs
@@ -9,7 +9,7 @@ using WixSharp;
namespace QuikPak
{
- class Program
+ internal class Program
{
public static void Main(string[] args)
{
@@ -65,21 +65,25 @@ namespace QuikPak
)
},
Version = new Version(config.Version) { },
- GUID = new Guid(config.Id),
+ GUID = string.IsNullOrWhiteSpace(config.Id) ? Guid.NewGuid() : 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"
- // } };
+ project.MajorUpgrade = new MajorUpgrade() { AllowDowngrades = true, Schedule = UpgradeSchedule.afterInstallInitialize };
+ project.MajorUpgradeStrategy = new MajorUpgradeStrategy()
+ {
+ UpgradeVersions = new VersionRange()
+ {
+ IncludeMinimum = true,
+ IncludeMaximum = false,
+ Minimum = "0.0.0.1",
+ Maximum = "99.0.0.0"
+ },
+ RemoveExistingProductAfter = Step.InstallInitialize
+ };
Compiler.BuildMsi(project);
}
}
diff --git a/QuikPak/QuikPak.csproj b/QuikPak/QuikPak.csproj
index 6533355..cdc6066 100644
--- a/QuikPak/QuikPak.csproj
+++ b/QuikPak/QuikPak.csproj
@@ -81,9 +81,6 @@
-
- Always
-
diff --git a/QuikPak/readme.md b/QuikPak/readme.md
deleted file mode 100644
index 75cd6fc..0000000
--- a/QuikPak/readme.md
+++ /dev/null
@@ -1 +0,0 @@
-this website is installed via an MSI please do not alter it
\ No newline at end of file
diff --git a/Readme.md b/Readme.md
index 9901772..a6dd7c3 100644
--- a/Readme.md
+++ b/Readme.md
@@ -14,7 +14,6 @@ Create a json config file that looks something like this
```json
{
- "Id": "d372b142-ea42-4cc9-8dd6-cb4ba2b0c0f3",
"UpgradeCode": "317e4313-2314-46e9-ae7e-6cdfee60c05d",
"Name": "MyWebsite",
"Version": "1.0.0.0",
@@ -30,3 +29,7 @@ Create a json config file that looks something like this
```
then call QuikPak.exe -c path\to\your\config.json -x path\to\your\web\content
+
+## TODO
+
+Allow someone to include a certificate optionally for secure bindings
diff --git a/build.cmd b/build.cmd
index b1d49b1..fbbfc98 100644
--- a/build.cmd
+++ b/build.cmd
@@ -1,2 +1,4 @@
"C:\Program Files (x86)\msbuild\14.0\Bin\msbuild.exe" /p:Configuration=Release
-chocolatey pack QuikPak\choco\quikpak.nuspec
\ No newline at end of file
+chocolatey pack QuikPak\choco\quikpak.nuspec
+del QuikPak\bin\Release\*.xml
+del QuikPak\bin\Release\*.pdb
diff --git a/config.json b/config.json
new file mode 100644
index 0000000..6eeac6b
--- /dev/null
+++ b/config.json
@@ -0,0 +1,13 @@
+{
+ "Id": "",
+ "UpgradeCode": "317e4313-2314-46e9-ae7e-6cdfee60c05d",
+ "Name": "MyWebsite",
+ "Version": "1.0.0",
+ "Endpoints": [
+ {
+ "port": 80,
+ "DnsName": "mywebsite.com",
+ "Secure": false
+ }
+ ]
+}