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

fix(packaging/windows): add Sunshine directories to system PATH #3727

Merged

Conversation

ReenigneArcher
Copy link
Member

@ReenigneArcher ReenigneArcher commented Mar 16, 2025

Description

This PR was inspired after too many users have tried running sunshine --<command> from the wrong working directory.

The option via CPACK is too complex (see explanation below).

CPACK method

See https://cmake.org/cmake/help/latest/cpack_gen/nsis.html#variable:CPACK_NSIS_MODIFY_PATH

As far as I can tell there is no way to set the default options.

TODO:

image

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

@ReenigneArcher ReenigneArcher force-pushed the fix/packaging/prompt-to-add-program-directory-to-path branch from ccde593 to 7ba90cb Compare March 17, 2025 02:20
Copy link

codecov bot commented Mar 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 11.61%. Comparing base (7c8113d) to head (39019f0).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3727   +/-   ##
=======================================
  Coverage   11.61%   11.61%           
=======================================
  Files          92       92           
  Lines       17337    17337           
  Branches     8100     8100           
=======================================
  Hits         2013     2013           
  Misses      12833    12833           
  Partials     2491     2491           
Flag Coverage Δ
Linux 11.28% <ø> (ø)
Windows 13.01% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ReenigneArcher ReenigneArcher force-pushed the fix/packaging/prompt-to-add-program-directory-to-path branch 7 times, most recently from f0067b8 to 0c5ea24 Compare March 19, 2025 01:56
@ReenigneArcher
Copy link
Member Author

ReenigneArcher commented Mar 19, 2025

@cgutman My initial idea for this was to use the CPACK option to set the path, but ran into a bunch of issues with it.

  1. It doesn't work unless ./bin exists
  2. Moved the exe and tools to the bin directory, but then Sunshine had some issues.
  3. Sunshine couldn't find the config directory. I was able to fix this.
  4. Sunshine couldn't find assets directory (I think... unknown as Sunshine crashed and nothing useful in logs)... this would be far more complex to fix.
  5. Setting the PATH worked sometimes, and other times it didn't work and required a re-install.
  6. Cannot set default option to set the PATH or not.
  7. The option to add desktop icon is not customizable and didn't ever work.

So, I started thinking it would be easier to just have an install/uninstall script. Any thoughts/opinions/questions on this approach.

These are mine:

  1. Should we prompt to set the PATH or not? My thought is no prompt and just set it all the time.
  2. Should tool binaries be moved so that they are also on the PATH? edit: added tools directory as well

@ReenigneArcher ReenigneArcher marked this pull request as ready for review March 19, 2025 02:06

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses an issue with users running the program from the wrong working directory by updating the packaging instructions.

  • Removed outdated uninstallation instructions from the documentation.
  • Focused on clarifying the setup steps post-installation.
Files not reviewed (2)
  • cmake/packaging/windows.cmake: Language not supported
  • src_assets/windows/misc/path/update-path.bat: Language not supported
@ReenigneArcher ReenigneArcher changed the title fix(packaging): prompt to add program directory to path fix(packaging): add program directory to system PATH Mar 19, 2025
@ReenigneArcher ReenigneArcher changed the title fix(packaging): add program directory to system PATH fix(packaging/windows): add program directory to system PATH Mar 19, 2025
@ReenigneArcher ReenigneArcher added this to the stable release milestone Mar 19, 2025
@ReenigneArcher ReenigneArcher force-pushed the fix/packaging/prompt-to-add-program-directory-to-path branch 2 times, most recently from a9445e0 to e95d827 Compare March 20, 2025 21:40
@ReenigneArcher ReenigneArcher force-pushed the fix/packaging/prompt-to-add-program-directory-to-path branch from e95d827 to c538455 Compare March 22, 2025 00:17
@ReenigneArcher ReenigneArcher force-pushed the fix/packaging/prompt-to-add-program-directory-to-path branch from c538455 to 39019f0 Compare March 22, 2025 01:07
@ReenigneArcher ReenigneArcher changed the title fix(packaging/windows): add program directory to system PATH fix(packaging/windows): add Sunshine directories to system PATH Mar 22, 2025
@ReenigneArcher ReenigneArcher enabled auto-merge (squash) March 22, 2025 01:42
@ReenigneArcher ReenigneArcher disabled auto-merge March 22, 2025 01:43
@ReenigneArcher ReenigneArcher enabled auto-merge (squash) March 22, 2025 01:47
@ReenigneArcher ReenigneArcher merged commit 873939a into master Mar 22, 2025
47 of 48 checks passed
@ReenigneArcher ReenigneArcher deleted the fix/packaging/prompt-to-add-program-directory-to-path branch March 22, 2025 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant