Skip to content

Commit

Permalink
Release v1.6.5.1
Browse files Browse the repository at this point in the history
* Issue #377: How to register a new MIME type with custom document icon
* Issue #373: Bootstrapper.DigitalSignature.Apply hide console output
* Added missing IconFile support
* SetupEvent sample extended to show how restart itself elevated if required.
  • Loading branch information
oleg-shilo committed Jun 3, 2018
1 parent 6615b49 commit 7ad81ca
Show file tree
Hide file tree
Showing 20 changed files with 58 additions and 90 deletions.
26 changes: 6 additions & 20 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>1.6.4.3</version>
<version>1.6.5.1</version>
<title>Wix# (WixSharp) - Binaries</title>
<authors>Oleg Shilo</authors>
<owners>Oleg Shilo</owners>
Expand All @@ -16,25 +16,11 @@ 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 v1.6.4.3-HotFix

-----
v1.6.4.3
- Issue #354: Adding an InternetShortcuts throw NullReferenceException
- Assorted internal fixes (XML docs etc.)
- All compatible `IGenericEntity.Process(ProcessingContext)` cases moved to `WixEntity.CreateAndInsertParentComponent`

v1.6.4.2
* Issue #344: Duplicate symbol 'Directory:ProgramFilesFolder' found

v1.6.4.1
* Updated all IGenericEntity implementations to support 'no-directory' deployments
* Removed all references to the obsolete `IncludeWixExtension`
* Implemented clean algorithm for handling no-dir scenarios without resorting to the `%ProgramFiles%\WixSharp\DummyDir`.
Algorithm is controlled by `AutoElements.LagacyDummyDirAlgorithm`
* Issue #341: UAC Text is not localized
* Implemented adding custom error description of he ManagedUI.ExitDialog depending on the Install error or cancellation.

<releaseNotes>Release v1.6.5.1
* Issue #377: How to register a new MIME type with custom document icon
* Issue #373: Bootstrapper.DigitalSignature.Apply hide console output
* Added missing IconFile support
* SetupEvent sample extended to show how restart itself elevated if required.

</releaseNotes>
<copyright>Copyright (C) 2004-2018 Oleg Shilo</copyright>
Expand Down
28 changes: 7 additions & 21 deletions Source/NuGet/WixSharp/WixSharp.lab.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.Lab</id>
<version>1.6.4.3</version>
<version>1.6.5.1</version>
<title>Wix# (WixSharp) - Experimantal features</title>
<authors>Oleg Shilo</authors>
<owners>Oleg Shilo</owners>
Expand All @@ -14,25 +14,11 @@
The package contains the sample code for building a simple MSI with the CLR WinForm dialog inserted into UI sequence between InsallDirDlg and VerifyReadyDlg native MSI dialogs. 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# binaries containing experimental features (e.g. native WiX UI support).</summary>
<releaseNotes>Release v1.6.4.3-HotFix

-----
v1.6.4.3
- Issue #354: Adding an InternetShortcuts throw NullReferenceException
- Assorted internal fixes (XML docs etc.)
- All compatible `IGenericEntity.Process(ProcessingContext)` cases moved to `WixEntity.CreateAndInsertParentComponent`

v1.6.4.2
* Issue #344: Duplicate symbol 'Directory:ProgramFilesFolder' found

v1.6.4.1
* Updated all IGenericEntity implementations to support 'no-directory' deployments
* Removed all references to the obsolete `IncludeWixExtension`
* Implemented clean algorithm for handling no-dir scenarios without resorting to the `%ProgramFiles%\WixSharp\DummyDir`.
Algorithm is controlled by `AutoElements.LagacyDummyDirAlgorithm`
* Issue #341: UAC Text is not localized
* Implemented adding custom error description of he ManagedUI.ExitDialog depending on the Install error or cancellation.

<releaseNotes>Release v1.6.5.1
* Issue #377: How to register a new MIME type with custom document icon
* Issue #373: Bootstrapper.DigitalSignature.Apply hide console output
* Added missing IconFile support
* SetupEvent sample extended to show how restart itself elevated if required.

</releaseNotes>
<copyright>Copyright (C) 2004-2018 Oleg Shilo</copyright>
Expand All @@ -43,7 +29,7 @@ v1.6.4.1
<frameworkAssembly assemblyName="System.Drawing" targetFramework="" />
</frameworkAssemblies>
<dependencies>
<dependency id="WixSharp.bin" version="1.6.4.3" />
<dependency id="WixSharp.bin" version="1.6.5.1" />
</dependencies>
</metadata>
<files>
Expand Down
28 changes: 7 additions & 21 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>1.6.4.3</version>
<version>1.6.5.1</version>
<title>Wix# (WixSharp) - managed interface for WiX</title>
<authors>Oleg Shilo</authors>
<owners>Oleg Shilo</owners>
Expand All @@ -18,32 +18,18 @@ 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 v1.6.4.3-HotFix

-----
v1.6.4.3
- Issue #354: Adding an InternetShortcuts throw NullReferenceException
- Assorted internal fixes (XML docs etc.)
- All compatible `IGenericEntity.Process(ProcessingContext)` cases moved to `WixEntity.CreateAndInsertParentComponent`

v1.6.4.2
* Issue #344: Duplicate symbol 'Directory:ProgramFilesFolder' found

v1.6.4.1
* Updated all IGenericEntity implementations to support 'no-directory' deployments
* Removed all references to the obsolete `IncludeWixExtension`
* Implemented clean algorithm for handling no-dir scenarios without resorting to the `%ProgramFiles%\WixSharp\DummyDir`.
Algorithm is controlled by `AutoElements.LagacyDummyDirAlgorithm`
* Issue #341: UAC Text is not localized
* Implemented adding custom error description of he ManagedUI.ExitDialog depending on the Install error or cancellation.

<releaseNotes>Release v1.6.5.1
* Issue #377: How to register a new MIME type with custom document icon
* Issue #373: Bootstrapper.DigitalSignature.Apply hide console output
* Added missing IconFile support
* SetupEvent sample extended to show how restart itself elevated if required.

</releaseNotes>
<copyright>Copyright (C) 2004-2018 Oleg Shilo</copyright>
<language>en-AU</language>
<tags>C# scripting msi install setup wix</tags>
<dependencies>
<dependency id="WixSharp.bin" version="1.6.4.3" />
<dependency id="WixSharp.bin" version="1.6.5.1" />
</dependencies>
</metadata>
<files>
Expand Down
24 changes: 8 additions & 16 deletions Source/src/WixSharp.Samples/Support/testpad/setup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,28 +66,20 @@ static void Issue_374()
Compiler.BuildMsi(project);
}

static void Issue_354()
static void Issue_378()
{
var mainFeature = new Feature("My Product", true, false);
AutoElements.DisableAutoUserProfileRegistry = true;
// Compiler.LightOptions += " -sice:ICE38";

var project = new Project("My Product",
new InstallDir(@"%ProgramFiles%/My Company/My Product"),
new Dir("%ProgramMenu%",
// new Dir(mainFeature, "My Product",
new Dir("My Product",
new InternetShortcut()
{
Name = "Wix# project page",
Target = "https://github.com/oleg-shilo/wixsharp",
Type = InternetShortcut.ShortcutType.url
})));
// new Dir(@"%ProgramFiles%/My Company/My Product",
new Dir(@"%LocalAppData%/My Company/My Product",
new File("setup.cs")));

// project.DefaultFeature = mainFeature;

project.PreserveTempFiles = true;
project.InstallScope = InstallScope.perMachine;
project.GUID = new Guid("6fe30b47-2577-43ad-9095-1861ba25889c");
project.BuildMsi();
project.BuildMsi();
}

static void Issue_298()
Expand Down Expand Up @@ -132,8 +124,8 @@ static void Issue_298b()

static public void Main(string[] args)
{
Issue_378(); return;
Issue_374(); return;
Issue_354(); return;
Issue_298(); return;
// Compiler.AutoGeneration.LegacyDefaultIdAlgorithm = true;

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ static public void Main()
new XmlFile(XmlFileAction.setValue, @"//configuration/connectionStrings/add[\[]@name='Server1'[\]]/@providerName", "System.Data.SqlClient"))),
new ElevatedManagedAction(CustomActions.OnInstall, Return.check, When.After, Step.InstallFiles, Condition.NOT_Installed)
{
UsesProperties = "CONFIG_FILE=[INSTALLDIR]MyApp.exe.config, APP_FILE=[INSTALLDIR]MyApp.exe, DATABASE_CONNECTION_STRING=[DATABASE_CONNECTION_STRING]",
Execute = WixSharp.Execute.deferred
UsesProperties = "CONFIG_FILE=[INSTALLDIR]MyApp.exe.config, APP_FILE=[INSTALLDIR]MyApp.exe, DATABASE_CONNECTION_STRING=[DATABASE_CONNECTION_STRING]"
});

project.GUID = new Guid("6fe30b47-2577-43ad-9195-1861ba25889b");
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ static public void Main(string[] args)
Icon = "wixsharp.ico"
}
),
new IconFile(),
new Dir(@"Docs\Manual",
new File(@"Files\Docs\Manual.txt")
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
//css_ref System.Xml.dll;

using System;
using System.Security.Principal;

//using System.Linq;
using System.Windows.Forms;
Expand Down Expand Up @@ -52,6 +53,7 @@ static public void Main()
//project.UI = WUI.WixUI_ProgressOnly; //native MSI UI

project.UILoaded += project_UIInit;
project.UIInitialized += Project_UIInitialized;
project.Load += project_Load;
project.BeforeInstall += project_BeforeInstall;
project.AfterInstall += project_AfterInstall;
Expand All @@ -74,6 +76,25 @@ static public void Main()
Compiler.BuildMsi(project);
}

