mirror of
https://github.com/sp-tarkov/build.git
synced 2025-02-13 09:50:45 -05:00
Refactored build.yaml and removed unnecessary files
This commit is contained in:
parent
21d34c574c
commit
a7db8e78b9
@ -246,25 +246,25 @@ jobs:
|
|||||||
image: refringe/spt-build-server:0.0.4
|
image: refringe/spt-build-server:0.0.4
|
||||||
steps:
|
steps:
|
||||||
- name: Create Directory
|
- name: Create Directory
|
||||||
run: mkdir -p /workspace/refringe/Build/assembled
|
run: mkdir -p /workspace/refringe/Build/release
|
||||||
|
|
||||||
- name: Download Server Build Artifact
|
- name: Download Server Build Artifact
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: server-build
|
name: server-build
|
||||||
path: /workspace/refringe/Build/assembled/
|
path: /workspace/refringe/Build/release/
|
||||||
|
|
||||||
- name: Download Modules Build Artifact
|
- name: Download Modules Build Artifact
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: modules-build
|
name: modules-build
|
||||||
path: /workspace/refringe/Build/assembled/
|
path: /workspace/refringe/Build/release/
|
||||||
|
|
||||||
- name: Download Launcher Build Artifact
|
- name: Download Launcher Build Artifact
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: launcher-build
|
name: launcher-build
|
||||||
path: /workspace/refringe/Build/assembled/
|
path: /workspace/refringe/Build/release/
|
||||||
|
|
||||||
- name: Clone Build Project
|
- name: Clone Build Project
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -272,9 +272,19 @@ jobs:
|
|||||||
path: /workspace/refringe/Build/build
|
path: /workspace/refringe/Build/build
|
||||||
|
|
||||||
- name: Merge Static and Dynamic Files
|
- name: Merge Static and Dynamic Files
|
||||||
run: cp -rvf /workspace/refringe/Build/build/project/static/* /workspace/refringe/Build/assembled/
|
run: cp -rvf /workspace/refringe/Build/build/project/static/* /workspace/refringe/Build/release/
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: List Directory Contents
|
- name: List Release Contents
|
||||||
run: tree /workspace/refringe/Build/assembled
|
run: tree /workspace/refringe/Build/release
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
- name: Compress Release
|
||||||
|
run: |
|
||||||
|
cd /workspace/refringe/Build/release
|
||||||
|
7z a -mx=9 -m0=lzma2 ../release.7z ./*
|
||||||
|
echo "Release compressed."
|
||||||
|
|
||||||
|
- name: List Release File
|
||||||
|
run: |
|
||||||
|
ls -la /workspace/refringe/Build/release.7z
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,10 +0,0 @@
|
|||||||
Write-Output ""
|
|
||||||
Write-Output " █████╗ ██████╗ ████████╗"
|
|
||||||
Write-Output " ██╔════╝ ██╔══██╗╚══██╔══╝"
|
|
||||||
Write-Output " ╚█████╗ ██████╔╝ ██║"
|
|
||||||
Write-Output " ╚═══██╗ ██╔═══╝ ██║"
|
|
||||||
Write-Output " ██████╔╝ ██║ ██║"
|
|
||||||
Write-Output " ╚═════╝ ╚═╝ ╚═╝"
|
|
||||||
Write-Output " Once it hits your lips,"
|
|
||||||
Write-Output " it's so good!"
|
|
||||||
Write-Output ""
|
|
53
project/modify-launcher-executable.js
Normal file
53
project/modify-launcher-executable.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
/**
|
||||||
|
* The sole purpose of this script is to modify the version information and icon of the Launcher project's built
|
||||||
|
* executable. This is not a necessary step for the build process, but it is a nice-to-have for the final product.
|
||||||
|
* It is required during the CI build process because .NET 6 will not compile this information into the executable
|
||||||
|
* on a Linux environment. If the Launcher project is ever updated to .NET v8 this script will no longer be necessary.
|
||||||
|
*/
|
||||||
|
const fs = require('fs').promises;
|
||||||
|
const path = require('path');
|
||||||
|
const ResEdit = require('resedit-js');
|
||||||
|
|
||||||
|
const manifest = {
|
||||||
|
icon: '/workspace/refringe/Build/build/project/icon.launcher.ico',
|
||||||
|
author: 'SPT-AKI Launcher',
|
||||||
|
description: 'The single-player modding framework for Escape From Tarkov.',
|
||||||
|
name: 'aki-launcher',
|
||||||
|
license: 'NCSA',
|
||||||
|
version: '1.0.0', // TODO:
|
||||||
|
};
|
||||||
|
|
||||||
|
const serverExe = '/workspace/refringe/Build/assembled/Aki.Launcher.exe';
|
||||||
|
|
||||||
|
const updateBuildProperties = async () => {
|
||||||
|
const exe = ResEdit.NtExecutable.from(await fs.readFile(serverExe));
|
||||||
|
const res = ResEdit.NtExecutableResource.from(exe);
|
||||||
|
|
||||||
|
const iconPath = path.resolve(manifest.icon);
|
||||||
|
const iconFile = ResEdit.Data.IconFile.from(await fs.readFile(iconPath));
|
||||||
|
|
||||||
|
ResEdit.Resource.IconGroupEntry.replaceIconsForResource(
|
||||||
|
res.entries,
|
||||||
|
1,
|
||||||
|
1033,
|
||||||
|
iconFile.icons.map((item) => item.data),
|
||||||
|
);
|
||||||
|
|
||||||
|
const vi = ResEdit.Resource.VersionInfo.fromEntries(res.entries)[0];
|
||||||
|
|
||||||
|
vi.setStringValues({ lang: 1033, codepage: 1200 }, {
|
||||||
|
ProductName: manifest.author,
|
||||||
|
FileDescription: manifest.description,
|
||||||
|
CompanyName: manifest.name,
|
||||||
|
LegalCopyright: manifest.license,
|
||||||
|
});
|
||||||
|
vi.removeStringValue({ lang: 1033, codepage: 1200 }, "OriginalFilename");
|
||||||
|
vi.removeStringValue({ lang: 1033, codepage: 1200 }, "InternalName");
|
||||||
|
vi.setFileVersion(...manifest.version.split(".").map(Number));
|
||||||
|
vi.setProductVersion(...manifest.version.split(".").map(Number));
|
||||||
|
vi.outputToResourceEntries(res.entries);
|
||||||
|
res.outputResource(exe, true);
|
||||||
|
await fs.writeFile(serverExe, Buffer.from(exe.generate()));
|
||||||
|
};
|
||||||
|
|
||||||
|
updateBuildProperties().catch(console.error);
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user