Bot releases are visible (Hide)
Published by oleg-shilo almost 7 years ago
This release delivers defect fixes and quite a few new features (majority is contributed by @Xaddan).
The most important feature to be aware of is the customization of the ID allocation algorithm. This feature may affect some users so please read about it in more details in the bottom section.
AddRange
is renamed in Combine
WixSharp.Project.HashedTargetPathIdAlgorithm
Project.CustomIdAlgorithm
and Compiler.CustomIdAlgorithm
Compiler.AutoGeneration.IsWxsGenerationThreadSafe
Compiler.AutoGeneration
settings object made read-onlyID allocation customization
The need for user defined ID allocation algorithm was expressed in the multiple reports. The existing ID auto-generation algorithm exhibited certain practical limitations in some scenarios. While manual ID allocation gives the user the complete control over ID allocation, having a hybrid solution when user has ability to customize the auto-allocation was an attractive option.
Starting from this release user as an ability to provide a customid-allocation algorithm, which is invoked by WixSharp if no explicit Id for the WixEntity is specified:
project.CustomIdAlgorithm =
entity =>
{
if (entity is File file)
{
var target_path = this.GetTargetPathOf(file);
var dir_hash = Math.Abs(target_path.PathGetDirName().GetHashCode32());
var file_name = target_path.PathGetFileName();
return $"File.{dir_hash}.{file_name}"; // pass to default ID generator
}
};
WixSharp also provides an alternative ready to go id-allocation algorithm, which addresses the reported limitations. Thus instead of emitting indexed IDs it produces ID with the target path hash for all File entities/elements. Note this feature does not affect user ability to set IDs manually.
// globally via configuration
Compiler.AutoGeneration.LegacyDefaultIdAlgorithm = false;
// for project only via delegate
project.CustomIdAlgorithm = project.HashedTargetPathIdAlgorithm;
The feature implementation took into account the community feedback provided via #204.
The new approach is more reliable but it will affect the users who stores the generated WXS files under source control. That's why the new API allows switching back to legacy ID-allocation algorithm if required.
Currently (in this release) the new hash-based algorithm is disabled by default to allow the users some time to get used to the new algorithm. But it will be made enabled by default in the next release.
Support for new WiX elements
Sample for UrlReservation element:
var project =
new Project("MyProduct",
new Dir(@"%ProgramFiles%\My Company\My Product",
new UrlReservation("http://+:2131/url/device_service/",
"*S-1-1-0",
UrlReservationRights.register),
...
Sample for IniFile:
var project =
new Project("MyProduct",
new Dir(@"%ProgramFiles%\My Company\My Product",
new File(@"..\Install Files\Files\Bin\MyApp.exe")),
new Property("IP_ADRESS", "127.0.0.1"),
new IniFile("config.ini", "INSTALLDIR", IniFileAction.createLine, "discovery", "enabled", "false"),
new IniFile("config.ini", "INSTALLDIR", IniFileAction.createLine, "info", "enabled_server", "[IP_ADRESS]"));
Support for CustomActionsRef
:
var project =
new Project("MyProduct",
new Dir(@"%ProgramFiles%\My Company\My Product",
new CustomActionRef ("WixFailWhenDeferred",
When.Before,
Step.InstallFinalize,
"WIXFAILWHENDEFERRED=1")
...
project.IncludeWixExtension(WixExtension.Util);
Sample for Rollback customization:
var project =
new Project("MyProduct",
new Dir(@"%ProgramFiles%\My Company\My Product",
new ElevatedManagedAction(CustomActions.Install,
Return.check,
When.After,
Step.InstallFiles,
Condition.NOT_Installed,
CustomActions.Rollback)
{
RollbackArg = "Prop=Rollback"
}
...
public class CustomActions
{
[CustomAction]
public static ActionResult Rollback(Session session)
{
MessageBox.Show(session.Property("Prop"), "Rollback");
return ActionResult.Success;
}
...
Published by oleg-shilo almost 7 years ago
WixSharp.Project.HashedTargetPathIdAlgorithm
Project.CustomIdAlgorithm
and Compiler.CustomIdAlgorithm
Compiler.AutoGeneration.LegacyDefaultIdAlgorithm
flag to control the algorithm selection (incremantal vs. hashed)Compiler.AutoGeneration.IsWxsGenerationThreadSafe
Compiler.AutoGeneration
settings object made read-onlyAddRange
is renamed in Combine
Published by oleg-shilo almost 7 years ago
Published by oleg-shilo about 7 years ago
AddOrUpdateElement
has been renamed in SetElementValue
Published by oleg-shilo about 7 years ago
v1.4.8.0
IManagedUIShell.Errors
AttributesDefinition = "{dep}ProviderKey = 01234567-8901-2345-6789-012345678901"`ActionResult.SkipRemainingActions
in UIInitialized
event handler.Session.LookupInstalledVersion
Session.QueryProductVersion
Session.QueryProperty
SetupEventArgs.ManagedUIShell
renamed into SetupEventArgs.ManagedUI
and marked as obsolete.SetupEventArgs.ManagedUI.Shell
to allow UI navigation to be triggered from ManagedSetup events (e.g. e.ManagedUI.Shell.GoTo<ExitDialog>()
).e.ManagedUI.Shell.ErrorDetected
made writable to allow failing the setup from from ManagedSetup events.Project.UIInitialized
is reworked to make UI dialogs available as soon as possible. Useful for hooking to e.ManagedUI.OnCurrentDialogChanged
before the UI sequence is started.%this%
with non '.dll' extension. This solves the problem with DTF runtime asm probing failing to locate non standard assemblies (e.g. '.compiled').Published by oleg-shilo about 7 years ago
v1.4.7.2
%this%
with non '.dll' extension. This solves the problem with DTF runtime asm probing failing to locate non standard assemblies (e.g. '.compiled').Published by oleg-shilo about 7 years ago
Published by oleg-shilo over 7 years ago
AddXmlInclude
when custom Project.OutDir is specified. Triggered but not related to the issue #96.Published by oleg-shilo over 7 years ago
Published by oleg-shilo over 7 years ago
UnescapeKeyValue
implementationPublished by oleg-shilo over 7 years ago
This release is identical functionality wise to v1.4.4.0.
It's just re-packaged according new CI to include all binaries stamped with the same version number.
Published by oleg-shilo over 7 years ago
-
character in folder namesPublished by oleg-shilo over 7 years ago
IGenericEntity
) are now allowed in File
and Assembly
constructor.Feature
s. Triggered by issue#48.Published by oleg-shilo over 7 years ago
AppSearch.GetProductVersionFromUpgradeCode
static void project_BeforeInstall(SetupEventArgs e)
{
var installedVersion = AppSearch.GetProductVersionFromUpgradeCode(e.UpgradeCode);
}
Published by oleg-shilo over 7 years ago
MediaTemplate
element.Published by oleg-shilo over 7 years ago
static void Main()
{
// suppress generation of .\wix\MyProduct.g.wxs
MsBuild.EmitAutoGenFiles = false;
...
Published by oleg-shilo over 7 years ago
Release v1.3.0
Published by oleg-shilo almost 8 years ago
Changes:
Published by oleg-shilo almost 8 years ago
Changes: