mirror of https://github.com/tauri-apps/tauri
chore: merge remote-tracking branch '1.x' into v2 (#9479)
* chore: port PR template from `dev` branch (#9004) * fix(runtime-wry): avoid panic during clipboard initialization on wayland (#9003) closes #8964 * ci: downgrade thread_local to 1.1.7 in msrv list (#9012) * Apply Version Updates From Current Changes (v1) (#9013) Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com> * fix(bundler): escape potentially problematic strings in an XML (#9040) * fix(bundler): escape potentially problematic strings in an XML (#9030) - replace characters invalid in XML with their escaped form to properly bundle resources with such characters in their pathnames. * change file * fix(cli): use `matched_path_or_any_parents` when checking if a file is ignored (#8903) * fix: taurignore ignoreing folders not working for watch * docs: add to changes * fix: panic: path is expected to be under the root * Update taurignore-ignoring-folders-not-working-for-watch.md * Update taurignore-ignoring-folders-not-working-for-watch.md * fix(cli): migrate to stable features of `log` crate (#9119) * fix(cli): migrate to stable features of `log` crate * to_cow_str * Apply Version Updates From Current Changes (v1) (#9074) Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com> * fix(core/path): remove suffix in basename only once (#9166) * fix(core/path): remove suffix in basename only once ref: #9064 * Update tooling/api/src/path.ts --------- Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app> * fix(cli): Clone Options struct after mutating it. (#9188) * fix(bundler): Fix nsis resource paths on non-windows build systems. (#9281) * fix(bundler): Fix nsis resource paths on non-windows build systems. * remove leftover from alternative * fix(bundler/nsis): Don't use /R flag on installation dir (#9282) * fix(cli): upgrade heck to better support Chinese/Japanese prodcut name on Linux (#9298) * chore: fix clippy false positive (#9329) * fix(cli/info): fix crash when checking node version (#9411) closes #9396 --------- Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com> Co-authored-by: bifs <127015052+bifs@users.noreply.github.com> Co-authored-by: anatawa12 <anatawa12@icloud.com> Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app> Co-authored-by: Jet Li <jing.i.qin@icloud.com>
This commit is contained in:
parent
a07b513201
commit
e64b8f1dce
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'tauri-bundler': 'patch:bug'
|
||||
---
|
||||
|
||||
The NSIS uninstaller now won't mindlessly try to remove the whole installation folder when the "Remove application data" checkbox was ticked. This prevents data loss when the app was installed in a folder which contained other files.
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'tauri-bundler': 'patch:bug'
|
||||
---
|
||||
|
||||
Fixed an issue causing the NSIS bundler to install resources incorrectly when the installer was built on a non-Windows system.
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
'tauri-cli': 'patch:bug'
|
||||
'@tauri-apps/cli': 'patch:bug'
|
||||
---
|
||||
|
||||
Upgrade `heck` to v0.5 to better support Chinese and Japanese product name, because Chinese do not have word separation.
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
'tauri-cli': 'patch:bug'
|
||||
'@tauri-apps/cli': 'patch:bug'
|
||||
---
|
||||
|
||||
Fixed an issue causing the `build.runner` and `build.features` configs to not take effect.
|
|
@ -99,6 +99,7 @@ jobs:
|
|||
cargo update -p serde_json --precise 1.0.97
|
||||
cargo update -p petgraph --precise 0.6.3
|
||||
cargo update -p os_str_bytes --precise 6.5.1
|
||||
cargo update -p thread_local --precise 1.1.7
|
||||
|
||||
- name: test build
|
||||
run: cargo check --target ${{ matrix.platform.target }} --features tracing,compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart,test
|
||||
|
|
|
@ -3558,7 +3558,7 @@ dependencies = [
|
|||
"cargo_toml",
|
||||
"dirs-next",
|
||||
"glob",
|
||||
"heck 0.4.1",
|
||||
"heck 0.5.0",
|
||||
"json-patch",
|
||||
"quote",
|
||||
"schemars",
|
||||
|
@ -3687,7 +3687,7 @@ dependencies = [
|
|||
"dunce",
|
||||
"getrandom 0.2.12",
|
||||
"glob",
|
||||
"heck 0.4.1",
|
||||
"heck 0.5.0",
|
||||
"html5ever",
|
||||
"infer",
|
||||
"json-patch",
|
||||
|
|
|
@ -33,7 +33,7 @@ tauri-utils = { version = "2.0.0-beta.12", path = "../tauri-utils", features = [
|
|||
cargo_toml = "0.17"
|
||||
serde = "1"
|
||||
serde_json = "1"
|
||||
heck = "0.4"
|
||||
heck = "0.5"
|
||||
json-patch = "1.2"
|
||||
walkdir = "2"
|
||||
tauri-winres = "0.1"
|
||||
|
|
|
@ -351,6 +351,12 @@
|
|||
- Support `with_webview` for Android platform alowing execution of JNI code in context.
|
||||
- [8ea87e9c](https://www.github.com/tauri-apps/tauri/commit/8ea87e9c9ca8ba4c7017c8281f78aacd08f45785) feat(android): with_webview access for jni execution ([#5148](https://www.github.com/tauri-apps/tauri/pull/5148)) on 2022-09-08
|
||||
|
||||
## \[0.14.5]
|
||||
|
||||
### What's Changed
|
||||
|
||||
- [`d42668ce`](https://www.github.com/tauri-apps/tauri/commit/d42668ce17494ab778f436aaa9b216d6db3f0b31)([#9003](https://www.github.com/tauri-apps/tauri/pull/9003)) Fix panic during intialization on wayland when using `clipboard` feature, instead propagate the error during API usage.
|
||||
|
||||
## \[0.14.4]
|
||||
|
||||
### Bug Fixes
|
||||
|
|
|
@ -44,7 +44,7 @@ log = "0.4.21"
|
|||
cargo_metadata = { version = "0.18", optional = true }
|
||||
|
||||
[target."cfg(target_os = \"linux\")".dependencies]
|
||||
heck = "0.4"
|
||||
heck = "0.5"
|
||||
|
||||
[target."cfg(target_os = \"macos\")".dependencies]
|
||||
swift-rs = { version = "1.0.6", optional = true, features = [ "build" ] }
|
||||
|
|
|
@ -225,6 +225,13 @@
|
|||
- First mobile alpha release!
|
||||
- [fa3a1098](https://www.github.com/tauri-apps/tauri/commit/fa3a10988a03aed1b66fb17d893b1a9adb90f7cd) feat(ci): prepare 2.0.0-alpha.0 ([#5786](https://www.github.com/tauri-apps/tauri/pull/5786)) on 2022-12-08
|
||||
|
||||
## \[1.5.1]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- [`516386158`](https://www.github.com/tauri-apps/tauri/commit/5163861588b229fe2e13e61bf65fbf5b88743bb3)([#9040](https://www.github.com/tauri-apps/tauri/pull/9040)) On Windows, fix building WiX installer when resources contains an XML charcter that should be escaped.
|
||||
- [`97a05145f`](https://www.github.com/tauri-apps/tauri/commit/97a05145fbb24533526eba6589594f03046e11df)([#9119](https://www.github.com/tauri-apps/tauri/pull/9119)) Fix compilation error due to dependency on unstable features of `log` crate.
|
||||
|
||||
## \[1.5.0]
|
||||
|
||||
### New Features
|
||||
|
|
|
@ -63,7 +63,7 @@ plist = "1"
|
|||
regex = "1"
|
||||
|
||||
[target."cfg(target_os = \"linux\")".dependencies]
|
||||
heck = "0.4"
|
||||
heck = "0.5"
|
||||
ar = "0.9.0"
|
||||
md5 = "0.7.0"
|
||||
rpm = "0.14.0"
|
||||
|
|
|
@ -16,7 +16,7 @@ use crate::bundle::{
|
|||
},
|
||||
};
|
||||
use anyhow::{bail, Context};
|
||||
use handlebars::{to_json, Handlebars};
|
||||
use handlebars::{html_escape, to_json, Handlebars};
|
||||
use regex::Regex;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{
|
||||
|
@ -121,7 +121,7 @@ impl ResourceDirectory {
|
|||
r#"<Component Id="{id}" Guid="{guid}" Win64="$(var.Win64)" KeyPath="yes"><File Id="PathFile_{id}" Source="{path}" /></Component>"#,
|
||||
id = file.id,
|
||||
guid = file.guid,
|
||||
path = file.path.display()
|
||||
path = html_escape(&file.path.display().to_string())
|
||||
).as_str()
|
||||
);
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ impl ResourceDirectory {
|
|||
format!(
|
||||
r#"<Directory Id="I{id}" Name="{name}">{files}{directories}</Directory>"#,
|
||||
id = Uuid::new_v4().as_simple(),
|
||||
name = self.name,
|
||||
name = html_escape(&self.name),
|
||||
files = files,
|
||||
directories = directories,
|
||||
)
|
||||
|
|
|
@ -339,6 +339,31 @@ fn build_nsis_app_installer(
|
|||
resources_ancestors.sort_by_key(|p| std::cmp::Reverse(p.components().count()));
|
||||
resources_ancestors.pop(); // Last one is always ""
|
||||
|
||||
// We need to convert / to \ for nsis to move the files into the correct dirs
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
let resources: ResourcesMap = resources
|
||||
.into_iter()
|
||||
.map(|(r, p)| {
|
||||
(
|
||||
r,
|
||||
(
|
||||
p.0.display().to_string().replace('/', "\\").into(),
|
||||
p.1.display().to_string().replace('/', "\\").into(),
|
||||
),
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
let resources_ancestors: Vec<PathBuf> = resources_ancestors
|
||||
.into_iter()
|
||||
.map(|p| p.display().to_string().replace('/', "\\").into())
|
||||
.collect();
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
let resources_dirs: Vec<PathBuf> = resources_dirs
|
||||
.into_iter()
|
||||
.map(|p| p.display().to_string().replace('/', "\\").into())
|
||||
.collect();
|
||||
|
||||
data.insert("resources_ancestors", to_json(resources_ancestors));
|
||||
data.insert("resources_dirs", to_json(resources_dirs));
|
||||
data.insert("resources", to_json(&resources));
|
||||
|
|
|
@ -674,14 +674,10 @@ Section Uninstall
|
|||
; Delete uninstaller
|
||||
Delete "$INSTDIR\uninstall.exe"
|
||||
|
||||
${If} $DeleteAppDataCheckboxState == 1
|
||||
RMDir /R /REBOOTOK "$INSTDIR"
|
||||
${Else}
|
||||
{{#each resources_ancestors}}
|
||||
RMDir /REBOOTOK "$INSTDIR\\{{this}}"
|
||||
{{/each}}
|
||||
RMDir "$INSTDIR"
|
||||
${EndIf}
|
||||
{{#each resources_ancestors}}
|
||||
RMDir /REBOOTOK "$INSTDIR\\{{this}}"
|
||||
{{/each}}
|
||||
RMDir "$INSTDIR"
|
||||
|
||||
; Remove start menu shortcut
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $AppStartMenuFolder
|
||||
|
|
|
@ -564,6 +564,17 @@
|
|||
- First mobile alpha release!
|
||||
- [fa3a1098](https://www.github.com/tauri-apps/tauri/commit/fa3a10988a03aed1b66fb17d893b1a9adb90f7cd) feat(ci): prepare 2.0.0-alpha.0 ([#5786](https://www.github.com/tauri-apps/tauri/pull/5786)) on 2022-12-08
|
||||
|
||||
## \[1.5.11]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- [`97a05145f`](https://www.github.com/tauri-apps/tauri/commit/97a05145fbb24533526eba6589594f03046e11df)([#9119](https://www.github.com/tauri-apps/tauri/pull/9119)) Fix compilation error due to dependency on unstable features of `log` crate.
|
||||
- [`b15948b11`](https://www.github.com/tauri-apps/tauri/commit/b15948b11c0e362eea7ef57a4606f15f7dbd886b)([#8903](https://www.github.com/tauri-apps/tauri/pull/8903)) Fix `.taurignore` failing to ignore in some cases.
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `tauri-bundler@1.5.1`
|
||||
|
||||
## \[1.5.10]
|
||||
|
||||
### New Features
|
||||
|
|
|
@ -4866,7 +4866,7 @@ dependencies = [
|
|||
"flate2",
|
||||
"glob",
|
||||
"handlebars 5.1.0",
|
||||
"heck 0.4.1",
|
||||
"heck 0.5.0",
|
||||
"hex",
|
||||
"image",
|
||||
"log",
|
||||
|
@ -5023,7 +5023,7 @@ dependencies = [
|
|||
"dunce",
|
||||
"getrandom 0.2.12",
|
||||
"glob",
|
||||
"heck 0.4.1",
|
||||
"heck 0.5.0",
|
||||
"html5ever",
|
||||
"infer 0.15.0",
|
||||
"json-patch",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"cli.js": {
|
||||
"version": "1.5.10",
|
||||
"version": "1.5.11",
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"tauri": "1.6.0",
|
||||
"tauri": "1.6.1",
|
||||
"tauri-build": "1.5.1"
|
||||
}
|
||||
|
|
|
@ -528,6 +528,16 @@
|
|||
- First mobile alpha release!
|
||||
- [fa3a1098](https://www.github.com/tauri-apps/tauri/commit/fa3a10988a03aed1b66fb17d893b1a9adb90f7cd) feat(ci): prepare 2.0.0-alpha.0 ([#5786](https://www.github.com/tauri-apps/tauri/pull/5786)) on 2022-12-08
|
||||
|
||||
## \[1.5.11]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- [`b15948b11`](https://www.github.com/tauri-apps/tauri/commit/b15948b11c0e362eea7ef57a4606f15f7dbd886b)([#8903](https://www.github.com/tauri-apps/tauri/pull/8903)) Fix `.taurignore` failing to ignore in some cases.
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `tauri-cli@1.5.11`
|
||||
|
||||
## \[1.5.10]
|
||||
|
||||
### Bug Fixes
|
||||
|
|
|
@ -263,7 +263,11 @@ struct IgnoreMatcher(Vec<Gitignore>);
|
|||
impl IgnoreMatcher {
|
||||
fn is_ignore(&self, path: &Path, is_dir: bool) -> bool {
|
||||
for gitignore in &self.0 {
|
||||
if gitignore.matched(path, is_dir).is_ignore() {
|
||||
if path.starts_with(gitignore.path())
|
||||
&& gitignore
|
||||
.matched_path_or_any_parents(path, is_dir)
|
||||
.is_ignore()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue