From f56a0da778d63a04afbb7178686c6a46f8c6aa47 Mon Sep 17 00:00:00 2001 From: Sparkenstein Date: Thu, 14 Nov 2024 19:18:16 +0530 Subject: [PATCH 1/3] fix: missing plugin --- src-tauri/src/main.rs | 20 +++++++++----------- src-tauri/tauri.conf.json | 28 ++++++---------------------- 2 files changed, 15 insertions(+), 33 deletions(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index bba96ac..b587587 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -169,21 +169,19 @@ fn main() { read_qr ]) .setup(|app| { + #[cfg(desktop)] + let res = app + .handle() + .plugin(tauri_plugin_updater::Builder::new().build()); + if res.is_err() { + println!("Error: {:?}", res.err()); + } + WebviewWindowBuilder::new(app, "main", WebviewUrl::App("index.html".into())) .title("DevTools-X") - .inner_size(1000.0, 650.0) + .inner_size(1000.0, 850.0) .resizable(true) .fullscreen(false) - .on_web_resource_request(|_, res| { - res.headers_mut().insert( - "Cross-Origin-Embedder-Policy", - "require-corp".try_into().unwrap(), - ); - res.headers_mut().append( - "Cross-Origin-Opener-Policy", - "same-origin".try_into().unwrap(), - ); - }) .build()?; // #[cfg(debug_assertions)] let process_arg: Vec = env::args().collect(); diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 64f5cc2..8c3b485 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -48,9 +48,7 @@ "identifier": "com.fosslife.devtoolsx", "plugins": { "sql": { - "preload": [ - "sqlite:devtools.db" - ] + "preload": ["sqlite:devtools.db"] }, "updater": { "endpoints": [ @@ -63,13 +61,9 @@ "security": { "assetProtocol": { "enable": true, - "scope": [ - "http://asset.localhost" - ] + "scope": ["http://asset.localhost"] }, - "dangerousDisableAssetCspModification": [ - "style-src" - ], + "dangerousDisableAssetCspModification": ["style-src"], "csp": { "default-src": [ "'self'", @@ -82,19 +76,9 @@ "https:", "tauri:" ], - "worker-src": [ - "'self'", - "blob:", - "https://unpkg.com" - ], - "script-src": [ - "'self'", - "'unsafe-inline'" - ], - "style-src": [ - "'self'", - "'unsafe-inline'" - ] + "worker-src": ["'self'", "blob:", "https://unpkg.com"], + "script-src": ["'self'", "'unsafe-inline'"], + "style-src": ["'self'", "'unsafe-inline'"] } }, "windows": [] From 5766675852fd646d4ea114175af4f7a9ba8b541a Mon Sep 17 00:00:00 2001 From: Sparkenstein Date: Thu, 14 Nov 2024 19:22:33 +0530 Subject: [PATCH 2/3] release: v3.3.1 --- package.json | 2 +- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index b7498c8..7383703 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "devtools-x", - "version": "3.3.0", + "version": "3.3.1", "license": "MIT", "type": "module", "scripts": { diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 71749ca..689259f 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1151,7 +1151,7 @@ dependencies = [ [[package]] name = "devtools-x" -version = "3.3.0" +version = "3.3.1" dependencies = [ "anyhow", "bardecoder", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 75604bb..a4fd653 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "devtools-x" -version = "3.3.0" +version = "3.3.1" description = "Developer tools desktop application" authors = ["Sparkenstein"] license = "MIT" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 8c3b485..6b7de4d 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -44,7 +44,7 @@ }, "productName": "devtools-x", "mainBinaryName": "devtools-x", - "version": "3.3.0", + "version": "3.3.1", "identifier": "com.fosslife.devtoolsx", "plugins": { "sql": { From 7225e0c9a3935ce1d97a6789a135929c0355df33 Mon Sep 17 00:00:00 2001 From: Sparkenstein Date: Thu, 14 Nov 2024 21:04:42 +0530 Subject: [PATCH 3/3] release: v3.3.2 --- package.json | 2 +- scripts/sign.mjs | 48 ++++++++++++++++++++++----------------- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- 5 files changed, 31 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index 7383703..35230cb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "devtools-x", - "version": "3.3.1", + "version": "3.3.2", "license": "MIT", "type": "module", "scripts": { diff --git a/scripts/sign.mjs b/scripts/sign.mjs index 7675bc2..e774c75 100644 --- a/scripts/sign.mjs +++ b/scripts/sign.mjs @@ -28,10 +28,10 @@ const releaseData = { notes: `https://github.com/${repoMetaData.owner}/${repoMetaData.repo}/releases/tag/${latestRelease.tag_name}`, pub_date: new Date().toISOString(), platforms: { - // "darwin-aarch64": { - // signature: "", - // url: "", - // }, + "darwin-aarch64": { + signature: "", + url: "", + }, "darwin-x86_64": { signature: "", url: "", @@ -51,29 +51,35 @@ const promises = latestRelease.assets.map( async ({ name, browser_download_url }) => { const signature = await getSignature(browser_download_url); - if (name.endsWith(".app.tar.gz")) { - // releaseData.platforms["darwin-aarch64"].url = browser_download_url; - releaseData.platforms["darwin-x86_64"].url = browser_download_url; + // For Mac + if (name.includes("_aarch64.app.tar.gz")) { + releaseData.platforms["darwin-aarch64"].url = browser_download_url; } - - if (name.endsWith(".app.tar.gz.sig")) { - // releaseData.platforms["darwin-aarch64"].signature = signature; - releaseData.platforms["darwin-x86_64"].signature = signature; + if (name.includes("_x64.app.tar.gz")) { + releaseData.platforms["darwin-x86_64"].url = browser_download_url; } - if (name.endsWith(".AppImage.tar.gz")) { + // For Linux + if (name.includes("_amd64.AppImage") && !name.endsWith(".sig")) { releaseData.platforms["linux-x86_64"].url = browser_download_url; } - if (name.endsWith(".AppImage.tar.gz.sig")) { - releaseData.platforms["linux-x86_64"].signature = signature; - } - - if (name.endsWith(".msi.zip")) { + // For Windows + if (name.includes("_x64_en-US.msi") && !name.endsWith(".sig")) { releaseData.platforms["windows-x86_64"].url = browser_download_url; } - if (name.endsWith(".msi.zip.sig")) { + // Signatures + if (name.includes("_aarch64.app.tar.gz.sig")) { + releaseData.platforms["darwin-aarch64"].signature = signature; + } + if (name.includes("_x64.app.tar.gz.sig")) { + releaseData.platforms["darwin-x86_64"].signature = signature; + } + if (name.includes("_amd64.AppImage.sig")) { + releaseData.platforms["linux-x86_64"].signature = signature; + } + if (name.includes("_x64_en-US.msi.sig")) { releaseData.platforms["windows-x86_64"].signature = signature; } } @@ -81,9 +87,9 @@ const promises = latestRelease.assets.map( await Promise.allSettled(promises); -// if (!releaseData.platforms["darwin-aarch64"].url) { -// throw new Error("Failed to get release for MacOS"); -// } +if (!releaseData.platforms["darwin-aarch64"].url) { + throw new Error("Failed to get release for MacOS"); +} if (!releaseData.platforms["linux-x86_64"].url) { throw new Error("Failed to get release for Linux"); diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 689259f..6dc0a8e 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1151,7 +1151,7 @@ dependencies = [ [[package]] name = "devtools-x" -version = "3.3.1" +version = "3.3.2" dependencies = [ "anyhow", "bardecoder", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index a4fd653..f8d6beb 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "devtools-x" -version = "3.3.1" +version = "3.3.2" description = "Developer tools desktop application" authors = ["Sparkenstein"] license = "MIT" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 6b7de4d..7e2bb59 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -44,7 +44,7 @@ }, "productName": "devtools-x", "mainBinaryName": "devtools-x", - "version": "3.3.1", + "version": "3.3.2", "identifier": "com.fosslife.devtoolsx", "plugins": { "sql": {