Compare commits

...

10 Commits

Author SHA1 Message Date
github-actions[bot]
cab7f76d01 apply version updates (#12826)
Co-authored-by: amrbashir <48618675+amrbashir@users.noreply.github.com>
2025-02-28 14:14:08 +01:00
Amr Bashir
e103e87f15 fix(windows): ensure APIs exist before using it (#12848)
* fix(windows): ensure APIs exist before using it

* fix build on other platforms

* clippy

* use GetSystemMetricsForDpi
2025-02-28 14:46:16 +02:00
Fabian-Lars
bca02967a9 docs: Update wording from #12830 (#12839) 2025-02-28 00:12:19 +02:00
Tony
887db0813f chore(deps): update js dependencies (#12832)
* chore(deps): update js dependencies

* Update lock
2025-02-27 17:15:32 +08:00
Tony
4f26dcf309 fix(deps): os webview not gated in wry feature (#12833) 2025-02-27 16:38:20 +08:00
Simon Laux
4bffc326ea docs: update WebViewBuilder::with_asynchronous_custom_protocol with platform-specific notes (#12830) 2025-02-27 03:10:08 +02:00
renovate[bot]
b859dc43fc chore(deps): update rust crate resvg to 0.45.0 (#12825)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 22:00:52 +01:00
renovate[bot]
9332132239 chore(deps): update dependency eslint-config-prettier to v10.0.2 (#12822)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 20:46:52 +01:00
Timur Amirov
22e9bf74a4 fix(cli/ios): Configure initial view controller for the launch screen on iOS (#12538)
Co-authored-by: Fabian-Lars <github@fabianlars.de>
2025-02-26 20:42:24 +01:00
Fabian-Lars
b495fe0fdc ci: install corepack in docker (#12824)
* ci: install corepack in docker

this should fix the build errors from https://github.com/tauri-apps/tauri/actions/runs/13548556704/job/37866236681
i only added it outside of docker in my last pr

* remove musl
2025-02-26 13:41:32 -03:00
24 changed files with 613 additions and 497 deletions

View File

@@ -48,6 +48,8 @@ jobs:
target: x86_64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: |
npm i -g --force corepack
corepack enable
cd packages/cli
pnpm build --target x86_64-unknown-linux-gnu
strip *.node
@@ -67,6 +69,8 @@ jobs:
target: aarch64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
build: |
npm i -g --force corepack
corepack enable
cd packages/cli
pnpm build --target aarch64-unknown-linux-gnu
aarch64-unknown-linux-gnu-strip *.node

53
Cargo.lock generated
View File

@@ -2511,9 +2511,9 @@ dependencies = [
[[package]]
name = "fontdb"
version = "0.22.0"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3a6f9af55fb97ad673fb7a69533eb2f967648a06fa21f8c9bb2cd6d33975716"
checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905"
dependencies = [
"fontconfig-parser",
"log",
@@ -3631,7 +3631,7 @@ dependencies = [
"color_quant",
"exr",
"gif",
"image-webp 0.2.0",
"image-webp",
"num-traits",
"png",
"qoi",
@@ -3643,16 +3643,6 @@ dependencies = [
"zune-jpeg",
]
[[package]]
name = "image-webp"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f79afb8cbee2ef20f59ccd477a218c12a93943d075b492015ecb1bb81f8ee904"
dependencies = [
"byteorder-lite",
"quick-error 2.0.1",
]
[[package]]
name = "image-webp"
version = "0.2.0"
@@ -6836,12 +6826,12 @@ dependencies = [
[[package]]
name = "resvg"
version = "0.44.0"
version = "0.45.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a325d5e8d1cebddd070b13f44cec8071594ab67d1012797c121f27a669b7958"
checksum = "dd43d1c474e9dadf09a8fdf22d713ba668b499b5117b9b9079500224e26b5b29"
dependencies = [
"gif",
"image-webp 0.1.3",
"image-webp",
"log",
"pico-args",
"rgb",
@@ -7213,9 +7203,9 @@ dependencies = [
[[package]]
name = "rustybuzz"
version = "0.18.0"
version = "0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c85d1ccd519e61834798eb52c4e886e8c2d7d698dd3d6ce0b1b47eb8557f1181"
checksum = "fd3c7c96f8a08ee34eff8857b11b49b07d71d1c3f4e88f8a88d4c9e9f90b1702"
dependencies = [
"bitflags 2.7.0",
"bytemuck",
@@ -8201,9 +8191,9 @@ dependencies = [
[[package]]
name = "svgtypes"
version = "0.15.2"
version = "0.15.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "794de53cc48eaabeed0ab6a3404a65f40b3e38c067e4435883a65d2aa4ca000e"
checksum = "68c7541fff44b35860c1a7a47a7cadf3e4a304c457b58f9870d9706ece028afc"
dependencies = [
"kurbo",
"siphasher 1.0.1",
@@ -8402,7 +8392,7 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]]
name = "tauri"
version = "2.3.0"
version = "2.3.1"
dependencies = [
"anyhow",
"bytes",
@@ -8528,7 +8518,7 @@ dependencies = [
[[package]]
name = "tauri-cli"
version = "2.3.0"
version = "2.3.1"
dependencies = [
"anyhow",
"ar",
@@ -8798,7 +8788,7 @@ dependencies = [
[[package]]
name = "tauri-runtime-wry"
version = "2.4.0"
version = "2.4.1"
dependencies = [
"gtk",
"http 1.2.0",
@@ -8807,6 +8797,7 @@ dependencies = [
"objc2 0.6.0",
"objc2-app-kit",
"objc2-foundation 0.3.0",
"once_cell",
"percent-encoding",
"raw-window-handle",
"softbuffer",
@@ -9456,9 +9447,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
[[package]]
name = "ttf-parser"
version = "0.24.1"
version = "0.25.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5be21190ff5d38e8b4a2d3b6a3ae57f612cc39c96e83cedeaf7abc338a8bac4a"
checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31"
dependencies = [
"core_maths",
]
@@ -9628,15 +9619,15 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5"
[[package]]
name = "unicode-bidi-mirroring"
version = "0.3.0"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64af057ad7466495ca113126be61838d8af947f41d93a949980b2389a118082f"
checksum = "5dfa6e8c60bb66d49db113e0125ee8711b7647b5579dc7f5f19c42357ed039fe"
[[package]]
name = "unicode-ccc"
version = "0.3.0"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "260bc6647b3893a9a90668360803a15f96b85a5257b1c3a0c3daf6ae2496de42"
checksum = "ce61d488bcdc9bc8b5d1772c404828b17fc481c0a582b5581e95fb233aef503e"
[[package]]
name = "unicode-id-start"
@@ -9781,9 +9772,9 @@ dependencies = [
[[package]]
name = "usvg"
version = "0.44.0"
version = "0.45.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7447e703d7223b067607655e625e0dbca80822880248937da65966194c4864e6"
checksum = "2ac8e0e3e4696253dc06167990b3fe9a2668ab66270adf949a464db4088cb354"
dependencies = [
"base64 0.22.1",
"data-url",

View File

@@ -1,5 +1,11 @@
# Changelog
## \[2.3.1]
### Bug Fixes
- [`22e9bf74a`](https://www.github.com/tauri-apps/tauri/commit/22e9bf74a4684c827279a85bb66548e83c1ea5cf) ([#12538](https://www.github.com/tauri-apps/tauri/pull/12538) by [@DeTeam](https://www.github.com/tauri-apps/tauri/../../DeTeam)) Set initialViewController for LaunchScreen (iOS).
## \[2.3.0]
### Enhancements

View File

@@ -1,6 +1,6 @@
[package]
name = "tauri-cli"
version = "2.3.0"
version = "2.3.1"
authors = ["Tauri Programme within The Commons Conservancy"]
edition = "2021"
rust-version = "1.77.2"
@@ -98,7 +98,7 @@ serde-value = "0.7"
itertools = "0.13"
local-ip-address = "0.6"
css-color = "0.2"
resvg = "0.44.0"
resvg = "0.45.0"
dunce = "1"
glob = "0.3"
# 0.39 raised msrv to above 1.78 but 0.37+ can't compile on 1.77.2 either.

View File

@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://schema.tauri.app/config/2.3.0",
"$id": "https://schema.tauri.app/config/2.3.1",
"title": "Config",
"description": "The Tauri configuration object.\n It is read from a file where you can define your frontend assets,\n configure the bundler and define a tray icon.\n\n The configuration file is generated by the\n [`tauri init`](https://v2.tauri.app/reference/cli/#init) command that lives in\n your Tauri application source directory (src-tauri).\n\n Once generated, you may modify it at will to customize your Tauri application.\n\n ## File Formats\n\n By default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\n Tauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively.\n The JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`.\n The TOML file name is `Tauri.toml`.\n\n ## Platform-Specific Configuration\n\n In addition to the default configuration file, Tauri can\n read a platform-specific configuration from `tauri.linux.conf.json`,\n `tauri.windows.conf.json`, `tauri.macos.conf.json`, `tauri.android.conf.json` and `tauri.ios.conf.json`\n (or `Tauri.linux.toml`, `Tauri.windows.toml`, `Tauri.macos.toml`, `Tauri.android.toml` and `Tauri.ios.toml` if the `Tauri.toml` format is used),\n which gets merged with the main configuration object.\n\n ## Configuration Structure\n\n The configuration is composed of the following objects:\n\n - [`app`](#appconfig): The Tauri configuration\n - [`build`](#buildconfig): The build configuration\n - [`bundle`](#bundleconfig): The bundle configurations\n - [`plugins`](#pluginconfig): The plugins configuration\n\n Example tauri.config.json file:\n\n ```json\n {\n \"productName\": \"tauri-app\",\n \"version\": \"0.1.0\",\n \"build\": {\n \"beforeBuildCommand\": \"\",\n \"beforeDevCommand\": \"\",\n \"devUrl\": \"http://localhost:3000\",\n \"frontendDist\": \"../dist\"\n },\n \"app\": {\n \"security\": {\n \"csp\": null\n },\n \"windows\": [\n {\n \"fullscreen\": false,\n \"height\": 600,\n \"resizable\": true,\n \"title\": \"Tauri App\",\n \"width\": 800\n }\n ]\n },\n \"bundle\": {},\n \"plugins\": {}\n }\n ```",
"type": "object",

View File

@@ -1,9 +1,9 @@
{
"cli.js": {
"version": "2.3.0",
"version": "2.3.1",
"node": ">= 10.0.0"
},
"tauri": "2.3.0",
"tauri": "2.3.1",
"tauri-build": "2.0.5",
"tauri-plugin": "2.0.4"
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17150" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17150" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Y6W-OH-hqX">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17122"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>

View File

@@ -1,5 +1,11 @@
# Changelog
## \[2.4.1]
### Bug Fixes
- [`e103e87f1`](https://www.github.com/tauri-apps/tauri/commit/e103e87f155cf7fa51baa0a48a476463216c0d62) ([#12848](https://www.github.com/tauri-apps/tauri/pull/12848) by [@amrbashir](https://www.github.com/tauri-apps/tauri/../../amrbashir)) Fix crash on Windows because of missing functions on older Windows systems, regression in 2.3.0
## \[2.4.0]
### Enhancements

View File

@@ -1,6 +1,6 @@
[package]
name = "tauri-runtime-wry"
version = "2.4.0"
version = "2.4.1"
description = "Wry bindings to the Tauri runtime"
exclude = ["CHANGELOG.md", "/target"]
readme = "README.md"
@@ -35,6 +35,7 @@ log = "0.4.21"
[target."cfg(windows)".dependencies]
webview2-com = "0.36"
softbuffer = { version = "0.4", default-features = false }
once_cell = "1.20"
[target."cfg(windows)".dependencies.windows]
version = "0.60"

View File

@@ -134,6 +134,7 @@ type IpcHandler = dyn Fn(Request<String>) + 'static;
target_os = "openbsd"
))]
mod undecorated_resizing;
mod util;
mod webview;
mod window;

View File

@@ -78,11 +78,12 @@ fn hit_test(
#[cfg(windows)]
mod windows {
use crate::util;
use super::{hit_test, HitTestResult};
use windows::core::*;
use windows::Win32::System::LibraryLoader::*;
use windows::Win32::UI::HiDpi::{GetDpiForWindow, GetSystemMetricsForDpi};
use windows::Win32::UI::WindowsAndMessaging::*;
use windows::Win32::{Foundation::*, UI::Shell::SetWindowSubclass};
use windows::Win32::{Graphics::Gdi::*, UI::Shell::DefSubclassProc};
@@ -302,9 +303,9 @@ mod windows {
let (cx, cy) = (GET_X_LPARAM(lparam) as i32, GET_Y_LPARAM(lparam) as i32);
let dpi = unsafe { GetDpiForWindow(child) };
let border_x = GetSystemMetricsForDpi(SM_CXFRAME, dpi);
let border_y = GetSystemMetricsForDpi(SM_CYFRAME, dpi);
let dpi = unsafe { util::hwnd_dpi(child) };
let border_x = util::get_system_metrics_for_dpi(SM_CXFRAME, dpi);
let border_y = util::get_system_metrics_for_dpi(SM_CYFRAME, dpi);
let res = hit_test(
rect.left,
@@ -348,9 +349,9 @@ mod windows {
return DefWindowProcW(child, msg, wparam, lparam);
}
let padded_border = GetSystemMetrics(SM_CXPADDEDBORDER);
let border_x = GetSystemMetrics(SM_CXFRAME) + padded_border;
let border_y = GetSystemMetrics(SM_CYFRAME) + padded_border;
let dpi = unsafe { util::hwnd_dpi(child) };
let border_x = util::get_system_metrics_for_dpi(SM_CXFRAME, dpi);
let border_y = util::get_system_metrics_for_dpi(SM_CYFRAME, dpi);
hit_test(
rect.left,
@@ -415,9 +416,9 @@ mod windows {
// and so we need create a cut out in the middle for the parent and other child
// windows like the webview can receive mouse events.
let dpi = unsafe { GetDpiForWindow(hwnd) };
let border_x = GetSystemMetricsForDpi(SM_CXFRAME, dpi);
let border_y = GetSystemMetricsForDpi(SM_CYFRAME, dpi);
let dpi = unsafe { util::hwnd_dpi(hwnd) };
let border_x = util::get_system_metrics_for_dpi(SM_CXFRAME, dpi);
let border_y = util::get_system_metrics_for_dpi(SM_CYFRAME, dpi);
let hrgn1 = CreateRectRgn(0, 0, width, height);

View File

@@ -0,0 +1,118 @@
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
#[cfg_attr(not(windows), allow(unused_imports))]
pub use imp::*;
#[cfg(not(windows))]
mod imp {}
#[cfg(windows)]
mod imp {
use std::{iter::once, os::windows::ffi::OsStrExt};
use once_cell::sync::Lazy;
use windows::{
core::{HRESULT, PCSTR, PCWSTR},
Win32::{
Foundation::*,
Graphics::Gdi::*,
System::LibraryLoader::{GetProcAddress, LoadLibraryW},
UI::{HiDpi::*, WindowsAndMessaging::*},
},
};
pub fn encode_wide(string: impl AsRef<std::ffi::OsStr>) -> Vec<u16> {
string.as_ref().encode_wide().chain(once(0)).collect()
}
// Helper function to dynamically load function pointer.
// `library` and `function` must be zero-terminated.
pub(super) fn get_function_impl(library: &str, function: &str) -> FARPROC {
let library = encode_wide(library);
assert_eq!(function.chars().last(), Some('\0'));
// Library names we will use are ASCII so we can use the A version to avoid string conversion.
let module = unsafe { LoadLibraryW(PCWSTR::from_raw(library.as_ptr())) }.unwrap_or_default();
if module.is_invalid() {
return None;
}
unsafe { GetProcAddress(module, PCSTR::from_raw(function.as_ptr())) }
}
macro_rules! get_function {
($lib:expr, $func:ident) => {
$crate::util::get_function_impl($lib, concat!(stringify!($func), '\0'))
.map(|f| unsafe { std::mem::transmute::<_, $func>(f) })
};
}
type GetDpiForWindow = unsafe extern "system" fn(hwnd: HWND) -> u32;
type GetDpiForMonitor = unsafe extern "system" fn(
hmonitor: HMONITOR,
dpi_type: MONITOR_DPI_TYPE,
dpi_x: *mut u32,
dpi_y: *mut u32,
) -> HRESULT;
type GetSystemMetricsForDpi =
unsafe extern "system" fn(nindex: SYSTEM_METRICS_INDEX, dpi: u32) -> i32;
static GET_DPI_FOR_WINDOW: Lazy<Option<GetDpiForWindow>> =
Lazy::new(|| get_function!("user32.dll", GetDpiForWindow));
static GET_DPI_FOR_MONITOR: Lazy<Option<GetDpiForMonitor>> =
Lazy::new(|| get_function!("shcore.dll", GetDpiForMonitor));
static GET_SYSTEM_METRICS_FOR_DPI: Lazy<Option<GetSystemMetricsForDpi>> =
Lazy::new(|| get_function!("user32.dll", GetSystemMetricsForDpi));
#[allow(non_snake_case)]
pub unsafe fn hwnd_dpi(hwnd: HWND) -> u32 {
let hdc = GetDC(Some(hwnd));
if hdc.is_invalid() {
return USER_DEFAULT_SCREEN_DPI;
}
if let Some(GetDpiForWindow) = *GET_DPI_FOR_WINDOW {
// We are on Windows 10 Anniversary Update (1607) or later.
match GetDpiForWindow(hwnd) {
0 => USER_DEFAULT_SCREEN_DPI, // 0 is returned if hwnd is invalid
dpi => dpi,
}
} else if let Some(GetDpiForMonitor) = *GET_DPI_FOR_MONITOR {
// We are on Windows 8.1 or later.
let monitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST);
if monitor.is_invalid() {
return USER_DEFAULT_SCREEN_DPI;
}
let mut dpi_x = 0;
let mut dpi_y = 0;
if GetDpiForMonitor(monitor, MDT_EFFECTIVE_DPI, &mut dpi_x, &mut dpi_y).is_ok() {
dpi_x
} else {
USER_DEFAULT_SCREEN_DPI
}
} else {
// We are on Vista or later.
if IsProcessDPIAware().as_bool() {
// If the process is DPI aware, then scaling must be handled by the application using
// this DPI value.
GetDeviceCaps(Some(hdc), LOGPIXELSX) as u32
} else {
// If the process is DPI unaware, then scaling is performed by the OS; we thus return
// 96 (scale factor 1.0) to prevent the window from being re-scaled by both the
// application and the WM.
USER_DEFAULT_SCREEN_DPI
}
}
}
#[allow(non_snake_case)]
pub unsafe fn get_system_metrics_for_dpi(nindex: SYSTEM_METRICS_INDEX, dpi: u32) -> i32 {
if let Some(GetSystemMetricsForDpi) = *GET_SYSTEM_METRICS_FOR_DPI {
GetSystemMetricsForDpi(nindex, dpi)
} else {
GetSystemMetrics(nindex)
}
}
}

View File

@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://schema.tauri.app/config/2.3.0",
"$id": "https://schema.tauri.app/config/2.3.1",
"title": "Config",
"description": "The Tauri configuration object.\n It is read from a file where you can define your frontend assets,\n configure the bundler and define a tray icon.\n\n The configuration file is generated by the\n [`tauri init`](https://v2.tauri.app/reference/cli/#init) command that lives in\n your Tauri application source directory (src-tauri).\n\n Once generated, you may modify it at will to customize your Tauri application.\n\n ## File Formats\n\n By default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\n Tauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively.\n The JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`.\n The TOML file name is `Tauri.toml`.\n\n ## Platform-Specific Configuration\n\n In addition to the default configuration file, Tauri can\n read a platform-specific configuration from `tauri.linux.conf.json`,\n `tauri.windows.conf.json`, `tauri.macos.conf.json`, `tauri.android.conf.json` and `tauri.ios.conf.json`\n (or `Tauri.linux.toml`, `Tauri.windows.toml`, `Tauri.macos.toml`, `Tauri.android.toml` and `Tauri.ios.toml` if the `Tauri.toml` format is used),\n which gets merged with the main configuration object.\n\n ## Configuration Structure\n\n The configuration is composed of the following objects:\n\n - [`app`](#appconfig): The Tauri configuration\n - [`build`](#buildconfig): The build configuration\n - [`bundle`](#bundleconfig): The bundle configurations\n - [`plugins`](#pluginconfig): The plugins configuration\n\n Example tauri.config.json file:\n\n ```json\n {\n \"productName\": \"tauri-app\",\n \"version\": \"0.1.0\",\n \"build\": {\n \"beforeBuildCommand\": \"\",\n \"beforeDevCommand\": \"\",\n \"devUrl\": \"http://localhost:3000\",\n \"frontendDist\": \"../dist\"\n },\n \"app\": {\n \"security\": {\n \"csp\": null\n },\n \"windows\": [\n {\n \"fullscreen\": false,\n \"height\": 600,\n \"resizable\": true,\n \"title\": \"Tauri App\",\n \"width\": 800\n }\n ]\n },\n \"bundle\": {},\n \"plugins\": {}\n }\n ```",
"type": "object",

View File

@@ -8,6 +8,6 @@
"dev": "wrangler dev"
},
"devDependencies": {
"wrangler": "^3.95.0"
"wrangler": "^3.107.3"
}
}

View File

@@ -1,5 +1,16 @@
# Changelog
## \[2.3.1]
### Bug Fixes
- [`4f26dcf30`](https://www.github.com/tauri-apps/tauri/commit/4f26dcf3090f230d2996626423c8b9d58cc2e8aa) ([#12833](https://www.github.com/tauri-apps/tauri/pull/12833) by [@Legend-Master](https://www.github.com/tauri-apps/tauri/../../Legend-Master)) Fix OS webviews (`webview2` and `webkit2gtk`) are always compiled with tauri even without `wry` feature
- [`e103e87f1`](https://www.github.com/tauri-apps/tauri/commit/e103e87f155cf7fa51baa0a48a476463216c0d62) ([#12848](https://www.github.com/tauri-apps/tauri/pull/12848) by [@amrbashir](https://www.github.com/tauri-apps/tauri/../../amrbashir)) Fix crash on Windows because of missing functions on older Windows systems, regression in 2.3.0
### Dependencies
- Upgraded to `tauri-runtime-wry@2.4.1`
## \[2.3.0]
### New Features

View File

@@ -1,6 +1,6 @@
[package]
name = "tauri"
version = "2.3.0"
version = "2.3.1"
description = "Make tiny, secure apps for all desktop platforms with Tauri"
exclude = ["/test", "/.scripts", "CHANGELOG.md", "/target"]
readme = "README.md"
@@ -62,7 +62,7 @@ tauri-macros = { version = "2.0.5", path = "../tauri-macros" }
tauri-utils = { version = "2.2.0", features = [
"resources",
], path = "../tauri-utils" }
tauri-runtime-wry = { version = "2.4.0", path = "../tauri-runtime-wry", optional = true }
tauri-runtime-wry = { version = "2.4.1", path = "../tauri-runtime-wry", optional = true }
getrandom = "0.2"
serde_repr = "0.1"
http = "1"
@@ -95,7 +95,7 @@ tray-icon = { version = "0.20", default-features = false, features = [
# linux
[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))'.dependencies]
gtk = { version = "0.18", features = ["v3_24"] }
webkit2gtk = { version = "=2.0.1", features = ["v2_40"] }
webkit2gtk = { version = "=2.0.1", features = ["v2_40"], optional = true }
# macOS
[target.'cfg(target_os = "macos")'.dependencies]
@@ -120,9 +120,13 @@ window-vibrancy = "0.6"
# windows
[target."cfg(windows)".dependencies]
webview2-com = "0.36"
webview2-com = { version = "0.36", optional = true }
window-vibrancy = "0.6"
windows = { version = "0.60", features = ["Win32_Foundation"] }
windows = { version = "0.60", features = [
"Win32_Foundation",
"Win32_UI",
"Win32_UI_WindowsAndMessaging",
] }
# mobile
[target.'cfg(any(target_os = "android", all(target_vendor = "apple", not(target_os = "macos"))))'.dependencies]
@@ -180,7 +184,7 @@ tray-icon = ["dep:tray-icon"]
tracing = ["dep:tracing", "tauri-macros/tracing", "tauri-runtime-wry/tracing"]
test = []
compression = ["tauri-macros/compression", "tauri-utils/compression"]
wry = ["tauri-runtime-wry"]
wry = ["webview2-com", "webkit2gtk", "tauri-runtime-wry"]
# TODO: Remove in v3 - wry does not have this feature anymore
objc-exception = []
linux-libxdo = ["tray-icon/libxdo", "muda/libxdo"]

View File

@@ -1727,6 +1727,17 @@ tauri::Builder::default()
/// }
/// });
/// ```
///
/// # Warning
///
/// Pages loaded from a custom protocol will have a different Origin on different platforms.
/// Servers which enforce CORS will need to add the exact same Origin header (or `*`) in `Access-Control-Allow-Origin`
/// if you wish to send requests with native `fetch` and `XmlHttpRequest` APIs. Here are the
/// different Origin headers across platforms:
///
/// - macOS, iOS and Linux: `<scheme_name>://localhost/<path>` (so it will be `my-scheme://localhost/path/to/page).
/// - Windows and Android: `http://<scheme_name>.localhost/<path>` by default (so it will be `http://my-scheme.localhost/path/to/page`).
/// To use `https` instead of `http`, use [`super::webview::WebviewBuilder::use_https_scheme`].
#[must_use]
pub fn register_uri_scheme_protocol<
N: Into<String>,
@@ -1784,6 +1795,17 @@ tauri::Builder::default()
/// });
/// });
/// ```
///
/// # Warning
///
/// Pages loaded from a custom protocol will have a different Origin on different platforms.
/// Servers which enforce CORS will need to add the exact same Origin header (or `*`) in `Access-Control-Allow-Origin`
/// if you wish to send requests with native `fetch` and `XmlHttpRequest` APIs. Here are the
/// different Origin headers across platforms:
///
/// - macOS, iOS and Linux: `<scheme_name>://localhost/<path>` (so it will be `my-scheme://localhost/path/to/page).
/// - Windows and Android: `http://<scheme_name>.localhost/<path>` by default (so it will be `http://my-scheme.localhost/path/to/page`).
/// To use `https` instead of `http`, use [`super::webview::WebviewBuilder::use_https_scheme`].
#[must_use]
pub fn register_asynchronous_uri_scheme_protocol<
N: Into<String>,

View File

@@ -554,6 +554,17 @@ impl<R: Runtime, C: DeserializeOwned> Builder<R, C> {
/// .build()
/// }
/// ```
///
/// # Warning
///
/// Pages loaded from a custom protocol will have a different Origin on different platforms.
/// Servers which enforce CORS will need to add the exact same Origin header (or `*`) in `Access-Control-Allow-Origin`
/// if you wish to send requests with native `fetch` and `XmlHttpRequest` APIs. Here are the
/// different Origin headers across platforms:
///
/// - macOS, iOS and Linux: `<scheme_name>://localhost/<path>` (so it will be `my-scheme://localhost/path/to/page).
/// - Windows and Android: `http://<scheme_name>.localhost/<path>` by default (so it will be `http://my-scheme.localhost/path/to/page`).
/// To use `https` instead of `http`, use [`super::webview::WebviewBuilder::use_https_scheme`].
#[must_use]
pub fn register_uri_scheme_protocol<
N: Into<String>,
@@ -617,6 +628,17 @@ impl<R: Runtime, C: DeserializeOwned> Builder<R, C> {
/// .build()
/// }
/// ```
///
/// # Warning
///
/// Pages loaded from a custom protocol will have a different Origin on different platforms.
/// Servers which enforce CORS will need to add the exact same Origin header (or `*`) in `Access-Control-Allow-Origin`
/// if you wish to send requests with native `fetch` and `XmlHttpRequest` APIs. Here are the
/// different Origin headers across platforms:
///
/// - macOS, iOS and Linux: `<scheme_name>://localhost/<path>` (so it will be `my-scheme://localhost/path/to/page).
/// - Windows and Android: `http://<scheme_name>.localhost/<path>` by default (so it will be `http://my-scheme.localhost/path/to/page`).
/// To use `https` instead of `http`, use [`super::webview::WebviewBuilder::use_https_scheme`].
#[must_use]
pub fn register_asynchronous_uri_scheme_protocol<
N: Into<String>,

View File

@@ -13,12 +13,12 @@
"@tauri-apps/api": "../../packages/api/dist"
},
"devDependencies": {
"@iconify-json/codicon": "^1.2.11",
"@iconify-json/codicon": "^1.2.12",
"@iconify-json/ph": "^1.2.2",
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"@unocss/extractor-svelte": "^66.0.0",
"svelte": "^5.20.2",
"svelte": "^5.20.4",
"unocss": "^66.0.0",
"vite": "^6.1.1"
"vite": "^6.2.0"
}
}

View File

@@ -23,14 +23,18 @@
"example:api:dev": "pnpm run --filter \"api\" tauri dev"
},
"devDependencies": {
"prettier": "^3.5.1"
"prettier": "^3.5.2"
},
"packageManager": "pnpm@9.9.0",
"packageManager": "pnpm@10.5.2",
"pnpm": {
"overrides": {
"cross-spawn@>=7.0.0 <7.0.5": ">=7.0.5",
"cookie@<0.7.0": ">=0.7.0",
"esbuild@<0.25.0": ">=0.25.0"
}
},
"onlyBuiltDependencies": [
"esbuild",
"workerd"
]
}
}

View File

@@ -44,18 +44,18 @@
"eslint:fix": "eslint src/**/*.ts --fix"
},
"devDependencies": {
"@eslint/js": "^9.4.0",
"@eslint/js": "^9.21.0",
"@rollup/plugin-terser": "0.4.4",
"@rollup/plugin-typescript": "12.1.2",
"@types/eslint": "^9.0.0",
"@types/node": "^22.10.1",
"eslint": "^9.4.0",
"eslint-config-prettier": "10.0.1",
"@types/eslint": "^9.6.1",
"@types/node": "^22.13.5",
"eslint": "^9.21.0",
"eslint-config-prettier": "10.0.2",
"eslint-plugin-security": "3.0.1",
"fast-glob": "3.3.3",
"globals": "^16.0.0",
"rollup": "4.34.8",
"tslib": "^2.6.3",
"typescript-eslint": "^8.1.0"
"tslib": "^2.8.1",
"typescript-eslint": "^8.25.0"
}
}

View File

@@ -1,5 +1,11 @@
# Changelog
## \[2.3.1]
### Dependencies
- Upgraded to `tauri-cli@2.3.1`
## \[2.3.0]
### Enhancements

View File

@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/cli",
"version": "2.3.0",
"version": "2.3.1",
"description": "Command line interface for building Tauri apps",
"funding": {
"type": "opencollective",
@@ -39,9 +39,9 @@
},
"devDependencies": {
"@napi-rs/cli": "2.18.4",
"@types/node": "^22.10.1",
"@types/node": "^22.13.5",
"cross-env": "7.0.3",
"vitest": "^3.0.5"
"vitest": "^3.0.7"
},
"engines": {
"node": ">= 10"

769
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff