Skip to content

Commit

Permalink
chore(deps): upgrade gtk to 0.18 (#8084)
Browse files Browse the repository at this point in the history
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
  • Loading branch information
dklassic and lucasfernog committed Oct 24, 2023
1 parent a0f7b88 commit 9580df1
Show file tree
Hide file tree
Showing 11 changed files with 143 additions and 134 deletions.
7 changes: 7 additions & 0 deletions .changes/gtk018.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"tauri-runtime": 'minor:deps'
"tauri-runtime-wry": 'minor:deps'
"tauri": 'minor:deps'
---

Upgrade `gtk` to 0.18.
6 changes: 6 additions & 0 deletions .changes/wry-0.34.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tauri": patch:deps
"tauri-runtime-wry": patch:deps
---

Updated to wry@0.34, removing the `dox` feature flag.
5 changes: 1 addition & 4 deletions .github/workflows/lint-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ jobs:
matrix:
clippy:
- { args: '', key: 'empty' }
- {
args: '--features compression,wry,linux-ipc-protocol,isolation,custom-protocol,tray-icon,test',
key: 'all'
}
- { args: '--all-features', key: 'all' }
- { args: '--features custom-protocol', key: 'custom-protocol' }

steps:
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/test-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,8 @@ jobs:
command: 'build'
}
features:
- {
args: --no-default-features,
key: no-default
}
- {
args: --features compression,wry,linux-ipc-protocol,isolation,custom-protocol,tray-icon,test,
key: all
}
- { args: --no-default-features, key: no-default }
- { args: --all-features, key: all }

steps:
- uses: actions/checkout@v4
Expand All @@ -91,7 +85,7 @@ jobs:
if: contains(matrix.platform.target, 'unknown-linux')
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
sudo apt-get install -y webkit2gtk-4.1 libxdo-dev libayatana-appindicator3-dev
- uses: Swatinem/rust-cache@v2
with:
Expand Down
10 changes: 3 additions & 7 deletions core/tauri-runtime-wry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ license = { workspace = true }
edition = { workspace = true }
rust-version = { workspace = true }

[package.metadata.docs.rs]
features = [ "dox" ]

[dependencies]
wry = { version = "0.33", default-features = false, features = [ "tao", "file-drop", "protocol" ] }
wry = { version = "0.34.1", default-features = false, features = [ "tao", "file-drop", "protocol" ] }
tauri-runtime = { version = "1.0.0-alpha.3", path = "../tauri-runtime" }
tauri-utils = { version = "2.0.0-alpha.9", path = "../tauri-utils" }
raw-window-handle = "0.5"
Expand All @@ -30,8 +27,8 @@ webview2-com = "0.25"
features = [ "Win32_Foundation" ]

