Skip to content

Commit e48eaca

Browse files
m_igashim_igashi
authored andcommitted
fix: use GTK3 backend for Linux file dialogs
Avoid ashpd/xdg-portal compilation issues on Linux CI
1 parent e53eff3 commit e48eaca

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
if: runner.os == 'Linux'
8181
run: |
8282
sudo apt-get update
83-
sudo apt-get install -y libxkbcommon-dev libwayland-dev
83+
sudo apt-get install -y libxkbcommon-dev libwayland-dev libgtk-3-dev
8484
8585
- name: Build GUI
8686
run: cargo build --release --manifest-path mp3rgui/Cargo.toml --target ${{ matrix.target }}

mp3rgui/Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,17 @@ repository = "https://github.com/M-Igashi/mp3rgain"
1111
eframe = "0.31"
1212
egui = "0.31"
1313
egui_extras = { version = "0.31", features = ["all_loaders"] }
14-
rfd = "0.15"
1514
image = { version = "0.25", default-features = false, features = ["png"] }
1615
mp3rgain = { path = ".." }
1716

17+
# Linux: use GTK3 backend to avoid ashpd/xdg-portal compilation issues
18+
[target.'cfg(target_os = "linux")'.dependencies]
19+
rfd = { version = "0.15", default-features = false, features = ["gtk3"] }
20+
21+
# macOS/Windows: use native file dialogs
22+
[target.'cfg(not(target_os = "linux"))'.dependencies]
23+
rfd = "0.15"
24+
1825
[target.'cfg(windows)'.build-dependencies]
1926
winresource = "0.1"
2027

0 commit comments

Comments
 (0)