Вопросы и замечания по WixSharp Managed Setup - Cusom UI

Sep 25, 2015 at 11:02 AM
Edited Sep 25, 2015 at 11:24 AM
Добрый день Олег.
Я использую шаблон "WixSharp Managed Setup - Cusom UI", он очень подходит для моих инсталляторов, но у меня есть несколько вопросов и замечаний. Буду благодарен если вы ответите на них.
1) При создание проекта из данного шаблона, и построения. Запускаем его и переходим в диалог выбора Feature, если в этом диалоге кликнуть на пустое место в TreeView то выпадет исключение:
************** Текст исключения **************
System.NullReferenceException: В экземпляре объекта не задана ссылка на объект.
   в WixSharp.UI.Forms.ReadOnlyTreeNode.Behavior.<>c__DisplayClass0_0.<AttachTo>b__0(Object s, MouseEventArgs e)
   в System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)
   в System.Windows.Forms.TreeView.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   в System.Windows.Forms.TreeView.WndProc(Message& m)
   в System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   в System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   в System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
2) Края формы не фиксированы, пользователь может изменить размер инсталлятора. Также хотелось бы иметь возможность изменить размер форма. На данный момент необходимо лезть в исходники и менять там.

3) Не могу скрыть Feature в TreeView. Attributes = new Attributes() { { "Display", "hidden" } или { "Level", "0" } }, все равно отображается. Также не работает Attributes = new Attributes() { { "Display", "expand" } }.

4) Прописываем в Feature Description, если в Feature файл то все ок Description есть, если в Feature мерж модуль то Description пропадает.

5) В инсталляторе в диалоге Feature выбираем необходимые компоненты, переходим на следующий диалог и возвращаемся обратно, все сбросилось по умолчанию. Тоже самое с путем установки.

6)Возможно ли запилить "WixSharp Managed Setup - Cusom UI WPF"? )

Вроде пока все. Заранее спасибо.
Sep 27, 2015 at 3:38 AM
Edited Sep 27, 2015 at 3:42 AM
Thank you for your feedback.

I took the liberty of translating your comments so other readers can benefit/participate. While I am OK with spoken Russian the technical terminology is a challenge for me. So some inaccuracies are possible . :)

  • ManagedSetup CustomUI - clicking on empty space in Features dialog triggers the exception.
    Issue created: https://wixsharp.codeplex.com/workitem/69
    Fixed in v1 0.27.0 with commit 6dcb879d27c9
  • CustomUI ShellView form is resizable.
    Yes this is a mistake.
    Fixed in v1 0.27.0 with commit a762ce072a0e
  • How to change size of the ShellView form?
    You can do it by accessing the parent Form from the first dialog being displayed:
void WelcomeDialog_Load(object sender, EventArgs e)
    image.Image = MsiRuntime.Session.GetEmbeddedBitmap("WixUI_Bmp_Dialog");
    ((Form)Parent).Size = new Size(800, 600);
  • Cannot hide Feature in TreeView. Attributes = new Attributes() { { "Display", "hidden" } or { "Level", "0" } } has no effect.
    This is a difficult one. The problem is caused by the deficiencies in the WiX implementation of the DTF support for features illustrated on the image below.
    If you create the Wix# CustomUI project from the corresponding project template and try to debug the project you will see that the only information that is available when the TreeView is being built is the name of the feature. The rest of the properties is unavailable (throwing the exception). Image
    Thus the FeatureInfo class cannot be used at runtime to update the feature item state in the TreeView. Subsequently Wix# has to rely only on the feature information available from MSI tables instead. And neither Display nor Level cannot be utilized this way. Meanubg that if you want to hide the feature item you will need either to remove it from the Project definition at compile time or do it at runtime from the C# definition of you FeaturesDialog.
  • Feature Description is not available if the feature is associated with merge module.
    Issue created: https://wixsharp.codeplex.com/workitem/70
    Fixed in v1 0.27.0 with commit 6dcb879d27c9
  • In Feature dialog TreeView selection losses all user choices after navigation to another dialog.
    This feature was planned but wasn't (until now) implemented yet.
    Issue created: https://wixsharp.codeplex.com/workitem/71
    Fixed in v1 0.27.0 with commit 53800fa9093a
  • Is WixSharp Managed Setup - Cusom UI available for WPF runtime?
    No, not at the moment. This feature is in my todo but to be honest I am not completely convinced it is of a reasonable priority. WPF EmbeddedUI samples are available and nothing stops user from creating rich WPF setup UIs. The main objective of 'Managed Setup - Standard UI' was to replicate the look and feel of the standard MSI native UI sequence and Forms were adequate enough for this. And for everything fancier you have the full power of WPF of non-standard UI.
    However, I suggest you create a feature request and if it attracts users attention (up-voted) I will consider bringing it forward.