Skip to content

Commit

Permalink
Merge branch 'dev' into implement-new-window-requested-event
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir authored Jun 19, 2022
2 parents ecc4114 + 0cb6961 commit aaa1b13
Show file tree
Hide file tree
Showing 21 changed files with 353 additions and 635 deletions.
5 changes: 5 additions & 0 deletions .changes/reexport-url.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wry": patch
---

Re-export `url::Url`.
5 changes: 0 additions & 5 deletions .changes/webview2-mini-menu.md

This file was deleted.

59 changes: 59 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,64 @@
# Changelog

## \[0.18.3]

- Update tao to 0.11
- [f4b42fb](https://github.com/tauri-apps/wry/commit/f4b42fb412fa557188f20b72ef6c4314d1d6bb91) Update tao to v0.12 ([#609](https://github.com/tauri-apps/wry/pull/609)) on 2022-06-15

## \[0.18.2]

- Fix NSString can not be released.
- [95ca52f](https://github.com/tauri-apps/wry/commit/95ca52f5d8ca86b64f8587a0f96cf0fb7dc22125) fix: NSString isn't released ([#604](https://github.com/tauri-apps/wry/pull/604)) on 2022-06-07

## \[0.18.1]

- Remove unused tray from doc features.
- [5eecb00](https://github.com/tauri-apps/wry/commit/5eecb0074397efa40351b3caa8fd4a6d972c4c85) Remove unused tray from doc features ([#602](https://github.com/tauri-apps/wry/pull/602)) on 2022-05-31

## \[0.18.0]

- Remove trivial tray features.
- [a3fea48](https://github.com/tauri-apps/wry/commit/a3fea48d2d78ebe4fa3f08b40d2c3c8c8135bb12) Remove trivial tray features ([#599](https://github.com/tauri-apps/wry/pull/599)) on 2022-05-31

## \[0.17.0]

- Add option to enable/disable zoom shortcuts for WebView2, disabled by default.
- [494a110](https://github.com/tauri-apps/wry/commit/494a11057f9ddd2bf4bcecdc96b43ed95c5bd08e) WebView2: Enable/disable platform default zooming shortcuts, closes [#569](https://github.com/tauri-apps/wry/pull/569) ([#574](https://github.com/tauri-apps/wry/pull/574)) on 2022-05-15
- Prevent memory leak on macOS.
- [16d1924](https://github.com/tauri-apps/wry/commit/16d192450ed639f94cf8b7137fa5fea1a319f8b5) fix: prevent memory leak on macOS, closes [#536](https://github.com/tauri-apps/wry/pull/536) ([#587](https://github.com/tauri-apps/wry/pull/587)) on 2022-05-20
- Update the `windows` crate to the latest 0.37.0 release and `webview2-com` to 0.16.0 to match.

The `#[implement]` macro in `windows-implement` and the `implement` feature in `windows` depend on some `const` generic features which stabilized in `rustc` 1.61. The MSRV on Windows targets is effectively 1.61, but other targets do not require these features.

The `webview2-com` crate specifies `rust-version = "1.61"`, so `wry` will inherit that MSRV and developers on Windows should get a clear error message telling them to update their toolchain when building `wry` or anything that depends on `wry`. Developers targeting other platforms should be able to continue using whatever toolchain they were using before.

- [9d9d9d8](https://github.com/tauri-apps/wry/commit/9d9d9d8f3d37a283bbb707d39c3aac090325a63e) Update windows-rs to 0.37.0 and webview2-com to 0.16.0 to match ([#592](https://github.com/tauri-apps/wry/pull/592)) on 2022-05-23

## \[0.16.2]

- Fixed build on macos.
- [17ab12d](https://github.com/tauri-apps/wry/commit/17ab12ded27949474f687640faebb5cc376327c5) fix: fix build on macos, closes [#580](https://github.com/tauri-apps/wry/pull/580) ([#581](https://github.com/tauri-apps/wry/pull/581)) on 2022-05-10

## \[0.16.1]

- Fixes a crash on macOS below Big Sur due to `titlebarSeparatorStyle` (11+ API) usage.
- [eb2dddb](https://github.com/tauri-apps/wry/commit/eb2dddb611f7fadf35bf7d7c32cb6d054da9fe9e) fix(macos): only use APIs when supported on 2022-05-08
- Only run `WebView::print` on macOS on v11+. This prevents a crash on older versions.
- [eb2dddb](https://github.com/tauri-apps/wry/commit/eb2dddb611f7fadf35bf7d7c32cb6d054da9fe9e) fix(macos): only use APIs when supported on 2022-05-08

## \[0.16.0]

- Fixes a typo in the `WebviewExtMacOS` conditional compilation.
- [10d7f03](https://github.com/tauri-apps/wry/commit/10d7f03f403e9c373fe80897308393e0bb67a06d) fix(macos): typo in the WebviewExtMacOS conditional compilation ([#568](https://github.com/tauri-apps/wry/pull/568)) on 2022-05-02
- Fixes a crash when the custom protocol response is empty on macOS.
- [67809f4](https://github.com/tauri-apps/wry/commit/67809f4d8abe1a042b2cdb616b03f6a2c50652b8) fix(macos): crash when custom protocol response is empty ([#567](https://github.com/tauri-apps/wry/pull/567)) on 2022-05-01
- Add `WebView::zoom` method.
- [34b6cbc](https://github.com/tauri-apps/wry/commit/34b6cbca76811966cedf8050ae0d0fa18c84aa34) feat: add feature to zoom webview contents, closes [#388](https://github.com/tauri-apps/wry/pull/388) ([#564](https://github.com/tauri-apps/wry/pull/564)) on 2022-05-02
- Set the titlebar separator style in macOS to `none`.
- [9776fc4](https://github.com/tauri-apps/wry/commit/9776fc466b5f3a6ef47956ec5c9cdd9c5164046a) fix(macos): set titlebar style to `none` ([#566](https://github.com/tauri-apps/wry/pull/566)) on 2022-05-01
- Disable webview2 mini menu
- [ed0b223](https://github.com/tauri-apps/wry/commit/ed0b2230c285991b7a4588c8045111f04a67a16f) fix: disable WebView2 mini menu ("OOUI"), closes [#535](https://github.com/tauri-apps/wry/pull/535) ([#559](https://github.com/tauri-apps/wry/pull/559)) on 2022-04-29

## \[0.15.1]

- Update how android handles url
Expand Down
32 changes: 13 additions & 19 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ workspace = { }

[package]
name = "wry"
version = "0.15.1"
version = "0.18.3"
authors = [ "Tauri Programme within The Commons Conservancy" ]
edition = "2021"
license = "Apache-2.0 OR MIT"
Expand All @@ -14,28 +14,20 @@ categories = [ "gui" ]

[package.metadata.docs.rs]
default-features = false
features = [ "dox", "file-drop", "protocol", "tray", "ayatana-tray" ]
features = [ "dox", "file-drop", "protocol", "tray" ]
targets = [
"x86_64-unknown-linux-gnu",
"x86_64-pc-windows-msvc",
"x86_64-apple-darwin"
]

[features]
default = [
"file-drop",
"objc-exception",
"protocol",
"tray",
"ayatana-tray"
]
default = [ "file-drop", "objc-exception", "protocol" ]
objc-exception = [ "objc/exception" ]
file-drop = [ ]
protocol = [ ]
dox = [ "tao/dox" ]
tray = [ "tao/tray" ]
ayatana-tray = [ "tao/ayatana-tray" ]
gtk-tray = [ "tao/gtk-tray" ]
devtools = [ ]
transparent = [ ]
fullscreen = [ ]
Expand All @@ -48,36 +40,38 @@ serde = { version = "1.0", features = [ "derive" ] }
serde_json = "1.0"
thiserror = "1.0"
url = "2.2"
tao = { version = "0.8.2", default-features = false, features = [ "serde" ] }
http = "0.2.6"
tao = { version = "0.11", default-features = false, features = [ "serde" ] }
http = "0.2.7"

[dev-dependencies]
anyhow = "1.0.57"
tempfile = "3.3.0"
http-range = "0.1.5"

[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
webkit2gtk = { version = "0.17", features = [ "v2_22" ] }
webkit2gtk-sys = "0.17"
webkit2gtk = { version = "0.18", features = [ "v2_22" ] }
webkit2gtk-sys = "0.18"
gio = "0.15"
glib = "0.15"
gtk = "0.15"
gdk = "0.15"

[target."cfg(target_os = \"windows\")".dependencies]
webview2-com = "0.13.0"
windows_macros = "0.30.0"
webview2-com = "0.16.0"
windows-implement = "0.37.0"

[target."cfg(target_os = \"windows\")".dependencies.windows]
version = "0.30.0"
version = "0.37.0"
features = [
"alloc",
"implement",
"Win32_Foundation",
"Win32_Graphics_Gdi",
"Win32_System_Com",
"Win32_System_Com_StructuredStorage",
"Win32_System_SystemInformation",
"Win32_System_LibraryLoader",
"Win32_System_Ole",
"Win32_System_SystemInformation",
"Win32_System_SystemServices",
"Win32_UI_Shell",
"Win32_UI_WindowsAndMessaging"
Expand Down
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fn main() -> wry::Result<()> {
}
```

There are also more samples under `examples`, you can enter commands like following to try them:
There are also more samples under `examples`, you can enter commands like the following to try them:

```
cargo run --example multi_window
Expand All @@ -66,32 +66,36 @@ For more information, please read the documentation below.

## Platform-specific notes

All platforms uses [tao](https://github.com/tauri-apps/tao) to build the window, and wry re-export it as application module. Here are the underlying web engine each platform uses, and some dependencies you might need to install.
All platforms use [tao](https://github.com/tauri-apps/tao) to build the window, and wry re-exports it as an application module. Here is the underlying web engine each platform uses, and some dependencies you might need to install.

### Linux

Tao uses [gtk-rs](https://gtk-rs.org/) and its related libraries for window creation and wry also needs [WebKitGTK](https://webkitgtk.org/) for WebView. So please make sure following packages are installed:
Tao uses [gtk-rs](https://gtk-rs.org/) and its related libraries for window creation and wry also needs [WebKitGTK](https://webkitgtk.org/) for WebView. So please make sure the following packages are installed:

#### Arch Linux / Manjaro:

```bash
sudo pacman -S webkit2gtk
sudo pacman -S libappindicator-gtk3 # not required
sudo pacman -S libappindicator-gtk3 # For tray feature
```

The `libayatana-indicator` package can be installed from the Arch User Repository (AUR).

#### Debian / Ubuntu:

```bash
sudo apt install libwebkit2gtk-4.0-dev libayatana-appindicator3-dev
sudo apt install libappindicator3-dev # not required
sudo apt install libwebkit2gtk-4.0-dev
# For tray feature, choose one of following package
sudo apt install libayatana-appindicator3-dev
sudo apt install libappindicator3-dev
```

#### Fedora

```bash
sudo dnf install gtk3-devel webkit2gtk3-devel libappindicator-gtk3-devel
sudo dnf install gtk3-devel webkit2gtk3-devel
# For tray feature
sudo dnf install libappindicator-gtk3-devel
```

Fedora does not have the Ayatana package yet, so you need to use the GTK one, see the [feature flags documentation](https://docs.rs/wry/latest/wry/#feature-flags).
Expand Down
2 changes: 1 addition & 1 deletion bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repository = "https://github.com/tauri-apps/wry"

[dependencies]
anyhow = "1.0.57"
time = "0.3"
time = { version = "0.3", features = ["formatting"] }
tempfile = "3.3.0"
serde_json = "1.0"
serde = { version = "1.0", features = [ "derive" ] }
Expand Down
5 changes: 4 additions & 1 deletion bench/src/run_benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,11 @@ fn main() -> Result<()> {
let target_dir = utils::target_dir();
env::set_current_dir(&utils::bench_root_path())?;

let format = time::format_description::parse("[year]-[month]-[day]T[hour]:[minute]:[second]Z").unwrap();
let now = time::OffsetDateTime::now_utc();

let mut new_data = utils::BenchResult {
created_at: format!("{}", time::OffsetDateTime::now_utc()),
created_at: format!("{}", now.format(&format).unwrap()),
sha1: utils::run_collect(&["git", "rev-parse", "HEAD"])
.0
.trim()
Expand Down
2 changes: 0 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ Run the `cargo run --example <file_name>` to see how each example works.
- `menu_bar`: uses a custom menu for the application in macOS and the Window and Linux/Windows.
- `multi_window`: create the window dynamically even after the application is running.
- `stream_range`: read the incoming header from the custom protocol and return part of the data. [RFC7233](https://httpwg.org/specs/rfc7233.html#header.range)
- `system_tray_no_menu`: open window on tray icon left click.
- `system_tray`: sample tray application with different behaviours.
- `transparent`: transparent example that also show how to create a valid data URI.
Binary file removed examples/icon.ico
Binary file not shown.
Binary file removed examples/icon.png
Binary file not shown.
Binary file removed examples/icon_blue.ico
Binary file not shown.
Binary file removed examples/icon_dark.png
Binary file not shown.
Loading

0 comments on commit aaa1b13

Please sign in to comment.