mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-19 23:24:42 +00:00
feat(windows): add arm64 release targets for cli and desktop (#16696)
This commit is contained in:
@@ -78,9 +78,17 @@ async function read(subdir: string, filename: string): Promise<LatestYml | undef
|
||||
|
||||
const output: Record<string, string> = {}
|
||||
|
||||
// Windows: single arch, pass through
|
||||
const win = await read("latest-yml-x86_64-pc-windows-msvc", "latest.yml")
|
||||
if (win) output["latest.yml"] = serialize(win)
|
||||
// Windows: merge arm64 + x64 into single file
|
||||
const winX64 = await read("latest-yml-x86_64-pc-windows-msvc", "latest.yml")
|
||||
const winArm64 = await read("latest-yml-aarch64-pc-windows-msvc", "latest.yml")
|
||||
if (winX64 || winArm64) {
|
||||
const base = winArm64 ?? winX64!
|
||||
output["latest.yml"] = serialize({
|
||||
version: base.version,
|
||||
files: [...(winArm64?.files ?? []), ...(winX64?.files ?? [])],
|
||||
releaseDate: base.releaseDate,
|
||||
})
|
||||
}
|
||||
|
||||
// Linux x64: pass through
|
||||
const linuxX64 = await read("latest-yml-x86_64-unknown-linux-gnu", "latest-linux.yml")
|
||||
|
||||
@@ -19,6 +19,11 @@ export const SIDECAR_BINARIES: Array<{ rustTarget: string; ocBinary: string; ass
|
||||
ocBinary: "opencode-darwin-x64-baseline",
|
||||
assetExt: "zip",
|
||||
},
|
||||
{
|
||||
rustTarget: "aarch64-pc-windows-msvc",
|
||||
ocBinary: "opencode-windows-arm64",
|
||||
assetExt: "zip",
|
||||
},
|
||||
{
|
||||
rustTarget: "x86_64-pc-windows-msvc",
|
||||
ocBinary: "opencode-windows-x64-baseline",
|
||||
@@ -41,7 +46,7 @@ export const RUST_TARGET = Bun.env.RUST_TARGET
|
||||
function nativeTarget() {
|
||||
const { platform, arch } = process
|
||||
if (platform === "darwin") return arch === "arm64" ? "aarch64-apple-darwin" : "x86_64-apple-darwin"
|
||||
if (platform === "win32") return "x86_64-pc-windows-msvc"
|
||||
if (platform === "win32") return arch === "arm64" ? "aarch64-pc-windows-msvc" : "x86_64-pc-windows-msvc"
|
||||
if (platform === "linux") return arch === "arm64" ? "aarch64-unknown-linux-gnu" : "x86_64-unknown-linux-gnu"
|
||||
throw new Error(`Unsupported platform: ${platform}/${arch}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user