Skip to content

Commit

Permalink
Release v2.2.0.0
Browse files Browse the repository at this point in the history
- Implemented `MsiExePackage`. Triggered by #1554
  The dedicated sample `WixBootstrapper_MsiEmbeddedUI` shows how to use it
  ```C#
  var bootstrapper =
        new Bundle("Managed Product Bundle",
                    new MsiExePackage(msi)
                    {
                        Name = "ManagedProduct",
                    });
  ```

- Issue #1557: Error when specifying Package Platform as ARM64
- Added `restart elevated` routine for custom BA sample
- Added `WixProject.WixBuildCommandGenerated` event. Can be used to manipulate `wix.exe` command line arguments. Triggered by #1557
- Added `CommonTasks.MapAsDeferredProperty` extension method:
  ```C#
  project.MapAsDeferredProperty("MYPROPERTY");
  // instead of
  project.DefaultDeferredProperties += ",MYPROPERTY";
  ```
- Added `string.CompleSelfHostedMsi` extension for building self executable msi files:
  ```C#
  msi.CompleSelfHostedMsi(msi + ".exe");
  ```
- added calling `dotnet tool restore` when using wix as a local tool. Triggered by #1546
  • Loading branch information
oleg-shilo committed Jun 29, 2024
1 parent 59ebb9f commit 9428203
Show file tree
Hide file tree
Showing 19 changed files with 165 additions and 88 deletions.
13 changes: 3 additions & 10 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.1.7.0</version>
<version>2.2.0.0</version>
<title>Wix# (WixSharp) - Binaries</title>
<authors>Oleg Shilo</authors>
<owners>Oleg Shilo</owners>
Expand All @@ -16,20 +16,13 @@ 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>WiX4 - Release v2.1.7.0

Special thanks to @geghamyan for contributing `Project.SignAllFiles` functionality.

- Added file signing functionality to project build process (`Project.SignAllFiles`).
- Added WiX5 new attributes (known at the time) for `FirewallException`'
- Issue #1533: Allow specifying the Group name when adding a FirewallException
- WixSharp.Core: Added EmbeddedUI sample solution
<releaseNotes>Release v2.2.0.0
</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.1.7.0" />
<dependency id="WixSharp.bin" version="2.2.0.0" />
<dependency id="Caliburn.Micro" version="4.0.212" />
</dependencies>
<references>
Expand Down
11 changes: 2 additions & 9 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.1.7.0</version>
<version>2.2.0.0</version>
<title>Wix# (WixSharp) - Binaries</title>
<authors>Oleg Shilo</authors>
<owners>Oleg Shilo</owners>
Expand All @@ -16,14 +16,7 @@ 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>WiX4 - Release v2.1.7.0

Special thanks to @geghamyan for contributing `Project.SignAllFiles` functionality.

- Added file signing functionality to project build process (`Project.SignAllFiles`).
- Added WiX5 new attributes (known at the time) for `FirewallException`'
- Issue #1533: Allow specifying the Group name when adding a FirewallException
- WixSharp.Core: Added EmbeddedUI sample solution
<releaseNotes>Release v2.2.0.0
</releaseNotes>
<copyright>Copyright (C) 2008-2022 Oleg Shilo</copyright>
<language>en-AU</language>
Expand Down
13 changes: 3 additions & 10 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.1.7.0</version>
<version>2.2.0.0</version>
<title>Wix# (WixSharp) - managed interface for WiX</title>
<authors>Oleg Shilo</authors>
<owners>Oleg Shilo</owners>
Expand All @@ -18,20 +18,13 @@ 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>WiX4 - Release v2.1.7.0

Special thanks to @geghamyan for contributing `Project.SignAllFiles` functionality.

