Skip to content

Commit 6216eb4

Browse files
authored
refactor(core): drop ayatana-tray and gtk-tray Cargo features (#4247)
1 parent 5c20c84 commit 6216eb4

12 files changed

Lines changed: 30 additions & 40 deletions

File tree

.changes/remove-tray-features.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"tauri": patch
3+
"tauri-runtime-wry": patch
4+
---
5+
6+
**Breaking change**: Removed the `gtk-tray` and `ayatana-tray` Cargo features.

.changes/tauri-tray-env-var.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"cli.rs": patch
3+
"cli.js": patch
4+
---
5+
6+
Use the `TAURI_TRAY` environment variable to determine which package should be added to the Debian `depends` section. Possible values are `ayatana` and `gtk`.

.github/workflows/lint-fmt-core.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,9 @@ jobs:
5050
clippy:
5151
- { args: '', key: 'empty' }
5252
- {
53-
args: '--features compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,ayatana-tray,http-multipart',
53+
args: '--features compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,http-multipart',
5454
key: 'all'
5555
}
56-
- {
57-
args: '--no-default-features --features ayatana-tray',
58-
key: 'no-default'
59-
}
6056
- { args: '--features custom-protocol', key: 'custom-protocol' }
6157
- { args: '--features api-all', key: 'api-all' }
6258

.github/workflows/test-core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ jobs:
8989
run: |
9090
cargo test
9191
cargo test --features api-all
92-
cargo test --features compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,ayatana-tray,http-multipart
92+
cargo test --features compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,http-multipart

.github/workflows/udeps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ jobs:
2929
clippy:
3030
- {
3131
path: './core/tauri/Cargo.toml',
32-
args: '--features compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,ayatana-tray,http-multipart'
32+
args: '--features compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,http-multipart'
3333
}
3434
- { path: './core/tauri-build/Cargo.toml', args: '--all-features' }
3535
- { path: './core/tauri-codegen/Cargo.toml', args: '--all-features' }
3636
- { path: './core/tauri-macros/Cargo.toml', args: '--all-features' }
3737
- { path: './core/tauri-runtime/Cargo.toml', args: '--all-features' }
3838
- {
3939
path: './core/tauri-runtime-wry/Cargo.toml',
40-
args: '--features devtools,system-tray,macos-private-api,objc-exception,ayatana-tray'
40+
args: '--features devtools,system-tray,macos-private-api,objc-exception'
4141
}
4242
- { path: './core/tauri-utils/Cargo.toml', args: '--all-features' }
4343
- { path: './tooling/bundler/Cargo.toml', args: '--all-features' }

core/tauri-runtime-wry/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ exclude = [ ".license_template", "CHANGELOG.md", "/target" ]
1313
readme = "README.md"
1414

1515
[dependencies]
16-
wry = { version = "0.17.0", default-features = false, features = [ "file-drop", "protocol" ] }
16+
wry = { version = "0.18.1", default-features = false, features = [ "file-drop", "protocol" ] }
1717
tauri-runtime = { version = "0.6.0", path = "../tauri-runtime" }
1818
tauri-utils = { version = "1.0.0-rc.8", path = "../tauri-utils" }
1919
uuid = { version = "1", features = [ "v4" ] }
@@ -44,7 +44,5 @@ macos-private-api = [
4444
"tauri-runtime/macos-private-api"
4545
]
4646
objc-exception = [ "wry/objc-exception" ]
47-
gtk-tray = [ "wry/gtk-tray" ]
48-
ayatana-tray = [ "wry/ayatana-tray" ]
4947
global-shortcut = [ "tauri-runtime/global-shortcut" ]
5048
clipboard = [ "tauri-runtime/clipboard" ]

core/tauri/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ default = [ "wry", "compression", "objc-exception" ]
133133
compression = [ "tauri-macros/compression", "tauri-utils/compression" ]
134134
wry = [ "tauri-runtime-wry" ]
135135
objc-exception = [ "tauri-runtime-wry/objc-exception" ]
136-
ayatana-tray = [ "tauri-runtime-wry/ayatana-tray" ]
137-
gtk-tray = [ "tauri-runtime-wry/gtk-tray" ]
138136
isolation = [ "tauri-utils/isolation", "tauri-macros/isolation" ]
139137
custom-protocol = [ "tauri-macros/custom-protocol" ]
140138
updater = [

core/tauri/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@
3131
//! - **fs-extract-api**: Enabled the `tauri::api::file::Extract` API.
3232
//! - **cli**: Enables usage of `clap` for CLI argument parsing. Enabled by default if the `cli` config is defined on the `tauri.conf.json` file.
3333
//! - **system-tray**: Enables application system tray API. Enabled by default if the `systemTray` config is defined on the `tauri.conf.json` file.
34-
//! Note that you must select one of `ayatana-tray` and `gtk-tray` features on Linux.
35-
//! - **ayatana-tray**: Use libayatana-appindicator for system tray on Linux.
36-
//! - **gtk-tray**: Use libappindicator3-1 for system tray on Linux. To enable this, you need to disable the default features.
3734
//! - **macos-private-api**: Enables features only available in **macOS**'s private APIs, currently the `transparent` window functionality and the `fullScreenEnabled` preference setting to `true`. Enabled by default if the `tauri > macosPrivateApi` config flag is set to `true` on the `tauri.conf.json` file.
3835
//! - **window-data-url**: Enables usage of data URLs on the webview.
3936
//! - **compression** *(enabled by default): Enables asset compression. You should only disable this if you want faster compile times in release builds - it produces larger binaries.

examples/api/src-tauri/Cargo.lock

Lines changed: 4 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/api/src-tauri/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ tauri = { path = "../../../core/tauri", features = ["api-all", "cli", "global-sh
1616
tiny_http = "0.11"
1717

1818
[features]
19-
default = [ "custom-protocol", "tauri/ayatana-tray" ]
19+
default = [ "custom-protocol" ]
2020
custom-protocol = [ "tauri/custom-protocol" ]
21-
gtk-tray = [ "tauri/gtk-tray" ]
2221

2322
# default to small, optimized release binaries
2423
[profile.release]

0 commit comments

Comments
 (0)