indygreg / indygreg/PyOxidizer
Adding own wix xml (.wxs) file to project
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 256
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm currently trying to use the wix toolset together with pyoxidizer to build an msi-installer, which installs the application as a service on windows. To accomplish that, I'm trying to add additional xml code to the automatic-generated wix config. In the [docs](https://pyoxidizer.readthedocs.io/en/stable/tugger_wix.html#how-tugger-invokes-wix), there is the following statement:
> Note that it is possible to use one of the higher-level interfaces for automatically generating a .wxs file and then supplement this automatically-generated file with other .wxs files that you maintain.
That's exactly how I want to use the wix-toolset, because I don't want to write all of the wix code and just add that, what I need.
Currently I'm only able to add an .wxs file to the build environment, but can't figure out, what to write inside the .wxs file, because what I read is, that normally, to use multiple files with wix, you have to reference the "outsourced" code with something like "ComponentRef" etc., but since the main.wxs is autogenerated, I couldn't find any solution for this.
This is the code, where I specify, which .wxs file to import into the build process:
```
def make_msi(exe):
# See the full docs for more. But this will convert your Python executable
# into a `WiXMSIBuilder` Starlark type, which will be converted to a Windows
# .msi installer when it is built.
wix_installer = WiXInstaller("service2", "Service.msi")
wix_msi_builder = exe.to_wix_msi_builder(
# Simple identifier of your app.
"my_service",
# The name of your application.
"My Service",
# The version of your application.
"0.1.0",
# The author/manufacturer of your application.
"Henning Wöhrmann"
)
# wix_msi_builder.dialog_bmp_path = "graphics/dialog.bmp"
wix_installer.add_build_file("graphics/dialog.bmp", "graphics/dialog.bmp")
wix_installer.add_msi_builder(wix_msi_builder)
wix_installer.add_wxs_file("serviceConfig2.wxs")
return wix_installer
```
I hope my issue is understandable and someone can help me with this.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the tugger_wix documentation section “How Tugger invokes WiX” and the shown make_msi entry point, then trace how WiXInstaller.add_wxs_file("serviceConfig2.wxs") is consumed alongside the generated main.wxs. Done means documenting the supported structure for adding custom WiX XML and showing how the service configuration is included.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100