indygreg / indygreg/PyOxidizer

Allow Windows MSI's to install in locations other than Program Files

Open
#695 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
6.2k
Forks
256
PR merge metrics
No merged PRs in 30d

Description

For example https://learn.microsoft.com/en-us/windows/win32/msi/localappdatafolder

```bzl
def make_msi(exe):
msi = WiXInstaller(
id="ddqa",
filename="ddqa-" + VERSION + "-x64.msi",
arch="x64",
)
msi.add_simple_installer(
"ddqa",
"Datadog QA",
VERSION,
"Datadog, Inc.",
exe.to_file_manifest("."),
)
msi.install_files_root_directory_id = "LocalAppDataFolder"

return msi
```

```
running light to produce C:\Users\ofek\Desktop\code\ddqa\app\build\x86_64-pc-windows-msvc\release\msi_installer\ddqa-0.0.1.29-x64.msi
C:\Users\ofek\Desktop\code\ddqa\app\build\x86_64-pc-windows-msvc\release\msi_installer\wxs\install-files.wxs(4) : error LGHT0094 : Unresolved reference to symbol 'Directory:LocalAppDataFolder' in section 'Fragment:'.
error: error calling build(): Runtime(RuntimeError { code: "TUGGER_WIX_INSTALLER", message: "building\n\nCaused by:\n 0: running light\n 1: command [\"C:\\\\Users\\\\ofek\\\\Desktop\\\\code\\\\ddqa\\\\app\\\\build\\\\x86_64-pc-windows-msvc\\\\release\\\\msi_installer\\\\wix-toolset.2c1888d5d1dba377\\\\light.exe\", \"-nologo\", \"-ext\", \"WixUIExtension\", \"-ext\", \"WixBalExtension\", \"-ext\", \"WixUtilExtension\", \"-out\", \"C:\\\\Users\\\\ofek\\\\Desktop\\\\code\\\\ddqa\\\\app\\\\build\\\\x86_64-pc-windows-msvc\\\\release\\\\msi_installer\\\\ddqa-0.0.1.29-x64.msi\", \"C:\\\\Users\\\\ofek\\\\Desktop\\\\code\\\\ddqa\\\\app\\\\build\\\\x86_64-pc-windows-msvc\\\\release\\\\msi_installer\\\\wxs\\\\install-files.wixobj\", \"C:\\\\Users\\\\ofek\\\\Desktop\\\\code\\\\ddqa\\\\app\\\\build\\\\x86_64-pc-windows-msvc\\\\release\\\\msi_installer\\\\wxs\\\\main.wixobj\"] exited with code 94", label: "WixInstaller.build()" })
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the WiXInstaller configuration using install_files_root_directory_id and inspect the generated wxs/install-files.wxs alongside the reported LGHT0094 error for LocalAppDataFolder. Reproduce the MSI build, then confirm that a non-Program Files root such as LocalAppDataFolder resolves and the installer builds successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.