mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-12 22:10:44 -05:00
Hardcoded Build Platform and Architecture
When the server was being built on systems other than Windows, that system's version of node was being downloaded for the build instead of the expected versions (Win/x64). This change hardcodes the values so that they're no longer dynamically pulled from the current system. Should help with generating automated builds. Also, re-enabled the build step that added the icon to the Windows executable. It was being skipped over on non-Windows platforms and I don't know why... it should be a cross-platform solution.
This commit is contained in:
parent
570a81ff78
commit
03ae37ec2f
@ -7,9 +7,12 @@ import pkgfetch from "@yao-pkg/pkg-fetch";
|
||||
import gulp from "gulp";
|
||||
import { exec } from "gulp-execa";
|
||||
import rename from "gulp-rename";
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
import * as ResEdit from "resedit";
|
||||
import manifest from "./package.json" assert { type: "json" };
|
||||
|
||||
const arch = "x64";
|
||||
const platform = "win32";
|
||||
const nodeVersion = "node20"; // As of @yao-pkg/pkg-fetch v3.5.7, it's v20.10.0
|
||||
const stdio = "inherit";
|
||||
const buildDir = "build/";
|
||||
@ -36,9 +39,9 @@ const fetchPackageImage = async () =>
|
||||
{
|
||||
const output = "./.pkg-cache/v3.5";
|
||||
const fetchedPkg = await pkgfetch.need({
|
||||
arch: process.arch,
|
||||
arch: arch,
|
||||
nodeRange: nodeVersion,
|
||||
platform: process.platform,
|
||||
platform: platform,
|
||||
output,
|
||||
});
|
||||
console.log(`fetched node binary at ${fetchedPkg}`);
|
||||
@ -56,7 +59,8 @@ const updateBuildProperties = async () =>
|
||||
{
|
||||
if (os.platform() !== "win32")
|
||||
{
|
||||
return;
|
||||
console.debug("Attempting to update Windows executable properties on non-Windows platform.");
|
||||
// Refringe was here. He's not sorry.
|
||||
}
|
||||
|
||||
const exe = ResEdit.NtExecutable.from(await fs.readFile(serverExe));
|
||||
@ -279,7 +283,7 @@ const build = (packagingType) =>
|
||||
// Packaging Arguments
|
||||
const packaging = async (entry) =>
|
||||
{
|
||||
const target = `${nodeVersion}-${process.platform}-${process.arch}`;
|
||||
const target = `${nodeVersion}-${platform}-${arch}`;
|
||||
try
|
||||
{
|
||||
await pkg.exec([
|
||||
|
Loading…
x
Reference in New Issue
Block a user