Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: Product info feature request #1355

Closed
randers-bit opened this issue Jul 29, 2020 · 3 comments
Closed

Windows: Product info feature request #1355

randers-bit opened this issue Jul 29, 2020 · 3 comments

Comments

@randers-bit
Copy link

randers-bit commented Jul 29, 2020

Hello.
I wanted to create msi installer using SBT Native with Windows plugin.
Plugin works great but sbt configuration is too stiff i think.

I wanted to add one more dialog page for setting environment variables in system. I succesfully generated .wxs file (via wixFile command in sbt) and then manually edited it (removed one UIRef and added UI definition at the end of product). Then i copied this file to ./src/windows and used it in wixFiles:= ( in build.sbt ).
This method is stiff. If i add new library to project or for example change machines (on one i have license file on D drive and on another i have on C drive) then .wxs file is not valid anymore.

It would be nice if it could be possibe to manipulate product info a little bit more in build.sbt.

Expected behaviour

I think it would be nice if user could manipulate UIRefs added in product (now 2 UIRef are hardcoded: WixUI_FeatureTree and WixUI_ErrorProgressText )

I think it would be nice too if sbt allowed to append xml.Node to product at the end of product definition. For example user first remove UIRef and then declare manually UI element without worrying about adding project files and directories.

With this users could generate .wxs files and could add new dialogs without manually generating whole ProductInfo in build.sbt.

Actual behaviour

Native packager generates .wxs always with two hardcoded UIRef. User can only manually pass static .xsw file to wixFiles, or generate whole product info manually in build sbt without using WixHelper.makeWixProductConfig because this function generates not wanted xml definition.

Information

I think labels should be windows and feature request.

  • Windows Plugin
  • SBT 1.3.12
  • Windows
  • Im building msi installer
  • Im using WIX toolset 3.11.2
  • My target is Windows
@randers-bit randers-bit changed the title Windows: Windows: Product info feature request Jul 29, 2020
@muuki88
Copy link
Contributor

muuki88 commented Jul 30, 2020

Hi @Randerspl and thanks for your detailed feature request.

I have no experience with bundling stuff with Wix or on window, so feel free to correct any statements I make.

I think it would be nice too if sbt allowed to append xml.Node to product at the end of product definition

That should be possible. The setting wixConfig is a xml.Node and can be manipulated.
(defining code)

Windows / wixConfig := {
   val currentConfig = (Windows / wixConfig).value
   // do some xml stuff with the currentConfig
  
   currentConfig
}

Note that wixConfig is a setting. So you can't depend on a task. For a static configuration this should be okay.
If you need some dynamic stuff you would have to override the wixFile task and do the logic in there.

@randers-bit
Copy link
Author

randers-bit commented Sep 11, 2020

Sorry for not responding for a long time.
I recently implemented this as you said ( manually manipulating xml Node ) and it works great.

Still this approach has some steps to do ( i need to manually remove some xml definitions like WixUI_FeatureTree from Product because it is hardcoded in sbt task and collides when you want a custom dialog ).

The only thing I think would be useful is the ability to filter what dialogs are generated (like adding array parameter). Now two UIRef are hardcoded in XML ( WixUI_FeatureTree and WixUI_ErrorProgressText). It would be nice if in sbt we can define like wixFeatures collection what UiRefs are inserted so user can for example set this array to empty and generate manually refs for inserting.

I think this issue can be closed because if somebody want's a custom dialog it can do it via XML manipulation.

@muuki88
Copy link
Contributor

muuki88 commented Sep 16, 2020

The only thing I think would be useful is the ability to filter what dialogs are generated (like adding array parameter). Now two UIRef are hardcoded in XML ( WixUI_FeatureTree and WixUI_ErrorProgressText). It would be nice if in sbt we can define like wixFeatures collection what UiRefs are inserted so user can for example set this array to empty and generate manually refs for inserting.

I'm open to pull requests. This sounds very reasonable to me and from my naive standpoint this could be refactored into a separate setting that is used to build the wixConfig.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants