Skip to content

Commit

Permalink
Release v1.4.1.0
Browse files Browse the repository at this point in the history
* Issue #27: Fixing AppSearch.GetProducts() crash
* Added support for `MediaTemplate` element.
* Added tunneling of Files and DirFiles attributes to the aggregated File items
* Issue #23: Attributes inheritance in Files and DirFiles
* Added Compiler.GetMappedWixConstants() for exploring WiX constants mapping
* Adding %CommonAppDataFolder% to Dir.cs description
* Issue #20: File.Attributes (on parent Component) after setting File.NeverOverwrite will not work
  • Loading branch information
oleg-shilo committed Feb 28, 2017
1 parent 855f29d commit 87daab1
Show file tree
Hide file tree
Showing 13 changed files with 108 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DTFManagedCA</RootNamespace>
<AssemblyName>DTF %28ManagedCA%29</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
Expand All @@ -32,6 +32,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -42,6 +43,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -51,6 +53,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Deployment.WindowsInstaller, Version=3.0.0.0, Culture=neutral, PublicKeyToken=ce35f76fcda82bad, processorArchitecture=MSIL">
Expand Down Expand Up @@ -104,6 +107,9 @@
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
7 changes: 5 additions & 2 deletions Source/src/WixSharp.Samples/VSProjects/Setup Events.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SetupEvents</RootNamespace>
<AssemblyName>SetupEvents</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
Expand All @@ -32,7 +32,8 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -44,6 +45,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<UseVSHostingProcess>false</UseVSHostingProcess>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -53,6 +55,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Deployment.WindowsInstaller, Version=3.0.0.0, Culture=neutral, PublicKeyToken=ce35f76fcda82bad, processorArchitecture=MSIL">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public partial class UserNameDialog : ManagedForm, IManagedDialog
{
public UserNameDialog()
{
MessageBox.Show("Hello World! (CLR: v" + Environment.Version + ")", "Managed Setup - UserNameDialog");
InitializeComponent();
}

Expand All @@ -27,9 +28,9 @@ void dialog_Load(object sender, EventArgs e)

void ResetLayout()
{
// The form controls are properly anchored and will be correctly resized on parent form
// resizing. However the initial sizing by WinForm runtime doesn't do a good job with DPI
// other than 96. Thus manual resizing is the only reliable option apart from going WPF.
// The form controls are properly anchored and will be correctly resized on parent form
// resizing. However the initial sizing by WinForm runtime doesn't do a good job with DPI
// other than 96. Thus manual resizing is the only reliable option apart from going WPF.
float ratio = (float) banner.Image.Width / (float) banner.Image.Height;
topPanel.Height = (int) (banner.Width / ratio);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static public void Main()

var project =
new ManagedProject("ManagedSetup",
//one of possible ways of setting custom INSTALLDIR (disabled for demo purposes)
//one of possible ways of setting custom INSTALLDIR (disabled for demo purposes)
new ManagedAction(Script.SetInstallDir,
Return.check,
When.Before,
Expand All @@ -46,8 +46,8 @@ static public void Main()
);

//project.ManagedUI = ManagedUI.Empty;
//project.ManagedUI = ManagedUI.Default; //Wix# ManagedUI
project.UI = WUI.WixUI_FeatureTree; //native MSI UI
project.ManagedUI = ManagedUI.Default; //Wix# ManagedUI
//project.UI = WUI.WixUI_ProgressOnly; //native MSI UI

project.UILoaded += project_UIInit;
project.Load += project_Load;
Expand All @@ -69,12 +69,14 @@ public static ActionResult SetInstallDir(Session session)
///This event is fired before native MSI UI loaded (disabled for demo purposes)
//session["INSTALLDIR"] = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\7-Zip")
// .GetValue("Path")
// .ToString();
// .ToString();
return ActionResult.Success;
}

static void project_UIInit(SetupEventArgs e)
{
MessageBox.Show("Hello World! (CLR: v" + Environment.Version + ")", "Managed Setup - UIInit");

e.Session["TOOLSDIR"] = @"C:\Temp\Doc";
//set custom installdir
//This event is fired before Wix# ManagedUI loaded (disabled for demo purposes)
Expand All @@ -95,15 +97,17 @@ static void SetEnvVersion(Session session)

static void project_Load(SetupEventArgs e)
{
MessageBox.Show("Hello World! (CLR: v" + Environment.Version + ")", "Managed Setup - Load");

var msi = e.MsiFile;

SetEnvVersion(e.Session);

//MSI doesn't preserve any e.Session properties if they are accessed from deferred actions (e.g. project_AfterInstall)
//Wix# forces some of the properties to be persisted (via CustomActionData) by using user defined
//Wix# forces some of the properties to be persisted (via CustomActionData) by using user defined
//project.DefaultDeferredProperties ("INSTALLDIR,UILevel" by default).
//Alternatively you can save any data to the Wix# specific fully persisted data properties "bag" SetupEventArgs.Data.
//SetupEventArgs.Data values can be set and accesses at any time from any custom action including deferred one.
//SetupEventArgs.Data values can be set and accesses at any time from any custom action including deferred one.
var conn = @"Data Source=.\SQLEXPRESS;Initial Catalog=RequestManagement;Integrated Security=SSPI";
e.Data["persisted_data"] = conn;

Expand All @@ -118,7 +122,7 @@ static void project_BeforeInstall(SetupEventArgs e)
static void project_AfterInstall(SetupEventArgs e)
{
//Note AfterInstall is an event based on deferred Custom Action. All properties that have
//been pushed to e.Session.CustomActionData with project.DefaultDeferredProperties are
//been pushed to e.Session.CustomActionData with project.DefaultDeferredProperties are
//also set as environment variables just before invoking this event handler.
//Similarly the all content of e.Data is also pushed to the environment variables.
MessageBox.Show(e.ToString() +
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
start msiexec /uninstall MyProduct.msi
start msiexec /uninstall ManagedSetup.msi
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.
73 changes: 72 additions & 1 deletion Source/src/WixSharp.Samples/WixSharp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2984,6 +2984,65 @@
<param name="projectId">The project id.</param>
<returns></returns>
</member>
<member name="T:WixSharp.MediaTemplate">
<summary>
MediaTeplate element describes information to automatically assign files to cabinets. A maximumum number of cabinets created is 999.
<example>The following is an example of defining the <c>MediaTemplate</c> element(s).
<code>
var project =
new Project("My Product",
new MediaTemplate { CompressionLevel=CompressionLevel.high },
new Dir(@"%ProgramFiles%\My Company\My Product",
...
project.BuildMsi();
</code>
</example>
</summary>
<seealso cref="T:WixSharp.WixEntity" />
<seealso cref="T:WixSharp.IGenericEntity" />
</member>
<member name="F:WixSharp.MediaTemplate.CabinetTemplate">
<summary>
Templated name of the cabinet if some or all of the files stored on the media are in a cabinet file. This name must begin with either a letter or an underscore, contain maximum of five characters and {0} in the cabinet name part and must end three character extension. The default is cab{0}.cab.
</summary>
</member>
<member name="F:WixSharp.MediaTemplate.CompressionLevel">
<summary>
Indicates the compression level for the Media's cabinet. This attribute can only be used in conjunction with the Cabinet attribute. The default is 'mszip'.
</summary>
</member>
<member name="F:WixSharp.MediaTemplate.DiskPrompt">
<summary>
The disk name, which is usually the visible text printed on the disk. This localizable text is used to prompt the user when this disk needs to be inserted. This value will be used in the "[1]" of the DiskPrompt Property. Using this attribute will require you to define a DiskPrompt Property.
</summary>
</member>
<member name="F:WixSharp.MediaTemplate.EmbedCab">
<summary>
Instructs the binder to embed the cabinets in the product if 'true'.
</summary>
</member>
<member name="F:WixSharp.MediaTemplate.MaximumCabinetSizeForLargeFileSplitting">
<summary>
Maximum size of cabinet files in megabytes for large files. This attribute is used for packaging files that are larger than MaximumUncompressedMediaSize into smaller cabinets. If cabinet size exceed this value, then setting this attribute will cause the file to be split into multiple cabinets of this maximum size. For simply controlling cabinet size without file splitting use MaximumUncompressedMediaSize attribute. Setting this attribute will disable smart cabbing feature for this Fragment / Product. Setting WIX_MCSLFS environment variable can be used to override this value. Minimum allowed value of this attribute is 20 MB. Maximum allowed value and the Default value of this attribute is 2048 MB (2 GB).
</summary>
</member>
<member name="F:WixSharp.MediaTemplate.MaximumUncompressedMediaSize">
<summary>
Size of uncompressed files in each cabinet, in megabytes. WIX_MUMS environment variable can be used to override this value. Default value is 200 MB.
</summary>
</member>
<member name="F:WixSharp.MediaTemplate.VolumeLabel">
<summary>
The label attributed to the volume. This is the volume label returned by the GetVolumeInformation function. If the SourceDir property refers to a removable (floppy or CD-ROM) volume, then this volume label is used to verify that the proper disk is in the drive before attempting to install files. The entry in this column must match the volume label of the physical media.
</summary>
</member>
<member name="M:WixSharp.MediaTemplate.Process(WixSharp.ProcessingContext)">
<summary>
Adds itself as an XML content into the WiX source being generated from the <see cref="T:WixSharp.Project" />.
See 'Wix#/samples/Extensions' sample for the details on how to implement this interface correctly.
</summary>
<param name="context">The context.</param>
</member>
<member name="T:WixSharp.ODBCDataSource">
<summary>
Represents an ODBCDataSource to be registered.
Expand Down Expand Up @@ -4292,6 +4351,13 @@
<param name="data">The merge key/values source in it's serialized form data.</param>
<returns></returns>
</member>
<member name="M:WixSharp.Extensions.Clone(System.Collections.Generic.Dictionary{System.String,System.String})">
<summary>
Clones the specified collection.
</summary>
<param name="collection">The collection.</param>
<returns></returns>
</member>
<member name="M:WixSharp.Extensions.ToCondition(System.String)">
<summary>
Converts the string into the <see cref="T:WixSharp.Condition"/> instance.
Expand Down Expand Up @@ -8166,7 +8232,7 @@
</member>
<member name="F:WixSharp.Files.Filter">
<summary>
The filter delegate. It is applied for every file to be evaluated for the inclusion into MSI.
The filter delegate. It is applied for every file to be evaluated for the inclusion into MSI.
</summary>
</member>
<member name="F:WixSharp.Files.IncludeMask">
Expand Down Expand Up @@ -9480,6 +9546,11 @@
Collection of <see cref="T:WixSharp.FirewallException"/> to be installed.
</summary>
</member>
<member name="F:WixSharp.Project.GenericItems">
<summary>
Collection of the user defined <see cref="T:WixSharp.IGenericEntity"/> items.
</summary>
</member>
<member name="F:WixSharp.Project.Properties">
<summary>
Collection of WiX/MSI <see cref="T:WixSharp.Property"/> objects to be created during the installed.
Expand Down
2 changes: 1 addition & 1 deletion Source/src/WixSharp.UI/ManagedAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// This module contains the definition of the Wix# classes.
//
// Written by Oleg Shilo (oshilo@gmail.com)
// Copyright (c) 2008-2013. All rights reserved.
// Copyright (c) 2008-2017. All rights reserved.
//
// Redistribution and use of this code in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
Expand Down
6 changes: 3 additions & 3 deletions Source/src/WixSharp.UI/ManagedUI/Forms/WelcomeDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ void WelcomeDialog_Load(object sender, EventArgs e)

void ResetLayout()
{
// The form controls are properly anchored and will be correctly resized on parent form
// resizing. However the initial sizing by WinForm runtime doesn't a do good job with DPI
// other than 96. Thus manual resizing is the only reliable option apart from going WPF.
// The form controls are properly anchored and will be correctly resized on parent form
// resizing. However the initial sizing by WinForm runtime doesn't a do good job with DPI
// other than 96. Thus manual resizing is the only reliable option apart from going WPF.

var bHeight = (int) (next.Height * 2.3);

Expand Down
2 changes: 1 addition & 1 deletion Source/src/WixSharp/Controls/Dialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// This module contains the definition of the Wix# classes.
//
// Written by Oleg Shilo (oshilo@gmail.com)
// Copyright (c) 2008-2012. All rights reserved.
// Copyright (c) 2008-2017. All rights reserved.
//
// Redistribution and use of this code in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
Expand Down
6 changes: 3 additions & 3 deletions Source/src/WixSharp/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Oleg Shilo")]
[assembly: AssemblyProduct("WixSharp")]
[assembly: AssemblyCopyright("Copyright Oleg Shilo 2008-2016")]
[assembly: AssemblyCopyright("Copyright Oleg Shilo 2008-2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -33,5 +33,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.4.0.0")]
[assembly: AssemblyFileVersion("1.4.0.0")]
[assembly: AssemblyVersion("1.4.1.0")]
[assembly: AssemblyFileVersion("1.4.1.0")]

0 comments on commit 87daab1

Please sign in to comment.