build(tauri): 更改打包配置

This commit is contained in:
BTMuli
2023-03-30 14:20:20 +08:00
parent cee575ad6b
commit 3953b98a48
4 changed files with 38 additions and 8 deletions

21
src-tauri/Cargo.lock generated
View File

@@ -1404,6 +1404,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.6.2"
@@ -2617,6 +2623,7 @@ checksum = "fe7e0f1d535e7cbbbab43c82be4fc992b84f9156c16c160955617e0260ebc449"
dependencies = [
"anyhow",
"attohttpc",
"base64 0.13.1",
"cocoa",
"dirs-next",
"embed_plist",
@@ -2629,6 +2636,7 @@ dependencies = [
"heck 0.4.1",
"http",
"ignore",
"minisign-verify",
"notify-rust",
"objc",
"once_cell",
@@ -2654,12 +2662,14 @@ dependencies = [
"tauri-utils",
"tempfile",
"thiserror",
"time",
"tokio",
"url",
"uuid 1.3.0",
"webkit2gtk",
"webview2-com",
"windows 0.39.0",
"zip",
]
[[package]]
@@ -3625,3 +3635,14 @@ checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc"
dependencies = [
"libc",
]
[[package]]
name = "zip"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0445d0fbc924bb93539b4316c11afb121ea39296f99a3c4c9edad09e3658cdef"
dependencies = [
"byteorder",
"crc32fast",
"crossbeam-utils",
]

View File

@@ -13,7 +13,7 @@ edition = "2021"
tauri-build = { version = "1.2", features = [] }
[dependencies]
tauri = { version = "1.2", features = ["api-all"] }
tauri = { version = "1.2", features = ["api-all", "updater"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

View File

@@ -2,7 +2,7 @@
"build": {
"beforeDevCommand": "npm run dev",
"beforeBuildCommand": "npm run build",
"devPath": "http://localhost:1420",
"devPath": "http://localhost:3000",
"distDir": "../dist",
"withGlobalTauri": true
},
@@ -20,7 +20,11 @@
"http": {
"all": true,
"request": true,
"scope": ["https://**", "http://**"]
"scope": [
"https://api-takumi.mihoyo.com/*",
"https://bbs-api.mihoyo.com/*",
"https://bbs.mihoyo.com/*"
]
},
"shell": {
"all": false,
@@ -42,15 +46,20 @@
"csp": null
},
"updater": {
"active": false
"active": true,
"dialog": true,
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEU5OEE2RkU0QUZCMTMzMUEKUldRYU03R3Y1RytLNlI4bytTRDhpYTNTL2lTOUVZeWQwOTAxNHBock8zY3FrdVliR2kvdHhoN2IK"
},
"windows": [
{
"fullscreen": false,
"resizable": true,
"title": "tauri-genshin",
"width": 1540,
"height": 912
"title": "Tauri.Genshin v0.0.0-alpha",
"label": "tauri-genshin",
"width": 1600,
"height": 900,
"center": true,
"transparent": true
}
]
}

View File

@@ -12,7 +12,7 @@ export default defineConfig({
clearScreen: false,
// tauri expects a fixed port, fail if that port is not available
server: {
port: 1420,
port: 3000,
strictPort: true,
},
// to make use of `TAURI_DEBUG` and other env variables