wip(0.S3): the packages migrated by ludic migrate state packages - every package test green

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-25 14:02:21 +03:00
parent 1e8b5b0523
commit 07505e7ef2
294 changed files with 14996 additions and 14675 deletions

View file

@ -44,19 +44,19 @@ function update__up(p: string) -> string {
# the executable's directory
export function update_dir() -> string { return update__up(UpdateWorld.exe()) }
export function update_root() -> string {
let c = update__conf()
export function update_root(update_st: mut UpdateState) -> string {
let c = update__conf(update_st)
if len(c.root) > 0 { return c.root }
if update__mac() { return update__up(update__up(update_dir())) }
return update_dir() + "\\.."
}
# where the packages live: never inside a macOS bundle, which is read-only and which apply replaces
export function update_packages() -> string {
let c = update__conf()
export function update_packages(update_st: mut UpdateState) -> string {
let c = update__conf(update_st)
if len(c.packages) > 0 { return c.packages }
if update__mac() and len(c.mac_packages) > 0 { return c.mac_packages }
return update_root() + update__sep() + "packages"
return update_root(update_st) + update__sep() + "packages"
}
function update__feed_file() -> string {
@ -64,9 +64,9 @@ function update__feed_file() -> string {
return "releases.win.json"
}
function update__updater() -> string {
if update__mac() { return update_root() + "/Contents/MacOS/UpdateMac" }
return update_root() + update__sep() + "Update.exe"
function update__updater(update_st: mut UpdateState) -> string {
if update__mac() { return update_root(update_st) + "/Contents/MacOS/UpdateMac" }
return update_root(update_st) + update__sep() + "Update.exe"
}
# A quarantined Mac app still where it was downloaded runs from a read-only /AppTranslocation/
@ -76,8 +76,8 @@ export function update_translocated() -> bool {
}
# can this copy update itself? A copy Velopack did not install downloads the game again instead.
export function update_installed() -> bool {
if len(update__conf().root) > 0 { return true }
export function update_installed(update_st: mut UpdateState) -> bool {
if len(update__conf(update_st).root) > 0 { return true }
if update_translocated() { return false }
if update__mac() { return Fs.exists(update_dir() + "/UpdateMac") }
return Fs.exists(update_dir() + "/../Update.exe")