qutebrowser icon indicating copy to clipboard operation
qutebrowser copied to clipboard

Improve Windows build detection for Python and NSIS

Open l4-s0 opened this issue 1 month ago • 2 comments

Context

Builds using tox -e build-release would fail because Python and NSIS were not detected in certain configurations, for example if they were not on the PATH.

  • Python: If installed only for the current user (not system-wide) or via Microsoft Store, the build script could not locate the executable because it didn’t check the correct PATH locations or the HKEY_CURRENT_USER registry keys.
  • NSIS: If installed in non-standard locations, or not on PATH, makensis.exe could not be found.

Fix

  • Added additional fallback paths for Python detection.
  • Added similar fallback logic for NSIS.

With these changes, the build script now correctly locates Python and NSIS in all common user environments, including Microsoft Store installations and user-only installs. This allows tox -e build-release to run successfully without requiring system-wide Python or manually modifying PATH.

l4-s0 avatar Nov 17 '25 13:11 l4-s0

I'm not really interested in all the additional complexity if it doesn't solve a real-world issue. Why do you need to build your own custom builds in the first place?

The-Compiler avatar Nov 17 '25 14:11 The-Compiler

Thanks for you response !

For my first contribution I was trying to work on the issue : "Add a versions.txt to windows releases #1212". In order to do so, I needed to run tox -e build-release on Windows.

On my setup, the build couldn’t detect Python or NSIS at all. This PR only adds small fallback checks so contributors on Windows setups can run the build without manually fixing PATH or registry entries.

I didn't really mean to create my own custom build in the first place. By the way, the original versions.txt issue (#1212) is being handled by my teammate, who will open a PR soon.

I totally understand if this extra robustness isn’t needed — though it could maybe still help future contributors on Windows. If you prefer to keep things simpler, I can close the PR without any issue.

PS : My teammate is encountering the same issue with the NSIS path, merging this PR would allow him to post his PR for (#1212)

l4-s0 avatar Nov 17 '25 15:11 l4-s0