mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 00:13:12 +09:00
Support the ARM64 Linux headless build of Factorio
Factorio publishes a linux-arm64 headless build from 2.1.18. On ARM64 Linux the host now downloads that build, refuses versions older than 2.1.18 that are not already installed, and finds the binary in bin/arm64 or bin/x64, whichever is present. The host builds the download URL from the version instead of using headlessUrl from the controller, so the version list on the wire stays the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
35f9609865
commit
5aaea1f213
7 files changed
+167
-15
No files matched your search
+19
-1
@@ -14,6 +14,24 @@ export const ExternalFactorioVersionSchema = Type.Object({
|
||||
|
||||
export type ExternalFactorioVersion = Static<typeof ExternalFactorioVersionSchema>;
|
||||
|
||||
/** CPU architectures Factorio publishes Linux headless builds for */
|
||||
export type FactorioHeadlessArch = "x64" | "arm64";
|
||||
|
||||
/** First Factorio version with an ARM64 Linux headless build */
|
||||
export const minimumArm64HeadlessVersion = "2.1.18";
|
||||
|
||||
/**
|
||||
* Download URL of the Linux headless build of a Factorio version
|
||||
*
|
||||
* @param version - Factorio version to download.
|
||||
* @param arch - CPU architecture of the build.
|
||||
* @returns URL redirecting to the tarball.
|
||||
*/
|
||||
export function factorioHeadlessUrl(version: string, arch: FactorioHeadlessArch = "x64") {
|
||||
const build = arch === "arm64" ? "linux-arm64" : "linux64";
|
||||
return `https://www.factorio.com/get-download/${version}/headless/${build}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch all factorio versions that support headless
|
||||
*
|
||||
@@ -60,7 +78,7 @@ function parseFactorioVersions(html: string): ExternalFactorioVersion[] {
|
||||
versions.set(version, {
|
||||
version: version,
|
||||
stable: kind === "stable",
|
||||
headlessUrl: `https://www.factorio.com/get-download/${version}/headless/linux64`,
|
||||
headlessUrl: factorioHeadlessUrl(version),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user