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

v0.22.1 #2216

Merged
merged 33 commits into from
Mar 14, 2024
Merged

v0.22.1 #2216

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
cacadc4
build(linux): ensure pre-compiled arch pkg is not debug build (#2214)
ReenigneArcher Mar 5, 2024
9f94eeb
Fix mismatched case and unhandled exception in open_drm_fd_for_cuda_d…
cgutman Mar 5, 2024
4ebc7b5
build(macos): add build strategy matrix (#2211)
ReenigneArcher Mar 5, 2024
b99a9e9
build(macos): fix publishing of portfile (#2220)
ReenigneArcher Mar 5, 2024
3f21596
fix(config): add missing resolution to default config ui (#2224)
ReenigneArcher Mar 6, 2024
9e299c2
Fix predefined FPS values not taking effect
cgutman Mar 6, 2024
c86a4e1
Fix wrong path in desktop file (#2223)
detiam Mar 6, 2024
3b3e681
Make debuginfo artifacts harder to confuse with the Windows portable …
cgutman Mar 6, 2024
6aeaaf5
Fix process tree tracking when the cmd.exe trampoline is used
cgutman Mar 7, 2024
972e5d2
Strip quotes out of the working directory path
cgutman Mar 7, 2024
06c0ed1
Temporarily add the working directory to our path when starting an app
cgutman Mar 7, 2024
f5dd0d4
Update app examples to clarify new command syntax for Windows
cgutman Mar 7, 2024
7cdd156
Fix heap corruption with cursor pixel counts that aren't divisible by 8
cgutman Mar 7, 2024
ce3b625
Fix undefined behavior when computing cursor end pointer
cgutman Mar 8, 2024
33e99e1
build(macos)!: add homebrew formula and drop dmg (#2222)
ReenigneArcher Mar 9, 2024
9d5b017
Replace WMIC-based check for ViGEmBus with a Powershell check
cgutman Mar 9, 2024
278567f
Move kmsgrab dependencies from optdepends to depends
cgutman Mar 9, 2024
74ce047
Add optdepends for Intel and AMD hardware encoding
cgutman Mar 9, 2024
cb4bfaa
Add the .INSTALL script needed for kmsgrab to work
cgutman Mar 9, 2024
bc0a478
Use icon caching for system tray. (#2238)
brycerocky Mar 10, 2024
a2785ba
fix(linux): automatically migrate config directory (#2240)
ReenigneArcher Mar 11, 2024
9174496
Avoid broken fallback to cross-adapter NVENC encoding with KMS
cgutman Mar 11, 2024
3117fa5
Rename 85-sunshine.rules to 60-sunshine.rules
cgutman Mar 11, 2024
3181d91
Apply udev rules to /dev/uinput immediately after installation
cgutman Mar 11, 2024
97467ea
Reorder and reword the KMS setup step
cgutman Mar 11, 2024
e383ab9
Add note to prefer distro packages over Flatpak/AppImage
cgutman Mar 11, 2024
d887798
Improve KMS debuggability and avoid known broken cases
cgutman Mar 12, 2024
c13a30d
Allow NVENC to be forced to try capturing non-Nvidia GPUs
cgutman Mar 13, 2024
1859e23
build(deps): bump LizardByte/homebrew-release-action from 2024.309.15…
dependabot[bot] Mar 13, 2024
0bfad20
fix(Linux/Fedora): re-enable CUDA and bump to 12.4.0 (#2247)
Crashdummyy Mar 13, 2024
3e49e25
chore: bump version to v0.22.1 (#2221)
ReenigneArcher Mar 13, 2024
22736c4
Fix(linux/fedora39) patch system headers so build succeeds with cuda …
ReenigneArcher Mar 13, 2024
c43dd24
Don't update tray icon after tray_exit() was called
cgutman Mar 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(linux): automatically migrate config directory (#2240)
  • Loading branch information
ReenigneArcher authored Mar 11, 2024
commit a2785baf0aa7202bceecd975b1aa2d8798d2378a
1 change: 1 addition & 0 deletions packaging/linux/flatpak/dev.lizardbyte.sunshine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ separate-locales: false
finish-args:
- --device=all # access all devices
- --env=PULSE_PROP_media.category=Manager # allow sunshine to manage audio sinks
- --env=SUNSHINE_MIGRATE_CONFIG=1 # migrate config files to the new location
- --filesystem=home # need to save files in user's home directory
- --share=ipc # required for X11 shared memory extension
- --share=network # access network
Expand Down
48 changes: 40 additions & 8 deletions src/platform/linux/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,22 +100,54 @@ namespace platf {

fs::path
appdata() {
bool found = false;
bool migrate_config = true;
const char *dir;
const char *homedir;
fs::path config_path;

// Get the home directory
if ((homedir = getenv("HOME")) == nullptr || strlen(homedir) == 0) {
// If HOME is empty or not set, use the current user's home directory
homedir = getpwuid(geteuid())->pw_dir;
}

// May be set if running under a systemd service with the ConfigurationDirectory= option set.
if ((dir = getenv("CONFIGURATION_DIRECTORY")) != nullptr) {
return fs::path { dir } / "sunshine"sv;
if ((dir = getenv("CONFIGURATION_DIRECTORY")) != nullptr && strlen(dir) > 0) {
found = true;
config_path = fs::path(dir) / "sunshine"sv;
}
// Otherwise, follow the XDG base directory specification:
// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
if ((dir = getenv("XDG_CONFIG_HOME")) != nullptr) {
return fs::path { dir } / "sunshine"sv;
}
if ((dir = getenv("HOME")) == nullptr) {
dir = getpwuid(geteuid())->pw_dir;
if (!found && (dir = getenv("XDG_CONFIG_HOME")) != nullptr && strlen(dir) > 0) {
found = true;
config_path = fs::path(dir) / "sunshine"sv;
}
// As a last resort, use the home directory
if (!found) {
migrate_config = false;
config_path = fs::path(homedir) / ".config/sunshine"sv;
}

// migrate from the old config location if necessary
if (migrate_config && found && getenv("SUNSHINE_MIGRATE_CONFIG") == "1"sv) {
fs::path old_config_path = fs::path(homedir) / ".config/sunshine"sv;
if (old_config_path != config_path && fs::exists(old_config_path)) {
if (!fs::exists(config_path)) {
BOOST_LOG(info) << "Migrating config from "sv << old_config_path << " to "sv << config_path;
std::error_code ec;
fs::rename(old_config_path, config_path, ec);
if (ec) {
return old_config_path;
}
}
else {
BOOST_LOG(warning) << "Config exists in both "sv << old_config_path << " and "sv << config_path << ", using "sv << config_path << "... it is recommended to remove "sv << old_config_path;
}
}
}

return fs::path { dir } / ".config/sunshine"sv;
return config_path;
}

std::string
Expand Down
Loading