Skip to content

Commit

Permalink
Update gtk to 0.16 (#6155)
Browse files Browse the repository at this point in the history
Co-authored-by: Wu Yu Wei <wusyong9104@gmail.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
  • Loading branch information
3 people authored Jan 29, 2023
1 parent 8835633 commit 7eb9aa7
Show file tree
Hide file tree
Showing 68 changed files with 150 additions and 148 deletions.
2 changes: 1 addition & 1 deletion .changes/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"getPublishedVersion": "node ../../.scripts/covector/package-latest-version.js cargo ${ pkgFile.pkg.package.name } ${ pkgFile.pkg.package.version }",
"prepublish": [
"sudo apt-get update",
"sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev",
"sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev",
"cargo install cargo-audit --features=fix",
{
"command": "cargo generate-lockfile",
Expand Down
8 changes: 8 additions & 0 deletions .changes/gtk16.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"tauri-runtime": minor
"tauri-runtime-wry": minor
"tauri": minor
---

Update gtk to 0.16.

13 changes: 13 additions & 0 deletions .changes/msrv-1.64.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"cli.rs": minor
"tauri-bundler": minor
"tauri": minor
"tauri-build": minor
"tauri-codegen": minor
"tauri-macros": minor
"tauri-utils": minor
"tauri-runtime": minor
"tauri-runtime-wry": minor
---

Bump the MSRV to 1.64.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
# Derived from Tauri contribution and setup guides:
# See: https://github.com/tauri-apps/tauri/blob/dev/.github/CONTRIBUTING.md#development-guide
# See: https://tauri.app/v1/guides/getting-started/prerequisites/#setting-up-linux
ARG TAURI_BUILD_DEPS="build-essential curl libappindicator3-dev libgtk-3-dev librsvg2-dev libssl-dev libwebkit2gtk-4.0-dev wget"
ARG TAURI_BUILD_DEPS="build-essential curl libappindicator3-dev libgtk-3-dev librsvg2-dev libssl-dev libwebkit2gtk-4.1-dev wget"

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y --no-install-recommends $TAURI_BUILD_DEPS
2 changes: 1 addition & 1 deletion .docker/cross/aarch64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \

RUN dpkg --add-architecture arm64
RUN apt-get update
RUN apt-get install --assume-yes --no-install-recommends libssl-dev:arm64 libdbus-1-dev:arm64 libsoup2.4-dev:arm64 libssl-dev:arm64 libgtk-3-dev:arm64 webkit2gtk-4.0-dev:arm64 libappindicator3-1:arm64 librsvg2-dev:arm64 patchelf:arm64
RUN apt-get install --assume-yes --no-install-recommends libssl-dev:arm64 libdbus-1-dev:arm64 libsoup2.4-dev:arm64 libssl-dev:arm64 libgtk-3-dev:arm64 webkit2gtk-4.1-dev:arm64 libappindicator3-1:arm64 librsvg2-dev:arm64 patchelf:arm64
2 changes: 1 addition & 1 deletion .github/workflows/artifacts-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
- uses: Swatinem/rust-cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run: |
python -m pip install --upgrade pip
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev xvfb
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev xvfb
wget https://github.com/sharkdp/hyperfine/releases/download/v1.11.0/hyperfine_1.11.0_amd64.deb
sudo dpkg -i hyperfine_1.11.0_amd64.deb
pip install memory_profiler
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/covector-version-or-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev libfuse2
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev libfuse2
- uses: Swatinem/rust-cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
- name: Test
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-fmt-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
- uses: actions-rs/toolchain@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-cli-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ jobs:
- name: install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
- name: Test bindings
run: yarn test
test-linux-x64-musl-binding:
Expand Down Expand Up @@ -351,7 +351,7 @@ jobs:
set -e
export PATH=/usr/local/cargo/bin/:/usr/local/fnm:$PATH
apt-get update
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install --no-install-recommends -y unzip webkit2gtk-4.0 libayatana-appindicator3-dev
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install --no-install-recommends -y unzip webkit2gtk-4.1 libayatana-appindicator3-dev
bash
curl https://sh.rustup.rs -sSf | bash -s -- -y
curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir "/usr/local/fnm" --skip-shell
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-cli-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
- uses: Swatinem/rust-cache@v2
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,35 +34,35 @@ jobs:
- {
target: x86_64-pc-windows-msvc,
os: windows-latest,
toolchain: '1.61.0',
toolchain: '1.64.0',
cross: false,
command: 'test'
}
- {
target: x86_64-unknown-linux-gnu,
os: ubuntu-latest,
toolchain: '1.59.0',
toolchain: '1.64.0',
cross: false,
command: 'test'
}
- {
target: x86_64-apple-darwin,
os: macos-latest,
toolchain: '1.59.0',
toolchain: '1.64.0',
cross: false,
command: 'test'
}
- {
target: aarch64-apple-ios,
os: macos-latest,
toolchain: '1.59.0',
toolchain: '1.64.0',
cross: false,
command: 'build'
}
- {
target: aarch64-linux-android,
os: ubuntu-latest,
toolchain: '1.59.0',
toolchain: '1.64.0',
cross: true,
command: 'build'
}
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
if: contains(matrix.platform.target, 'unknown-linux')
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
- uses: Swatinem/rust-cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.1
- name: setup node
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/udeps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
- name: Install required packages
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
- uses: actions-rs/cargo@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ For **developing** Tauri apps refer to the [Getting Started guide on tauri.app](
For **running** Tauri apps we support the below configurations (these are automatically added as dependencies for .deb and are bundled for AppImage so that your users don't need to manually install them):

- Debian (Ubuntu 18.04 and above or equivalent) with the following packages installed:
- `libwebkit2gtk-4.0-37`, `libgtk-3-0`, `libayatana-appindicator3-1`<sup>1</sup>
- `libwebkit2gtk-4.1-0`, `libgtk-3-0`, `libayatana-appindicator3-1`<sup>1</sup>
- Arch with the following packages installed:
- `webkit2gtk`, `gtk3`, `libayatana-appindicator`<sup>1</sup>
- Fedora (latest 2 versions) with the following packages installed:
Expand Down
2 changes: 1 addition & 1 deletion core/tauri-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ homepage = "https://tauri.app"
repository = "https://github.com/tauri-apps/tauri/tree/dev/core/tauri-build"
description = "build time code to pair with https://crates.io/crates/tauri"
edition = "2021"
rust-version = "1.59"
rust-version = "1.64"
exclude = [ "CHANGELOG.md", "/target" ]
readme = "README.md"

Expand Down
2 changes: 1 addition & 1 deletion core/tauri-codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ homepage = "https://tauri.app"
repository = "https://github.com/tauri-apps/tauri/tree/dev/core/tauri-codegen"
description = "code generation meant to be consumed inside of `tauri` through `tauri-build` or `tauri-macros`"
edition = "2021"
rust-version = "1.59"
rust-version = "1.64"
exclude = [ "CHANGELOG.md", "/target" ]
readme = "README.md"

Expand Down
2 changes: 1 addition & 1 deletion core/tauri-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ homepage = "https://tauri.app"
repository = "https://github.com/tauri-apps/tauri"
description = "Macros for the tauri crate."
edition = "2021"
rust-version = "1.59"
rust-version = "1.64"
exclude = [ "CHANGELOG.md", "/target" ]
readme = "README.md"

Expand Down
8 changes: 4 additions & 4 deletions core/tauri-runtime-wry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ homepage = "https://tauri.app"
repository = "https://github.com/tauri-apps/tauri"
description = "Wry bindings to the Tauri runtime"
edition = "2021"
rust-version = "1.59"
rust-version = "1.64"
exclude = [ "CHANGELOG.md", "/target" ]
readme = "README.md"

[dependencies]
wry = { git = "https://github.com/tauri-apps/wry", branch = "dev", default-features = false, features = [ "file-drop", "protocol" ] }
wry = { version = "0.25.0", default-features = false, features = [ "file-drop", "protocol" ] }
tauri-runtime = { version = "0.13.0-alpha.0", path = "../tauri-runtime" }
tauri-utils = { version = "2.0.0-alpha.0", path = "../tauri-utils" }
uuid = { version = "1", features = [ "v4" ] }
Expand All @@ -28,8 +28,8 @@ webview2-com = "0.19.1"
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.15", features = [ "v3_20" ] }
webkit2gtk = { version = "0.18.2", features = [ "v2_22" ] }
gtk = { version = "0.16", features = [ "v3_24" ] }
webkit2gtk = { version = "0.19.1", features = [ "v2_38" ] }
percent-encoding = "2.1"

[target."cfg(any(target_os = \"ios\", target_os = \"macos\"))".dependencies]
Expand Down
4 changes: 2 additions & 2 deletions core/tauri-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ homepage = "https://tauri.app"
repository = "https://github.com/tauri-apps/tauri"
description = "Runtime for Tauri applications"
edition = "2021"
rust-version = "1.59"
rust-version = "1.64"
exclude = [ "CHANGELOG.md", "/target" ]
readme = "README.md"

Expand Down Expand Up @@ -41,7 +41,7 @@ webview2-com = "0.19.1"
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.15", features = [ "v3_20" ] }
gtk = { version = "0.16", features = [ "v3_24" ] }

[features]
devtools = [ ]
Expand Down
2 changes: 1 addition & 1 deletion core/tauri-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ homepage = "https://tauri.app"
repository = "https://github.com/tauri-apps/tauri"
description = "Utilities for Tauri"
edition = "2021"
rust-version = "1.59"
rust-version = "1.64"
exclude = [ "CHANGELOG.md", "/target" ]
readme = "README.md"

Expand Down
10 changes: 5 additions & 5 deletions core/tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = [ "Tauri Programme within The Commons Conservancy" ]
categories = [ "gui", "web-programming" ]
description = "Make tiny, secure apps for all desktop platforms with Tauri"
edition = "2021"
rust-version = "1.59"
rust-version = "1.64"
exclude = [ "/test", "/.scripts", "CHANGELOG.md", "/target" ]
homepage = "https://tauri.app"
license = "Apache-2.0 OR MIT"
Expand Down Expand Up @@ -87,13 +87,13 @@ ico = { version = "0.2.0", optional = true }
encoding_rs = "0.8.31"

[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
rfd = { version = "0.10", optional = true }
rfd = { git = "https://github.com/PolyMeilex/rfd", version = "0.10", optional = true }
notify-rust = { version = "4.5", default-features = false, features = [ "d" ], optional = true }

[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
gtk = { version = "0.15", features = [ "v3_20" ] }
glib = "0.15"
webkit2gtk = { version = "0.18.2", features = [ "v2_22" ] }
gtk = { version = "0.16", features = [ "v3_24" ] }
glib = "0.16"
webkit2gtk = { version = "0.19.1", features = [ "v2_38" ] }

[target."cfg(target_os = \"macos\")".dependencies]
embed_plist = "1.2"
Expand Down
2 changes: 1 addition & 1 deletion examples/api/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "api"
version = "0.1.0"
description = "An example Tauri Application showcasing the api"
edition = "2021"
rust-version = "1.59"
rust-version = "1.64"
license = "Apache-2.0 OR MIT"

[lib]
Expand Down
8 changes: 4 additions & 4 deletions examples/commands/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ fn force_async(the_argument: String) -> String {
#[command(async)]
fn force_async_with_result(the_argument: &str) -> Result<&str, MyError> {
(!the_argument.is_empty())
.then(|| the_argument)
.then_some(the_argument)
.ok_or(MyError::FooError)
}