static void Project_UIInitialized(SetupEventArgs e)
{
// just an example of restarting the setup UI elevated. Old fashioned but... convenient and reliable.
if (!new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator))
{
MessageBox.Show(e.Session.GetMainWindow(), "You must start the msi file as admin");
e.Result = ActionResult.Failure;

var startInfo = new ProcessStartInfo();
startInfo.UseShellExecute = true;
startInfo.WorkingDirectory = Environment.CurrentDirectory;
startInfo.FileName = "msiexec.exe";
startInfo.Arguments = "/i \"" + e.MsiFile + "\"";
startInfo.Verb = "runas";

Process.Start(startInfo);
}
}

[CustomAction]
public static ActionResult SetInstallDir(Session session)
{
Expand Down
Binary file modified Source/src/WixSharp.Samples/WixSharp.Lab.dll
Binary file not shown.
Binary file modified Source/src/WixSharp.Samples/WixSharp.Msi.dll
Binary file not shown.
Binary file modified Source/src/WixSharp.Samples/WixSharp.UI.dll
Binary file not shown.
Binary file modified Source/src/WixSharp.Samples/WixSharp.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion Source/src/WixSharp.Samples/WixSharp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3334,7 +3334,7 @@
</member>
<member name="F:WixSharp.Compiler.LightOptions">
<summary>
WiX linker <c>Light.exe</c> options (e.g. -sice:ICE30).
WiX linker <c>Light.exe</c> options (e.g. " -sice:ICE30").
<para>The default value is "-sw1076 -sw1079" (disable warning 1076 and 1079).</para>
</summary>
</member>
Expand Down
2 changes: 1 addition & 1 deletion Source/src/WixSharp.Test/SamplesTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void BuildSample(string batchFile, int currentStep, List<string> failedSamples)

if (output.Contains(" : error") || output.Contains("Error: ") || (nonMsi && !HasAnyMsis(dir)))
{
if (batchFile.EndsWith(@"Signing\Build.cmd") && output.Contains("The signer's certificate is not valid for signing."))
if (batchFile.EndsWith(@"Signing\Build.cmd") && output.Contains("SignTool Error:"))
{
//just ignore as the certificate is just a demo certificate
}
Expand Down
8 changes: 4 additions & 4 deletions Source/src/WixSharp/Compiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,16 +253,16 @@ public partial class Compiler
static public ResolveEventHandler AssemblyResolve;

/// <summary>
/// WiX linker <c>Light.exe</c> options (e.g. -sice:ICE30).
/// WiX linker <c>Light.exe</c> options (e.g. " -sice:ICE30").
/// <para>The default value is "-sw1076 -sw1079" (disable warning 1076 and 1079).</para>
/// </summary>
static public string LightOptions = "-sw1076 -sw1079";
static public string LightOptions = "-sw1076 -sw1079 ";

/// <summary>
/// WiX compiler <c>Candle.exe</c> options.
/// <para>The default value is "-sw1076" (disable warning 1026).</para>
/// </summary>
static public string CandleOptions = "-sw1026";
static public string CandleOptions = "-sw1026 ";

static string autogeneratedWxsForVS = null;

Expand Down Expand Up @@ -1843,7 +1843,7 @@ static void ProcessDirectoryFiles(Dir wDir, Project wProject, Dictionary<Feature
{
var icon = new IconFile { SourceFile = wFileAssociation.Icon };

progId.FindSingle("Product")
progId.Parent("Product")
.AddElement(icon.ToXElement("Icon"));

progId.SetAttribute("Icon", icon.Id);
Expand Down
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("1.6.5.0")]
[assembly: AssemblyFileVersion("1.6.5.0")]
[assembly: AssemblyVersion("1.6.5.1")]
[assembly: AssemblyFileVersion("1.6.5.1")]
1 change: 0 additions & 1 deletion Source/src/WixSharp/ServiceInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ XElement ServiceInstallToXml(Project project)
serviceConfig.SetAttribute("DelayedAutoStart", DelayedAutoStart)
.SetAttribute("PreShutdownDelay", PreShutdownDelay)
.SetAttribute("ServiceSid", ServiceSid)

.SetAttribute("OnInstall", ConfigureServiceTrigger.Install.PresentIn(ConfigureServiceTrigger))
.SetAttribute("OnReinstall", ConfigureServiceTrigger.Reinstall.PresentIn(ConfigureServiceTrigger))
.SetAttribute("OnUninstall", ConfigureServiceTrigger.Uninstall.PresentIn(ConfigureServiceTrigger));
Expand Down

0 comments on commit 7ad81ca

Please sign in to comment.