Skip to content

Commit 6ed8c03

Browse files
authored
Add files via upload
1 parent a2c22e0 commit 6ed8c03

File tree

5 files changed

+174
-0
lines changed

5 files changed

+174
-0
lines changed

.github/workflows/buildCE.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build Cheat Engine
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
build:
11+
runs-on: windows-latest
12+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
13+
steps:
14+
- name: Setup job variables
15+
uses: allenevans/[email protected]
16+
with:
17+
LAZARUS_VERSION: 2.0.10
18+
FPC_VERSION: 3.2.0
19+
- uses: actions/checkout@v2
20+
- uses: bahmutov/npm-install@v1
21+
with:
22+
working-directory: ./.github/workflows/scripts
23+
env:
24+
NODE_ENV: production
25+
- name: Get Lazarus dependencies
26+
shell: bash
27+
id: get-dependencies
28+
run: echo "::set-output name=dependencies::$(node ./.github/workflows/scripts/getPackages.js)"
29+
- name: Install Lazarus
30+
uses: gcarreno/[email protected]
31+
with:
32+
lazarus-version: ${{ env.LAZARUS_VERSION }}
33+
include-packages: ${{ steps.get-dependencies.outputs.dependencies }}
34+
- name: Install 32bit compat
35+
shell: bash
36+
run: node ./.github/workflows/scripts/install32bitCompat.js
37+
env:
38+
LAZARUS_VERSION: ${{ env.LAZARUS_VERSION }}
39+
FPC_VERSION: ${{ env.FPC_VERSION }}
40+
- name: Build 32-Bit
41+
shell: cmd
42+
run: lazbuild --build-mode="Release 32-bit" --no-write-project "Cheat Engine/cheatengine.lpi"
43+
- name: Build 64-Bit
44+
shell: cmd
45+
run: lazbuild --build-mode="Release 64-bit" --no-write-project "Cheat Engine/cheatengine.lpi"
46+
- name: Build 64-Bit O4 AVX2
47+
shell: cmd
48+
run: lazbuild --build-mode="Release 64-bit O4 AVX2" --no-write-project "Cheat Engine/cheatengine.lpi"
49+
- name: Zip artifact
50+
shell: cmd
51+
run: 7z a -tzip release.zip * -r
52+
working-directory: "./Cheat Engine/bin"
53+
- name: Release artifact
54+
uses: actions/upload-artifact@v2
55+
with:
56+
name: Release
57+
path: "Cheat Engine/bin/release.zip"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const { readFileSync } = require("fs");
2+
const { join } = require("path");
3+
4+
let fileContent = readFileSync(join(process.env.GITHUB_WORKSPACE, "Cheat Engine/cheatengine.lpi"), { encoding: "utf-8", flag: "r" });
5+
let dependencies = fileContent.match(/(?<=<PackageName Value=").*?(?="\/>)/g).join(",");
6+
7+
console.log(dependencies);
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const { join } = require("path");
2+
const { execSync } = require("child_process");
3+
const fetchSync = require("@the-bds-maneger/fetchsync");
4+
5+
fetchSync(
6+
`https://downloads.sourceforge.net/project/lazarus/Lazarus%20Windows%2064%20bits/Lazarus%20${process.env.LAZARUS_VERSION}/lazarus-${process.env.LAZARUS_VERSION}-fpc-${process.env.FPC_VERSION}-cross-i386-win32-win64.exe`,
7+
{
8+
Binary: true,
9+
}
10+
).save(join(process.env.GITHUB_WORKSPACE, "32bit.exe"));
11+
execSync(`cd "${process.env.GITHUB_WORKSPACE}" && 32bit.exe /VERYSILENT /DIR=${join(process.env.RUNNER_TEMP, "lazarus")}`);

.github/workflows/scripts/package-lock.json

Lines changed: 92 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "scripts",
3+
"version": "1.0.0",
4+
"dependencies": {
5+
"@the-bds-maneger/fetchsync": "^10.12.4177"
6+
}
7+
}

0 commit comments

Comments
 (0)