Skip to content

Commit 452b788

Browse files
committed
Fix CICD
1 parent 88a26bb commit 452b788

File tree

7 files changed

+110
-76
lines changed

7 files changed

+110
-76
lines changed

.github/workflows/preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- name: Set Modpack Version
5656
run: |
5757
if [[ "${{ matrix.buildType }}" == "lwjgl3" ]]; then
58-
VER="${{ env.VERSION_LWJGL3 }}"
58+
VER="${{ env.JAVA_OPT }}"
5959
echo "[CleanroomMMC] GregTech Expert 2 $VER" > overrides/config/txloader/load/custommainmenu/version.txt
6060
else
6161
VER="${{ env.JAVA8_CF }}"

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- name: Set Modpack Version
5353
run: |
5454
if [[ "${{ matrix.buildType }}" == "lwjgl3" ]]; then
55-
VER="${{ env.VERSION_LWJGL3 }}"
55+
VER="${{ env.JAVA_OPT }}"
5656
echo "[CleanroomMMC] GregTech Expert 2 $VER" > overrides/config/txloader/load/custommainmenu/version.txt
5757
else
5858
VER="${{ env.JAVA8_CF }}"

buildtools/gen-lwjgl3-manifest.py

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,47 @@
11
#!/usr/bin/env python3
2-
# Remove lwjgl3 not supported mods
2+
# Generate LWJGL3 compatible manifest.json
33

4-
## Import library
54
import json
5+
import json5
66

77

8-
## Run main function
9-
projectIDs = [
10-
419286, # MixinBooter
11-
870276, # ConfigAnytime
12-
873867, # Red Core
13-
910715, # Alfheim Lighting Engine
14-
624967, # RenderLib
15-
409087, # Entity Culling
16-
408853, # Particle Culling
17-
]
8+
def main():
9+
# Read overrides configuration
10+
with open('lwjgl3-overrides.jsonc', 'r', encoding='utf-8') as f:
11+
overrides = json5.load(f)
1812

19-
# Read manifest.json
20-
with open('../manifest.json', 'r') as f:
21-
data = json.load(f)
13+
remove_ids = set(overrides.get('remove', []))
14+
add_mods = overrides.get('add', [])
15+
replace_mods = {mod['projectID']: mod['with'] for mod in overrides.get('replace', [])}
2216

23-
# Remove lwjgl3 not supported mods
24-
data['files'] = [item for item in data['files'] if item['projectID'] not in projectIDs]
17+
# Read manifest.json
18+
with open('../manifest.json', 'r', encoding='utf-8') as f:
19+
data = json.load(f)
2520

26-
# Write manifest.json
27-
with open('../cmmc/manifest.json', 'w') as f:
28-
json.dump(data, f, indent=2)
21+
# Remove mods
22+
data['files'] = [item for item in data['files'] if item['projectID'] not in remove_ids]
23+
24+
# Replace mods (update projectID and/or fileID)
25+
for item in data['files']:
26+
if item['projectID'] in replace_mods:
27+
replacement = replace_mods[item['projectID']]
28+
item['projectID'] = replacement['projectID']
29+
item['fileID'] = replacement['fileID']
30+
if 'required' in replacement:
31+
item['required'] = replacement['required']
32+
33+
# Add mods
34+
for mod in add_mods:
35+
data['files'].append({
36+
'projectID': mod['projectID'],
37+
'fileID': mod['fileID'],
38+
'required': mod.get('required', True)
39+
})
40+
41+
# Write manifest.json
42+
with open('../cmmc/manifest.json', 'w', encoding='utf-8') as f:
43+
json.dump(data, f, indent=2)
44+
45+
46+
if __name__ == '__main__':
47+
main()

buildtools/lwjgl3-overrides.jsonc

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
// Mods to remove for LWJGL3 build (projectID)
3+
"remove": [
4+
419286, // MixinBooter
5+
870276, // ConfigAnytime
6+
873867, // Red Core
7+
910715, // Alfheim Lighting Engine
8+
624967, // RenderLib
9+
409087, // Entity Culling
10+
408853 // Particle Culling
11+
],
12+
13+
// Mods to add for LWJGL3 build
14+
"add": [
15+
{ // Fugue
16+
"projectID": 1005815,
17+
"fileID": 7355882,
18+
"required": true
19+
},
20+
{ // Scalar Legacy
21+
"projectID": 1235372,
22+
"fileID": 6842491,
23+
"required": true
24+
}
25+
],
26+
27+
// Mods to replace with LWJGL3 compatible versions
28+
"replace": [
29+
{ // CodeChicken Lib -> CodeChicken Lib CRE
30+
"projectID": 242818,
31+
"with": {
32+
"projectID": 1328922,
33+
"fileID": 6898525
34+
}
35+
},
36+
{ // ModernSplash -> ModernSplash LWJGL3 version
37+
"projectID": 629058,
38+
"with": {
39+
"projectID": 629058,
40+
"fileID": 6501489
41+
}
42+
}
43+
]
44+
}

buildtools/pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[project]
22
name = "gte2-buildtools"
3-
version = "1.0.0"
3+
version = "1.1.0"
44
description = "Build tools for GTE2 Modpack"
5-
requires-python = ">=3.12"
5+
requires-python = ">=3.14"
66
dependencies = [
7+
"json5>=0.12.1",
78
"requests>=2.32.5",
89
]
910

buildtools/uv.lock

Lines changed: 19 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)