[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
gtk = { version = "0.16", features = [ "v3_24" ] }
webkit2gtk = { version = "1.1", features = [ "v2_38" ] }
gtk = { version = "0.18", features = [ "v3_24" ] }
webkit2gtk = { version = "=2.0", features = [ "v2_38" ] }
percent-encoding = "2.1"

[target."cfg(any(target_os = \"ios\", target_os = \"macos\"))".dependencies]
Expand All @@ -41,7 +38,6 @@ cocoa = "0.24"
jni = "0.21"

[features]
dox = [ "wry/dox" ]
devtools = [ "wry/devtools", "tauri-runtime/devtools" ]
macos-private-api = [
"wry/fullscreen",
Expand Down
2 changes: 1 addition & 1 deletion core/tauri-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ version = "0.48"
features = [ "Win32_Foundation" ]

[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
gtk = { version = "0.16", features = [ "v3_24" ] }
gtk = { version = "0.18", features = [ "v3_24" ] }

[target."cfg(target_os = \"android\")".dependencies]
jni = "0.21"
Expand Down
11 changes: 4 additions & 7 deletions core/tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ features = [
"icon-png",
"protocol-asset",
"test",
"dox"
]
rustdoc-args = [ "--cfg", "doc_cfg" ]
default-target = "x86_64-unknown-linux-gnu"
Expand Down Expand Up @@ -73,13 +72,12 @@ ico = { version = "0.3.0", optional = true }
http-range = { version = "0.1.4", optional = true }

[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\", target_os = \"windows\", target_os = \"macos\"))".dependencies]
muda = { version = "0.8", default-features = false }
tray-icon = { version = "0.8", default-features = false, optional = true }
muda = { version = "0.10", default-features = false }
tray-icon = { version = "0.10", default-features = false, optional = true }

[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
gtk = { version = "0.16", features = [ "v3_24" ] }
glib = "0.16"
webkit2gtk = { version = "1.1", features = [ "v2_38" ] }
gtk = { version = "0.18", features = [ "v3_24" ] }
webkit2gtk = { version = "=2.0", features = [ "v2_38" ] }

[target."cfg(target_os = \"macos\")".dependencies]
embed_plist = "1.2"
Expand Down Expand Up @@ -145,7 +143,6 @@ native-tls = [ "reqwest/native-tls" ]
native-tls-vendored = [ "reqwest/native-tls-vendored" ]
rustls-tls = [ "reqwest/rustls-tls" ]
devtools = [ "tauri-runtime/devtools", "tauri-runtime-wry/devtools" ]
dox = [ "tauri-runtime-wry/dox" ]
process-relaunch-dangerous-allow-symlink-macos = [ "tauri-utils/process-relaunch-dangerous-allow-symlink-macos" ]
macos-private-api = [
"tauri-runtime/macos-private-api",
Expand Down
1 change: 0 additions & 1 deletion core/tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
//!
//! - **wry** *(enabled by default)*: Enables the [wry](https://github.com/tauri-apps/wry) runtime. Only disable it if you want a custom runtime.
//! - **test**: Enables the [`test`] module exposing unit test helpers.
//! - **dox**: Internal feature to generate Rust documentation without linking on Linux.
//! - **objc-exception**: Wrap each msg_send! in a @try/@catch and panics if an exception is caught, preventing Objective-C from unwinding into Rust.
//! - **linux-ipc-protocol**: Use custom protocol for faster IPC on Linux. Requires webkit2gtk v2.40 or above.
//! - **linux-libxdo**: Enables linking to libxdo which enables Cut, Copy, Paste and SelectAll menu items to work on Linux.
Expand Down
4 changes: 2 additions & 2 deletions core/tauri/src/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
//! }
//!
//! fn main() {
//! let app = create_app(tauri::Builder::default());
//! // let app = create_app(tauri::Builder::default());
//! // app.run(|_handle, _event| {});
//! }
//!
Expand Down Expand Up @@ -190,7 +190,7 @@ pub fn mock_app() -> App<MockRuntime> {
/// }
///
/// fn main() {
/// let app = create_app(tauri::Builder::default());
/// // let app = create_app(tauri::Builder::default());
/// // app.run(|_handle, _event| {});}
/// }
///
Expand Down
6 changes: 3 additions & 3 deletions core/tauri/src/window/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1160,9 +1160,9 @@ impl<R: Runtime> Window<R> {
/// main_window.with_webview(|webview| {
/// #[cfg(target_os = "linux")]
/// {
/// // see https://docs.rs/webkit2gtk/0.18.2/webkit2gtk/struct.WebView.html
/// // and https://docs.rs/webkit2gtk/0.18.2/webkit2gtk/trait.WebViewExt.html
/// use webkit2gtk::traits::WebViewExt;
/// // see https://docs.rs/webkit2gtk/2.0.0/webkit2gtk/struct.WebView.html
/// // and https://docs.rs/webkit2gtk/2.0.0/webkit2gtk/trait.WebViewExt.html
/// use webkit2gtk::WebViewExt;
/// webview.inner().set_zoom_level(4.);
/// }
///
Expand Down
Loading

0 comments on commit 9580df1

Please sign in to comment.