Compare commits

...

13 Commits

Author SHA1 Message Date
github-actions[bot]
d78fa20d86 Apply Version Updates From Current Changes (v1) (#9793)
Co-authored-by: amrbashir <amrbashir@users.noreply.github.com>
2024-05-15 20:09:07 +03:00
Amr Bashir
3b69c1384b Revert "fix(core/shell): speedup Command.execute & fix extra new lines (#9706)" (#9792)
* Revert "fix(core/shell): speedup `Command.execute` & fix extra new lines (#9706)"

This reverts commit 7f885bd5ed.

* change file
2024-05-15 19:28:15 +03:00
Amr Bashir
704260bb3c fix(macos/dialog): avoid setting empty default_path (#9784)
closes #7566

ref: https://github.com/tauri-apps/tauri/issues/4065
ref: https://github.com/tauri-apps/tauri/pull/4028
ref: https://github.com/tauri-apps/tauri/issues/9762
2024-05-15 18:45:11 +03:00
Amr Bashir
36b082a9c8 ci: pull .crate file from workspace target directory (#9732) 2024-05-10 02:32:15 +03:00
github-actions[bot]
f45d35cf06 Apply Version Updates From Current Changes (v1) (#9730)
Co-authored-by: amrbashir <amrbashir@users.noreply.github.com>
2024-05-10 00:13:21 +03:00
Amr Bashir
ef35a793c5 fix(core): fix compilation when shell-execute or shell-sidecar (#9729)
* fix(core): fix compilation when `shell-execute` or `shell-sidecar`

regression from: https://github.com/tauri-apps/tauri/pull/9706

* change file
2024-05-09 23:56:52 +03:00
github-actions[bot]
15c62b5d99 Apply Version Updates From Current Changes (v1) (#9721)
* apply version updates

* fmt

---------

Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-05-09 15:22:45 -03:00
Lucas Fernandes Nogueira
9b90b67ed2 Revert "Apply Version Updates From Current Changes (v1)" (#9724)
This reverts commit 6bb721cd3d.
2024-05-09 14:02:31 -03:00
Angel S. Moreno
f1b0b00159 docs: added example of tauri.allowlist.protocol (#9726) 2024-05-09 19:52:55 +03:00
github-actions[bot]
6bb721cd3d Apply Version Updates From Current Changes (v1) (#9709)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-05-09 12:28:21 -03:00
Amr Bashir
7f885bd5ed fix(core/shell): speedup Command.execute & fix extra new lines (#9706)
* fix(core/shell): speedup `Command.execute` & fix extra new lines

The speed gains comes from running the Command in Rust fully and returning the result in one go instead of using events.

The extra new lines was a regression from https://github.com/tauri-apps/tauri/pull/6519

ref: https://github.com/tauri-apps/tauri/issues/7684#issuecomment-2100897383

* fix unix build

* clippy

* cleanup

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-05-09 18:14:53 +03:00
Lucas Fernandes Nogueira
2eb21378a6 fix(tauri-runtime-wry): window draw span not closing (#9718)
* fix(tauri-runtime-wry): window draw span not closing

* use .retain
2024-05-09 10:09:48 -03:00
Enkhjil Enkhbaatar
ab9ec42c10 fix(windows): nsis failed to resolve resources with $ in their name, closes #9657 (#9659) 2024-05-08 20:32:09 +03:00
29 changed files with 156 additions and 43 deletions

View File

@@ -72,7 +72,7 @@
],
"assets": [
{
"path": "${ pkg.path }/target/package/${ pkg.pkg }-${ pkgFile.version }.crate",
"path": "./target/package/${ pkg.pkg }-${ pkgFile.version }.crate",
"name": "${ pkg.pkg }-${ pkgFile.version }.crate"
}
]

4
Cargo.lock generated
View File

@@ -4021,7 +4021,7 @@ checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f"
[[package]]
name = "tauri"
version = "1.6.3"
version = "1.6.5"
dependencies = [
"anyhow",
"base64 0.21.7",
@@ -4180,7 +4180,7 @@ dependencies = [
[[package]]
name = "tauri-runtime-wry"
version = "0.14.6"
version = "0.14.7"
dependencies = [
"arboard",
"cocoa",

View File

@@ -1,5 +1,11 @@
# Changelog
## \[0.14.7]
### Bug Fixes
- [`2eb21378a`](https://www.github.com/tauri-apps/tauri/commit/2eb21378a65107da0d4a1ab425767e99580966c2)([#9718](https://www.github.com/tauri-apps/tauri/pull/9718)) Fixes redraw tracing span not closing.
## \[0.14.6]
### Dependencies

View File

@@ -1,6 +1,6 @@
[package]
name = "tauri-runtime-wry"
version = "0.14.6"
version = "0.14.7"
authors = [ "Tauri Programme within The Commons Conservancy" ]
categories = [ "gui", "web-programming" ]
license = "Apache-2.0 OR MIT"

View File

@@ -248,14 +248,11 @@ pub struct ActiveTraceSpanStore(Rc<RefCell<Vec<ActiveTracingSpan>>>);
#[cfg(feature = "tracing")]
impl ActiveTraceSpanStore {
pub fn remove_window_draw(&self, window_id: WindowId) {
let mut store = self.0.borrow_mut();
if let Some(index) = store
.iter()
.position(|t| matches!(t, ActiveTracingSpan::WindowDraw { id, span: _ } if id == &window_id))
{
store.remove(index);
}
pub fn remove_window_draw(&self) {
self
.0
.borrow_mut()
.retain(|t| !matches!(t, ActiveTracingSpan::WindowDraw { id: _, span: _ }));
}
}
@@ -2839,8 +2836,8 @@ fn handle_event_loop<T: UserEvent>(
}
#[cfg(feature = "tracing")]
Event::RedrawRequested(id) => {
active_tracing_spans.remove_window_draw(id);
Event::RedrawEventsCleared => {
active_tracing_spans.remove_window_draw();
}
#[cfg(all(desktop, feature = "global-shortcut"))]

View File

@@ -1,5 +1,28 @@
# Changelog
## \[1.6.6]
### Bug Fixes
- [`704260bb3`](https://www.github.com/tauri-apps/tauri/commit/704260bb3c2bc54c149f2fe508bff09535b083ad)([#9784](https://www.github.com/tauri-apps/tauri/pull/9784)) Fix dialog crash on macOS when the `default_path` value is empty.
- [`3b69c1384`](https://www.github.com/tauri-apps/tauri/commit/3b69c1384bd089ad5dcff0c1b12fbfadeb585c6a)([#9792](https://www.github.com/tauri-apps/tauri/pull/9792)) Revert [#9706](https://github.com/tauri-apps/tauri/pull/9706) which broke compatability between `tauri` crate and the JS `@tauri-apps/api` npm package in a patch release where it should've been in a minor release.
## \[1.6.5]
### Bug Fixes
- [`ef35a793c`](https://www.github.com/tauri-apps/tauri/commit/ef35a793c5d923d55e338b51e04e6c280f7c810d)([#9729](https://www.github.com/tauri-apps/tauri/pull/9729)) Fix compilation error when `shell-execute` or `shell-sidecar` features are not active
## \[1.6.4]
### Enhancements
- [`7f885bd5e`](https://www.github.com/tauri-apps/tauri/commit/7f885bd5edf3e179ddf0b674c3ea7a96e26ce39e)([#9706](https://www.github.com/tauri-apps/tauri/pull/9706)) Enhance the speed of The JS `Command.execute` API from `shell` module.
### Dependencies
- Upgraded to `tauri-runtime-wry@0.14.7`
## \[1.6.3]
### Enhancements

View File

@@ -10,7 +10,7 @@ license = "Apache-2.0 OR MIT"
name = "tauri"
readme = "README.md"
repository = "https://github.com/tauri-apps/tauri"
version = "1.6.3"
version = "1.6.6"
[package.metadata.docs.rs]
no-default-features = true
@@ -61,7 +61,7 @@ once_cell = "1"
tauri-runtime = { version = "0.14.3", path = "../tauri-runtime" }
tauri-macros = { version = "1.4.4", path = "../tauri-macros" }
tauri-utils = { version = "1.5.4", features = [ "resources" ], path = "../tauri-utils" }
tauri-runtime-wry = { version = "0.14.6", path = "../tauri-runtime-wry", optional = true }
tauri-runtime-wry = { version = "0.14.7", path = "../tauri-runtime-wry", optional = true }
rand = "0.8"
semver = { version = "1.0", features = [ "serde" ] }
serde_repr = "0.1"

View File

@@ -301,6 +301,10 @@ fn set_default_path(
mut dialog_builder: FileDialogBuilder,
default_path: PathBuf,
) -> FileDialogBuilder {
if default_path.as_os_str().is_empty() {
return dialog_builder;
}
// we need to adjust the separator on Windows: https://github.com/tauri-apps/tauri/issues/8074
let default_path: PathBuf = default_path.components().collect();
if default_path.is_file() || !default_path.exists() {

View File

@@ -1,5 +1,21 @@
# Changelog
## \[1.5.6]
### Bug Fixes
- [`3b69c1384`](https://www.github.com/tauri-apps/tauri/commit/3b69c1384bd089ad5dcff0c1b12fbfadeb585c6a)([#9792](https://www.github.com/tauri-apps/tauri/pull/9792)) Revert [#9706](https://github.com/tauri-apps/tauri/pull/9706) which broke compatability between `tauri` crate and the JS `@tauri-apps/api` npm package in a patch release where it should've been in a minor release.
## \[1.5.5]
### Enhancements
- [`7f885bd5e`](https://www.github.com/tauri-apps/tauri/commit/7f885bd5edf3e179ddf0b674c3ea7a96e26ce39e)([#9706](https://www.github.com/tauri-apps/tauri/pull/9706)) Enhance the speed of The JS `Command.execute` API from `shell` module.
### Bug Fixes
- [`7f885bd5e`](https://www.github.com/tauri-apps/tauri/commit/7f885bd5edf3e179ddf0b674c3ea7a96e26ce39e)([#9706](https://www.github.com/tauri-apps/tauri/pull/9706)) Fix The JS `Command.execute` API from `shell` module including extra new lines.
## \[1.5.4]
### Bug Fixes

View File

@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/api",
"version": "1.5.4",
"version": "1.5.6",
"description": "Tauri API definitions",
"funding": {
"type": "opencollective",

View File

@@ -106,6 +106,19 @@ async function invoke<T>(cmd: string, args: InvokeArgs = {}): Promise<T> {
*
* Additionally, `asset` must be added to [`tauri.allowlist.protocol`](https://tauri.app/v1/api/config/#allowlistconfig.protocol)
* in `tauri.conf.json` and its access scope must be defined on the `assetScope` array on the same `protocol` object.
* For example:
* ```json
* {
* "tauri": {
* "allowlist": {
* "protocol": {
* "asset": true,
* "assetScope": ["$APPDATA/assets/*"]
* }
* }
* }
* }
* ```
*
* @param filePath The file path.
* @param protocol The protocol to use. Defaults to `asset`. You only need to set this when using a custom protocol.

View File

@@ -1,5 +1,11 @@
# Changelog
## \[1.5.4]
### Bug Fixes
- [`ab9ec42c1`](https://www.github.com/tauri-apps/tauri/commit/ab9ec42c102da7594f5d83998aa095d558e86d90)([#9659](https://www.github.com/tauri-apps/tauri/pull/9659)) Fix failing to create NSIS installer when including resources that has `$` in its path.
## \[1.5.3]
### Enhancements

View File

@@ -2,7 +2,7 @@ workspace = { }
[package]
name = "tauri-bundler"
version = "1.5.3"
version = "1.5.4"
authors = [
"George Burton <burtonageo@gmail.com>",
"Tauri Programme within The Commons Conservancy"

View File

@@ -417,6 +417,7 @@ fn build_nsis_app_installer(
}
let mut handlebars = Handlebars::new();
handlebars.register_helper("unescape-dollar-sign", Box::new(unescape_dollar_sign));
handlebars.register_escape_fn(|s| {
let mut output = String::new();
for c in s.chars() {
@@ -504,6 +505,18 @@ fn build_nsis_app_installer(
Ok(vec![nsis_installer_path])
}
fn unescape_dollar_sign(
h: &handlebars::Helper<'_, '_>,
_: &Handlebars<'_>,
_: &handlebars::Context,
_: &mut handlebars::RenderContext<'_, '_>,
out: &mut dyn handlebars::Output,
) -> handlebars::HelperResult {
let content = h.param(0).unwrap().render();
out.write(&content.replace("$$", "$"))?;
Ok(())
}
/// BTreeMap<OriginalPath, (ParentOfTargetPath, TargetPath)>
type ResourcesMap = BTreeMap<PathBuf, (PathBuf, PathBuf)>;
fn generate_resource_data(settings: &Settings) -> crate::Result<ResourcesMap> {

View File

@@ -546,12 +546,12 @@ Section Install
CreateDirectory "$INSTDIR\\{{this}}"
{{/each}}
{{#each resources}}
File /a "/oname={{this.[1]}}" "{{@key}}"
File /a "/oname={{this.[1]}}" "{{unescape-dollar-sign @key}}"
{{/each}}
; Copy external binaries
{{#each binaries}}
File /a "/oname={{this}}" "{{@key}}"
File /a "/oname={{this}}" "{{unescape-dollar-sign @key}}"
{{/each}}
; Create uninstaller

View File

@@ -1,5 +1,11 @@
# Changelog
## \[1.5.14]
### Dependencies
- Upgraded to `tauri-bundler@1.5.4`
## \[1.5.13]
### Dependencies

View File

@@ -3349,7 +3349,7 @@ dependencies = [
[[package]]
name = "tauri-bundler"
version = "1.5.3"
version = "1.5.4"
dependencies = [
"anyhow",
"ar",
@@ -3389,7 +3389,7 @@ dependencies = [
[[package]]
name = "tauri-cli"
version = "1.5.13"
version = "1.5.14"
dependencies = [
"anyhow",
"axum",

View File

@@ -3,7 +3,7 @@ members = [ "node" ]
[package]
name = "tauri-cli"
version = "1.5.13"
version = "1.5.14"
authors = [ "Tauri Programme within The Commons Conservancy" ]
edition = "2021"
rust-version = "1.70"
@@ -42,7 +42,7 @@ path = "src/main.rs"
clap_complete = "4"
clap = { version = "4.4", features = [ "derive" ] }
anyhow = "1.0"
tauri-bundler = { version = "1.5.3", path = "../bundler", default-features = false }
tauri-bundler = { version = "1.5.4", path = "../bundler", default-features = false }
colored = "2.0"
once_cell = "1"
serde = { version = "1.0", features = [ "derive" ] }

View File

@@ -1,8 +1,8 @@
{
"cli.js": {
"version": "1.5.13",
"version": "1.5.14",
"node": ">= 10.0.0"
},
"tauri": "1.6.3",
"tauri": "1.6.6",
"tauri-build": "1.5.2"
}

View File

@@ -1,5 +1,11 @@
# Changelog
## \[1.5.14]
### Dependencies
- Upgraded to `tauri-cli@1.5.14`
## \[1.5.13]
### Dependencies

View File

@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/cli",
"version": "1.5.13",
"version": "1.5.14",
"description": "Command line interface for building Tauri apps",
"funding": {
"type": "opencollective",

View File

@@ -1,5 +1,11 @@
# Changelog
## \[0.1.4]
### New Features
- [`435d7513`](https://www.github.com/tauri-apps/tauri/commit/435d7513e45eab8b512e9a7e695a1adef8a98a46)([#8609](https://www.github.com/tauri-apps/tauri/pull/8609)) Added `webviewOptions` object to the `tauri:options` capability to configure the [Edge webview options](https://learn.microsoft.com/en-us/microsoft-edge/webdriver-chromium/capabilities-edge-options#webviewoptions-object) on Windows.
## \[0.1.3]
### What's Changed

View File

@@ -234,9 +234,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
[[package]]
name = "libc"
version = "0.2.147"
version = "0.2.153"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
[[package]]
name = "memchr"
@@ -255,9 +255,9 @@ dependencies = [
[[package]]
name = "mio"
version = "0.8.8"
version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
dependencies = [
"libc",
"wasi",
@@ -421,7 +421,7 @@ dependencies = [
[[package]]
name = "tauri-driver"
version = "0.1.3"
version = "0.1.4"
dependencies = [
"anyhow",
"futures",

View File

@@ -2,7 +2,7 @@ workspace = { }
[package]
name = "tauri-driver"
version = "0.1.3"
version = "0.1.4"
authors = [ "Tauri Programme within The Commons Conservancy" ]
categories = [ "gui", "web-programming" ]
license = "Apache-2.0 OR MIT"

View File

@@ -9,13 +9,15 @@ native WebDriver server for you behind the scenes. It requires two separate
ports to be used since two distinct [WebDriver Remote Ends] run.
You can configure the ports used with arguments when starting the binary:
* `--port` (default: `4444`)
* `--native-port` (default: `4445`)
- `--port` (default: `4444`)
- `--native-port` (default: `4445`)
Supported platforms:
* **[pre-alpha]** Linux w/ `WebKitWebDriver`
* **[pre-alpha]** Windows w/ [Microsoft Edge Driver]
* **[Todo]** macOS w/ [Appium Mac2 Driver] (probably)
- **[pre-alpha]** Linux w/ `WebKitWebDriver`
- **[pre-alpha]** Windows w/ [Microsoft Edge Driver]
- **[Todo]** macOS w/ [Appium Mac2 Driver] (probably)
_note: the (probably) items haven't been proof-of-concept'd yet, and if it is
not possible to use the listed native webdriver, then a custom implementation

View File

@@ -1,4 +1,4 @@
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT

View File

@@ -1,7 +1,18 @@
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
//! [![](https://github.com/tauri-apps/tauri/raw/dev/.github/splash.png)](https://tauri.app)
//!
//! Cross-platform WebDriver server for Tauri applications.
//!
//! This is a [WebDriver Intermediary Node](https://www.w3.org/TR/webdriver/#dfn-intermediary-nodes) that wraps the native WebDriver server for platforms that [Tauri](https://github.com/tauri-apps/tauri) supports. Your WebDriver client will connect to the running `tauri-driver` server, and `tauri-driver` will handle starting the native WebDriver server for you behind the scenes. It requires two separate ports to be used since two distinct [WebDriver Remote Ends](https://www.w3.org/TR/webdriver/#dfn-remote-ends) run.
#![doc(
html_logo_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png",
html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png"
)]
mod cli;
mod server;
mod webdriver;

View File

@@ -1,4 +1,4 @@
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
@@ -20,10 +20,14 @@ type HttpClient = Client<hyper::client::HttpConnector>;
const TAURI_OPTIONS: &str = "tauri:options";
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
struct TauriOptions {
application: PathBuf,
#[serde(default)]
args: Vec<String>,
#[cfg(target_os = "windows")]
#[serde(default)]
webview_options: Option<Value>,
}
impl TauriOptions {
@@ -44,7 +48,7 @@ impl TauriOptions {
map.insert("browserName".into(), json!("webview2"));
map.insert(
"ms:edgeOptions".into(),
json!({"binary": self.application, "args": self.args}),
json!({"binary": self.application, "args": self.args, "webviewOptions": self.webview_options}),
);
map
}

View File

@@ -1,4 +1,4 @@
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT