From 38a72baa82b2c7739449defeadfbca8b1bb3733b Mon Sep 17 00:00:00 2001 From: William Henderson Date: Tue, 28 Jun 2022 15:34:35 +0100 Subject: [PATCH] Configured automatic updates for Equion --- nginx.conf | 1 + nginx.prod.conf | 1 + range/src-tauri/Cargo.lock | 22 ++++++++++++++++++++++ range/src-tauri/Cargo.toml | 2 +- range/src-tauri/tauri.conf.json | 9 +++++++-- 5 files changed, 32 insertions(+), 3 deletions(-) diff --git a/nginx.conf b/nginx.conf index 766aaa8..963d89c 100644 --- a/nginx.conf +++ b/nginx.conf @@ -49,6 +49,7 @@ http { location /release/ { proxy_pass http://download_manager/; proxy_set_header Host $host; + client_max_body_size 32M; } location /release/download/ { diff --git a/nginx.prod.conf b/nginx.prod.conf index aef1474..6804b4b 100644 --- a/nginx.prod.conf +++ b/nginx.prod.conf @@ -41,6 +41,7 @@ http { location /release/ { proxy_pass http://download_manager/; proxy_set_header Host $host; + client_max_body_size 32M; } location /release/download/ { diff --git a/range/src-tauri/Cargo.lock b/range/src-tauri/Cargo.lock index 9fe4929..8c939c5 100644 --- a/range/src-tauri/Cargo.lock +++ b/range/src-tauri/Cargo.lock @@ -1434,6 +1434,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "minisign-verify" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881" + [[package]] name = "miniz_oxide" version = "0.5.1" @@ -2672,6 +2678,7 @@ checksum = "81af088a87f908dab3a268f92e3c331e911bed6b1756bbfaeadedfe9dd40fe4f" dependencies = [ "anyhow", "attohttpc", + "base64", "bincode", "cocoa", "dirs-next", @@ -2687,6 +2694,7 @@ dependencies = [ "ico", "ignore", "infer", + "minisign-verify", "notify-rust", "objc", "once_cell", @@ -2713,12 +2721,14 @@ dependencies = [ "tauri-utils", "tempfile", "thiserror", + "time", "tokio", "url", "uuid 1.1.2", "webkit2gtk", "webview2-com", "windows 0.37.0", + "zip", ] [[package]] @@ -2916,6 +2926,7 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" dependencies = [ + "itoa 1.0.1", "libc", "num_threads", ] @@ -3656,3 +3667,14 @@ name = "xml-rs" version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" + +[[package]] +name = "zip" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf225bcf73bb52cbb496e70475c7bd7a3f769df699c0020f6c7bd9a96dcf0b8d" +dependencies = [ + "byteorder", + "crc32fast", + "crossbeam-utils", +] diff --git a/range/src-tauri/Cargo.toml b/range/src-tauri/Cargo.toml index 55644e3..fdf75cb 100644 --- a/range/src-tauri/Cargo.toml +++ b/range/src-tauri/Cargo.toml @@ -17,7 +17,7 @@ tauri-build = { version = "1.0.0-rc.10", features = [] } [dependencies] serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } -tauri = { version = "1.0.0-rc.10", features = ["api-all", "icon-ico", "icon-png", "system-tray"] } +tauri = { version = "1.0.0-rc.10", features = ["api-all", "icon-ico", "icon-png", "system-tray", "updater"] } base64 = "^0.13.0" tauri-plugin-deep-link = { git = "https://github.com/FabianLars/tauri-plugin-deep-link", rev = "4e014f28767f69d097b59e1b40ca3384d94b0029"} diff --git a/range/src-tauri/tauri.conf.json b/range/src-tauri/tauri.conf.json index 231b31c..1e3c888 100644 --- a/range/src-tauri/tauri.conf.json +++ b/range/src-tauri/tauri.conf.json @@ -1,6 +1,6 @@ { "package": { - "productName": "equion", + "productName": "Equion", "version": "0.1.0" }, "build": { @@ -31,7 +31,12 @@ } }, "updater": { - "active": false + "active": true, + "endpoints": [ + "https://equion.whenderson.dev/release/update/{{target}}/{{current_version}}" + ], + "dialog": true, + "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEYzRDgxQUVCQzcxNDc0ODAKUldTQWRCVEg2eHJZOC9FYkNqdUllN013QWZDRVVoT3BJdFFieEt0L2FDdDNBVU5leWM1bDNpV1cK" }, "allowlist": { "all": true