- Added file signing functionality to project build process (`Project.SignAllFiles`).
- Added WiX5 new attributes (known at the time) for `FirewallException`'
- Issue #1533: Allow specifying the Group name when adding a FirewallException
- WixSharp.Core: Added EmbeddedUI sample solution
<releaseNotes>Release v2.2.0.0
</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.1.7.0" />
<dependency id="WixSharp.bin" version="2.2.0.0" />
</dependencies>
</metadata>
<files>
Expand Down
38 changes: 28 additions & 10 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.1.7.0</version>
<version>2.2.0.0</version>
<title>Wix# (WixSharp) - Binaries</title>
<authors>Oleg Shilo</authors>
<owners>Oleg Shilo</owners>
Expand All @@ -16,20 +16,38 @@ 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>WiX4 - Release v2.1.7.0

Special thanks to @geghamyan for contributing `Project.SignAllFiles` functionality.

- Added file signing functionality to project build process (`Project.SignAllFiles`).
- Added WiX5 new attributes (known at the time) for `FirewallException`'
- Issue #1533: Allow specifying the Group name when adding a FirewallException
- WixSharp.Core: Added EmbeddedUI sample solution
<releaseNotes>Release v2.2.0.0
- Implemented `MsiExePackage`. Triggered by #1554
The dedicated sample `WixBootstrapper_MsiEmbeddedUI` shows how to use it
```C#
var bootstrapper =
new Bundle("Managed Product Bundle",
new MsiExePackage(msi)
{
Name = "ManagedProduct",
});
```

- Issue #1557: Error when specifying Package Platform as ARM64
- Added `restart elevated` routine for custom BA sample
- Added `WixProject.WixBuildCommandGenerated` event. Can be used to manipulate `wix.exe` command line arguments. Triggered by #1557
- Added `CommonTasks.MapAsDeferredProperty` extension method:
```C#
project.MapAsDeferredProperty("MYPROPERTY");
// instead of
project.DefaultDeferredProperties += ",MYPROPERTY";
```
- Added `string.CompleSelfHostedMsi` extension for building self executable msi files:
```C#
msi.CompleSelfHostedMsi(msi + ".exe");
```
- added calling `dotnet tool restore` when using wix as a local tool. Triggered by #1546
</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.1.7.0" />
<dependency id="WixSharp_wix4.bin" version="2.2.0.0" />
<dependency id="Caliburn.Micro" version="4.0.212" />
</dependencies>
<references>
Expand Down
36 changes: 27 additions & 9 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.1.7.0</version>
<version>2.2.0.0</version>
<title>Wix# (WixSharp) - Binaries</title>
<authors>Oleg Shilo</authors>
<owners>Oleg Shilo</owners>
Expand All @@ -16,14 +16,32 @@ 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>WiX4 - Release v2.1.7.0

Special thanks to @geghamyan for contributing `Project.SignAllFiles` functionality.

- Added file signing functionality to project build process (`Project.SignAllFiles`).
- Added WiX5 new attributes (known at the time) for `FirewallException`'
- Issue #1533: Allow specifying the Group name when adding a FirewallException
- WixSharp.Core: Added EmbeddedUI sample solution
<releaseNotes>Release v2.2.0.0
- Implemented `MsiExePackage`. Triggered by #1554
The dedicated sample `WixBootstrapper_MsiEmbeddedUI` shows how to use it
```C#
var bootstrapper =
new Bundle("Managed Product Bundle",
new MsiExePackage(msi)
{
Name = "ManagedProduct",
});
```

- Issue #1557: Error when specifying Package Platform as ARM64
- Added `restart elevated` routine for custom BA sample
- Added `WixProject.WixBuildCommandGenerated` event. Can be used to manipulate `wix.exe` command line arguments. Triggered by #1557
- Added `CommonTasks.MapAsDeferredProperty` extension method:
```C#
project.MapAsDeferredProperty("MYPROPERTY");
// instead of
project.DefaultDeferredProperties += ",MYPROPERTY";
```
- Added `string.CompleSelfHostedMsi` extension for building self executable msi files:
```C#
msi.CompleSelfHostedMsi(msi + ".exe");
```
- added calling `dotnet tool restore` when using wix as a local tool. Triggered by #1546
</releaseNotes>
<copyright>Copyright (C) 2008-2023 Oleg Shilo</copyright>
<language>en-AU</language>
Expand Down
37 changes: 28 additions & 9 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.1.7.0</version>
<version>2.2.0.0</version>
<title>Wix# (WixSharp) - managed interface for WiX</title>
<authors>Oleg Shilo</authors>
<owners>Oleg Shilo</owners>
Expand All @@ -18,20 +18,39 @@ 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>WiX4 - Release v2.1.7.0
<releaseNotes>Release v2.2.0.0
- Implemented `MsiExePackage`. Triggered by #1554
The dedicated sample `WixBootstrapper_MsiEmbeddedUI` shows how to use it
```C#
var bootstrapper =
new Bundle("Managed Product Bundle",
new MsiExePackage(msi)
{
Name = "ManagedProduct",
});
```

