mirror of
https://github.com/storytold/craft-anything.git
synced 2026-11-19 05:50:53 +01:00
Add Help > Check for Updates and bump to 0.6.1 (#1706)
* feat(updates): add manual release checks and verified native updates * chore: bump version to 0.6.1 * fix(flatpak): honor the launcher version choices * fix(updates): report restart outcomes without UI process side effects * fix(i18n): translate updater controls in the complete catalogs * test: document native updater startup as UI plumbing
This commit is contained in:
1 parent
ab79ec87a4
commit
5b3f1d818f
27 files changed
+1089
-22
No files matched your search
Generated
+277
-20
@@ -866,6 +866,15 @@ dependencies = [
|
||||
"rand_core 0.10.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "chrono"
|
||||
version = "0.4.45"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327"
|
||||
dependencies = [
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cipher"
|
||||
version = "0.4.4"
|
||||
@@ -1025,6 +1034,15 @@ version = "0.9.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
|
||||
|
||||
[[package]]
|
||||
name = "constant_time_eq"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9eb6feb175df65d0a3ccd3e73484e940d0ac664e8034f0519fd49a93db3071d9"
|
||||
dependencies = [
|
||||
"rustversion",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cookie-factory"
|
||||
version = "0.3.3"
|
||||
@@ -1122,7 +1140,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "craft-anything"
|
||||
version = "0.4.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"craft-anything-ai",
|
||||
"craft-anything-engine",
|
||||
@@ -1138,7 +1156,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "craft-anything-ai"
|
||||
version = "0.4.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"craft-anything-engine",
|
||||
"craft-anything-engines",
|
||||
@@ -1160,7 +1178,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "craft-anything-analysis"
|
||||
version = "0.4.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"craft-anything-disasm",
|
||||
"craft-anything-evidence",
|
||||
@@ -1173,7 +1191,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "craft-anything-cli"
|
||||
version = "0.4.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"craft-anything-ai",
|
||||
@@ -1193,7 +1211,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "craft-anything-disasm"
|
||||
version = "0.4.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"craft-anything-formats",
|
||||
"craft-anything-testkit",
|
||||
@@ -1207,7 +1225,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "craft-anything-engine"
|
||||
version = "0.4.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"bitflags 2.13.2",
|
||||
@@ -1238,7 +1256,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "craft-anything-engines"
|
||||
version = "0.4.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"craft-anything-evidence",
|
||||
@@ -1260,7 +1278,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "craft-anything-evidence"
|
||||
version = "0.4.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"hex",
|
||||
"serde",
|
||||
@@ -1271,7 +1289,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "craft-anything-formats"
|
||||
version = "0.4.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"bzip2-rs",
|
||||
"craft-anything-testkit",
|
||||
@@ -1295,7 +1313,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "craft-anything-js"
|
||||
version = "0.4.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"craft-anything-testkit",
|
||||
"hex",
|
||||
@@ -1315,7 +1333,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "craft-anything-mcp"
|
||||
version = "0.4.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"craft-anything-engine",
|
||||
"craft-anything-evidence",
|
||||
@@ -1328,7 +1346,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "craft-anything-platform"
|
||||
version = "0.4.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"craft-anything-evidence",
|
||||
"hex",
|
||||
@@ -1348,7 +1366,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "craft-anything-setup"
|
||||
version = "0.4.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"craft-anything-engine",
|
||||
"craft-anything-engines",
|
||||
@@ -1367,7 +1385,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "craft-anything-testkit"
|
||||
version = "0.4.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"miniz_oxide 0.8.9",
|
||||
"p256",
|
||||
@@ -1380,7 +1398,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "craft-anything-ui-egui"
|
||||
version = "0.4.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"arboard",
|
||||
"craft-anything-ai",
|
||||
@@ -1389,6 +1407,7 @@ dependencies = [
|
||||
"craft-anything-platform",
|
||||
"craft-anything-setup",
|
||||
"craft-anything-testkit",
|
||||
"craft-update",
|
||||
"eframe",
|
||||
"egui",
|
||||
"egui_extras",
|
||||
@@ -1405,7 +1424,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "craft-anything-web"
|
||||
version = "0.4.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"craft-anything-analysis",
|
||||
"craft-anything-evidence",
|
||||
@@ -1420,6 +1439,31 @@ dependencies = [
|
||||
"web-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "craft-update"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=6ac2a6a34ae83fc0f0bfb25a569ba6388b72266a#6ac2a6a34ae83fc0f0bfb25a569ba6388b72266a"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"dunce",
|
||||
"flate2",
|
||||
"getrandom 0.3.4",
|
||||
"log",
|
||||
"plist",
|
||||
"rustix 1.1.5",
|
||||
"semver",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sha2",
|
||||
"tar",
|
||||
"tempfile",
|
||||
"ureq",
|
||||
"verifysign",
|
||||
"winreg 0.55.0",
|
||||
"winsafe",
|
||||
"zip",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-assembler-x64"
|
||||
version = "0.136.4"
|
||||
@@ -1715,6 +1759,12 @@ dependencies = [
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "deranged"
|
||||
version = "0.5.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e"
|
||||
|
||||
[[package]]
|
||||
name = "dify"
|
||||
version = "0.8.0"
|
||||
@@ -1881,6 +1931,12 @@ dependencies = [
|
||||
"linux-raw-sys 0.9.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dunce"
|
||||
version = "1.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
|
||||
|
||||
[[package]]
|
||||
name = "dyn-clone"
|
||||
version = "1.0.20"
|
||||
@@ -2321,6 +2377,16 @@ dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "filetime"
|
||||
version = "0.2.29"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c287a33c7f0a620c38e641e7f60827713987b3c0f26e8ddc9462cc69cf75759"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "find-msvc-tools"
|
||||
version = "0.1.14"
|
||||
@@ -2587,9 +2653,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
"libc",
|
||||
"r-efi 6.0.0",
|
||||
"rand_core 0.10.1",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3790,6 +3858,12 @@ dependencies = [
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-conv"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441"
|
||||
|
||||
[[package]]
|
||||
name = "num-integer"
|
||||
version = "0.1.47"
|
||||
@@ -4371,6 +4445,12 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "openssl-probe"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7e036b411754132fd6b74e94b74e9a13c5cf606fa93d1885c35860d3060820b1"
|
||||
|
||||
[[package]]
|
||||
name = "option-ext"
|
||||
version = "0.2.0"
|
||||
@@ -4934,6 +5014,19 @@ version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
|
||||
|
||||
[[package]]
|
||||
name = "plist"
|
||||
version = "1.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "327a4cb2ad49dc48adfdc9da89e22c64d488b508c67a044d71ba729e4521a285"
|
||||
dependencies = [
|
||||
"base64 0.23.1",
|
||||
"indexmap",
|
||||
"quick-xml 0.42.0",
|
||||
"serde",
|
||||
"time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "png"
|
||||
version = "0.17.16"
|
||||
@@ -5028,7 +5121,7 @@ dependencies = [
|
||||
"shared_library",
|
||||
"shell-words",
|
||||
"winapi",
|
||||
"winreg",
|
||||
"winreg 0.10.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5054,6 +5147,12 @@ dependencies = [
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "powerfmt"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958"
|
||||
|
||||
[[package]]
|
||||
name = "ppv-lite86"
|
||||
version = "0.2.21"
|
||||
@@ -5157,6 +5256,15 @@ dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quick-xml"
|
||||
version = "0.42.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "41b1177fdf999d2321d3fb46ff47159d9c1fb9ad66a4879f8c50a0b504615e9b"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.47"
|
||||
@@ -5576,6 +5684,18 @@ dependencies = [
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls-native-certs"
|
||||
version = "0.8.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4a073f5dc7469f984c52ad2752b63b0807745133b6de880b7b64c1ac4c48aec4"
|
||||
dependencies = [
|
||||
"openssl-probe",
|
||||
"rustls-pki-types",
|
||||
"schannel",
|
||||
"security-framework 3.7.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls-pki-types"
|
||||
version = "1.15.1"
|
||||
@@ -5585,6 +5705,33 @@ dependencies = [
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls-platform-verifier"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1167586491e2b18b8bfbb293e8180ec17c201c4f076d7cb3070ca964e7598f98"
|
||||
dependencies = [
|
||||
"core-foundation 0.10.1",
|
||||
"core-foundation-sys",
|
||||
"jni",
|
||||
"log",
|
||||
"once_cell",
|
||||
"rustls",
|
||||
"rustls-native-certs",
|
||||
"rustls-platform-verifier-android",
|
||||
"rustls-webpki",
|
||||
"security-framework 3.7.0",
|
||||
"security-framework-sys",
|
||||
"webpki-root-certs",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls-platform-verifier-android"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eec689c0bc40ff2458a5977b6619cb718087084a18e02a131c599b62d05e1a5f"
|
||||
|
||||
[[package]]
|
||||
name = "rustls-webpki"
|
||||
version = "0.103.15"
|
||||
@@ -5617,6 +5764,15 @@ dependencies = [
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "schannel"
|
||||
version = "0.1.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9cb23c424d8ee841bb4d813677ca237e2a610067d594fec130f87d6093495ab5"
|
||||
dependencies = [
|
||||
"windows-sys 0.61.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "schemars"
|
||||
version = "1.2.2"
|
||||
@@ -6189,6 +6345,16 @@ version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
|
||||
|
||||
[[package]]
|
||||
name = "tar"
|
||||
version = "0.4.46"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3f6221d9a6003c78398e3b239969f352578258df48c8eb051caadae0015bc840"
|
||||
dependencies = [
|
||||
"filetime",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "target-lexicon"
|
||||
version = "0.13.5"
|
||||
@@ -6282,6 +6448,36 @@ dependencies = [
|
||||
"zune-jpeg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.3.55"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134"
|
||||
dependencies = [
|
||||
"deranged",
|
||||
"num-conv",
|
||||
"powerfmt",
|
||||
"serde_core",
|
||||
"time-core",
|
||||
"time-macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "time-core"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109"
|
||||
|
||||
[[package]]
|
||||
name = "time-macros"
|
||||
version = "0.2.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85"
|
||||
dependencies = [
|
||||
"num-conv",
|
||||
"time-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tiny-skia"
|
||||
version = "0.11.4"
|
||||
@@ -6451,6 +6647,12 @@ dependencies = [
|
||||
"rustc-hash 2.1.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "typed-path"
|
||||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9ce898823d8cd0f028662d2f349694b1af0a5cc9be83f1d213a00d3147445e1e"
|
||||
|
||||
[[package]]
|
||||
name = "typeid"
|
||||
version = "1.0.3"
|
||||
@@ -6522,6 +6724,7 @@ dependencies = [
|
||||
"percent-encoding",
|
||||
"rustls",
|
||||
"rustls-pki-types",
|
||||
"rustls-platform-verifier",
|
||||
"ureq-proto",
|
||||
"utf8-zero",
|
||||
"webpki-roots",
|
||||
@@ -6629,6 +6832,16 @@ dependencies = [
|
||||
"vello_common",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "verifysign"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a6efd25aadc22c756a9012267fae0b130278d335d6ceb512ec02ce82029b5ca9"
|
||||
dependencies = [
|
||||
"core-foundation 0.10.1",
|
||||
"windows-sys 0.61.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "version-compare"
|
||||
version = "0.2.1"
|
||||
@@ -7182,7 +7395,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "338e30461b3a2b67d70eb30a6d89f8e0c93a833e07d2ae89085cd070c4a00ac0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quick-xml",
|
||||
"quick-xml 0.41.0",
|
||||
"quote",
|
||||
]
|
||||
|
||||
@@ -7249,6 +7462,15 @@ dependencies = [
|
||||
"web-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "webpki-root-certs"
|
||||
version = "1.0.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "293198dcebfb821155b5092ab94b5a82ff180eddd7241df3bd6e66a4ffd1a585"
|
||||
dependencies = [
|
||||
"rustls-pki-types",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "webpki-roots"
|
||||
version = "1.0.9"
|
||||
@@ -7832,6 +8054,16 @@ dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winreg"
|
||||
version = "0.55.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb5a765337c50e9ec252c2069be9bf91c7df47afb103b642ba3a53bf8101be97"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winresource"
|
||||
version = "0.1.34"
|
||||
@@ -7842,6 +8074,12 @@ dependencies = [
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winsafe"
|
||||
version = "0.0.29"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9ef0ffc427f045c0cc9ebffd6f4f91153dcd2a1547b5c3c29ee3f541e16e95c6"
|
||||
|
||||
[[package]]
|
||||
name = "wit-bindgen"
|
||||
version = "0.57.1"
|
||||
@@ -7972,7 +8210,7 @@ checksum = "a6c2ad15e0e922856ee89afe862b8992334bbe7953adad56cd1199358cb30566"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"libc",
|
||||
"quick-xml",
|
||||
"quick-xml 0.41.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -8024,7 +8262,7 @@ checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9"
|
||||
|
||||
[[package]]
|
||||
name = "xtask"
|
||||
version = "0.4.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"craft-anything-engine",
|
||||
"proc-macro2",
|
||||
@@ -8349,6 +8587,25 @@ dependencies = [
|
||||
"syn 3.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zip"
|
||||
version = "9.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e3476fd497ac8af5b1ec7b51acab7bef380f7e8dd8e0487595bafd839417a302"
|
||||
dependencies = [
|
||||
"constant_time_eq",
|
||||
"crc32fast",
|
||||
"flate2",
|
||||
"getrandom 0.4.3",
|
||||
"indexmap",
|
||||
"libc",
|
||||
"memchr",
|
||||
"nix 0.31.3",
|
||||
"typed-path",
|
||||
"windows-sys 0.61.2",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zlib-rs"
|
||||
version = "0.6.8"
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ resolver = "3"
|
||||
members = ["crates/*", "apps/*", "xtask"]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.4.0"
|
||||
version = "0.6.1"
|
||||
edition = "2024"
|
||||
license = "MIT OR Apache-2.0"
|
||||
rust-version = "1.97"
|
||||
|
||||
@@ -24,6 +24,13 @@ mod linux_gpu;
|
||||
/// Opens the window on the engine and AI hub (a path on the command line opens as the first
|
||||
/// target); if the window can't start, says why and where its log is.
|
||||
fn main() -> eframe::Result {
|
||||
if let Some(result) = craft_anything_ui_egui::updates::finish_helper() {
|
||||
let failed = result.is_err();
|
||||
if let Err(error) = result {
|
||||
eprintln!("Update failed: {error}");
|
||||
}
|
||||
std::process::exit(i32::from(failed));
|
||||
}
|
||||
let args: Vec<String> = std::env::args().skip(1).collect();
|
||||
if args.iter().any(|a| a == "--version" || a == "-V") {
|
||||
println!("craft-anything {}", env!("CARGO_PKG_VERSION"));
|
||||
@@ -131,6 +138,7 @@ fn main() -> eframe::Result {
|
||||
log::info!("window open");
|
||||
CraftApp::setup_context(&cc.egui_ctx);
|
||||
let mut app = CraftApp::new(engine, hub);
|
||||
app.show_update_outcome_on_start();
|
||||
// The window is built hidden and its first frame is drawn afterwards, where a graphics
|
||||
// driver may still crash: the mark stays until frames have been shown (#74).
|
||||
app.after_first_frames(move || {
|
||||
|
||||
@@ -27,6 +27,8 @@ serde_json = { workspace = true }
|
||||
log = { workspace = true }
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
craft-update = { git = "https://github.com/storytold/craft-libs", rev = "6ac2a6a34ae83fc0f0bfb25a569ba6388b72266a" }
|
||||
|
||||
# Native open/save dialogs, always shown from a worker thread (never blocks a frame).
|
||||
rfd = { workspace = true }
|
||||
# Pictures pasted from the clipboard (see `paste`).
|
||||
@@ -43,3 +45,7 @@ muda = { version = "0.21.2", default-features = false }
|
||||
craft-anything-testkit = { workspace = true }
|
||||
egui_kittest = { workspace = true, features = ["wgpu", "snapshot", "eframe"] }
|
||||
tempfile = "3"
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
|
||||
# Unit tests need a Linux window backend without the desktop binary's feature unification.
|
||||
eframe = { workspace = true, features = ["x11"] }
|
||||
@@ -1467,3 +1467,24 @@ Connecting to {name}… {seconds} s Připojování k {name}… {seconds} s
|
||||
Stopped adding {name}. Přidávání {name} bylo zastaveno.
|
||||
It isn't there any more, so {program} runs in its place. Už tam není, proto se místo něj spouští {program}.
|
||||
Use it Použít
|
||||
|
||||
# Native update checks and verified installation.
|
||||
ArtCraft Launcher manages this app's version. Change its version there. Verzi této aplikace spravuje ArtCraft Launcher. Změňte ji tam.
|
||||
Check again Zkontrolovat znovu
|
||||
Check for Updates Vyhledat aktualizace
|
||||
Check for Updates… Vyhledat aktualizace…
|
||||
Checking for updates… Vyhledávání aktualizací…
|
||||
Couldn't check for updates: {error} Aktualizace se nepodařilo zkontrolovat: {error}
|
||||
Downloading and verifying the update… Stahování a ověřování aktualizace…
|
||||
No installer is available for this platform. Pro tuto platformu není dostupný instalátor.
|
||||
Releases Vydání
|
||||
Save your work and stop running tasks before installing an update. Před instalací aktualizace uložte práci a zastavte běžící úlohy.
|
||||
The update failed: {error} Aktualizace selhala: {error}
|
||||
The update worker stopped unexpectedly. Try checking again. Proces aktualizace se neočekávaně zastavil. Zkuste kontrolu znovu.
|
||||
This installation is managed externally. Update it with its package manager or open Releases. Tuto instalaci spravuje externí nástroj. Aktualizujte ji správcem balíčků nebo otevřete vydání.
|
||||
Update and restart Aktualizovat a restartovat
|
||||
Update ready. Restarting… Aktualizace je připravena. Restartování…
|
||||
Updated to {version}. Aktualizováno na {version}.
|
||||
Use Releases or your package manager to update this installation. Aktualizujte tuto instalaci přes vydání nebo správce balíčků.
|
||||
You're up to date. Máte nejnovější verzi.
|
||||
{version} is available. Je dostupná verze {version}.
|
||||
|
Can't render this file because it contains an unexpected character in line 62 and column 52.
|
@@ -1467,3 +1467,24 @@ Connecting to {name}… {seconds} s Verbinde mit {name}… {seconds} s
|
||||
Stopped adding {name}. Hinzufügen von {name} abgebrochen.
|
||||
It isn't there any more, so {program} runs in its place. Es ist nicht mehr dort, daher läuft stattdessen {program}.
|
||||
Use it Verwenden
|
||||
|
||||
# Native update checks and verified installation.
|
||||
ArtCraft Launcher manages this app's version. Change its version there. ArtCraft Launcher verwaltet die Version dieser App. Ändere die Version dort.
|
||||
Check again Erneut prüfen
|
||||
Check for Updates Nach Updates suchen
|
||||
Check for Updates… Nach Updates suchen…
|
||||
Checking for updates… Suche nach Updates…
|
||||
Couldn't check for updates: {error} Updates konnten nicht geprüft werden: {error}
|
||||
Downloading and verifying the update… Update wird heruntergeladen und überprüft…
|
||||
No installer is available for this platform. Für diese Plattform ist kein Installationsprogramm verfügbar.
|
||||
Releases Veröffentlichungen
|
||||
Save your work and stop running tasks before installing an update. Speichere deine Arbeit und beende laufende Aufgaben, bevor du ein Update installierst.
|
||||
The update failed: {error} Das Update ist fehlgeschlagen: {error}
|
||||
The update worker stopped unexpectedly. Try checking again. Der Update-Prozess wurde unerwartet beendet. Prüfe erneut auf Updates.
|
||||
This installation is managed externally. Update it with its package manager or open Releases. Diese Installation wird extern verwaltet. Aktualisiere sie mit der Paketverwaltung oder öffne die Veröffentlichungen.
|
||||
Update and restart Aktualisieren und neu starten
|
||||
Update ready. Restarting… Update bereit. Neustart…
|
||||
Updated to {version}. Auf {version} aktualisiert.
|
||||
Use Releases or your package manager to update this installation. Aktualisiere diese Installation über die Veröffentlichungen oder deine Paketverwaltung.
|
||||
You're up to date. Du bist auf dem neuesten Stand.
|
||||
{version} is available. {version} ist verfügbar.
|
||||
|
Can't render this file because it contains an unexpected character in line 1 and column 49.
|
@@ -1467,3 +1467,24 @@ Connecting to {name}… {seconds} s Conectando con {name}… {seconds} s
|
||||
Stopped adding {name}. Se dejó de añadir {name}.
|
||||
It isn't there any more, so {program} runs in its place. Ya no está ahí, así que se usa {program} en su lugar.
|
||||
Use it Usarlo
|
||||
|
||||
# Native update checks and verified installation.
|
||||
ArtCraft Launcher manages this app's version. Change its version there. ArtCraft Launcher administra la versión de esta aplicación. Cámbiala allí.
|
||||
Check again Volver a comprobar
|
||||
Check for Updates Buscar actualizaciones
|
||||
Check for Updates… Buscar actualizaciones…
|
||||
Checking for updates… Buscando actualizaciones…
|
||||
Couldn't check for updates: {error} No se pudieron buscar actualizaciones: {error}
|
||||
Downloading and verifying the update… Descargando y verificando la actualización…
|
||||
No installer is available for this platform. No hay ningún instalador disponible para esta plataforma.
|
||||
Releases Versiones
|
||||
Save your work and stop running tasks before installing an update. Guarda tu trabajo y detén las tareas en ejecución antes de instalar una actualización.
|
||||
The update failed: {error} La actualización falló: {error}
|
||||
The update worker stopped unexpectedly. Try checking again. El proceso de actualización se detuvo inesperadamente. Vuelve a comprobarlo.
|
||||
This installation is managed externally. Update it with its package manager or open Releases. Esta instalación se administra externamente. Actualízala con su gestor de paquetes o abre Versiones.
|
||||
Update and restart Actualizar y reiniciar
|
||||
Update ready. Restarting… Actualización lista. Reiniciando…
|
||||
Updated to {version}. Actualizado a {version}.
|
||||
Use Releases or your package manager to update this installation. Usa Versiones o tu gestor de paquetes para actualizar esta instalación.
|
||||
You're up to date. Tienes la última versión.
|
||||
{version} is available. {version} está disponible.
|
||||
|
Can't render this file because it contains an unexpected character in line 1 and column 61.
|
@@ -1467,3 +1467,24 @@ Connecting to {name}… {seconds} s Ühendamine: {name}… {seconds} s
|
||||
Stopped adding {name}. {name} lisamine peatati.
|
||||
It isn't there any more, so {program} runs in its place. Seda pole enam seal, nii et selle asemel käivitub {program}.
|
||||
Use it Kasuta seda
|
||||
|
||||
# Native update checks and verified installation.
|
||||
ArtCraft Launcher manages this app's version. Change its version there. Selle rakenduse versiooni haldab ArtCraft Launcher. Muuda versiooni seal.
|
||||
Check again Kontrolli uuesti
|
||||
Check for Updates Otsi uuendusi
|
||||
Check for Updates… Otsi uuendusi…
|
||||
Checking for updates… Uuenduste otsimine…
|
||||
Couldn't check for updates: {error} Uuendusi ei saanud kontrollida: {error}
|
||||
Downloading and verifying the update… Uuenduse allalaadimine ja kontrollimine…
|
||||
No installer is available for this platform. Sellele platvormile pole paigaldajat saadaval.
|
||||
Releases Väljalasked
|
||||
Save your work and stop running tasks before installing an update. Enne uuenduse paigaldamist salvesta töö ja peata töötavad ülesanded.
|
||||
The update failed: {error} Uuendamine nurjus: {error}
|
||||
The update worker stopped unexpectedly. Try checking again. Uuendamisprotsess peatus ootamatult. Proovi uuesti kontrollida.
|
||||
This installation is managed externally. Update it with its package manager or open Releases. Seda paigaldust hallatakse väliselt. Uuenda seda paketihalduriga või ava Väljalasked.
|
||||
Update and restart Uuenda ja taaskäivita
|
||||
Update ready. Restarting… Uuendus on valmis. Taaskäivitamine…
|
||||
Updated to {version}. Uuendatud versioonile {version}.
|
||||
Use Releases or your package manager to update this installation. Selle paigalduse uuendamiseks kasuta Väljalaskeid või paketihaldurit.
|
||||
You're up to date. Sul on uusim versioon.
|
||||
{version} is available. Saadaval on {version}.
|
||||
|
Can't render this file because it contains an unexpected character in line 62 and column 52.
|
@@ -1469,3 +1469,24 @@ Connecting to {name}… {seconds} s Connessione a {name}… {seconds} s
|
||||
Stopped adding {name}. Aggiunta di {name} interrotta.
|
||||
It isn't there any more, so {program} runs in its place. Non è più lì, quindi al suo posto si usa {program}.
|
||||
Use it Usalo
|
||||
|
||||
# Native update checks and verified installation.
|
||||
ArtCraft Launcher manages this app's version. Change its version there. ArtCraft Launcher gestisce la versione di questa app. Modificala lì.
|
||||
Check again Controlla di nuovo
|
||||
Check for Updates Controlla aggiornamenti
|
||||
Check for Updates… Controlla aggiornamenti…
|
||||
Checking for updates… Ricerca aggiornamenti…
|
||||
Couldn't check for updates: {error} Impossibile cercare aggiornamenti: {error}
|
||||
Downloading and verifying the update… Download e verifica dell’aggiornamento…
|
||||
No installer is available for this platform. Non è disponibile un programma di installazione per questa piattaforma.
|
||||
Releases Versioni
|
||||
Save your work and stop running tasks before installing an update. Salva il lavoro e interrompi le attività in esecuzione prima di installare un aggiornamento.
|
||||
The update failed: {error} Aggiornamento non riuscito: {error}
|
||||
The update worker stopped unexpectedly. Try checking again. Il processo di aggiornamento si è interrotto in modo imprevisto. Riprova a controllare.
|
||||
This installation is managed externally. Update it with its package manager or open Releases. Questa installazione è gestita esternamente. Aggiornala con il gestore pacchetti o apri Versioni.
|
||||
Update and restart Aggiorna e riavvia
|
||||
Update ready. Restarting… Aggiornamento pronto. Riavvio…
|
||||
Updated to {version}. Aggiornato a {version}.
|
||||
Use Releases or your package manager to update this installation. Usa Versioni o il gestore pacchetti per aggiornare questa installazione.
|
||||
You're up to date. Hai la versione più recente.
|
||||
{version} is available. {version} è disponibile.
|
||||
|
Can't render this file because it contains an unexpected character in line 1 and column 50.
|
@@ -1467,3 +1467,24 @@ Connecting to {name}… {seconds} s {name}-თან დაკავშირე
|
||||
Stopped adding {name}. {name}-ის დამატება შეჩერდა.
|
||||
It isn't there any more, so {program} runs in its place. ის აღარ არის იქ, ამიტომ მის ნაცვლად {program} ეშვება.
|
||||
Use it გამოყენება
|
||||
|
||||
# Native update checks and verified installation.
|
||||
ArtCraft Launcher manages this app's version. Change its version there. ამ აპის ვერსიას ArtCraft Launcher მართავს. ვერსია იქ შეცვალეთ.
|
||||
Check again ხელახლა შემოწმება
|
||||
Check for Updates განახლებების შემოწმება
|
||||
Check for Updates… განახლებების შემოწმება…
|
||||
Checking for updates… მიმდინარეობს განახლებების შემოწმება…
|
||||
Couldn't check for updates: {error} განახლებების შემოწმება ვერ მოხერხდა: {error}
|
||||
Downloading and verifying the update… მიმდინარეობს განახლების ჩამოტვირთვა და შემოწმება…
|
||||
No installer is available for this platform. ამ პლატფორმისთვის დამყენებელი ხელმისაწვდომი არ არის.
|
||||
Releases გამოშვებები
|
||||
Save your work and stop running tasks before installing an update. განახლების დაყენებამდე შეინახეთ ნამუშევარი და შეაჩერეთ მიმდინარე ამოცანები.
|
||||
The update failed: {error} განახლება ვერ მოხერხდა: {error}
|
||||
The update worker stopped unexpectedly. Try checking again. განახლების პროცესი მოულოდნელად შეწყდა. სცადეთ ხელახლა შემოწმება.
|
||||
This installation is managed externally. Update it with its package manager or open Releases. ეს ინსტალაცია გარედან იმართება. განაახლეთ პაკეტების მმართველით ან გახსენით გამოშვებები.
|
||||
Update and restart განახლება და ხელახლა გაშვება
|
||||
Update ready. Restarting… განახლება მზადაა. მიმდინარეობს ხელახლა გაშვება…
|
||||
Updated to {version}. განახლდა {version} ვერსიამდე.
|
||||
Use Releases or your package manager to update this installation. ამ ინსტალაციის გასაახლებლად გამოიყენეთ გამოშვებები ან პაკეტების მმართველი.
|
||||
You're up to date. უახლეს ვერსიას იყენებთ.
|
||||
{version} is available. ხელმისაწვდომია {version}.
|
||||
|
Can't render this file because it contains an unexpected character in line 100 and column 52.
|
@@ -1467,3 +1467,24 @@ Connecting to {name}… {seconds} s {name}에 연결하는 중… {seconds}초
|
||||
Stopped adding {name}. {name} 추가를 멈췄습니다.
|
||||
It isn't there any more, so {program} runs in its place. 더 이상 그곳에 없어서 대신 {program}이(가) 실행됩니다.
|
||||
Use it 이것 사용
|
||||
|
||||
# Native update checks and verified installation.
|
||||
ArtCraft Launcher manages this app's version. Change its version there. ArtCraft Launcher가 이 앱의 버전을 관리합니다. 버전은 그곳에서 변경하세요.
|
||||
Check again 다시 확인
|
||||
Check for Updates 업데이트 확인
|
||||
Check for Updates… 업데이트 확인…
|
||||
Checking for updates… 업데이트 확인 중…
|
||||
Couldn't check for updates: {error} 업데이트를 확인하지 못했습니다: {error}
|
||||
Downloading and verifying the update… 업데이트 다운로드 및 검증 중…
|
||||
No installer is available for this platform. 이 플랫폼에 사용할 수 있는 설치 프로그램이 없습니다.
|
||||
Releases 릴리스
|
||||
Save your work and stop running tasks before installing an update. 업데이트를 설치하기 전에 작업을 저장하고 실행 중인 작업을 중지하세요.
|
||||
The update failed: {error} 업데이트 실패: {error}
|
||||
The update worker stopped unexpectedly. Try checking again. 업데이트 작업이 예기치 않게 중지되었습니다. 다시 확인해 보세요.
|
||||
This installation is managed externally. Update it with its package manager or open Releases. 이 설치는 외부에서 관리합니다. 패키지 관리자로 업데이트하거나 릴리스를 여세요.
|
||||
Update and restart 업데이트 후 다시 시작
|
||||
Update ready. Restarting… 업데이트 준비 완료. 다시 시작 중…
|
||||
Updated to {version}. {version}(으)로 업데이트되었습니다.
|
||||
Use Releases or your package manager to update this installation. 릴리스 또는 패키지 관리자를 사용하여 이 설치를 업데이트하세요.
|
||||
You're up to date. 최신 버전입니다.
|
||||
{version} is available. {version} 버전을 사용할 수 있습니다.
|
||||
|
Can't render this file because it contains an unexpected character in line 62 and column 52.
|
@@ -1467,3 +1467,24 @@ Connecting to {name}… {seconds} s Conectando a {name}… {seconds} s
|
||||
Stopped adding {name}. A adição de {name} foi interrompida.
|
||||
It isn't there any more, so {program} runs in its place. Ele não está mais lá, então {program} é usado no lugar.
|
||||
Use it Usar este
|
||||
|
||||
# Native update checks and verified installation.
|
||||
ArtCraft Launcher manages this app's version. Change its version there. O ArtCraft Launcher gerencia a versão deste aplicativo. Altere a versão nele.
|
||||
Check again Verificar novamente
|
||||
Check for Updates Verificar atualizações
|
||||
Check for Updates… Verificar atualizações…
|
||||
Checking for updates… Verificando atualizações…
|
||||
Couldn't check for updates: {error} Não foi possível verificar atualizações: {error}
|
||||
Downloading and verifying the update… Baixando e verificando a atualização…
|
||||
No installer is available for this platform. Não há instalador disponível para esta plataforma.
|
||||
Releases Versões
|
||||
Save your work and stop running tasks before installing an update. Salve seu trabalho e interrompa as tarefas em execução antes de instalar uma atualização.
|
||||
The update failed: {error} A atualização falhou: {error}
|
||||
The update worker stopped unexpectedly. Try checking again. O processo de atualização parou inesperadamente. Tente verificar novamente.
|
||||
This installation is managed externally. Update it with its package manager or open Releases. Esta instalação é gerenciada externamente. Atualize-a pelo gerenciador de pacotes ou abra Versões.
|
||||
Update and restart Atualizar e reiniciar
|
||||
Update ready. Restarting… Atualização pronta. Reiniciando…
|
||||
Updated to {version}. Atualizado para {version}.
|
||||
Use Releases or your package manager to update this installation. Use Versões ou seu gerenciador de pacotes para atualizar esta instalação.
|
||||
You're up to date. Você está usando a versão mais recente.
|
||||
{version} is available. {version} está disponível.
|
||||
|
Can't render this file because it contains an unexpected character in line 62 and column 52.
|
@@ -1467,3 +1467,24 @@ Connecting to {name}… {seconds} s Подключение к {name}… {seconds
|
||||
Stopped adding {name}. Добавление {name} остановлено.
|
||||
It isn't there any more, so {program} runs in its place. Его там больше нет, поэтому вместо него запускается {program}.
|
||||
Use it Использовать
|
||||
|
||||
# Native update checks and verified installation.
|
||||
ArtCraft Launcher manages this app's version. Change its version there. Версией этого приложения управляет ArtCraft Launcher. Измените версию в нём.
|
||||
Check again Проверить снова
|
||||
Check for Updates Проверить обновления
|
||||
Check for Updates… Проверить обновления…
|
||||
Checking for updates… Проверка обновлений…
|
||||
Couldn't check for updates: {error} Не удалось проверить обновления: {error}
|
||||
Downloading and verifying the update… Загрузка и проверка обновления…
|
||||
No installer is available for this platform. Для этой платформы нет установщика.
|
||||
Releases Выпуски
|
||||
Save your work and stop running tasks before installing an update. Перед установкой обновления сохраните работу и остановите выполняющиеся задачи.
|
||||
The update failed: {error} Ошибка обновления: {error}
|
||||
The update worker stopped unexpectedly. Try checking again. Процесс обновления неожиданно остановился. Повторите проверку.
|
||||
This installation is managed externally. Update it with its package manager or open Releases. Эта установка управляется извне. Обновите её через менеджер пакетов или откройте выпуски.
|
||||
Update and restart Обновить и перезапустить
|
||||
Update ready. Restarting… Обновление готово. Перезапуск…
|
||||
Updated to {version}. Обновлено до {version}.
|
||||
Use Releases or your package manager to update this installation. Обновите эту установку через выпуски или менеджер пакетов.
|
||||
You're up to date. Установлена последняя версия.
|
||||
{version} is available. Доступна версия {version}.
|
||||
|
Can't render this file because it contains an unexpected character in line 48 and column 52.
|
@@ -1467,3 +1467,24 @@ Connecting to {name}… {seconds} s กำลังเชื่อมต่อ
|
||||
Stopped adding {name}. หยุดเพิ่ม {name} แล้ว
|
||||
It isn't there any more, so {program} runs in its place. ไม่มีอยู่ที่นั่นแล้ว จึงใช้ {program} แทน
|
||||
Use it ใช้อันนี้
|
||||
|
||||
# Native update checks and verified installation.
|
||||
ArtCraft Launcher manages this app's version. Change its version there. ArtCraft Launcher จัดการเวอร์ชันของแอปนี้ โปรดเปลี่ยนเวอร์ชันที่นั่น
|
||||
Check again ตรวจสอบอีกครั้ง
|
||||
Check for Updates ตรวจสอบการอัปเดต
|
||||
Check for Updates… ตรวจสอบการอัปเดต…
|
||||
Checking for updates… กำลังตรวจสอบการอัปเดต…
|
||||
Couldn't check for updates: {error} ตรวจสอบการอัปเดตไม่ได้: {error}
|
||||
Downloading and verifying the update… กำลังดาวน์โหลดและตรวจสอบการอัปเดต…
|
||||
No installer is available for this platform. ไม่มีตัวติดตั้งสำหรับแพลตฟอร์มนี้
|
||||
Releases รุ่นที่เผยแพร่
|
||||
Save your work and stop running tasks before installing an update. บันทึกงานและหยุดงานที่กำลังทำงานก่อนติดตั้งการอัปเดต
|
||||
The update failed: {error} การอัปเดตล้มเหลว: {error}
|
||||
The update worker stopped unexpectedly. Try checking again. กระบวนการอัปเดตหยุดโดยไม่คาดคิด โปรดลองตรวจสอบอีกครั้ง
|
||||
This installation is managed externally. Update it with its package manager or open Releases. การติดตั้งนี้จัดการจากภายนอก โปรดอัปเดตผ่านตัวจัดการแพ็กเกจหรือเปิดรุ่นที่เผยแพร่
|
||||
Update and restart อัปเดตและเริ่มใหม่
|
||||
Update ready. Restarting… การอัปเดตพร้อมแล้ว กำลังเริ่มใหม่…
|
||||
Updated to {version}. อัปเดตเป็น {version} แล้ว
|
||||
Use Releases or your package manager to update this installation. ใช้รุ่นที่เผยแพร่หรือตัวจัดการแพ็กเกจเพื่ออัปเดตการติดตั้งนี้
|
||||
You're up to date. คุณใช้เวอร์ชันล่าสุดแล้ว
|
||||
{version} is available. มี {version} พร้อมใช้งานแล้ว
|
||||
|
Can't render this file because it contains an unexpected character in line 62 and column 52.
|
@@ -1467,3 +1467,24 @@ Connecting to {name}… {seconds} s {name} sunucusuna bağlanılıyor… {second
|
||||
Stopped adding {name}. {name} eklenmesi durduruldu.
|
||||
It isn't there any more, so {program} runs in its place. Artık orada değil, bu yüzden yerine {program} çalışıyor.
|
||||
Use it Bunu kullan
|
||||
|
||||
# Native update checks and verified installation.
|
||||
ArtCraft Launcher manages this app's version. Change its version there. Bu uygulamanın sürümünü ArtCraft Launcher yönetiyor. Sürümü oradan değiştirin.
|
||||
Check again Yeniden denetle
|
||||
Check for Updates Güncellemeleri denetle
|
||||
Check for Updates… Güncellemeleri denetle…
|
||||
Checking for updates… Güncellemeler denetleniyor…
|
||||
Couldn't check for updates: {error} Güncellemeler denetlenemedi: {error}
|
||||
Downloading and verifying the update… Güncelleme indiriliyor ve doğrulanıyor…
|
||||
No installer is available for this platform. Bu platform için bir yükleyici yok.
|
||||
Releases Sürümler
|
||||
Save your work and stop running tasks before installing an update. Güncelleme yüklemeden önce çalışmanızı kaydedin ve çalışan görevleri durdurun.
|
||||
The update failed: {error} Güncelleme başarısız oldu: {error}
|
||||
The update worker stopped unexpectedly. Try checking again. Güncelleme işlemi beklenmedik şekilde durdu. Yeniden denetlemeyi deneyin.
|
||||
This installation is managed externally. Update it with its package manager or open Releases. Bu kurulum harici olarak yönetiliyor. Paket yöneticisiyle güncelleyin veya Sürümler’i açın.
|
||||
Update and restart Güncelle ve yeniden başlat
|
||||
Update ready. Restarting… Güncelleme hazır. Yeniden başlatılıyor…
|
||||
Updated to {version}. {version} sürümüne güncellendi.
|
||||
Use Releases or your package manager to update this installation. Bu kurulumu güncellemek için Sürümler’i veya paket yöneticinizi kullanın.
|
||||
You're up to date. En güncel sürümdesiniz.
|
||||
{version} is available. {version} sürümü kullanılabilir.
|
||||
|
Can't render this file because it contains an unexpected character in line 62 and column 52.
|
@@ -1467,3 +1467,24 @@ Connecting to {name}… {seconds} s Đang kết nối với {name}… {seconds}
|
||||
Stopped adding {name}. Đã dừng thêm {name}.
|
||||
It isn't there any more, so {program} runs in its place. Nó không còn ở đó nữa, nên {program} chạy thay thế.
|
||||
Use it Dùng nó
|
||||
|
||||
# Native update checks and verified installation.
|
||||
ArtCraft Launcher manages this app's version. Change its version there. ArtCraft Launcher quản lý phiên bản của ứng dụng này. Hãy đổi phiên bản tại đó.
|
||||
Check again Kiểm tra lại
|
||||
Check for Updates Kiểm tra cập nhật
|
||||
Check for Updates… Kiểm tra cập nhật…
|
||||
Checking for updates… Đang kiểm tra cập nhật…
|
||||
Couldn't check for updates: {error} Không thể kiểm tra cập nhật: {error}
|
||||
Downloading and verifying the update… Đang tải xuống và xác minh bản cập nhật…
|
||||
No installer is available for this platform. Không có trình cài đặt cho nền tảng này.
|
||||
Releases Bản phát hành
|
||||
Save your work and stop running tasks before installing an update. Lưu công việc và dừng các tác vụ đang chạy trước khi cài đặt bản cập nhật.
|
||||
The update failed: {error} Cập nhật thất bại: {error}
|
||||
The update worker stopped unexpectedly. Try checking again. Tiến trình cập nhật đã dừng ngoài dự kiến. Hãy thử kiểm tra lại.
|
||||
This installation is managed externally. Update it with its package manager or open Releases. Bản cài đặt này được quản lý bên ngoài. Hãy cập nhật bằng trình quản lý gói hoặc mở Bản phát hành.
|
||||
Update and restart Cập nhật và khởi động lại
|
||||
Update ready. Restarting… Bản cập nhật đã sẵn sàng. Đang khởi động lại…
|
||||
Updated to {version}. Đã cập nhật lên {version}.
|
||||
Use Releases or your package manager to update this installation. Dùng Bản phát hành hoặc trình quản lý gói để cập nhật bản cài đặt này.
|
||||
You're up to date. Bạn đang dùng phiên bản mới nhất.
|
||||
{version} is available. Đã có phiên bản {version}.
|
||||
|
Can't render this file because it contains an unexpected character in line 1 and column 66.
|
@@ -1467,3 +1467,24 @@ Connecting to {name}… {seconds} s 正在连接 {name}… {seconds} 秒
|
||||
Stopped adding {name}. 已停止添加 {name}。
|
||||
It isn't there any more, so {program} runs in its place. 它已不在那里,因此改用 {program}。
|
||||
Use it 使用它
|
||||
|
||||
# Native update checks and verified installation.
|
||||
ArtCraft Launcher manages this app's version. Change its version there. ArtCraft Launcher 管理此应用的版本。请在那里更改版本。
|
||||
Check again 再次检查
|
||||
Check for Updates 检查更新
|
||||
Check for Updates… 检查更新…
|
||||
Checking for updates… 正在检查更新…
|
||||
Couldn't check for updates: {error} 无法检查更新:{error}
|
||||
Downloading and verifying the update… 正在下载并验证更新…
|
||||
No installer is available for this platform. 此平台没有可用的安装程序。
|
||||
Releases 发行版本
|
||||
Save your work and stop running tasks before installing an update. 安装更新前,请保存工作并停止正在运行的任务。
|
||||
The update failed: {error} 更新失败:{error}
|
||||
The update worker stopped unexpectedly. Try checking again. 更新工作线程意外停止。请重新检查。
|
||||
This installation is managed externally. Update it with its package manager or open Releases. 此安装由外部管理。请使用软件包管理器更新,或打开“发行版本”。
|
||||
Update and restart 更新并重启
|
||||
Update ready. Restarting… 更新已就绪。正在重启…
|
||||
Updated to {version}. 已更新至 {version}。
|
||||
Use Releases or your package manager to update this installation. 请通过“发行版本”或软件包管理器更新此安装。
|
||||
You're up to date. 已是最新版本。
|
||||
{version} is available. {version} 已可用。
|
||||
|
Can't render this file because it contains an unexpected character in line 62 and column 52.
|
@@ -1467,3 +1467,24 @@ Connecting to {name}… {seconds} s 正在連線 {name}… {seconds} 秒
|
||||
Stopped adding {name}. 已停止新增 {name}。
|
||||
It isn't there any more, so {program} runs in its place. 它已不在那裡,因此改用 {program}。
|
||||
Use it 使用它
|
||||
|
||||
# Native update checks and verified installation.
|
||||
ArtCraft Launcher manages this app's version. Change its version there. ArtCraft Launcher 管理此應用程式的版本。請在那裡變更版本。
|
||||
Check again 再次檢查
|
||||
Check for Updates 檢查更新
|
||||
Check for Updates… 檢查更新…
|
||||
Checking for updates… 正在檢查更新…
|
||||
Couldn't check for updates: {error} 無法檢查更新:{error}
|
||||
Downloading and verifying the update… 正在下載並驗證更新…
|
||||
No installer is available for this platform. 此平台沒有可用的安裝程式。
|
||||
Releases 發行版本
|
||||
Save your work and stop running tasks before installing an update. 安裝更新前,請儲存工作並停止正在執行的工作。
|
||||
The update failed: {error} 更新失敗:{error}
|
||||
The update worker stopped unexpectedly. Try checking again. 更新工作執行緒意外停止。請重新檢查。
|
||||
This installation is managed externally. Update it with its package manager or open Releases. 此安裝由外部管理。請使用套件管理器更新,或開啟「發行版本」。
|
||||
Update and restart 更新並重新啟動
|
||||
Update ready. Restarting… 更新已就緒。正在重新啟動…
|
||||
Updated to {version}. 已更新至 {version}。
|
||||
Use Releases or your package manager to update this installation. 請透過「發行版本」或套件管理器更新此安裝。
|
||||
You're up to date. 已是最新版本。
|
||||
{version} is available. {version} 已可用。
|
||||
|
Can't render this file because it contains an unexpected character in line 62 and column 52.
|
@@ -444,6 +444,8 @@ struct FirstFrames {
|
||||
}
|
||||
|
||||
pub struct CraftApp {
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub(crate) updates: updates::Updates,
|
||||
pub engine: Arc<Engine>,
|
||||
pub hub: Arc<AiHub>,
|
||||
pub state: UiState,
|
||||
@@ -587,6 +589,12 @@ pub struct CraftApp {
|
||||
}
|
||||
|
||||
impl CraftApp {
|
||||
/// Show the last update's result once the native window begins drawing.
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub fn show_update_outcome_on_start(&mut self) {
|
||||
self.updates.startup();
|
||||
}
|
||||
|
||||
/// Initialize UI state from the shared engine's saved settings, waiting rather than substituting defaults.
|
||||
pub fn new(engine: Arc<Engine>, hub: Arc<AiHub>) -> Self {
|
||||
// Wait for the engine if it's busy: defaults here would show Clean room and no AI, and the
|
||||
@@ -594,6 +602,8 @@ impl CraftApp {
|
||||
let settings = engine.session().settings.clone();
|
||||
i18n::set_language(&settings.language);
|
||||
CraftApp {
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
updates: Default::default(),
|
||||
engine,
|
||||
hub,
|
||||
state: UiState::default(),
|
||||
@@ -1911,6 +1921,18 @@ impl CraftApp {
|
||||
/// Draw the whole interface.
|
||||
pub fn show(&mut self, ui: &mut egui::Ui) {
|
||||
let ctx = ui.ctx().clone();
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
{
|
||||
let safe = !self.jobs.busy()
|
||||
&& !self.runs.any_busy()
|
||||
&& !self.conversation.as_ref().is_some_and(|c| c.is_busy())
|
||||
&& !self.settings_dirty
|
||||
&& self.save_due.is_none()
|
||||
&& self.saving.is_none();
|
||||
if self.updates.show(&ctx, safe) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
self.tick(&ctx);
|
||||
self.shortcuts(&ctx);
|
||||
#[cfg(target_os = "macos")]
|
||||
@@ -2231,3 +2253,13 @@ pub fn kind_icon(k: TargetKind) -> &'static str {
|
||||
TargetKind::Unknown => "file",
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub mod updates;
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
impl Drop for CraftApp {
|
||||
fn drop(&mut self) {
|
||||
self.updates.finish();
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,7 @@ enum Action {
|
||||
Mode(Mode),
|
||||
Deep(bool),
|
||||
Quit,
|
||||
Updates,
|
||||
Url(&'static str),
|
||||
}
|
||||
|
||||
@@ -86,6 +87,7 @@ impl MenuBar {
|
||||
let palette = item("Command palette", cmd(Code::KeyK), Action::Palette);
|
||||
let theme = item("Switch light / dark theme", None, Action::App(AppCommand::ToggleTheme));
|
||||
let website = item("Craft Anything on GitHub", None, Action::Url(REPO));
|
||||
let updates = item("Check for Updates…", None, Action::Updates);
|
||||
let report = item("Report a problem…", None, Action::Url(NEW_ISSUE));
|
||||
let mut check = |label: &'static str, action: Action| {
|
||||
let i = CheckMenuItem::new(tr(label), true, false, None);
|
||||
@@ -134,7 +136,7 @@ impl MenuBar {
|
||||
.and_then(|()| file.append_items(&[&new_project, &open_file, &open_folder, &sep(), &export, &sep(), &close_window]))
|
||||
.and_then(|()| view.append_items(&[&palette, &sep(), &simple, &advanced, &sep(), &clean, &deep, &sep(), &theme, &sep(), &fullscreen]))
|
||||
.and_then(|()| window.append_items(&[&minimise, &zoom, &sep(), &to_front]))
|
||||
.and_then(|()| help.append_items(&[&website, &report]))
|
||||
.and_then(|()| help.append_items(&[&updates, &sep(), &website, &report]))
|
||||
.and_then(|()| menu.append_items(&[&app_menu, &file, &view, &window, &help]));
|
||||
if let Err(e) = built {
|
||||
log::warn!("the menu bar couldn't be built: {e}");
|
||||
@@ -187,6 +189,7 @@ pub fn update(app: &mut CraftApp, ctx: &egui::Context) {
|
||||
}
|
||||
for action in picked {
|
||||
match action {
|
||||
Action::Updates => app.updates.check(ctx),
|
||||
Action::Quit => ctx.send_viewport_cmd(egui::ViewportCommand::Close),
|
||||
Action::Url(url) => ctx.open_url(egui::OpenUrl::new_tab(url)),
|
||||
_ if !ready => {}
|
||||
|
||||
@@ -157,6 +157,13 @@ pub fn show(app: &mut CraftApp, ui: &mut Ui) {
|
||||
app.state.screen = Screen::Home;
|
||||
}
|
||||
ui.label(theme::label_text("Craft Anything", label(12.0, s)).color(t.text).strong());
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
ui.menu_button(tr("Help"), |ui| {
|
||||
if ui.button(tr("Check for Updates…")).clicked() {
|
||||
app.updates.check(ui.ctx());
|
||||
ui.close();
|
||||
}
|
||||
});
|
||||
let in_project = app.state.screen == Screen::Project;
|
||||
let project = if in_project { app.workspace.as_ref().map(|w| w.manifest.name.clone()) } else { app.view.project.clone() };
|
||||
let target = if in_project { None } else { app.view.active_target().map(|t| (t.name.clone(), t.kind)) };
|
||||
|
||||
@@ -0,0 +1,422 @@
|
||||
//! Native release checks and verified installation through craft-update's platform helpers.
|
||||
use crate::i18n::{tr, trf};
|
||||
use craft_update::pins::{Choice, Pins};
|
||||
use craft_update::{App, Http, Paths, Platform, Release, Stop, self_update};
|
||||
use std::sync::mpsc::{Receiver, TryRecvError, channel};
|
||||
|
||||
pub const APP: App = App::new("craft-anything", "Craft Anything", "Build and investigate apps", "storytold/craft-anything");
|
||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
/// A pinned, nightly, or unknown launcher choice must never be replaced by a stable update.
|
||||
fn stable_choice() -> Result<(), String> {
|
||||
if Pins::load_default().choice(APP.id) == Choice::Stable {
|
||||
Ok(())
|
||||
} else {
|
||||
Err(tr("ArtCraft Launcher manages this app's version. Change its version there."))
|
||||
}
|
||||
}
|
||||
|
||||
enum Reply {
|
||||
Checked(Result<Option<Release>, String>, bool),
|
||||
Installed(Result<self_update::Restart, String>),
|
||||
}
|
||||
#[derive(Default)]
|
||||
pub struct Updates {
|
||||
open: bool,
|
||||
read_outcome_requested: bool,
|
||||
message: String,
|
||||
release: Option<Release>,
|
||||
installable: bool,
|
||||
worker: Option<Receiver<Reply>>,
|
||||
installing: bool,
|
||||
restart: Option<self_update::Restart>,
|
||||
}
|
||||
impl Updates {
|
||||
/// Read the previous update result when the first desktop frame can show it.
|
||||
pub fn startup(&mut self) {
|
||||
self.read_outcome_requested = true;
|
||||
}
|
||||
|
||||
/// Start a manual check off the UI thread; repeated requests share the running check.
|
||||
pub fn check(&mut self, ctx: &egui::Context) {
|
||||
self.check_using(ctx, || {
|
||||
let result = stable_choice()
|
||||
.and_then(|()| Http::new(concat!("Craft Anything/", env!("CARGO_PKG_VERSION"))))
|
||||
.and_then(|http| craft_update::check_for_update(&APP, &http, VERSION));
|
||||
let installable = result
|
||||
.as_ref()
|
||||
.ok()
|
||||
.and_then(|release| release.as_ref())
|
||||
.is_some_and(|release| self_update::is_self_updating(&APP) && self_update::release_installs(&APP, release));
|
||||
(result, installable)
|
||||
});
|
||||
}
|
||||
|
||||
fn check_using(&mut self, ctx: &egui::Context, check: impl FnOnce() -> (Result<Option<Release>, String>, bool) + Send + 'static) {
|
||||
self.open = true;
|
||||
if self.worker.is_some() {
|
||||
return;
|
||||
}
|
||||
self.message = tr("Checking for updates…");
|
||||
self.release = None;
|
||||
self.installable = false;
|
||||
let (tx, rx) = channel();
|
||||
self.worker = Some(rx);
|
||||
let ctx = ctx.clone();
|
||||
let result = std::thread::Builder::new().name("release-check".into()).spawn(move || {
|
||||
let (result, installable) = check();
|
||||
let _ = tx.send(Reply::Checked(result, installable));
|
||||
ctx.request_repaint();
|
||||
});
|
||||
if let Err(error) = result {
|
||||
self.worker = None;
|
||||
self.message = error.to_string();
|
||||
}
|
||||
}
|
||||
fn install(&mut self, ctx: &egui::Context, release: Release) {
|
||||
self.install_using(ctx, move || {
|
||||
let install =
|
||||
self_update::current(&APP).ok_or(tr("This installation is managed externally. Update it with its package manager or open Releases."))?;
|
||||
let platform = Platform::current().ok_or(tr("No installer is available for this platform."))?;
|
||||
let http = Http::new(concat!("Craft Anything/", env!("CARGO_PKG_VERSION")))?;
|
||||
let paths = Paths::for_app(&APP)?;
|
||||
self_update::prepare_update(&APP, &install, &release, platform, &http, &paths, &Stop::default(), &mut |_| {}, &stable_choice, Some(VERSION))
|
||||
});
|
||||
}
|
||||
|
||||
fn install_using(&mut self, ctx: &egui::Context, install: impl FnOnce() -> Result<self_update::Restart, String> + Send + 'static) {
|
||||
self.installing = true;
|
||||
self.message = tr("Downloading and verifying the update…");
|
||||
let (tx, rx) = channel();
|
||||
self.worker = Some(rx);
|
||||
let ctx = ctx.clone();
|
||||
let result = std::thread::Builder::new().name("release-install".into()).spawn(move || {
|
||||
let result = install();
|
||||
let _ = tx.send(Reply::Installed(result));
|
||||
ctx.request_repaint();
|
||||
});
|
||||
if let Err(error) = result {
|
||||
self.worker = None;
|
||||
self.installing = false;
|
||||
self.message = error.to_string();
|
||||
}
|
||||
}
|
||||
/// Returns true while installing: the caller pauses editing and starting work until restart.
|
||||
pub fn show(&mut self, ctx: &egui::Context, safe_to_install: bool) -> bool {
|
||||
if std::mem::take(&mut self.read_outcome_requested)
|
||||
&& let Ok(paths) = Paths::for_app(&APP)
|
||||
{
|
||||
self.apply_outcome(self_update::take_outcome(&paths, VERSION));
|
||||
}
|
||||
let reply = self.worker.as_ref().map(Receiver::try_recv);
|
||||
match reply {
|
||||
Some(Ok(Reply::Checked(result, installable))) => {
|
||||
self.installable = installable;
|
||||
self.worker = None;
|
||||
self.checked(result);
|
||||
}
|
||||
Some(Ok(Reply::Installed(result))) => {
|
||||
self.worker = None;
|
||||
match result {
|
||||
Ok(restart) => {
|
||||
self.restart = Some(restart);
|
||||
self.message = tr("Update ready. Restarting…");
|
||||
}
|
||||
Err(error) => {
|
||||
self.installing = false;
|
||||
self.message = error;
|
||||
}
|
||||
}
|
||||
}
|
||||
Some(Err(TryRecvError::Disconnected)) => {
|
||||
self.worker = None;
|
||||
self.installing = false;
|
||||
self.message = tr("The update worker stopped unexpectedly. Try checking again.");
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
if self.restart.is_some() {
|
||||
ctx.send_viewport_cmd(egui::ViewportCommand::Close);
|
||||
} else if self.installing && ctx.input(|i| i.viewport().close_requested()) {
|
||||
// The platform helper may be replacing files. Keep this process alive until it finishes.
|
||||
ctx.send_viewport_cmd(egui::ViewportCommand::CancelClose);
|
||||
}
|
||||
if self.worker.is_some() {
|
||||
ctx.request_repaint_after(std::time::Duration::from_millis(100));
|
||||
}
|
||||
if self.open {
|
||||
let mut open = true;
|
||||
let mut install = false;
|
||||
let mut again = false;
|
||||
egui::Window::new(tr("Check for Updates"))
|
||||
.open(&mut open)
|
||||
.collapsible(false)
|
||||
.resizable(false)
|
||||
.anchor(egui::Align2::CENTER_CENTER, egui::Vec2::ZERO)
|
||||
.default_width(440.0)
|
||||
.max_width((ctx.content_rect().width() - 32.0).max(160.0))
|
||||
.show(ctx, |ui| {
|
||||
ui.label(format!("Craft Anything {VERSION}"));
|
||||
ui.label(&self.message);
|
||||
if !safe_to_install && self.release.is_some() {
|
||||
ui.label(tr("Save your work and stop running tasks before installing an update."));
|
||||
}
|
||||
if self.release.is_some() && !self.installable {
|
||||
ui.label(tr("Use Releases or your package manager to update this installation."));
|
||||
}
|
||||
ui.horizontal(|ui| {
|
||||
if let Some(release) = &self.release {
|
||||
ui.hyperlink_to(tr("Releases"), &release.html_url);
|
||||
install = ui
|
||||
.add_enabled(
|
||||
safe_to_install && self.installable && self.worker.is_none() && self.restart.is_none(),
|
||||
egui::Button::new(tr("Update and restart")),
|
||||
)
|
||||
.clicked();
|
||||
} else {
|
||||
ui.hyperlink_to(tr("Releases"), APP.releases_url());
|
||||
}
|
||||
again = ui.add_enabled(self.worker.is_none() && !self.installing, egui::Button::new(tr("Check again"))).clicked();
|
||||
});
|
||||
});
|
||||
self.open = open || self.installing;
|
||||
if install && let Some(release) = self.release.clone() {
|
||||
self.install(ctx, release);
|
||||
}
|
||||
if again {
|
||||
self.check(ctx);
|
||||
}
|
||||
}
|
||||
self.installing
|
||||
}
|
||||
fn apply_outcome(&mut self, outcome: Option<self_update::Outcome>) {
|
||||
match outcome {
|
||||
Some(self_update::Outcome::Installed(version)) => {
|
||||
self.open = true;
|
||||
self.message = trf("Updated to {version}.", &[("version", &version.to_string())]);
|
||||
}
|
||||
Some(self_update::Outcome::Failed(error)) => {
|
||||
self.open = true;
|
||||
self.message = trf("The update failed: {error}", &[("error", &error)]);
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
}
|
||||
|
||||
fn checked(&mut self, result: Result<Option<Release>, String>) {
|
||||
match result {
|
||||
Ok(Some(release)) => {
|
||||
self.message = trf("{version} is available.", &[("version", &release.version_label())]);
|
||||
self.release = Some(release);
|
||||
}
|
||||
Ok(None) => {
|
||||
self.message = tr("You're up to date.");
|
||||
self.release = None;
|
||||
}
|
||||
Err(error) => {
|
||||
self.message = trf("Couldn't check for updates: {error}", &[("error", &error)]);
|
||||
self.release = None;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// Start the prepared helper only after the app's normal exit path has accepted closing.
|
||||
pub fn finish(&mut self) {
|
||||
if let Some(restart) = self.restart.take()
|
||||
&& let Err(error) = restart.start()
|
||||
{
|
||||
eprintln!("Couldn't restart after updating: {error}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Runs the Windows installation helper before opening a normal application window.
|
||||
pub fn finish_helper() -> Option<Result<(), String>> {
|
||||
self_update::finish(&APP, &std::env::args_os().skip(1).collect::<Vec<_>>())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
fn draw(updates: &mut Updates, safe: bool, close: bool) -> egui::FullOutput {
|
||||
let ctx = egui::Context::default();
|
||||
let mut input = egui::RawInput { screen_rect: Some(egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(640.0, 400.0))), ..Default::default() };
|
||||
if close {
|
||||
input.viewports.entry(egui::ViewportId::ROOT).or_default().events.push(egui::ViewportEvent::Close);
|
||||
}
|
||||
let mut output = ctx.run_ui(input, |ui| {
|
||||
updates.show(ui.ctx(), safe);
|
||||
});
|
||||
output.textures_delta.clear();
|
||||
output
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_launcher_pin_stops_the_real_check_before_network_access() {
|
||||
const CHILD: &str = "CRAFT_UPDATE_PIN_TEST_CHILD";
|
||||
if std::env::var_os(CHILD).is_some() {
|
||||
assert!(stable_choice().is_err());
|
||||
let mut updates = Updates::default();
|
||||
updates.check(&egui::Context::default());
|
||||
let reply =
|
||||
updates.worker.as_ref().expect("check worker").recv_timeout(std::time::Duration::from_secs(5)).expect("pin check finishes without network");
|
||||
let (tx, rx) = channel();
|
||||
tx.send(reply).expect("receiver");
|
||||
updates.worker = Some(rx);
|
||||
draw(&mut updates, true, false);
|
||||
assert!(updates.message.contains("ArtCraft Launcher"));
|
||||
assert!(updates.release.is_none());
|
||||
assert!(!updates.installable);
|
||||
assert!(finish_helper().is_none());
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
// This child has an isolated XDG data folder; never consume a user's update record.
|
||||
let paths = Paths::for_app(&APP).expect("isolated app folders");
|
||||
std::fs::create_dir_all(paths.logs()).expect("test logs");
|
||||
let failure = paths.logs().join("self-update-error.txt");
|
||||
std::fs::write(&failure, "test installer failure").expect("test failure record");
|
||||
let mut restarted = Updates::default();
|
||||
restarted.startup();
|
||||
draw(&mut restarted, true, false);
|
||||
assert!(restarted.open);
|
||||
assert!(restarted.message.contains("test installer failure"));
|
||||
assert!(!failure.exists(), "the helper result is consumed exactly once");
|
||||
restarted.open = false;
|
||||
restarted.startup();
|
||||
draw(&mut restarted, true, false);
|
||||
assert!(!restarted.open, "the old failure must not reappear on the next start");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
// Keep the process environment and the user's actual version choices untouched.
|
||||
let dir = std::env::temp_dir().join(format!("{}-updater-pin-test-{}", APP.id, std::process::id()));
|
||||
std::fs::create_dir_all(&dir).expect("test folder");
|
||||
let path = dir.join("versions.json");
|
||||
std::fs::write(&path, format!(r#"{{"apps":{{"{}":{{"Pinned":"0.1.0"}}}}}}"#, APP.id)).expect("test pin");
|
||||
let status = std::process::Command::new(std::env::current_exe().expect("test binary"))
|
||||
.args(["--exact", "updates::tests::a_launcher_pin_stops_the_real_check_before_network_access"])
|
||||
.env(CHILD, "1")
|
||||
.env(craft_update::pins::PATH_ENV, &path)
|
||||
.env("XDG_DATA_HOME", dir.join("data"))
|
||||
.status()
|
||||
.expect("isolated pin test");
|
||||
std::fs::remove_dir_all(dir).expect("remove test folder");
|
||||
assert!(status.success());
|
||||
}
|
||||
#[test]
|
||||
fn available_release_is_shown_but_never_installed_without_confirmation() {
|
||||
let release = Release { tag: "v99.0.0".into(), html_url: APP.releases_url(), ..Release::default() };
|
||||
let (tx, rx) = channel();
|
||||
tx.send(Reply::Checked(Ok(Some(release)), false)).expect("receiver is alive");
|
||||
let mut updates = Updates { open: true, worker: Some(rx), ..Updates::default() };
|
||||
let output = draw(&mut updates, false, false);
|
||||
assert!(updates.message.contains("99.0.0"));
|
||||
assert!(!output.shapes.is_empty(), "the result window must be rendered");
|
||||
assert!(updates.worker.is_none());
|
||||
assert!(!updates.installing);
|
||||
assert!(!updates.installable, "externally managed installs must only offer Releases");
|
||||
updates.installable = true;
|
||||
draw(&mut updates, true, false);
|
||||
assert!(!updates.installing, "an available update alone must never install");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn checks_run_off_thread_and_repeated_requests_share_the_worker() {
|
||||
let ctx = egui::Context::default();
|
||||
let (started, wait) = channel();
|
||||
let mut updates = Updates::default();
|
||||
updates.check_using(&ctx, move || {
|
||||
wait.recv().expect("release test worker");
|
||||
(Ok(None), false)
|
||||
});
|
||||
assert!(updates.worker.is_some());
|
||||
updates.check_using(&ctx, || panic!("must not start a second check"));
|
||||
draw(&mut updates, false, false);
|
||||
started.send(()).expect("worker waiting");
|
||||
let reply = updates.worker.as_ref().expect("worker").recv_timeout(std::time::Duration::from_secs(5)).expect("worker finishes");
|
||||
let (tx, rx) = channel();
|
||||
tx.send(reply).expect("receiver");
|
||||
updates.worker = Some(rx);
|
||||
draw(&mut updates, true, false);
|
||||
assert_eq!(updates.message, "You're up to date.");
|
||||
assert!(updates.worker.is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn an_install_failure_unlocks_editing_and_close_is_cancelled_until_it_finishes() {
|
||||
let ctx = egui::Context::default();
|
||||
let (finish, wait) = channel();
|
||||
let mut updates = Updates { open: true, ..Updates::default() };
|
||||
updates.install_using(&ctx, move || {
|
||||
wait.recv().expect("release test worker");
|
||||
Err("signature verification failed".into())
|
||||
});
|
||||
assert!(updates.installing);
|
||||
let output = draw(&mut updates, false, true);
|
||||
assert!(output.viewport_output.values().any(|v| v.commands.contains(&egui::ViewportCommand::CancelClose)));
|
||||
finish.send(()).expect("worker waiting");
|
||||
let reply = updates.worker.as_ref().expect("worker").recv_timeout(std::time::Duration::from_secs(5)).expect("worker finishes");
|
||||
let (tx, rx) = channel();
|
||||
tx.send(reply).expect("receiver");
|
||||
updates.worker = Some(rx);
|
||||
draw(&mut updates, false, false);
|
||||
assert!(!updates.installing);
|
||||
assert!(updates.worker.is_none());
|
||||
assert!(updates.restart.is_none(), "failed verification must never schedule a restart");
|
||||
assert!(updates.message.contains("signature verification failed"));
|
||||
updates.finish();
|
||||
updates.apply_outcome(None);
|
||||
}
|
||||
#[test]
|
||||
fn a_failed_helper_is_reported_when_the_old_app_restarts() {
|
||||
let mut updates = Updates::default();
|
||||
updates.apply_outcome(Some(self_update::Outcome::Failed("installer refused the update".into())));
|
||||
assert!(updates.open);
|
||||
assert!(updates.message.contains("installer refused the update"));
|
||||
assert!(updates.worker.is_none());
|
||||
assert!(!updates.installing);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_successful_restart_reports_the_installed_version() {
|
||||
let mut updates = Updates::default();
|
||||
let version = craft_update::version::parse("1.2.3").expect("valid test version");
|
||||
updates.apply_outcome(Some(self_update::Outcome::Installed(version)));
|
||||
assert!(updates.open);
|
||||
assert!(updates.message.contains("1.2.3"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_manual_check_reports_success_and_failure() {
|
||||
let mut updates = Updates::default();
|
||||
updates.checked(Ok(None));
|
||||
assert_eq!(updates.message, "You're up to date.");
|
||||
updates.checked(Err("network unavailable".into()));
|
||||
assert!(updates.message.contains("network unavailable"));
|
||||
assert!(updates.release.is_none());
|
||||
}
|
||||
#[test]
|
||||
fn a_dropped_worker_reports_failure_and_unblocks_the_app() {
|
||||
let (tx, rx) = channel();
|
||||
drop(tx);
|
||||
let mut updates = Updates { worker: Some(rx), installing: true, ..Updates::default() };
|
||||
assert!(!updates.show(&egui::Context::default(), false));
|
||||
assert!(updates.message.contains("stopped unexpectedly"));
|
||||
}
|
||||
#[test]
|
||||
fn the_manual_result_window_is_visible_without_network() -> Result<(), String> {
|
||||
use egui_kittest::kittest::Queryable as _;
|
||||
let mut updates = Updates { open: true, message: "You're up to date.".into(), ..Updates::default() };
|
||||
let mut harness = egui_kittest::Harness::builder().with_size(egui::vec2(640.0, 360.0)).build_ui(|ui| {
|
||||
updates.show(ui.ctx(), true);
|
||||
});
|
||||
harness.run();
|
||||
harness.get_by_label("You're up to date.");
|
||||
harness.get_by_label("Check again");
|
||||
if let Some(path) = std::env::var_os("CRAFT_UPDATE_SCREENSHOT") {
|
||||
harness.render()?.save(path).map_err(|e| e.to_string())?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
//! Release and source Flatpaks must allow release checks and host update helpers.
|
||||
fn finish_args(manifest: &str) -> Vec<&str> {
|
||||
manifest
|
||||
.split("finish-args:")
|
||||
.nth(1)
|
||||
.unwrap_or_default()
|
||||
.lines()
|
||||
.take_while(|line| line.is_empty() || line.starts_with(' ') || line.starts_with('#'))
|
||||
.filter_map(|line| line.trim().strip_prefix("- "))
|
||||
.map(|arg| arg.trim_matches(['\'', '"']))
|
||||
.collect()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn flatpak_update_permissions() {
|
||||
let manifests = [
|
||||
include_str!("../../../packaging/linux/flatpak/ai.storyteller.craft-anything.bundle.yml"),
|
||||
include_str!("../../../packaging/linux/flatpak/ai.storyteller.craft-anything.yml"),
|
||||
];
|
||||
let args = manifests.map(finish_args);
|
||||
assert_eq!(args[0], args[1], "source and release permissions must agree");
|
||||
for permissions in args {
|
||||
for required in ["--share=network", "--talk-name=org.freedesktop.Flatpak", "--filesystem=xdg-data/ArtCraft/versions:ro"] {
|
||||
assert!(permissions.contains(&required), "missing update permission: {required}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -147,6 +147,7 @@ const ACTIONS: &[Action] = &[
|
||||
/// `CraftApp` methods that aren't person-facing actions: callbacks, polling, drawing, helpers.
|
||||
#[rustfmt::skip]
|
||||
const PLUMBING: &[(&str, &str)] = &[
|
||||
("show_update_outcome_on_start", "native startup queues the previous helper result for the first window frame; no document action"),
|
||||
("load_agent_model_catalog", "worker dispatch shared by the model picker and its reload action"),
|
||||
("check_backend_keys", "a worker that fills the saved-key status rows"),
|
||||
("stuck_banner", "draws what the lock watchdog found; `sync::problems` and its log are the headless side"),
|
||||
|
||||
@@ -54,3 +54,5 @@ allow-wildcard-paths = true
|
||||
[sources]
|
||||
unknown-registry = "deny"
|
||||
unknown-git = "deny"
|
||||
# Shared native updater, pinned in the UI crate manifest.
|
||||
allow-git = ["https://github.com/storytold/craft-libs"]
|
||||
@@ -17,6 +17,10 @@ runtime-version: '26.08'
|
||||
sdk: org.freedesktop.Sdk
|
||||
command: craft-anything
|
||||
finish-args:
|
||||
# Honor the launcher's pinned and nightly version choices before offering updates.
|
||||
- --filesystem=xdg-data/ArtCraft/versions:ro
|
||||
# Verified update helpers run through flatpak-spawn --host.
|
||||
- --talk-name=org.freedesktop.Flatpak
|
||||
# Display: Wayland first; X11 only when no Wayland compositor is running.
|
||||
- --socket=wayland
|
||||
- --socket=fallback-x11
|
||||
|
||||
@@ -18,6 +18,10 @@ sdk-extensions:
|
||||
- org.freedesktop.Sdk.Extension.rust-stable
|
||||
command: craft-anything
|
||||
finish-args:
|
||||
# Honor the launcher's pinned and nightly version choices before offering updates.
|
||||
- --filesystem=xdg-data/ArtCraft/versions:ro
|
||||
# Verified update helpers run through flatpak-spawn --host.
|
||||
- --talk-name=org.freedesktop.Flatpak
|
||||
# Display: Wayland first; X11 only when no Wayland compositor is running.
|
||||
- --socket=wayland
|
||||
- --socket=fallback-x11
|
||||
|
||||
Reference in new issue
Block a user