From 608f71ea7bbd5ad2b9712ebe5b2cd750b61b4296 Mon Sep 17 00:00:00 2001 From: Jisu-Woniu <31986081+Jisu-Woniu@users.noreply.github.com> Date: Fri, 8 Dec 2023 16:06:09 +0800 Subject: [PATCH] build: :building_construction: Fix some build settings. --- CHANGELOG.md | 1 + cliff.toml | 8 +------- package.json | 2 +- src-tauri/Cargo.lock | 8 ++++---- src-tauri/Cargo.toml | 1 - src-tauri/Tauri.toml | 4 ---- src-tauri/crypto/Cargo.toml | 1 - src-tauri/src/main.rs | 2 -- vite.config.ts | 18 ++++++++---------- 9 files changed, 15 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb7124a..283f51b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file. ### Build - :zap: Remove Vue Options API support for space. +- :building_construction: Fix some build settings. ## [1.3.0] - 2023-12-07 diff --git a/cliff.toml b/cliff.toml index 3810263..0c7f388 100644 --- a/cliff.toml +++ b/cliff.toml @@ -1,9 +1,4 @@ -# git-cliff ~ default configuration file -# https://git-cliff.org/docs/configuration -# -# Lines starting with "#" are comments. -# Configuration options are organized into tables and keys. -# See documentation for more information on available options. +# git-cliff configuration file [changelog] # changelog header @@ -12,7 +7,6 @@ header = """ All notable changes to this project will be documented in this file.\n """ # template for the changelog body -# https://keats.github.io/tera/docs/#introduction body = """ {% if version %}\ ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} diff --git a/package.json b/package.json index cca4f30..2e09087 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "vue-tsc": "^1.8.25" }, "browserslist": [ - "chrome >= 105", + "edge >= 105", "safari >= 13" ] } diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 491809c..3bdc547 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -2268,9 +2268,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "overload" @@ -4532,9 +4532,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.25" +version = "0.5.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e87b8dfbe3baffbe687eef2e164e32286eff31a5ee16463ce03d991643ec94" +checksum = "b67b5f0a4e7a27a64c651977932b9dc5667ca7fc31ac44b03ed37a0cf42fdfff" dependencies = [ "memchr", ] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 8f6005d..8ab9821 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -17,7 +17,6 @@ license.workspace = true repository.workspace = true version.workspace = true -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [build-dependencies] tauri-build = { version = "1.5.0", features = [] } diff --git a/src-tauri/Tauri.toml b/src-tauri/Tauri.toml index c3a60ef..3d5de2a 100644 --- a/src-tauri/Tauri.toml +++ b/src-tauri/Tauri.toml @@ -34,9 +34,6 @@ shortDescription = "A Tauri app for signing files." [tauri.bundle.windows] -[tauri.bundle.windows.webviewInstallMode] -type = "embedBootstrapper" - [tauri.bundle.windows.nsis] displayLanguageSelector = true installMode = "both" @@ -48,7 +45,6 @@ language = ["zh-CN", "en-US"] [[tauri.windows]] label = "main" title = "数字签名工具" - fullscreen = false resizable = true width = 800 diff --git a/src-tauri/crypto/Cargo.toml b/src-tauri/crypto/Cargo.toml index d94589d..a75e4aa 100644 --- a/src-tauri/crypto/Cargo.toml +++ b/src-tauri/crypto/Cargo.toml @@ -7,7 +7,6 @@ license.workspace = true repository.workspace = true version.workspace = true -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] async-trait = "0.1.74" chrono = "0.4.31" diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index ed52fb2..9e41183 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -1,8 +1,6 @@ // Prevents additional console window on Windows in release, DO NOT REMOVE!! #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] -// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command - use crate::{ fs::{detect_file_type, get_file_names}, keygen::generate_key_pair, diff --git a/vite.config.ts b/vite.config.ts index cff8eb1..952772f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,22 +5,17 @@ import postcssPresetEnv from "postcss-preset-env"; import icons from "unplugin-icons/vite"; import { defineConfig } from "vite"; -// https://vitejs.dev/config/ export default defineConfig(async () => ({ plugins: [vue(), icons({ compiler: "vue3" })], - // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` - // - // 1. prevent vite from obscuring rust errors clearScreen: false, - // 2. tauri expects a fixed port, fail if that port is not available + server: { host: "127.0.0.1", port: 1420, strictPort: true, }, - // 3. to make use of `TAURI_DEBUG` and other env variables - // https://tauri.app/v1/api/config#buildconfig.beforedevcommand + envPrefix: [ "VITE_", "TAURI_ARCH", @@ -41,10 +36,13 @@ export default defineConfig(async () => ({ }, }, build: { - // Tauri uses Chromium on Windows and WebKit on macOS and Linux - target: process.env.TAURI_PLATFORM == "windows" ? "chrome105" : "safari13", + // Tauri uses Edge on Windows and WebKit on macOS and Linux + target: process.env.TAURI_PLATFORM == "windows" ? "edge105" : "safari13", // produce sourcemaps for debug builds sourcemap: !!process.env.TAURI_DEBUG, }, - define: { __VUE_OPTIONS_API__: false }, + define: { + // Remove Vue Options API support for memory consumption. + __VUE_OPTIONS_API__: false, + }, }));