From e5e82a3a76fb4a50b5a7965e7e054353f9a02f86 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Wed, 28 Dec 2022 18:46:45 -0300 Subject: [PATCH 01/11] feat: allow specifying a resource map, closes #5844 --- core/tauri-build/src/lib.rs | 28 +++-- core/tauri-config-schema/schema.json | 34 ++++-- core/tauri-utils/src/config.rs | 34 +++++- core/tauri-utils/src/resources.rs | 145 ++++++++++++++++++++---- examples/resources/src-tauri/Cargo.lock | 49 +++++--- examples/resources/src-tauri/Cargo.toml | 2 +- tooling/bundler/src/bundle/settings.rs | 25 ++-- tooling/cli/schema.json | 34 ++++-- tooling/cli/src/interface/rust.rs | 18 +-- 9 files changed, 288 insertions(+), 81 deletions(-) diff --git a/core/tauri-build/src/lib.rs b/core/tauri-build/src/lib.rs index b93616d6d6e6..5355c3f1bd47 100644 --- a/core/tauri-build/src/lib.rs +++ b/core/tauri-build/src/lib.rs @@ -9,8 +9,8 @@ use cargo_toml::{Dependency, Manifest}; use heck::AsShoutySnakeCase; use tauri_utils::{ - config::Config, - resources::{external_binaries, resource_relpath, ResourcePaths}, + config::{BundleResources, Config}, + resources::{external_binaries, ResourcePaths}, }; use std::path::{Path, PathBuf}; @@ -71,11 +71,10 @@ fn copy_binaries( /// Copies resources to a path. fn copy_resources(resources: ResourcePaths<'_>, path: &Path) -> Result<()> { - for src in resources { - let src = src?; - println!("cargo:rerun-if-changed={}", src.display()); - let dest = path.join(resource_relpath(&src)); - copy_file(&src, dest)?; + for resource in resources.into_iter() { + let resource = resource?; + println!("cargo:rerun-if-changed={}", resource.path().display()); + copy_file(resource.path(), path.join(resource.target()))?; } Ok(()) } @@ -363,15 +362,24 @@ pub fn try_build(attributes: Attributes) -> Result<()> { } #[allow(unused_mut, clippy::redundant_clone)] - let mut resources = config.tauri.bundle.resources.clone().unwrap_or_default(); - if target_triple.contains("windows") { + let mut resources = config + .tauri + .bundle + .resources + .clone() + .unwrap_or_else(|| BundleResources::List(Vec::new())); if let Some(fixed_webview2_runtime_path) = &config.tauri.bundle.windows.webview_fixed_runtime_path { resources.push(fixed_webview2_runtime_path.display().to_string()); } } - copy_resources(ResourcePaths::new(resources.as_slice(), true), target_dir)?; + match resources { + BundleResources::List(res) => { + copy_resources(ResourcePaths::new(res.as_slice(), true), target_dir)? + } + BundleResources::Map(map) => copy_resources(ResourcePaths::from_map(&map, true), target_dir)?, + } if target_triple.contains("darwin") { if let Some(version) = &config.tauri.bundle.macos.minimum_system_version { diff --git a/core/tauri-config-schema/schema.json b/core/tauri-config-schema/schema.json index b8bd3bb0f0fc..68f5461b0b3b 100644 --- a/core/tauri-config-schema/schema.json +++ b/core/tauri-config-schema/schema.json @@ -1053,13 +1053,14 @@ }, "resources": { "description": "App resources to bundle. Each resource is a path to a file or directory. Glob patterns are supported.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } + "anyOf": [ + { + "$ref": "#/definitions/BundleResources" + }, + { + "type": "null" + } + ] }, "copyright": { "description": "A copyright string associated with your application.", @@ -1237,6 +1238,25 @@ } ] }, + "BundleResources": { + "description": "Definition for bundle resources. Can be either a list of paths to include or a map of target to source paths.", + "anyOf": [ + { + "description": "A list of paths to include.", + "type": "array", + "items": { + "type": "string" + } + }, + { + "description": "A map of target to source paths.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + ] + }, "AppImageConfig": { "description": "Configuration for AppImage bundles.\n\nSee more: https://tauri.app/v1/api/config#appimageconfig", "type": "object", diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index 864a06025733..d828e5565546 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -34,7 +34,7 @@ use std::{ /// Items to help with parsing content into a [`Config`]. pub mod parse; -use crate::TitleBarStyle; +use crate::{resources::resource_relpath, TitleBarStyle}; pub use self::parse::parse; @@ -620,6 +620,36 @@ impl Default for WindowsConfig { } } +/// Definition for bundle resources. +/// Can be either a list of paths to include or a map of target to source paths. +#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)] +#[cfg_attr(feature = "schema", derive(JsonSchema))] +#[serde(rename_all = "camelCase", deny_unknown_fields, untagged)] +pub enum BundleResources { + /// A list of paths to include. + List(Vec), + /// A map of target to source paths. + Map(HashMap), +} + +impl BundleResources { + /// Adds a path to the resource collection. + pub fn push(&mut self, path: impl Into) { + match self { + Self::List(l) => l.push(path.into()), + Self::Map(l) => { + let path = path.into(); + l.insert( + resource_relpath(&PathBuf::from(&path)) + .to_string_lossy() + .to_string(), + path, + ); + } + } + } +} + /// Configuration for tauri-bundler. /// /// See more: https://tauri.app/v1/api/config#bundleconfig @@ -649,7 +679,7 @@ pub struct BundleConfig { /// App resources to bundle. /// Each resource is a path to a file or directory. /// Glob patterns are supported. - pub resources: Option>, + pub resources: Option, /// A copyright string associated with your application. pub copyright: Option, /// The application kind. diff --git a/core/tauri-utils/src/resources.rs b/core/tauri-utils/src/resources.rs index cad7ae0dbb8b..ba57ebbf9040 100644 --- a/core/tauri-utils/src/resources.rs +++ b/core/tauri-utils/src/resources.rs @@ -2,7 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use std::path::{Component, Path, PathBuf}; +use std::{ + collections::HashMap, + path::{Component, Path, PathBuf}, +}; /// Given a path (absolute or relative) to a resource file, returns the /// relative path from the bundle resources directory where that resource @@ -39,10 +42,58 @@ pub fn external_binaries(external_binaries: &[String], target_triple: &str) -> V paths } +enum PatternIter<'a> { + Slice(std::slice::Iter<'a, String>), + Map(std::collections::hash_map::Iter<'a, String, String>), +} + /// A helper to iterate through resources. pub struct ResourcePaths<'a> { + iter: ResourcePathsIter<'a>, +} + +impl<'a> ResourcePaths<'a> { + /// Creates a new ResourcePaths from a slice of patterns to iterate + pub fn new(patterns: &'a [String], allow_walk: bool) -> ResourcePaths<'a> { + ResourcePaths { + iter: ResourcePathsIter { + pattern_iter: PatternIter::Slice(patterns.iter()), + glob_iter: None, + walk_iter: None, + allow_walk, + current_pattern: None, + current_pattern_is_valid: false, + current_dest: None, + }, + } + } + + /// Creates a new ResourcePaths from a slice of patterns to iterate + pub fn from_map(patterns: &'a HashMap, allow_walk: bool) -> ResourcePaths<'a> { + ResourcePaths { + iter: ResourcePathsIter { + pattern_iter: PatternIter::Map(patterns.iter()), + glob_iter: None, + walk_iter: None, + allow_walk, + current_pattern: None, + current_pattern_is_valid: false, + current_dest: None, + }, + } + } + + /// Returns the resource iterator that yields the source and target paths. + /// Needed when using [`Self::from_map`]. + pub fn into_iter(self) -> ResourcePathsIter<'a> { + self.iter + } +} + +/// Iterator of a [`ResourcePaths`]. +pub struct ResourcePathsIter<'a> { /// the patterns to iterate. - pattern_iter: std::slice::Iter<'a, String>, + pattern_iter: PatternIter<'a>, /// the glob iterator if the path from the current iteration is a glob pattern. glob_iter: Option, /// the walkdir iterator if the path from the current iteration is a directory. @@ -53,19 +104,25 @@ pub struct ResourcePaths<'a> { current_pattern: Option, /// whether the current pattern is valid or not. current_pattern_is_valid: bool, + /// Current destination path. Only set when the iterator comes from a Map. + current_dest: Option, } -impl<'a> ResourcePaths<'a> { - /// Creates a new ResourcePaths from a slice of patterns to iterate - pub fn new(patterns: &'a [String], allow_walk: bool) -> ResourcePaths<'a> { - ResourcePaths { - pattern_iter: patterns.iter(), - glob_iter: None, - walk_iter: None, - allow_walk, - current_pattern: None, - current_pattern_is_valid: false, - } +/// Information for a resource. +pub struct Resource { + path: PathBuf, + target: PathBuf, +} + +impl Resource { + /// The path of the resource. + pub fn path(&self) -> &Path { + &self.path + } + + /// The target location of the resource. + pub fn target(&self) -> &Path { + &self.target } } @@ -73,6 +130,14 @@ impl<'a> Iterator for ResourcePaths<'a> { type Item = crate::Result; fn next(&mut self) -> Option> { + self.iter.next().map(|r| r.map(|res| res.path)) + } +} + +impl<'a> Iterator for ResourcePathsIter<'a> { + type Item = crate::Result; + + fn next(&mut self) -> Option> { loop { if let Some(ref mut walk_entries) = self.walk_iter { if let Some(entry) = walk_entries.next() { @@ -85,7 +150,14 @@ impl<'a> Iterator for ResourcePaths<'a> { continue; } self.current_pattern_is_valid = true; - return Some(Ok(path.to_path_buf())); + return Some(Ok(Resource { + target: if let Some(current_dest) = &self.current_dest { + current_dest.join(path.file_name().unwrap()) + } else { + resource_relpath(path) + }, + path: path.to_path_buf(), + })); } } self.walk_iter = None; @@ -105,7 +177,14 @@ impl<'a> Iterator for ResourcePaths<'a> { } } self.current_pattern_is_valid = true; - return Some(Ok(path)); + return Some(Ok(Resource { + target: if let Some(current_dest) = &self.current_dest { + current_dest.join(path.file_name().unwrap()) + } else { + resource_relpath(&path) + }, + path, + })); } else if let Some(current_path) = &self.current_pattern { if !self.current_pattern_is_valid { self.glob_iter = None; @@ -114,15 +193,33 @@ impl<'a> Iterator for ResourcePaths<'a> { } } self.glob_iter = None; - if let Some(pattern) = self.pattern_iter.next() { - self.current_pattern = Some(pattern.to_string()); - self.current_pattern_is_valid = false; - let glob = match glob::glob(pattern) { - Ok(glob) => glob, - Err(error) => return Some(Err(error.into())), - }; - self.glob_iter = Some(glob); - continue; + self.current_dest = None; + match &mut self.pattern_iter { + PatternIter::Slice(iter) => { + if let Some(pattern) = iter.next() { + self.current_pattern = Some(pattern.to_string()); + self.current_pattern_is_valid = false; + let glob = match glob::glob(pattern) { + Ok(glob) => glob, + Err(error) => return Some(Err(error.into())), + }; + self.glob_iter = Some(glob); + continue; + } + } + PatternIter::Map(iter) => { + if let Some((dest, pattern)) = iter.next() { + self.current_pattern = Some(pattern.to_string()); + self.current_pattern_is_valid = false; + let glob = match glob::glob(pattern) { + Ok(glob) => glob, + Err(error) => return Some(Err(error.into())), + }; + self.current_dest.replace(PathBuf::from(dest)); + self.glob_iter = Some(glob); + continue; + } + } } return None; } diff --git a/examples/resources/src-tauri/Cargo.lock b/examples/resources/src-tauri/Cargo.lock index 7407ddef93ae..7ba7e946f324 100644 --- a/examples/resources/src-tauri/Cargo.lock +++ b/examples/resources/src-tauri/Cargo.lock @@ -1029,9 +1029,9 @@ checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" [[package]] name = "ico" -version = "0.3.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3804960be0bb5e4edb1e1ad67afd321a9ecfd875c3e65c099468fd2717d7cae" +checksum = "031530fe562d8c8d71c0635013d6d155bbfe8ba0aa4b4d2d24ce8af6b71047bd" dependencies = [ "byteorder", "png", @@ -1167,6 +1167,17 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +[[package]] +name = "json-patch" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e712e62827c382a77b87f590532febb1f8b2fdbc3eefa1ee37fe7281687075ef" +dependencies = [ + "serde", + "serde_json", + "treediff 3.0.2", +] + [[package]] name = "json-patch" version = "0.3.0" @@ -1176,7 +1187,7 @@ dependencies = [ "serde", "serde_json", "thiserror", - "treediff", + "treediff 4.0.2", ] [[package]] @@ -2281,9 +2292,8 @@ dependencies = [ [[package]] name = "tao" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704522803dda895767f69198af8351b0a3f4fe2e293c3ca54cce0ecba05a97f2" +version = "0.15.8" +source = "git+https://github.com/tauri-apps/tao?branch=dev#b3aa3982d18a1ca2c8f08a135d7256b1aca46369" dependencies = [ "bitflags", "cairo-rs", @@ -2327,9 +2337,8 @@ dependencies = [ [[package]] name = "tao-macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b6fcd8245d45a39ffc8715183d92ae242750eb57b285eb3bcd63dfd512afd09" +version = "0.0.0" +source = "git+https://github.com/tauri-apps/tao?branch=dev#b3aa3982d18a1ca2c8f08a135d7256b1aca46369" dependencies = [ "proc-macro2", "quote", @@ -2400,7 +2409,7 @@ dependencies = [ "anyhow", "cargo_toml", "heck 0.4.0", - "json-patch", + "json-patch 0.3.0", "quote", "semver 1.0.16", "serde_json", @@ -2416,7 +2425,7 @@ dependencies = [ "base64 0.20.0", "brotli", "ico", - "json-patch", + "json-patch 0.3.0", "plist", "png", "proc-macro2", @@ -2459,7 +2468,7 @@ dependencies = [ "tauri-utils", "thiserror", "url", - "uuid", + "uuid 1.2.1", "webview2-com", "windows", ] @@ -2492,7 +2501,7 @@ dependencies = [ "heck 0.4.0", "html5ever", "infer", - "json-patch", + "json-patch 0.2.6", "kuchiki", "memchr", "phf 0.10.1", @@ -2704,6 +2713,15 @@ dependencies = [ "serde_json", ] +[[package]] +name = "treediff" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52984d277bdf2a751072b5df30ec0377febdb02f7696d64c2d7d54630bac4303" +dependencies = [ + "serde_json", +] + [[package]] name = "typenum" version = "1.16.0" @@ -3077,9 +3095,8 @@ dependencies = [ [[package]] name = "wry" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c846dc4dda988e959869dd0802cd27417c9696e584593e49178aeee28890d25" +version = "0.23.4" +source = "git+https://github.com/tauri-apps/wry#29c3c88add3f8e74b45faefde10bbfce257150bd" dependencies = [ "base64 0.13.1", "block", diff --git a/examples/resources/src-tauri/Cargo.toml b/examples/resources/src-tauri/Cargo.toml index 6557a6fb6727..7d7c68b3f79a 100644 --- a/examples/resources/src-tauri/Cargo.toml +++ b/examples/resources/src-tauri/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" rust-version = "1.60" [build-dependencies] -tauri-build = { path = "../../../core/tauri-build", features = [ "codegen" ] } +tauri-build = { path = "../../../core/tauri-build", features = ["codegen"] } [dependencies] serde_json = "1.0" diff --git a/tooling/bundler/src/bundle/settings.rs b/tooling/bundler/src/bundle/settings.rs index d250c3943c47..0f82e6f2e837 100644 --- a/tooling/bundler/src/bundle/settings.rs +++ b/tooling/bundler/src/bundle/settings.rs @@ -353,6 +353,12 @@ pub struct BundleSettings { /// /// supports glob patterns. pub resources: Option>, + /// The app's resources to bundle. Takes precedence over `Self::resources` when specified. + /// + /// Maps each resource path to its target directory in the bundle resources directory. + /// + /// Supports glob patterns. + pub resources_map: Option>, /// the app's copyright. pub copyright: Option, /// the app's category. @@ -703,9 +709,14 @@ impl Settings { /// Returns an iterator over the resource files to be included in this /// bundle. pub fn resource_files(&self) -> ResourcePaths<'_> { - match self.bundle_settings.resources { - Some(ref paths) => ResourcePaths::new(paths.as_slice(), true), - None => ResourcePaths::new(&[], true), + match ( + &self.bundle_settings.resources, + &self.bundle_settings.resources_map, + ) { + (Some(paths), None) => ResourcePaths::new(paths.as_slice(), true), + (None, Some(map)) => ResourcePaths::from_map(map, true), + (Some(_), Some(_)) => panic!("cannot use both `resources` and `resources_map`"), + (None, None) => ResourcePaths::new(&[], true), } } @@ -736,10 +747,10 @@ impl Settings { /// Copies resources to a path. pub fn copy_resources(&self, path: &Path) -> crate::Result<()> { - for src in self.resource_files() { - let src = src?; - let dest = path.join(tauri_utils::resources::resource_relpath(&src)); - common::copy_file(&src, dest)?; + for resource in self.resource_files().into_iter() { + let resource = resource?; + let dest = path.join(resource.target()); + common::copy_file(resource.path(), dest)?; } Ok(()) } diff --git a/tooling/cli/schema.json b/tooling/cli/schema.json index b8bd3bb0f0fc..68f5461b0b3b 100644 --- a/tooling/cli/schema.json +++ b/tooling/cli/schema.json @@ -1053,13 +1053,14 @@ }, "resources": { "description": "App resources to bundle. Each resource is a path to a file or directory. Glob patterns are supported.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } + "anyOf": [ + { + "$ref": "#/definitions/BundleResources" + }, + { + "type": "null" + } + ] }, "copyright": { "description": "A copyright string associated with your application.", @@ -1237,6 +1238,25 @@ } ] }, + "BundleResources": { + "description": "Definition for bundle resources. Can be either a list of paths to include or a map of target to source paths.", + "anyOf": [ + { + "description": "A list of paths to include.", + "type": "array", + "items": { + "type": "string" + } + }, + { + "description": "A map of target to source paths.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + ] + }, "AppImageConfig": { "description": "Configuration for AppImage bundles.\n\nSee more: https://tauri.app/v1/api/config#appimageconfig", "type": "object", diff --git a/tooling/cli/src/interface/rust.rs b/tooling/cli/src/interface/rust.rs index 8ed4bde81d7f..a531287f4bf1 100644 --- a/tooling/cli/src/interface/rust.rs +++ b/tooling/cli/src/interface/rust.rs @@ -35,7 +35,7 @@ use tauri_utils::config::parse::is_configuration_file; use super::{AppSettings, ExitReason, Interface}; use crate::helpers::{ app_paths::{app_dir, tauri_dir}, - config::{nsis_settings, reload as reload_config, wix_settings, Config}, + config::{nsis_settings, reload as reload_config, wix_settings, BundleSettings, Config}, }; use tauri_utils::display_path; @@ -989,7 +989,9 @@ fn tauri_config_to_bundle_settings( let windows_icon_path = PathBuf::from(""); #[allow(unused_mut)] - let mut resources = config.resources.unwrap_or_default(); + let mut resources = config + .resources + .unwrap_or(BundleResources::List(Vec::new())); #[allow(unused_mut)] let mut depends = config.deb.depends.unwrap_or_default(); @@ -1040,15 +1042,17 @@ fn tauri_config_to_bundle_settings( None => config.macos.provider_short_name, }; + let (resources, resources_map) = match resources { + BundleResources::List(paths) => (Some(paths), None), + BundleResources::Map(map) => (None, Some(map)), + }; + Ok(BundleSettings { identifier: Some(config.identifier), publisher: config.publisher, icon: Some(config.icon), - resources: if resources.is_empty() { - None - } else { - Some(resources) - }, + resources, + resources_map, copyright: config.copyright, category: match config.category { Some(category) => Some(AppCategory::from_str(&category).map_err(|e| match e { From a653d56dd024ddca74cc0a76b6fb2a3977522b33 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sat, 31 Dec 2022 10:27:07 -0800 Subject: [PATCH 02/11] fix windows impl --- core/tauri-utils/src/config.rs | 9 ++---- core/tauri-utils/src/resources.rs | 32 +++++++++++++++---- tooling/bundler/src/bundle/windows/msi/wix.rs | 11 +++---- 3 files changed, 32 insertions(+), 20 deletions(-) diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index d828e5565546..fc5d8a0f8d14 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -34,7 +34,7 @@ use std::{ /// Items to help with parsing content into a [`Config`]. pub mod parse; -use crate::{resources::resource_relpath, TitleBarStyle}; +use crate::TitleBarStyle; pub use self::parse::parse; @@ -639,12 +639,7 @@ impl BundleResources { Self::List(l) => l.push(path.into()), Self::Map(l) => { let path = path.into(); - l.insert( - resource_relpath(&PathBuf::from(&path)) - .to_string_lossy() - .to_string(), - path, - ); + l.insert(path.clone(), path); } } } diff --git a/core/tauri-utils/src/resources.rs b/core/tauri-utils/src/resources.rs index ba57ebbf9040..d0480c3b5df7 100644 --- a/core/tauri-utils/src/resources.rs +++ b/core/tauri-utils/src/resources.rs @@ -101,7 +101,7 @@ pub struct ResourcePathsIter<'a> { /// whether the resource paths allows directories or not. allow_walk: bool, /// the pattern of the current iteration. - current_pattern: Option, + current_pattern: Option<(String, PathBuf)>, /// whether the current pattern is valid or not. current_pattern_is_valid: bool, /// Current destination path. Only set when the iterator comes from a Map. @@ -134,6 +134,20 @@ impl<'a> Iterator for ResourcePaths<'a> { } } +fn normalize(path: &Path) -> PathBuf { + let mut dest = PathBuf::new(); + for component in path.components() { + match component { + Component::Prefix(_) => {} + Component::RootDir => dest.push("/"), + Component::CurDir => {} + Component::ParentDir => dest.push(".."), + Component::Normal(string) => dest.push(string), + } + } + dest +} + impl<'a> Iterator for ResourcePathsIter<'a> { type Item = crate::Result; @@ -151,8 +165,12 @@ impl<'a> Iterator for ResourcePathsIter<'a> { } self.current_pattern_is_valid = true; return Some(Ok(Resource { - target: if let Some(current_dest) = &self.current_dest { - current_dest.join(path.file_name().unwrap()) + target: if let (Some(current_dest), Some(current_pattern)) = (&self.current_dest, &self.current_pattern) { + if current_pattern.0.contains("*") { + current_dest.join(path.file_name().unwrap()) + } else { + current_dest.join(path.strip_prefix(¤t_pattern.1).unwrap()) + } } else { resource_relpath(path) }, @@ -188,7 +206,7 @@ impl<'a> Iterator for ResourcePathsIter<'a> { } else if let Some(current_path) = &self.current_pattern { if !self.current_pattern_is_valid { self.glob_iter = None; - return Some(Err(crate::Error::GlobPathNotFound(current_path.clone()))); + return Some(Err(crate::Error::GlobPathNotFound(current_path.0.clone()))); } } } @@ -197,7 +215,7 @@ impl<'a> Iterator for ResourcePathsIter<'a> { match &mut self.pattern_iter { PatternIter::Slice(iter) => { if let Some(pattern) = iter.next() { - self.current_pattern = Some(pattern.to_string()); + self.current_pattern = Some((pattern.to_string(), normalize(&Path::new(pattern)))); self.current_pattern_is_valid = false; let glob = match glob::glob(pattern) { Ok(glob) => glob, @@ -209,13 +227,13 @@ impl<'a> Iterator for ResourcePathsIter<'a> { } PatternIter::Map(iter) => { if let Some((dest, pattern)) = iter.next() { - self.current_pattern = Some(pattern.to_string()); + self.current_pattern = Some((pattern.to_string(), normalize(&Path::new(pattern)))); self.current_pattern_is_valid = false; let glob = match glob::glob(pattern) { Ok(glob) => glob, Err(error) => return Some(Err(error.into())), }; - self.current_dest.replace(PathBuf::from(dest)); + self.current_dest.replace(resource_relpath(&PathBuf::from(dest))); self.glob_iter = Some(glob); continue; } diff --git a/tooling/bundler/src/bundle/windows/msi/wix.rs b/tooling/bundler/src/bundle/windows/msi/wix.rs index d1945de1173e..92e7d32e20f9 100644 --- a/tooling/bundler/src/bundle/windows/msi/wix.rs +++ b/tooling/bundler/src/bundle/windows/msi/wix.rs @@ -25,8 +25,7 @@ use std::{ path::{Path, PathBuf}, process::Command, }; -use tauri_utils::display_path; -use tauri_utils::{config::WebviewInstallMode, resources::resource_relpath}; +use tauri_utils::config::WebviewInstallMode; use uuid::Uuid; // URLS for the WIX toolchain. Can be used for cross-platform compilation. @@ -910,11 +909,11 @@ fn generate_resource_data(settings: &Settings) -> crate::Result { let mut added_resources = Vec::new(); - for src in settings.resource_files() { - let src = src?; + for resource in settings.resource_files().into_iter() { + let resource = resource?; let resource_path = cwd - .join(src.clone()) + .join(resource.path()) .into_os_string() .into_string() .expect("failed to read resource path"); @@ -935,7 +934,7 @@ fn generate_resource_data(settings: &Settings) -> crate::Result { }; // split the resource path directories - let target_path = resource_relpath(&src); + let target_path = resource.target(); let components_count = target_path.components().count(); let directories = target_path .components() From 19246df6eecbe58506658e2c8ee5650edf8170f4 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sat, 31 Dec 2022 15:30:09 -0300 Subject: [PATCH 03/11] source to target, lint --- core/tauri-build/src/lib.rs | 2 +- core/tauri-config-schema/schema.json | 4 ++-- core/tauri-utils/src/config.rs | 4 ++-- core/tauri-utils/src/resources.rs | 18 +++++++++++------- tooling/bundler/src/bundle/settings.rs | 2 +- tooling/bundler/src/bundle/windows/msi/wix.rs | 2 +- tooling/cli/schema.json | 4 ++-- 7 files changed, 20 insertions(+), 16 deletions(-) diff --git a/core/tauri-build/src/lib.rs b/core/tauri-build/src/lib.rs index 5355c3f1bd47..4b3821ebce12 100644 --- a/core/tauri-build/src/lib.rs +++ b/core/tauri-build/src/lib.rs @@ -71,7 +71,7 @@ fn copy_binaries( /// Copies resources to a path. fn copy_resources(resources: ResourcePaths<'_>, path: &Path) -> Result<()> { - for resource in resources.into_iter() { + for resource in resources.iter() { let resource = resource?; println!("cargo:rerun-if-changed={}", resource.path().display()); copy_file(resource.path(), path.join(resource.target()))?; diff --git a/core/tauri-config-schema/schema.json b/core/tauri-config-schema/schema.json index 68f5461b0b3b..74cc81c9a434 100644 --- a/core/tauri-config-schema/schema.json +++ b/core/tauri-config-schema/schema.json @@ -1239,7 +1239,7 @@ ] }, "BundleResources": { - "description": "Definition for bundle resources. Can be either a list of paths to include or a map of target to source paths.", + "description": "Definition for bundle resources. Can be either a list of paths to include or a map of source to target paths.", "anyOf": [ { "description": "A list of paths to include.", @@ -1249,7 +1249,7 @@ } }, { - "description": "A map of target to source paths.", + "description": "A map of source to target paths.", "type": "object", "additionalProperties": { "type": "string" diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index fc5d8a0f8d14..9acdd08afef5 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -621,14 +621,14 @@ impl Default for WindowsConfig { } /// Definition for bundle resources. -/// Can be either a list of paths to include or a map of target to source paths. +/// Can be either a list of paths to include or a map of source to target paths. #[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)] #[cfg_attr(feature = "schema", derive(JsonSchema))] #[serde(rename_all = "camelCase", deny_unknown_fields, untagged)] pub enum BundleResources { /// A list of paths to include. List(Vec), - /// A map of target to source paths. + /// A map of source to target paths. Map(HashMap), } diff --git a/core/tauri-utils/src/resources.rs b/core/tauri-utils/src/resources.rs index d0480c3b5df7..fb62a64dcc4d 100644 --- a/core/tauri-utils/src/resources.rs +++ b/core/tauri-utils/src/resources.rs @@ -85,7 +85,7 @@ impl<'a> ResourcePaths<'a> { /// Returns the resource iterator that yields the source and target paths. /// Needed when using [`Self::from_map`]. - pub fn into_iter(self) -> ResourcePathsIter<'a> { + pub fn iter(self) -> ResourcePathsIter<'a> { self.iter } } @@ -165,8 +165,10 @@ impl<'a> Iterator for ResourcePathsIter<'a> { } self.current_pattern_is_valid = true; return Some(Ok(Resource { - target: if let (Some(current_dest), Some(current_pattern)) = (&self.current_dest, &self.current_pattern) { - if current_pattern.0.contains("*") { + target: if let (Some(current_dest), Some(current_pattern)) = + (&self.current_dest, &self.current_pattern) + { + if current_pattern.0.contains('*') { current_dest.join(path.file_name().unwrap()) } else { current_dest.join(path.strip_prefix(¤t_pattern.1).unwrap()) @@ -215,7 +217,7 @@ impl<'a> Iterator for ResourcePathsIter<'a> { match &mut self.pattern_iter { PatternIter::Slice(iter) => { if let Some(pattern) = iter.next() { - self.current_pattern = Some((pattern.to_string(), normalize(&Path::new(pattern)))); + self.current_pattern = Some((pattern.to_string(), normalize(Path::new(pattern)))); self.current_pattern_is_valid = false; let glob = match glob::glob(pattern) { Ok(glob) => glob, @@ -226,14 +228,16 @@ impl<'a> Iterator for ResourcePathsIter<'a> { } } PatternIter::Map(iter) => { - if let Some((dest, pattern)) = iter.next() { - self.current_pattern = Some((pattern.to_string(), normalize(&Path::new(pattern)))); + if let Some((pattern, dest)) = iter.next() { + self.current_pattern = Some((pattern.to_string(), normalize(Path::new(pattern)))); self.current_pattern_is_valid = false; let glob = match glob::glob(pattern) { Ok(glob) => glob, Err(error) => return Some(Err(error.into())), }; - self.current_dest.replace(resource_relpath(&PathBuf::from(dest))); + self + .current_dest + .replace(resource_relpath(&PathBuf::from(dest))); self.glob_iter = Some(glob); continue; } diff --git a/tooling/bundler/src/bundle/settings.rs b/tooling/bundler/src/bundle/settings.rs index 0f82e6f2e837..ce1ea833574a 100644 --- a/tooling/bundler/src/bundle/settings.rs +++ b/tooling/bundler/src/bundle/settings.rs @@ -747,7 +747,7 @@ impl Settings { /// Copies resources to a path. pub fn copy_resources(&self, path: &Path) -> crate::Result<()> { - for resource in self.resource_files().into_iter() { + for resource in self.resource_files().iter() { let resource = resource?; let dest = path.join(resource.target()); common::copy_file(resource.path(), dest)?; diff --git a/tooling/bundler/src/bundle/windows/msi/wix.rs b/tooling/bundler/src/bundle/windows/msi/wix.rs index 92e7d32e20f9..fe5b73b41cc2 100644 --- a/tooling/bundler/src/bundle/windows/msi/wix.rs +++ b/tooling/bundler/src/bundle/windows/msi/wix.rs @@ -909,7 +909,7 @@ fn generate_resource_data(settings: &Settings) -> crate::Result { let mut added_resources = Vec::new(); - for resource in settings.resource_files().into_iter() { + for resource in settings.resource_files().iter() { let resource = resource?; let resource_path = cwd diff --git a/tooling/cli/schema.json b/tooling/cli/schema.json index 68f5461b0b3b..74cc81c9a434 100644 --- a/tooling/cli/schema.json +++ b/tooling/cli/schema.json @@ -1239,7 +1239,7 @@ ] }, "BundleResources": { - "description": "Definition for bundle resources. Can be either a list of paths to include or a map of target to source paths.", + "description": "Definition for bundle resources. Can be either a list of paths to include or a map of source to target paths.", "anyOf": [ { "description": "A list of paths to include.", @@ -1249,7 +1249,7 @@ } }, { - "description": "A map of target to source paths.", + "description": "A map of source to target paths.", "type": "object", "additionalProperties": { "type": "string" From f6b9c468c29edf14fa6ff1e95f9cb2672ee49ae0 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sat, 31 Dec 2022 15:33:16 -0300 Subject: [PATCH 04/11] change files --- .changes/resources-map-bundler.md | 5 +++++ .changes/resources-map.md | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changes/resources-map-bundler.md create mode 100644 .changes/resources-map.md diff --git a/.changes/resources-map-bundler.md b/.changes/resources-map-bundler.md new file mode 100644 index 000000000000..f6b1024ab0ef --- /dev/null +++ b/.changes/resources-map-bundler.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": minor +--- + +Allow using a resource map instead of a simple array in `BundleSettings::resources_map`. diff --git a/.changes/resources-map.md b/.changes/resources-map.md new file mode 100644 index 000000000000..96c3af6be7f6 --- /dev/null +++ b/.changes/resources-map.md @@ -0,0 +1,5 @@ +--- +"tauri-utils": minor +--- + +Allow specifying resources as a map specifying source and target paths. From ca3b1ea57aae2e6d546036536bebc42511f3c293 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Tue, 23 May 2023 15:56:05 -0300 Subject: [PATCH 05/11] remove } --- core/tauri-build/src/lib.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/tauri-build/src/lib.rs b/core/tauri-build/src/lib.rs index 4b3821ebce12..a030e570cf34 100644 --- a/core/tauri-build/src/lib.rs +++ b/core/tauri-build/src/lib.rs @@ -368,12 +368,11 @@ pub fn try_build(attributes: Attributes) -> Result<()> { .resources .clone() .unwrap_or_else(|| BundleResources::List(Vec::new())); - if let Some(fixed_webview2_runtime_path) = - &config.tauri.bundle.windows.webview_fixed_runtime_path - { - resources.push(fixed_webview2_runtime_path.display().to_string()); - } + if let Some(fixed_webview2_runtime_path) = &config.tauri.bundle.windows.webview_fixed_runtime_path + { + resources.push(fixed_webview2_runtime_path.display().to_string()); } + match resources { BundleResources::List(res) => { copy_resources(ResourcePaths::new(res.as_slice(), true), target_dir)? From 4233ae0f765d8b39293b0b506530812ccd3948b8 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Tue, 23 May 2023 16:00:41 -0300 Subject: [PATCH 06/11] fix import name --- tooling/cli/src/interface/rust.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling/cli/src/interface/rust.rs b/tooling/cli/src/interface/rust.rs index a531287f4bf1..225e7ad5b53e 100644 --- a/tooling/cli/src/interface/rust.rs +++ b/tooling/cli/src/interface/rust.rs @@ -35,7 +35,7 @@ use tauri_utils::config::parse::is_configuration_file; use super::{AppSettings, ExitReason, Interface}; use crate::helpers::{ app_paths::{app_dir, tauri_dir}, - config::{nsis_settings, reload as reload_config, wix_settings, BundleSettings, Config}, + config::{nsis_settings, reload as reload_config, wix_settings, BundleResources, Config}, }; use tauri_utils::display_path; From 490a75c2b413b8ee99e2ca894f8b6c86cf49946c Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Tue, 23 May 2023 16:38:10 -0300 Subject: [PATCH 07/11] add missing import --- tooling/bundler/src/bundle/windows/msi/wix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling/bundler/src/bundle/windows/msi/wix.rs b/tooling/bundler/src/bundle/windows/msi/wix.rs index fe5b73b41cc2..8b4483951159 100644 --- a/tooling/bundler/src/bundle/windows/msi/wix.rs +++ b/tooling/bundler/src/bundle/windows/msi/wix.rs @@ -25,7 +25,7 @@ use std::{ path::{Path, PathBuf}, process::Command, }; -use tauri_utils::config::WebviewInstallMode; +use tauri_utils::{config::WebviewInstallMode, display_path}; use uuid::Uuid; // URLS for the WIX toolchain. Can be used for cross-platform compilation. From 673c7b25b2a081573f907b001b735f742b1506af Mon Sep 17 00:00:00 2001 From: amrbashir Date: Wed, 24 May 2023 04:57:57 +0300 Subject: [PATCH 08/11] update nsis implementation, use dunce --- examples/resources/src-tauri/Cargo.lock | 1156 +++++++++++------ tooling/bundler/src/bundle/windows/msi/wix.rs | 21 +- tooling/bundler/src/bundle/windows/nsis.rs | 30 +- 3 files changed, 781 insertions(+), 426 deletions(-) diff --git a/examples/resources/src-tauri/Cargo.lock b/examples/resources/src-tauri/Cargo.lock index 7ba7e946f324..eebda6dc20a0 100644 --- a/examples/resources/src-tauri/Cargo.lock +++ b/examples/resources/src-tauri/Cargo.lock @@ -17,6 +17,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "aho-corasick" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +dependencies = [ + "memchr", +] + [[package]] name = "alloc-no-stdlib" version = "2.0.4" @@ -32,11 +41,20 @@ dependencies = [ "alloc-no-stdlib", ] +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "anyhow" -version = "1.0.68" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" +checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" [[package]] name = "atk" @@ -59,7 +77,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.0", ] [[package]] @@ -76,9 +94,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.20.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" +checksum = "3f1e31e207a6b8fb791a38ea3105e6cb541f55e4d029902d3039a4ad07cc4105" [[package]] name = "bitflags" @@ -94,9 +112,9 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] @@ -124,19 +142,25 @@ dependencies = [ [[package]] name = "bstr" -version = "1.1.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45ea9b00a7b3f2988e9a65ad3917e62123c38dba709b666506207be96d1790b" +checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" dependencies = [ "memchr", "serde", ] +[[package]] +name = "bumpalo" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" + [[package]] name = "bytemuck" -version = "1.12.3" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaa3a8d9a1ca92e282c96a32d6511b695d7d994d1d102ba85d279f9b2756947f" +checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" [[package]] name = "byteorder" @@ -146,9 +170,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "cairo-rs" @@ -171,24 +195,24 @@ checksum = "3c55d429bef56ac9172d25fecb85dc8068307d17acd74b377866b7a1ef25d3c8" dependencies = [ "glib-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.0", ] [[package]] name = "cargo_toml" -version = "0.14.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f1204fe51a1e56042b8ec31d6407547ecd18f596b66f470dadb9abd9be9c843" +checksum = "7f83bc2e401ed041b7057345ebc488c005efa0341d5541ce7004d30458d0090b" dependencies = [ "serde", - "toml", + "toml 0.7.4", ] [[package]] name = "cc" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" [[package]] name = "cesu8" @@ -218,11 +242,12 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.11.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0357a6402b295ca3a86bc148e84df46c02e41f41fef186bda662557ef6328aa" +checksum = "c8790cf1286da485c72cf5fc7aeba308438800036ec67d89425924c4807268c9" dependencies = [ "smallvec", + "target-lexicon", ] [[package]] @@ -231,6 +256,19 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +dependencies = [ + "iana-time-zone", + "num-integer", + "num-traits", + "serde", + "winapi", +] + [[package]] name = "cocoa" version = "0.24.1" @@ -249,9 +287,9 @@ dependencies = [ [[package]] name = "cocoa-foundation" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" +checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" dependencies = [ "bitflags", "block", @@ -296,9 +334,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "core-graphics" @@ -327,9 +365,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" dependencies = [ "libc", ] @@ -345,9 +383,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.6" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ "cfg-if", "crossbeam-utils", @@ -355,9 +393,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ "cfg-if", ] @@ -386,7 +424,7 @@ dependencies = [ "proc-macro2", "quote", "smallvec", - "syn", + "syn 1.0.109", ] [[package]] @@ -396,7 +434,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e" dependencies = [ "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -406,20 +444,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" dependencies = [ "quote", - "syn", + "syn 1.0.109", ] -[[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" - [[package]] name = "darling" -version = "0.13.4" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" dependencies = [ "darling_core", "darling_macro", @@ -427,27 +459,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.13.4" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" +checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn", + "syn 2.0.16", ] [[package]] name = "darling_macro" -version = "0.13.4" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" dependencies = [ "darling_core", "quote", - "syn", + "syn 2.0.16", ] [[package]] @@ -459,15 +491,15 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", - "syn", + "rustc_version", + "syn 1.0.109", ] [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", @@ -517,9 +549,22 @@ dependencies = [ [[package]] name = "dunce" -version = "1.0.3" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + +[[package]] +name = "embed-resource" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" +checksum = "80663502655af01a2902dff3f06869330782267924bf1788410b74edcd93770a" +dependencies = [ + "cc", + "rustc_version", + "toml 0.7.4", + "vswhom", + "winreg", +] [[package]] name = "embed_plist" @@ -529,49 +574,79 @@ checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" [[package]] name = "encoding_rs" -version = "0.8.31" +version = "0.8.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" +checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" dependencies = [ "cfg-if", ] +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "fastrand" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ "instant", ] +[[package]] +name = "fdeflate" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10" +dependencies = [ + "simd-adler32", +] + [[package]] name = "field-offset" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e1c54951450cbd39f3dbcf1005ac413b49487dabf18a720ad2383eccfeffb92" +checksum = "a3cf3a800ff6e860c863ca6d4b16fd999db8b752819c1606884047b73e468535" dependencies = [ "memoffset", - "rustc_version 0.3.3", + "rustc_version", ] [[package]] name = "filetime" -version = "0.2.19" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9" +checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "windows-sys", + "redox_syscall 0.2.16", + "windows-sys 0.48.0", ] [[package]] name = "flate2" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" dependencies = [ "crc32fast", "miniz_oxide", @@ -619,24 +694,24 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", ] [[package]] name = "futures-core" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -645,32 +720,32 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-macro" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.16", ] [[package]] name = "futures-task" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-core", "futures-macro", @@ -728,7 +803,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.0", ] [[package]] @@ -745,7 +820,21 @@ dependencies = [ "libc", "pango-sys", "pkg-config", - "system-deps 6.0.3", + "system-deps 6.1.0", +] + +[[package]] +name = "gdkwayland-sys" +version = "0.15.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cca49a59ad8cfdf36ef7330fe7bdfbe1d34323220cc16a0de2679ee773aee2c2" +dependencies = [ + "gdk-sys", + "glib-sys", + "gobject-sys", + "libc", + "pkg-config", + "system-deps 6.1.0", ] [[package]] @@ -757,28 +846,28 @@ dependencies = [ "gdk-sys", "glib-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.0", "x11", ] [[package]] name = "generator" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266041a359dfa931b370ef684cceb84b166beb14f7f0421f4a6a3d0c446d12e" +checksum = "f3e123d9ae7c02966b4d892e550bdc32164f05853cd40ab570650ad600596a8a" dependencies = [ "cc", "libc", "log", "rustversion", - "windows", + "windows 0.48.0", ] [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -797,9 +886,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" dependencies = [ "cfg-if", "libc", @@ -832,7 +921,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.0", "winapi", ] @@ -858,17 +947,17 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.15.11" +version = "0.15.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a68131a662b04931e71891fb14aaf65ee4b44d08e8abc10f49e77418c86c64" +checksum = "10c6ae9f6fa26f4fb2ac16b528d138d971ead56141de489f8111e259b9df3c4a" dependencies = [ "anyhow", - "heck 0.4.0", + "heck 0.4.1", "proc-macro-crate", "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -878,7 +967,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef4b192f8e65e9cf76cbf4ea71fa8e3be4a0e18ffe3d68b8da6836974cc5bad4" dependencies = [ "libc", - "system-deps 6.0.3", + "system-deps 6.1.0", ] [[package]] @@ -893,7 +982,7 @@ version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" dependencies = [ - "aho-corasick", + "aho-corasick 0.7.20", "bstr", "fnv", "log", @@ -908,7 +997,7 @@ checksum = "0d57ce44246becd17153bd035ab4d32cfee096a657fc01f2231c9278378d1e0a" dependencies = [ "glib-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.0", ] [[package]] @@ -949,21 +1038,21 @@ dependencies = [ "gobject-sys", "libc", "pango-sys", - "system-deps 6.0.3", + "system-deps 6.1.0", ] [[package]] name = "gtk3-macros" -version = "0.15.4" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24f518afe90c23fba585b2d7697856f9e6a7bbc62f65588035e66f6afb01a2e9" +checksum = "684c0456c086e8e7e9af73ec5b84e35938df394712054550e81558d21c44ab0d" dependencies = [ "anyhow", "proc-macro-crate", "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -983,9 +1072,9 @@ dependencies = [ [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" @@ -996,6 +1085,18 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + [[package]] name = "html5ever" version = "0.25.2" @@ -1007,18 +1108,18 @@ dependencies = [ "markup5ever", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "http" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", - "itoa 1.0.5", + "itoa 1.0.6", ] [[package]] @@ -1027,11 +1128,34 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" +[[package]] +name = "iana-time-zone" +version = "0.1.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows 0.48.0", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + [[package]] name = "ico" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "031530fe562d8c8d71c0635013d6d155bbfe8ba0aa4b4d2d24ce8af6b71047bd" +checksum = "e3804960be0bb5e4edb1e1ad67afd321a9ecfd875c3e65c099468fd2717d7cae" dependencies = [ "byteorder", "png", @@ -1055,11 +1179,10 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.18" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" +checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" dependencies = [ - "crossbeam-utils", "globset", "lazy_static", "log", @@ -1073,9 +1196,9 @@ dependencies = [ [[package]] name = "image" -version = "0.24.5" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b7ea949b537b0fd0af141fff8c77690f2ce96f4f41f042ccb6c69c6c965945" +checksum = "527909aa81e20ac3a44803521443a765550f09b5130c2c2fa1ea59c2f8f50a3a" dependencies = [ "bytemuck", "byteorder", @@ -1086,12 +1209,13 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown", + "serde", ] [[package]] @@ -1112,6 +1236,17 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "io-lifetimes" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" +dependencies = [ + "hermit-abi 0.3.1", + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "itoa" version = "0.4.8" @@ -1120,9 +1255,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "javascriptcore-rs" @@ -1168,26 +1303,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] -name = "json-patch" -version = "0.3.0" +name = "js-sys" +version = "0.3.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e712e62827c382a77b87f590532febb1f8b2fdbc3eefa1ee37fe7281687075ef" +checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" dependencies = [ - "serde", - "serde_json", - "treediff 3.0.2", + "wasm-bindgen", ] [[package]] name = "json-patch" -version = "0.3.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e712e62827c382a77b87f590532febb1f8b2fdbc3eefa1ee37fe7281687075ef" +checksum = "1f54898088ccb91df1b492cc80029a6fdf1c48ca0db7c6822a8babad69c94658" dependencies = [ "serde", "serde_json", "thiserror", - "treediff 4.0.2", + "treediff", ] [[package]] @@ -1210,9 +1343,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.139" +version = "0.2.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" [[package]] name = "line-wrap" @@ -1223,6 +1356,12 @@ dependencies = [ "safemem", ] +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + [[package]] name = "lock_api" version = "0.4.9" @@ -1297,9 +1436,9 @@ dependencies = [ [[package]] name = "matches" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "memchr" @@ -1309,20 +1448,21 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" -version = "0.6.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" dependencies = [ "autocfg", ] [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", + "simd-adler32", ] [[package]] @@ -1411,29 +1551,29 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi", + "hermit-abi 0.2.6", "libc", ] [[package]] name = "num_enum" -version = "0.5.7" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.7" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1466,18 +1606,18 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "os_pipe" -version = "1.1.2" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6a252f1f8c11e84b3ab59d7a488e48e4478a93937e027076638c49536204639" +checksum = "0ae859aa07428ca9a929b936690f8b12dc5f11dd8c6992a18ca93919f28bc177" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1508,7 +1648,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.0", ] [[package]] @@ -1523,15 +1663,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -1540,16 +1680,6 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" -[[package]] -name = "pest" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4257b4a04d91f7e9e6290be5d3da4804dd5784fafde3a497d73eb2b4a158c30a" -dependencies = [ - "thiserror", - "ucd-trie", -] - [[package]] name = "phf" version = "0.8.0" @@ -1613,7 +1743,7 @@ dependencies = [ "proc-macro-hack", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1627,7 +1757,7 @@ dependencies = [ "proc-macro-hack", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1662,17 +1792,17 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "plist" -version = "1.4.0" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5329b8f106a176ab0dce4aae5da86bfcb139bb74fb00882859e03745011f3635" +checksum = "9bd9647b268a3d3e14ff09c23201133a62589c658db02bb7388c7246aafe0590" dependencies = [ - "base64 0.13.1", + "base64 0.21.1", "indexmap", "line-wrap", "quick-xml", @@ -1682,12 +1812,13 @@ dependencies = [ [[package]] name = "png" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" +checksum = "aaeebc51f9e7d2c150d3f3bfeb667f2aa985db5ef1e3d212847bdedb488beeaa" dependencies = [ "bitflags", "crc32fast", + "fdeflate", "flate2", "miniz_oxide", ] @@ -1706,13 +1837,12 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "proc-macro-crate" -version = "1.2.1" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "thiserror", - "toml", + "toml_edit", ] [[package]] @@ -1724,7 +1854,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "version_check", ] @@ -1747,27 +1877,27 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" dependencies = [ "unicode-ident", ] [[package]] name = "quick-xml" -version = "0.26.0" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f50b1c63b38611e7d4d7f68b82d3ad0cc71a2ad2e7f61fc10f1328d917c93cd" +checksum = "0ce5e73202a820a31f8a0ee32ada5e21029c81fd9e3ebf668a40832e4219d9d1" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" dependencies = [ "proc-macro2", ] @@ -1832,7 +1962,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", ] [[package]] @@ -1855,12 +1985,9 @@ dependencies = [ [[package]] name = "raw-window-handle" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" -dependencies = [ - "cty", -] +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" [[package]] name = "redox_syscall" @@ -1871,26 +1998,35 @@ dependencies = [ "bitflags", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags", +] + [[package]] name = "redox_users" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.8", - "redox_syscall", + "getrandom 0.2.9", + "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "regex" -version = "1.7.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "d1a59b5d8e97dee33696bf13c5ba8ab85341c002922fba050069326b9c498974" dependencies = [ - "aho-corasick", + "aho-corasick 1.0.1", "memchr", - "regex-syntax", + "regex-syntax 0.7.2", ] [[package]] @@ -1899,23 +2035,20 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "regex-syntax", + "regex-syntax 0.6.29", ] [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "regex-syntax" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" [[package]] name = "resources" @@ -1929,33 +2062,38 @@ dependencies = [ [[package]] name = "rustc_version" -version = "0.3.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 0.11.0", + "semver", ] [[package]] -name = "rustc_version" -version = "0.4.0" +name = "rustix" +version = "0.37.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" dependencies = [ - "semver 1.0.16", + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys 0.48.0", ] [[package]] name = "rustversion" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" [[package]] name = "ryu" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "safemem" @@ -2006,93 +2144,90 @@ dependencies = [ [[package]] name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" dependencies = [ "serde", ] -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - [[package]] name = "serde" -version = "1.0.152" +version = "1.0.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.16", ] [[package]] name = "serde_json" -version = "1.0.91" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ - "itoa 1.0.5", + "itoa 1.0.6", "ryu", "serde", ] [[package]] name = "serde_repr" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a5ec9fa74a20ebbe5d9ac23dac1fc96ba0ecfe9f50f2843b52e537b10fbcb4e" +checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.16", +] + +[[package]] +name = "serde_spanned" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +dependencies = [ + "serde", ] [[package]] name = "serde_with" -version = "1.14.0" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" +checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" dependencies = [ + "base64 0.13.1", + "chrono", + "hex", + "indexmap", "serde", + "serde_json", "serde_with_macros", + "time", ] [[package]] name = "serde_with_macros" -version = "1.5.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" +checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ "darling", "proc-macro2", "quote", - "syn", + "syn 2.0.16", ] [[package]] @@ -2114,7 +2249,7 @@ checksum = "74064874e9f6a15f04c1f3cb627902d0e6b410abbf36668afa873c61889f1763" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2157,6 +2292,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "simd-adler32" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "238abfbb77c1915110ad968465608b68e869e0772622c9656714e73e5a1a522f" + [[package]] name = "siphasher" version = "0.3.10" @@ -2165,9 +2306,9 @@ checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] name = "slab" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" dependencies = [ "autocfg", ] @@ -2223,9 +2364,9 @@ dependencies = [ [[package]] name = "string_cache" -version = "0.8.4" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213494b7a2b503146286049378ce02b482200519accc31872ee8be91fa820a08" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", @@ -2255,9 +2396,20 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.107" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" dependencies = [ "proc-macro2", "quote", @@ -2273,27 +2425,28 @@ dependencies = [ "cfg-expr 0.9.1", "heck 0.3.3", "pkg-config", - "toml", + "toml 0.5.11", "version-compare 0.0.11", ] [[package]] name = "system-deps" -version = "6.0.3" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2955b1fe31e1fa2fbd1976b71cc69a606d7d4da16f6de3333d0c92d51419aeff" +checksum = "e5fa6fb9ee296c0dc2df41a656ca7948546d061958115ddb0bcaae43ad0d17d2" dependencies = [ - "cfg-expr 0.11.0", - "heck 0.4.0", + "cfg-expr 0.15.1", + "heck 0.4.1", "pkg-config", - "toml", + "toml 0.7.4", "version-compare 0.1.1", ] [[package]] name = "tao" -version = "0.15.8" -source = "git+https://github.com/tauri-apps/tao?branch=dev#b3aa3982d18a1ca2c8f08a135d7256b1aca46369" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6d198e01085564cea63e976ad1566c1ba2c2e4cc79578e35d9f05521505e31" dependencies = [ "bitflags", "cairo-rs", @@ -2306,6 +2459,7 @@ dependencies = [ "gdk", "gdk-pixbuf", "gdk-sys", + "gdkwayland-sys", "gdkx11-sys", "gio", "glib", @@ -2330,19 +2484,20 @@ dependencies = [ "tao-macros", "unicode-segmentation", "uuid", - "windows", + "windows 0.39.0", "windows-implement", "x11-dl", ] [[package]] name = "tao-macros" -version = "0.0.0" -source = "git+https://github.com/tauri-apps/tao?branch=dev#b3aa3982d18a1ca2c8f08a135d7256b1aca46369" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b27a4bcc5eb524658234589bdffc7e7bfb996dbae6ce9393bfd39cb4159b445" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2356,9 +2511,15 @@ dependencies = [ "xattr", ] +[[package]] +name = "target-lexicon" +version = "0.12.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" + [[package]] name = "tauri" -version = "1.2.3" +version = "1.3.0" dependencies = [ "anyhow", "cocoa", @@ -2370,7 +2531,7 @@ dependencies = [ "glib", "glob", "gtk", - "heck 0.4.0", + "heck 0.4.1", "http", "ignore", "objc", @@ -2380,7 +2541,7 @@ dependencies = [ "rand 0.8.5", "raw-window-handle", "regex", - "semver 1.0.16", + "semver", "serde", "serde_json", "serde_repr", @@ -2399,39 +2560,40 @@ dependencies = [ "uuid", "webkit2gtk", "webview2-com", - "windows", + "windows 0.39.0", ] [[package]] name = "tauri-build" -version = "1.2.1" +version = "1.3.0" dependencies = [ "anyhow", "cargo_toml", - "heck 0.4.0", - "json-patch 0.3.0", + "heck 0.4.1", + "json-patch", "quote", - "semver 1.0.16", + "semver", + "serde", "serde_json", "tauri-codegen", "tauri-utils", - "winres", + "tauri-winres", ] [[package]] name = "tauri-codegen" -version = "1.2.1" +version = "1.3.0" dependencies = [ - "base64 0.20.0", + "base64 0.21.1", "brotli", "ico", - "json-patch 0.3.0", + "json-patch", "plist", "png", "proc-macro2", "quote", "regex", - "semver 1.0.16", + "semver", "serde", "serde_json", "sha2", @@ -2444,19 +2606,19 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "1.2.1" +version = "1.3.0" dependencies = [ - "heck 0.4.0", + "heck 0.4.1", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "tauri-codegen", "tauri-utils", ] [[package]] name = "tauri-runtime" -version = "0.12.1" +version = "0.13.0" dependencies = [ "gtk", "http", @@ -2468,14 +2630,14 @@ dependencies = [ "tauri-utils", "thiserror", "url", - "uuid 1.2.1", + "uuid", "webview2-com", - "windows", + "windows 0.39.0", ] [[package]] name = "tauri-runtime-wry" -version = "0.12.2" +version = "0.13.0" dependencies = [ "cocoa", "gtk", @@ -2487,48 +2649,57 @@ dependencies = [ "uuid", "webkit2gtk", "webview2-com", - "windows", + "windows 0.39.0", "wry", ] [[package]] name = "tauri-utils" -version = "1.2.1" +version = "1.3.0" dependencies = [ "brotli", "ctor", "glob", - "heck 0.4.0", + "heck 0.4.1", "html5ever", "infer", - "json-patch 0.2.6", + "json-patch", "kuchiki", "memchr", "phf 0.10.1", "proc-macro2", "quote", - "semver 1.0.16", + "semver", "serde", "serde_json", "serde_with", "thiserror", "url", "walkdir", - "windows", + "windows 0.39.0", +] + +[[package]] +name = "tauri-winres" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5993dc129e544393574288923d1ec447c857f3f644187f4fbf7d9a875fbfc4fb" +dependencies = [ + "embed-resource", + "toml 0.7.4", ] [[package]] name = "tempfile" -version = "3.3.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" dependencies = [ "cfg-if", "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", + "redox_syscall 0.3.5", + "rustix", + "windows-sys 0.45.0", ] [[package]] @@ -2550,40 +2721,41 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.16", ] [[package]] name = "thread_local" -version = "1.1.4" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ + "cfg-if", "once_cell", ] [[package]] name = "time" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" +checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" dependencies = [ - "itoa 1.0.5", + "itoa 1.0.6", "serde", "time-core", "time-macros", @@ -2591,15 +2763,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.6" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" +checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" dependencies = [ "time-core", ] @@ -2615,31 +2787,64 @@ dependencies = [ [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.24.2" +version = "1.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" +checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" dependencies = [ "autocfg", "bytes", - "memchr", "num_cpus", "pin-project-lite", - "windows-sys", + "windows-sys 0.48.0", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", ] [[package]] name = "toml" -version = "0.5.10" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" +checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" dependencies = [ "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", ] [[package]] @@ -2656,20 +2861,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.16", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", "valuable", @@ -2688,9 +2893,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" +checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" dependencies = [ "matchers", "nu-ansi-term", @@ -2713,38 +2918,23 @@ dependencies = [ "serde_json", ] -[[package]] -name = "treediff" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52984d277bdf2a751072b5df30ec0377febdb02f7696d64c2d7d54630bac4303" -dependencies = [ - "serde_json", -] - [[package]] name = "typenum" version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" -[[package]] -name = "ucd-trie" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" - [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-normalization" @@ -2757,9 +2947,9 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "url" @@ -2781,11 +2971,11 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "uuid" -version = "1.2.2" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" +checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", ] [[package]] @@ -2812,14 +3002,33 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "vswhom" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b" +dependencies = [ + "libc", + "vswhom-sys", +] + +[[package]] +name = "vswhom-sys" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3b17ae1f6c8a2b28506cd96d412eebf83b4a0ff2cbefeeb952f2f9dfa44ba18" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -2835,6 +3044,60 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasm-bindgen" +version = "0.2.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.16", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.16", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" + [[package]] name = "webkit2gtk" version = "0.18.2" @@ -2879,7 +3142,7 @@ dependencies = [ "pango-sys", "pkg-config", "soup2-sys", - "system-deps 6.0.3", + "system-deps 6.1.0", ] [[package]] @@ -2890,7 +3153,7 @@ checksum = "b4a769c9f1a64a8734bde70caafac2b96cada12cd4aefa49196b3a386b8b4178" dependencies = [ "webview2-com-macros", "webview2-com-sys", - "windows", + "windows 0.39.0", "windows-implement", ] @@ -2902,7 +3165,7 @@ checksum = "eaebe196c01691db62e9e4ca52c5ef1e4fd837dcae27dae3ada599b5a8fd05ac" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2915,7 +3178,7 @@ dependencies = [ "serde", "serde_json", "thiserror", - "windows", + "windows 0.39.0", "windows-bindgen", "windows-metadata", ] @@ -2965,6 +3228,15 @@ dependencies = [ "windows_x86_64_msvc 0.39.0", ] +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets 0.48.0", +] + [[package]] name = "windows-bindgen" version = "0.39.0" @@ -2981,7 +3253,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba01f98f509cb5dc05f4e5fc95e535f78260f15fea8fe1a8abdd08f774f1cee7" dependencies = [ - "syn", + "syn 1.0.109", "windows-tokens", ] @@ -2993,17 +3265,50 @@ checksum = "9ee5e275231f07c6e240d14f34e1b635bf1faa1c76c57cfd59a5cdb9848e4278" [[package]] name = "windows-sys" -version = "0.42.0" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.0", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.1", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] [[package]] @@ -3014,9 +3319,15 @@ checksum = "f838de2fe15fe6bac988e74b798f26499a8b21a9d97edec321e79b28d1d7f597" [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" [[package]] name = "windows_aarch64_msvc" @@ -3026,9 +3337,15 @@ checksum = "ec7711666096bd4096ffa835238905bb33fb87267910e154b18b44eaabb340f2" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" [[package]] name = "windows_i686_gnu" @@ -3038,9 +3355,15 @@ checksum = "763fc57100a5f7042e3057e7e8d9bdd7860d330070251a73d003563a3bb49e1b" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_msvc" @@ -3050,9 +3373,15 @@ checksum = "7bc7cbfe58828921e10a9f446fcaaf649204dcfe6c1ddd712c5eebae6bda1106" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] name = "windows_x86_64_gnu" @@ -3062,15 +3391,27 @@ checksum = "6868c165637d653ae1e8dc4d82c25d4f97dd6605eaa8d784b5c6e0ab2a252b65" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] name = "windows_x86_64_msvc" @@ -3080,23 +3421,40 @@ checksum = "5e4d40883ae9cae962787ca76ba76390ffa29214667a111db9e0a1ad8377e809" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] -name = "winres" -version = "0.1.12" +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "winnow" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b68db261ef59e9e52806f688020631e987592bd83619edccda9c47d42cde4f6c" +checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" dependencies = [ - "toml", + "memchr", +] + +[[package]] +name = "winreg" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a1a57ff50e9b408431e8f97d5456f2807f8eb2a2cd79b06068fc87f8ecf189" +dependencies = [ + "cfg-if", + "winapi", ] [[package]] name = "wry" -version = "0.23.4" -source = "git+https://github.com/tauri-apps/wry#29c3c88add3f8e74b45faefde10bbfce257150bd" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33748f35413c8a98d45f7a08832d848c0c5915501803d1faade5a4ebcd258cea" dependencies = [ "base64 0.13.1", "block", @@ -3126,15 +3484,15 @@ dependencies = [ "webkit2gtk", "webkit2gtk-sys", "webview2-com", - "windows", + "windows 0.39.0", "windows-implement", ] [[package]] name = "x11" -version = "2.20.1" +version = "2.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2638d5b9c17ac40575fb54bb461a4b1d2a8d1b4ffcc4ff237d254ec59ddeb82" +checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e" dependencies = [ "libc", "pkg-config", @@ -3142,12 +3500,12 @@ dependencies = [ [[package]] name = "x11-dl" -version = "2.20.1" +version = "2.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1536d6965a5d4e573c7ef73a2c15ebcd0b2de3347bdf526c34c297c00ac40f0" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" dependencies = [ - "lazy_static", "libc", + "once_cell", "pkg-config", ] diff --git a/tooling/bundler/src/bundle/windows/msi/wix.rs b/tooling/bundler/src/bundle/windows/msi/wix.rs index 8b4483951159..880f2f6e7e07 100644 --- a/tooling/bundler/src/bundle/windows/msi/wix.rs +++ b/tooling/bundler/src/bundle/windows/msi/wix.rs @@ -86,7 +86,7 @@ struct ResourceFile { /// the id to use on the WIX XML. id: String, /// the file path. - path: String, + path: PathBuf, } /// A resource directory to bundle with WIX. @@ -120,7 +120,7 @@ impl ResourceDirectory { r#""#, id = file.id, guid = file.guid, - path = file.path + path = file.path.display() ).as_str() ); } @@ -912,25 +912,22 @@ fn generate_resource_data(settings: &Settings) -> crate::Result { for resource in settings.resource_files().iter() { let resource = resource?; - let resource_path = cwd - .join(resource.path()) - .into_os_string() - .into_string() - .expect("failed to read resource path"); + let src = cwd.join(resource.path()); + let resource_path = dunce::simplified(&src); // In some glob resource paths like `assets/**/*` a file might appear twice // because the `tauri_utils::resources::ResourcePaths` iterator also reads a directory // when it finds one. So we must check it before processing the file. - if added_resources.contains(&resource_path) { + if added_resources.contains(&resource_path.to_path_buf()) { continue; } - added_resources.push(resource_path.clone()); + added_resources.push(resource_path.to_path_buf()); let resource_entry = ResourceFile { id: format!("I{}", Uuid::new_v4().as_simple()), guid: Uuid::new_v4().to_string(), - path: resource_path, + path: resource_path.to_path_buf(), }; // split the resource path directories @@ -999,7 +996,7 @@ fn generate_resource_data(settings: &Settings) -> crate::Result { let out_dir = settings.project_out_directory(); for dll in glob::glob(out_dir.join("*.dll").to_string_lossy().to_string().as_str())? { let path = dll?; - let resource_path = path.to_string_lossy().into_owned(); + let resource_path = dunce::simplified(&path); let relative_path = path .strip_prefix(out_dir) .unwrap() @@ -1009,7 +1006,7 @@ fn generate_resource_data(settings: &Settings) -> crate::Result { dlls.push(ResourceFile { id: format!("I{}", Uuid::new_v4().as_simple()), guid: Uuid::new_v4().to_string(), - path: resource_path, + path: resource_path.to_path_buf(), }); } } diff --git a/tooling/bundler/src/bundle/windows/nsis.rs b/tooling/bundler/src/bundle/windows/nsis.rs index 57960c87982d..21b0cfa29da1 100644 --- a/tooling/bundler/src/bundle/windows/nsis.rs +++ b/tooling/bundler/src/bundle/windows/nsis.rs @@ -20,10 +20,7 @@ use tauri_utils::display_path; use anyhow::Context; use handlebars::{to_json, Handlebars}; use log::{info, warn}; -use tauri_utils::{ - config::{NSISInstallerMode, WebviewInstallMode}, - resources::resource_relpath, -}; +use tauri_utils::config::{NSISInstallerMode, WebviewInstallMode}; use std::{ collections::{BTreeMap, HashMap}, @@ -474,34 +471,37 @@ fn build_nsis_app_installer( } /// BTreeMap -type ResourcesMap = BTreeMap; +type ResourcesMap = BTreeMap; fn generate_resource_data(settings: &Settings) -> crate::Result { let mut resources = ResourcesMap::new(); let cwd = std::env::current_dir()?; let mut added_resources = Vec::new(); - for src in settings.resource_files() { - let src = src?; - let resource_path = dunce::canonicalize(cwd.join(&src))?; + for resource in settings.resource_files().iter() { + let resource = resource?; + + let src = cwd.join(resource.path()); + let resource_path = dunce::simplified(&src); // In some glob resource paths like `assets/**/*` a file might appear twice // because the `tauri_utils::resources::ResourcePaths` iterator also reads a directory // when it finds one. So we must check it before processing the file. - if added_resources.contains(&resource_path) { + if added_resources.contains(&resource_path.to_path_buf()) { continue; } - added_resources.push(resource_path.clone()); + added_resources.push(resource_path.to_path_buf()); - let target_path = resource_relpath(&src); + let target_path = resource.target(); resources.insert( - resource_path, + resource_path.to_path_buf().clone(), ( target_path .parent() - .map(|p| p.to_string_lossy().to_string()) - .unwrap_or_default(), - target_path, + .expect("Couldn't get parent of target path") + .to_path_buf() + .clone(), + target_path.to_path_buf().clone(), ), ); } From b2a9faa0d6499fce5a4a688b11d262d2ea804ef0 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Tue, 23 May 2023 23:24:16 -0300 Subject: [PATCH 09/11] reduce to_path_buf calls --- tooling/bundler/src/bundle/windows/nsis.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tooling/bundler/src/bundle/windows/nsis.rs b/tooling/bundler/src/bundle/windows/nsis.rs index 21b0cfa29da1..35da22787b0f 100644 --- a/tooling/bundler/src/bundle/windows/nsis.rs +++ b/tooling/bundler/src/bundle/windows/nsis.rs @@ -482,26 +482,25 @@ fn generate_resource_data(settings: &Settings) -> crate::Result { let resource = resource?; let src = cwd.join(resource.path()); - let resource_path = dunce::simplified(&src); + let resource_path = dunce::simplified(&src).to_path_buf(); // In some glob resource paths like `assets/**/*` a file might appear twice // because the `tauri_utils::resources::ResourcePaths` iterator also reads a directory // when it finds one. So we must check it before processing the file. - if added_resources.contains(&resource_path.to_path_buf()) { + if added_resources.contains(&resource_path) { continue; } - added_resources.push(resource_path.to_path_buf()); + added_resources.push(resource_path.clone()); let target_path = resource.target(); resources.insert( - resource_path.to_path_buf().clone(), + resource_path, ( target_path .parent() .expect("Couldn't get parent of target path") - .to_path_buf() - .clone(), - target_path.to_path_buf().clone(), + .to_path_buf(), + target_path.to_path_buf(), ), ); } From d5b97f0c799e0d67e5e0221191c7e606d79134be Mon Sep 17 00:00:00 2001 From: amrbashir Date: Wed, 24 May 2023 05:42:52 +0300 Subject: [PATCH 10/11] same for wix --- tooling/bundler/src/bundle/windows/msi/wix.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tooling/bundler/src/bundle/windows/msi/wix.rs b/tooling/bundler/src/bundle/windows/msi/wix.rs index 880f2f6e7e07..27ac20869ae3 100644 --- a/tooling/bundler/src/bundle/windows/msi/wix.rs +++ b/tooling/bundler/src/bundle/windows/msi/wix.rs @@ -913,21 +913,20 @@ fn generate_resource_data(settings: &Settings) -> crate::Result { let resource = resource?; let src = cwd.join(resource.path()); - let resource_path = dunce::simplified(&src); - + let resource_path = dunce::simplified(&src).to_path_buf(); // In some glob resource paths like `assets/**/*` a file might appear twice // because the `tauri_utils::resources::ResourcePaths` iterator also reads a directory // when it finds one. So we must check it before processing the file. - if added_resources.contains(&resource_path.to_path_buf()) { + if added_resources.contains(&resource_path) { continue; } - added_resources.push(resource_path.to_path_buf()); + added_resources.push(resource_path.clone()); let resource_entry = ResourceFile { id: format!("I{}", Uuid::new_v4().as_simple()), guid: Uuid::new_v4().to_string(), - path: resource_path.to_path_buf(), + path: resource_path.clone(), }; // split the resource path directories From 02bda713cfa7331665603bec6ff7bac3d16c9e1f Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Mon, 3 Jul 2023 18:14:15 -0300 Subject: [PATCH 11/11] fix change tags [skip ci] --- .changes/resources-map-bundler.md | 2 +- .changes/resources-map.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.changes/resources-map-bundler.md b/.changes/resources-map-bundler.md index f6b1024ab0ef..ccb61bbd946d 100644 --- a/.changes/resources-map-bundler.md +++ b/.changes/resources-map-bundler.md @@ -1,5 +1,5 @@ --- -"tauri-bundler": minor +"tauri-bundler": minor:feat --- Allow using a resource map instead of a simple array in `BundleSettings::resources_map`. diff --git a/.changes/resources-map.md b/.changes/resources-map.md index 96c3af6be7f6..7a8e44427c0d 100644 --- a/.changes/resources-map.md +++ b/.changes/resources-map.md @@ -1,5 +1,5 @@ --- -"tauri-utils": minor +"tauri-utils": minor:feat --- Allow specifying resources as a map specifying source and target paths.