- Issue #1557: Error when specifying Package Platform as ARM64
- Added `restart elevated` routine for custom BA sample
- Added `WixProject.WixBuildCommandGenerated` event. Can be used to manipulate `wix.exe` command line arguments. Triggered by #1557
- Added `CommonTasks.MapAsDeferredProperty` extension method:
```C#
project.MapAsDeferredProperty("MYPROPERTY");
// instead of
project.DefaultDeferredProperties += ",MYPROPERTY";
```
- Added `string.CompleSelfHostedMsi` extension for building self executable msi files:
```C#
msi.CompleSelfHostedMsi(msi + ".exe");
```
- added calling `dotnet tool restore` when using wix as a local tool. Triggered by #1546

Special thanks to @geghamyan for contributing `Project.SignAllFiles` functionality.

- Added file signing functionality to project build process (`Project.SignAllFiles`).
- Added WiX5 new attributes (known at the time) for `FirewallException`'
- Issue #1533: Allow specifying the Group name when adding a FirewallException
- WixSharp.Core: Added EmbeddedUI sample solution
</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.1.7.0" />
<dependency id="WixSharp_wix4.bin" version="2.2.0.0" />
</dependencies>
</metadata>
<files>
Expand Down
14 changes: 11 additions & 3 deletions Source/src/NET-Core/WixSharp.Core/WixSharp.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<FileVersion>2.1.4</FileVersion>
<AssemblyVersion>2.1.5</AssemblyVersion>
<FileVersion>2.2.0</FileVersion>
<AssemblyVersion>2.2.0</AssemblyVersion>
</PropertyGroup>

<PropertyGroup>
<PackageVersion>2.1.9</PackageVersion>
<PackageVersion>2.2.0</PackageVersion>
<Title>WixSharp (.NET Core)</Title>
<Description>.NET Core edition of WixSharp package</Description>
<Copyright>Oleg Shilo</Copyright>
Expand Down Expand Up @@ -200,6 +200,14 @@
<Compile Include="..\..\WixSharp\WixProject.cs" Link="WixProject.cs" />
<Compile Include="..\..\WixSharp\WixQuietExec.cs" Link="WixQuietExec.cs" />
<Compile Include="..\..\WixSharp\XmlFile.cs" Link="XmlFile.cs" />

<Compile Include="..\..\WixSharp\Utilities\Utils.cs" Link="Utils.cs" />
<Compile Include="..\..\WixSharp\Utilities\XmlMapping.cs" Link="XmlMapping.cs" />
<Compile Include="..\..\WixSharp\Utilities\XmlAttribute.cs" Link="XmlAttribute.cs" />
<Compile Include="..\..\WixSharp\Utilities\ProjectLocalization.cs" Link="ProjectLocalization.cs" />
<Compile Include="..\..\WixSharp\Utilities\SerializingExtensions.cs" Link="SerializingExtensions.cs" />
<Compile Include="..\..\WixSharp\Utilities\AttachedProperties.cs" Link="AttachedProperties.cs" />

</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</PropertyGroup>

<PropertyGroup>
<PackageVersion>2.1.9</PackageVersion>
<PackageVersion>2.2.0</PackageVersion>
<Title>WixSharp (.NET Core)</Title>
<Description>.NET Core edition of WixSharp.Msi package</Description>
<Copyright>Oleg Shilo</Copyright>
Expand Down
13 changes: 8 additions & 5 deletions Source/src/WixSharp.Samples/Wix# Samples/Install Files/setup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ static public void Main()

var project =
new ManagedProject("MyProduct",
new Dir(@"AppDataFolder\My ICompany\My Product",
// new Dir(new Id("MY_INSTALLDIR"), @"%ProgramFiles%\My ICompany\My Product",
// new Dir(@"AppDataFolder\My ICompany\My Product",
new Dir(new Id("MY_INSTALLDIR"), @"%ProgramFiles%\My ICompany\My Product",
f = new File("MyApp_file".ToId(),
@"Files\Bin\MyApp.exe",
@"C:\sourceFiles\MyApp.exe",
// @"Files\Bin\MyApp.exe",
// @"D:\dev\wixsharp-wix4\Source\src\WixSharp.Samples\Wix# Samples\Install Files\Files\Bin\MyApp.exe",
new FileAssociation("cstm", "application/custom", "open", "\"%1\"")
{
Advertise = true,
Expand All @@ -35,7 +37,8 @@ static public void Main()
TargetFileName = "app.exe"
},
new Dir(@"Docs\Manual",
new File(@"Files\Docs\Manual.txt")
// new File(@"Files\Docs\Manual.txt")
new File(@"D:\dev\wixsharp-wix4\Source\src\WixSharp.Samples\Wix# Samples\Install Files\Files\Docs\Manual.txt")
{
NeverOverwrite = true
})),
Expand All @@ -44,7 +47,7 @@ static public void Main()
project.SetVersionFrom("MyApp_file");

project.GUID = new Guid("6f330b47-2577-43ad-9095-1861ba25889b");

Compiler.EmitRelativePaths = false;
// possible UIs
project.ManagedUI = ManagedUI.Default;
// project.ManagedUI = ManagedUI.DefaultWpf;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using WixSharp;
using WixSharp.CommonTasks;
using WixSharp.UI;
using WixToolset.Dtf.WindowsInstaller;

static class Script
{
Expand All @@ -27,20 +28,29 @@ static public void Main()

project.UI = WUI.WixUI_ProgressOnly;

// project.Scope = InstallScope.perMachine;
project.Scope = InstallScope.perUser;

project.BeforeInstall += Project_BeforeInstall;
project.AfterInstall += Project_AfterInstall;
project.AfterInstall += Project_AfterInstall; // is already elevated (deferred by default)

bool installPerUser = false;
if (installPerUser)
{
project.Scope = InstallScope.perUser;
project.BeforeInstallEventExecution = EventExecution.ExternalElevatedProcess;
}
else
{
project.Scope = InstallScope.perMachine;
project.BeforeInstallEventExecution = EventExecution.MsiSessionScopeDeferred;
// you can use ExternalElevatedProcess too
}

project.BeforeInstallEventExecution = EventExecution.ExternalElevatedProcess;
project.BuildMsi();
}

private static void Project_BeforeInstall(SetupEventArgs e)
{
MessageBox.Show(e.ToString(), "Project_BeforeInstall");
// e.Result = WixToolset.Dtf.WindowsInstaller.ActionResult.UserExit;
e.Result = ActionResult.UserExit; // canceling the install here
}

private static void Project_AfterInstall(SetupEventArgs e)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Caliburn.Micro;
using System;
using System;
using System.Windows;
using System.Windows.Media.Imaging;
using Caliburn.Micro;
using WixSharp;
using WixSharp.UI.Forms;
using WixSharp.UI.WPF;
Expand All @@ -16,6 +17,12 @@ public CustomDialogView()

public void Init()
{
var topWindow = this.ManagedFormHost.Parent as System.Windows.Forms.Form;
topWindow.FormClosing += (sender, e) =>
{
MessageBox.Show("Closing...");
};

ViewModelBinder.Bind(new CustomDialogModel { Host = ManagedFormHost }, this, null);
}
}
Expand Down
Loading

0 comments on commit 9428203

Please sign in to comment.