downgrades

This commit is contained in:
Tommy Parnell
2016-04-28 21:19:48 -04:00
parent 9f2b5f14d7
commit 049acac41e
8 changed files with 55 additions and 26 deletions

View File

@@ -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

View File

@@ -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);
}
}
}

View File

@@ -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);
}
}

View File

@@ -81,9 +81,6 @@
<None Include="App.config" />
<None Include="Config.json" />
<None Include="packages.config" />
<None Include="readme.md">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\WixSharp.1.0.35.3\build\WixSharp.targets" Condition="Exists('..\packages\WixSharp.1.0.35.3\build\WixSharp.targets')" />

View File

@@ -1 +0,0 @@
this website is installed via an MSI please do not alter it

View File

@@ -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

View File

@@ -1,2 +1,4 @@
"C:\Program Files (x86)\msbuild\14.0\Bin\msbuild.exe" /p:Configuration=Release
chocolatey pack QuikPak\choco\quikpak.nuspec
chocolatey pack QuikPak\choco\quikpak.nuspec
del QuikPak\bin\Release\*.xml
del QuikPak\bin\Release\*.pdb

13
config.json Normal file
View File

@@ -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
}
]
}