Skip to content

Commit

Permalink
chore: merge remote-tracking branch '1.x' into v2 (#9479)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
8 people committed Apr 18, 2024
1 parent a07b513 commit e64b8f1
Show file tree
Hide file tree
Showing 19 changed files with 103 additions and 21 deletions.
5 changes: 5 additions & 0 deletions .changes/bundler-r-flag.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions .changes/bundler-resources-unix.md
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 6 additions & 0 deletions .changes/cli-chinese-product-name.md
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 6 additions & 0 deletions .changes/runner-config.md
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions .github/workflows/covector-version-or-publish-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/tauri-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions core/tauri-runtime-wry/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/tauri-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" ] }
Expand Down
7 changes: 7 additions & 0 deletions tooling/bundler/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tooling/bundler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions tooling/bundler/src/bundle/windows/msi/wix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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()
);
}
Expand All @@ -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,
)
Expand Down
25 changes: 25 additions & 0 deletions tooling/bundler/src/bundle/windows/nsis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
12 changes: 4 additions & 8 deletions tooling/bundler/src/bundle/windows/templates/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions tooling/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tooling/cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tooling/cli/metadata.json
Original file line number Diff line number Diff line change
@@ -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"
}
10 changes: 10 additions & 0 deletions tooling/cli/node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion tooling/cli/src/interface/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit e64b8f1

Please sign in to comment.