Skip to content

Commit

Permalink
WiX4: Release v2.4.2.0
Browse files Browse the repository at this point in the history
- Added `Compiler.PreferredComponentGuidConsistency` to allow consistent generation of the component GUIDs between all versions of the same product.
- Fixed ExitDialog (form) layout problem
- Fix error WIX0400: The ProgressText element contains illegal inner text when setting CustomAction ProgressText or RollbackProgressText
  • Loading branch information
oleg-shilo committed Oct 27, 2024
1 parent 787bcd8 commit 0ef08d8
Show file tree
Hide file tree
Showing 14 changed files with 170 additions and 70 deletions.
13 changes: 6 additions & 7 deletions Source/NuGet/WixSharp/WixSharp.WPF.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>WixSharp.WPF</id>
<version>2.4.1.0</version>
<version>2.4.2.0</version>
<title>Wix# (WixSharp) - Binaries</title>
<authors>Oleg Shilo</authors>
<owners>Oleg Shilo</owners>
Expand All @@ -16,18 +16,17 @@ The package contains Wix# binaries only.
In order to use this package you need have WiX Toolset installed.
The package is tested against WIX (Windows Installer Xml) Toolset v3.10 (v3.10.2103.0)</description>
<summary>Wix# (WixSharp) - Binaries</summary>
<releaseNotes>Release v2.4.1.0
#1652: Bundle DotNetCompatibilityCheck element suport
#1653: Avoid unnecessary *Ref element for Fragment definitions.
#1579: installDir variable erased depending on ManagedProject structure
Updated custom dialogs to deal with changes in the size of Wix stock background images
<releaseNotes>Release v2.4.2.0
- Added `Compiler.PreferredComponentGuidConsistency` to allow consistent generation of the component GUIDs between all versions of the same product.
- Fixed ExitDialog (form) layout problem
- Fix error WIX0400: The ProgressText element contains illegal inner text when setting CustomAction ProgressText or RollbackProgressText

</releaseNotes>
<copyright>Copyright (C) 2008-2021 Oleg Shilo</copyright>
<language>en-AU</language>
<tags>C# scripting msi install setup wix</tags>
<dependencies>
<dependency id="WixSharp.bin" version="2.4.1.0" />
<dependency id="WixSharp.bin" version="2.4.2.0" />
<dependency id="Caliburn.Micro" version="4.0.212" />
</dependencies>
<references>
Expand Down
11 changes: 5 additions & 6 deletions Source/NuGet/WixSharp/WixSharp.bin.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
<metadata>
<id>WixSharp.bin</id>
<version>2.4.1.0</version>
<version>2.4.2.0</version>
<title>Wix# (WixSharp) - Binaries</title>
<authors>Oleg Shilo</authors>
<owners>Oleg Shilo</owners>
Expand All @@ -16,11 +16,10 @@ The package contains Wix# binaries only.
In order to use this package you need have WiX Toolset installed.
The package is tested against WIX (Windows Installer Xml) Toolset v3.10 (v3.10.2103.0)</description>
<summary>Wix# (WixSharp) - Binaries</summary>
<releaseNotes>Release v2.4.1.0
#1652: Bundle DotNetCompatibilityCheck element suport
#1653: Avoid unnecessary *Ref element for Fragment definitions.
#1579: installDir variable erased depending on ManagedProject structure
Updated custom dialogs to deal with changes in the size of Wix stock background images
<releaseNotes>Release v2.4.2.0
- Added `Compiler.PreferredComponentGuidConsistency` to allow consistent generation of the component GUIDs between all versions of the same product.
- Fixed ExitDialog (form) layout problem
- Fix error WIX0400: The ProgressText element contains illegal inner text when setting CustomAction ProgressText or RollbackProgressText

</releaseNotes>
<copyright>Copyright (C) 2008-2022 Oleg Shilo</copyright>
Expand Down
13 changes: 6 additions & 7 deletions Source/NuGet/WixSharp/WixSharp.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>WixSharp</id>
<version>2.4.1.0</version>
<version>2.4.2.0</version>
<title>Wix# (WixSharp) - managed interface for WiX</title>
<authors>Oleg Shilo</authors>
<owners>Oleg Shilo</owners>
Expand All @@ -18,18 +18,17 @@ If you need only Wix# binaries you may want to use WixSharp.bin package instead.
In order to use this package you need have WiX Toolset installed.
The package is tested against WIX (Windows Installer Xml) Toolset v3.10 (v3.10.2103.0)</description>
<summary>Wix# (WixSharp) - Binaries</summary>
<releaseNotes>Release v2.4.1.0
#1652: Bundle DotNetCompatibilityCheck element suport
#1653: Avoid unnecessary *Ref element for Fragment definitions.
#1579: installDir variable erased depending on ManagedProject structure
Updated custom dialogs to deal with changes in the size of Wix stock background images
<releaseNotes>Release v2.4.2.0
- Added `Compiler.PreferredComponentGuidConsistency` to allow consistent generation of the component GUIDs between all versions of the same product.
- Fixed ExitDialog (form) layout problem
- Fix error WIX0400: The ProgressText element contains illegal inner text when setting CustomAction ProgressText or RollbackProgressText

</releaseNotes>
<copyright>Copyright (C) 2008-2022 Oleg Shilo</copyright>
<language>en-AU</language>
<tags>C# scripting msi install setup wix</tags>
<dependencies>
<dependency id="WixSharp.bin" version="2.4.1.0" />
<dependency id="WixSharp.bin" version="2.4.2.0" />
</dependencies>
</metadata>
<files>
Expand Down
13 changes: 6 additions & 7 deletions Source/NuGet/WixSharp/WixSharp_wix4.WPF.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>WixSharp-wix4.WPF</id>
<version>2.4.1.0</version>
<version>2.4.2.0</version>
<title>Wix# (WixSharp) - Binaries</title>
<authors>Oleg Shilo</authors>
<owners>Oleg Shilo</owners>
Expand All @@ -16,18 +16,17 @@ The package contains Wix# binaries only.
In order to use this package you need have WiX Toolset installed: `dotnet tool install --global wix`
The package is tested against WIX (Windows Installer Xml) Toolset v4.0.1.0</description>
<summary>Wix# (WixSharp) - Binaries</summary>
<releaseNotes>Release v2.4.1.0
#1652: Bundle DotNetCompatibilityCheck element suport
#1653: Avoid unnecessary *Ref element for Fragment definitions.
#1579: installDir variable erased depending on ManagedProject structure
Updated custom dialogs to deal with changes in the size of Wix stock background images
<releaseNotes>Release v2.4.2.0
- Added `Compiler.PreferredComponentGuidConsistency` to allow consistent generation of the component GUIDs between all versions of the same product.
- Fixed ExitDialog (form) layout problem
- Fix error WIX0400: The ProgressText element contains illegal inner text when setting CustomAction ProgressText or RollbackProgressText

</releaseNotes>
<copyright>Copyright (C) 2008-2023 Oleg Shilo</copyright>
<language>en-AU</language>
<tags>C# scripting msi install setup wix</tags>
<dependencies>
<dependency id="WixSharp_wix4.bin" version="2.4.1.0" />
<dependency id="WixSharp_wix4.bin" version="2.4.2.0" />
</dependencies>
<references>
<reference file="WixSharp.UI.WPF.dll" />
Expand Down
11 changes: 5 additions & 6 deletions Source/NuGet/WixSharp/WixSharp_wix4.bin.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
<metadata>
<id>WixSharp_wix4.bin</id>
<version>2.4.1.0</version>
<version>2.4.2.0</version>
<title>Wix# (WixSharp) - Binaries</title>
<authors>Oleg Shilo</authors>
<owners>Oleg Shilo</owners>
Expand All @@ -16,11 +16,10 @@ The package contains Wix# binaries only.
In order to use this package you need have WiX Toolset installed: `dotnet tool install --global wix`
The package is tested against WIX (Windows Installer Xml) Toolset v4.0.1.0</description>
<summary>Wix# (WixSharp) - Binaries</summary>
<releaseNotes>Release v2.4.1.0
#1652: Bundle DotNetCompatibilityCheck element suport
#1653: Avoid unnecessary *Ref element for Fragment definitions.
#1579: installDir variable erased depending on ManagedProject structure
Updated custom dialogs to deal with changes in the size of Wix stock background images
<releaseNotes>Release v2.4.2.0
- Added `Compiler.PreferredComponentGuidConsistency` to allow consistent generation of the component GUIDs between all versions of the same product.
- Fixed ExitDialog (form) layout problem
- Fix error WIX0400: The ProgressText element contains illegal inner text when setting CustomAction ProgressText or RollbackProgressText

</releaseNotes>
<copyright>Copyright (C) 2008-2023 Oleg Shilo</copyright>
Expand Down
13 changes: 6 additions & 7 deletions Source/NuGet/WixSharp/WixSharp_wix4.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>WixSharp_wix4</id>
<version>2.4.1.0</version>
<version>2.4.2.0</version>
<title>Wix# (WixSharp) - managed interface for WiX</title>
<authors>Oleg Shilo</authors>
<owners>Oleg Shilo</owners>
Expand All @@ -18,18 +18,17 @@ If you need only Wix# binaries you may want to use WixSharp.bin package instead.
In order to use this package you need have WiX Toolset installed: `dotnet tool install --global wix`
The package is tested against WIX (Windows Installer Xml) Toolset v4.0.1.0</description>
<summary>Wix# (WixSharp) - Binaries</summary>
<releaseNotes>Release v2.4.1.0
#1652: Bundle DotNetCompatibilityCheck element suport
#1653: Avoid unnecessary *Ref element for Fragment definitions.
#1579: installDir variable erased depending on ManagedProject structure
Updated custom dialogs to deal with changes in the size of Wix stock background images
<releaseNotes>Release v2.4.2.0
- Added `Compiler.PreferredComponentGuidConsistency` to allow consistent generation of the component GUIDs between all versions of the same product.
- Fixed ExitDialog (form) layout problem
- Fix error WIX0400: The ProgressText element contains illegal inner text when setting CustomAction ProgressText or RollbackProgressText

</releaseNotes>
<copyright>Copyright (C) 2008-2023 Oleg Shilo</copyright>
<language>en-AU</language>
<tags>C# scripting msi install setup wix</tags>
<dependencies>
<dependency id="WixSharp_wix4.bin" version="2.4.1.0" />
<dependency id="WixSharp_wix4.bin" version="2.4.2.0" />
</dependencies>
</metadata>
<files>
Expand Down
2 changes: 1 addition & 1 deletion Source/NuGet/WixSharp/publish.cmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set ver=2.4.1
set ver=2.4.2
dotnet nuget push WixSharp.Msi.Core.%ver%.nupkg -k %nugetkey% -s https://api.nuget.org/v3/index.json
dotnet nuget push WixSharp.Core.%ver%.nupkg -k %nugetkey% -s https://api.nuget.org/v3/index.json

Expand Down
2 changes: 1 addition & 1 deletion Source/src/NET-Core/WixSharp.Core/WixSharp.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</PropertyGroup>

<PropertyGroup>
<PackageVersion>2.4.1</PackageVersion>
<PackageVersion>2.4.2</PackageVersion>
<Title>WixSharp (.NET Core)</Title>
<Description>.NET Core edition of WixSharp package</Description>
<Copyright>Oleg Shilo</Copyright>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</PropertyGroup>

<PropertyGroup>
<PackageVersion>2.4.1</PackageVersion>
<PackageVersion>2.4.2</PackageVersion>
<Title>WixSharp (.NET Core)</Title>
<Description>.NET Core edition of WixSharp.Msi package</Description>
<Copyright>Oleg Shilo</Copyright>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
156 changes: 131 additions & 25 deletions Source/src/WixSharp.Samples/Wix# Samples/testpad/setup.cs
Original file line number Diff line number Diff line change
@@ -1,35 +1,141 @@
//css_dir ..\..\;
// //css_ref Wix_bin\WixToolset.Dtf.WindowsInstaller.dll;
//css_ref D:\dev\Galos\wixsharp-wix4\Source\src\WixSharp.Samples\Wix# Samples\Install Files\bin\Debug\net472\WixToolset.Dtf.WindowsInstaller.dll
//css_ref D:\dev\Galos\wixsharp-wix4\Source\src\WixSharp.Samples\Wix# Samples\Install Files\bin\Debug\net472\WixToolset.Mba.Core.dll

//css_ref System.Core.dll;
//css_ref System.Xml.dll;
//using PirrosLibrary;
using System;
using System.Diagnostics;
using System.Linq;
using System.Windows.Forms;
using System.Xml.Linq;
using System.Collections.Generic;
using static System.Net.Mime.MediaTypeNames;
using System.Security.Cryptography;
using WixSharp;
using WixSharp.CommonTasks;
using WixSharp.UI;

static class Script
class Constants
{
public static string PluginVersion = "2.3.0";
}

namespace Pirros.installer.wixsharp
{
static public void Main()
class Program
{
Feature poFeature = new Feature("PO", "PO", "INSTALLDIR");
#if DEBUG
private static readonly string Configuration = "Debug";
#else
private static readonly string Configuration = "Release";
#endif

public static void Main()
{
return; // REMOVE THIS LINE TO ENABLE BUILDING

Environment.CurrentDirectory = @"D:\dev\support\wixsharp-issues\Pirros\WixSharp Setup1\WixSharp Setup1";
Constants.PluginVersion = "2.4.0";

string Version = Constants.PluginVersion; // READ FROM PIRROS LIBRARY
Guid ProductId = GenerateProductId("Pirros" + Constants.PluginVersion);
Guid UpgradeCode = new Guid("6476F6DF-EB27-4CAB-9790-5FE5F1C39731"); // DO NOT TOUCH

Project project =
new Project("Pirros",
new Media { EmbedCab = true }, // copied from old installer, don't know what it does
CreateRevitAddinDir(2020)// ,
// CreateRevitAddinDir(2021),
// CreateRevitAddinDir(2022),
// CreateRevitAddinDir(2023),
// CreateRevitAddinDir(2024),
// CreateRevitAddinDir(2025)
);

project.Scope = InstallScope.perUser;

project.Name = "Pirros Revit Plugin";
project.ProductId = ProductId;
project.UpgradeCode = UpgradeCode;
//project.GUID = new Guid("6476F6DF-EB27-4CAB-9790-5FE5F1C39735");

project.Version = new Version(Version);
project.Description = "Revit Plugin to interact with Pirros.com";
project.ControlPanelInfo.Manufacturer = "Pirros Inc";
project.ControlPanelInfo.ProductIcon = @".\Assets\icon.ico";
project.ControlPanelInfo.UrlInfoAbout = "https://www.pirros.com";

project.MajorUpgrade = new MajorUpgrade
{
DowngradeErrorMessage = "A newer version of Pirros Plugin is already installed.",
};

project.UI = WUI.WixUI_Minimal;

var project = new ManagedProject("My Product",
new Dir(@"%ProgramFiles%\My Company",
new InstallDir("My Product",
new Files(poFeature, @"C:\Builds\a\*.*"),
new Files(poFeature, @"C:\Builds\b\*.*"))));
project.WixVariables = new Dictionary<string, string>
{
{ "WixUILicenseRtf", @".\Assets\License.rtf" },
{ "WixUIBannerBmp", @".\Assets\Banner.png" },
{ "WixUIDialogBmp", @".\Assets\Background.png" }
};

project.GUID = new Guid("6f330b47-2577-43ad-9095-1861ba25889b");
project.OutFileName = $"Pirros.installer-V{Version}{(Configuration == "Debug" ? "-dev" : "")}";

Compiler.EmitRelativePaths = false;
project.SourceBaseDir = @"D:\dev\support\wixsharp-issues\Pirros\WixSharp Setup1\WixSharp Setup1";

//project.BuildMsi();
// Compiler.PreserveTempFiles = true;
Compiler.EmitRelativePaths = false;
Compiler.PreferredComponentGuidConsistency = ComponentGuidConsistency.WithinSingleVersion;
// var ttt = WixGuid.NewGuid("text");

//WixGuid.ConsistentGenerationStartValue = UpgradeCode;

project.BuildMsi();
}

private static Dir CreateRevitAddinDir(int year)
{
string framework = GetFrameworkForYear(year);

return new Dir($@"%AppDataFolder%\Autodesk\Revit\Addins\{year}",
new File(@"..\Pirros\Pirros.addin"),
new Dir("Pirros",
Files.FromBuildDir($@"..\Pirros\bin\{Configuration}{year}\{framework}"),
new Dir("Resources",
new Files(@"..\Pirros\Resources\*.*"))));
}

private static Guid GenerateProductId(string input)
{
using (var sha256 = SHA256.Create())
{
byte[] hashBytes = sha256.ComputeHash(System.Text.Encoding.UTF8.GetBytes(input));

// Ensure the byte array is exactly 16 bytes long, as required for a GUID.
// SHA256 generates 32 bytes, so we take the first 16 bytes.
byte[] guidBytes = new byte[16];
Array.Copy(hashBytes, guidBytes, 16);

// Construct the GUID from the 16-byte array.
return new Guid(guidBytes);
}
}

private static string GetFrameworkForYear(int year)
{
return year < 2025 ? "net48" : "net8.0-windows";
}
}
}
}

//using System;
//using WixSharp;

//namespace WixSharp_Setup1
//{
// public class Program
// {
// static void Main()
// {
// var project = new Project("MyProduct",
// new Dir(@"%ProgramFiles%\My Company\My Product",
// new File("Program.cs")));

// project.GUID = new Guid("e4c1d973-9881-498f-8b24-b61bcaee05d0");
// //project.SourceBaseDir = "<input dir path>";
// //project.OutDir = "<output dir path>";

// project.BuildMsi();
// }
// }
//}
4 changes: 2 additions & 2 deletions Source/src/WixSharp/Properties/AssemblyInfo.version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.4.1.0")]
[assembly: AssemblyFileVersion("2.4.1.0")]
[assembly: AssemblyVersion("2.4.2.0")]
[assembly: AssemblyFileVersion("2.4.2.0")]

0 comments on commit 0ef08d8

Please sign in to comment.