Skip to content

Commit

Permalink
feat(updater): support updating using non-zipped files (#10939)
Browse files Browse the repository at this point in the history
* feat(updater): support updating using non-zipped files

* minor

* fix compilation

* clippy

* pass `/UPDATE` to NSIS installer on updates

* clippy

* revert user-agent change

* add v1 -> v2 migration e2e test

* fix npm exec on windows

* downgrade serial-test for msrv

* fix sig ext for nsis v2

* fix windows e2e test

* add lcense headers

* fix conflict on e2e test on windows [skip ci]

---------

Co-authored-by: Lucas Nogueira <[email protected]>
  • Loading branch information
amrbashir and lucasfernog authored Sep 11, 2024
1 parent bc85e06 commit 50fbf7b
Show file tree
Hide file tree
Showing 35 changed files with 5,073 additions and 290 deletions.
5 changes: 5 additions & 0 deletions .changes/non-zipped-updates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": "minor:feat"
---

Add support for updating using non-zipped files. Only `.exe`(NSIS) and `.msi` (MSI Installer) on Windows and `.AppImage` on Linux.
5 changes: 5 additions & 0 deletions .changes/update-nsis-arg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": "minor:feat"
---

Pass `/UPDATE` flag to NSIS installer on updates
47 changes: 45 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-config-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@
]
},
{
"description": "Shows the title bar as a transparent overlay over the window's content.\n\nKeep in mind: - The height of the title bar is different on different OS versions, which can lead to window the controls and title not being where you don't expect. - You need to define a custom drag region to make your window draggable, however due to a limitation you can't drag the window when it's not in focus <https://github.com/tauri-apps/tauri/issues/4316>. - The color of the window title depends on the system theme.",
"description": "Shows the title bar as a transparent overlay over the window's content.\n\nKeep in mind: - The height of the title bar is different on different OS versions, which can lead to the window controls and title not being where you expect them to be. - You need to define a custom drag region to make your window draggable, however due to a limitation you can't drag the window when it's not in focus <https://github.com/tauri-apps/tauri/issues/4316>. - The color of the window title depends on the system theme.",
"type": "string",
"enum": [
"Overlay"
Expand Down
2 changes: 0 additions & 2 deletions core/tauri-runtime-wry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2230,8 +2230,6 @@ impl<T: UserEvent> Runtime<T> for Wry<T> {

#[cfg(desktop)]
fn run_iteration<F: FnMut(RunEvent<T>) + 'static>(&mut self, mut callback: F) -> RunIteration {
use std::sync::atomic::Ordering;

use wry::application::platform::run_return::EventLoopExtRunReturn;
let windows = self.context.main_thread.windows.clone();
let webview_id_map = self.context.webview_id_map.clone();
Expand Down
3 changes: 2 additions & 1 deletion core/tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ updater = [
"base64",
"http-api",
"dialog-ask",
"fs-extract-api"
"fs-extract-api",
"infer"
]
http-api = [ "reqwest", "bytes", "indexmap" ]
http-multipart = [ "reqwest/multipart" ]
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ mod test_utils {
fn check_spawn_task(task in "[a-z]+") {
// create dummy task function
let dummy_task = async move {
format!("{task}-run-dummy-task");
let _ = format!("{task}-run-dummy-task");
};
// call spawn
crate::async_runtime::spawn(dummy_task);
Expand Down
Loading

0 comments on commit 50fbf7b

Please sign in to comment.