forked from OpenGOAL-Mods/OG-Mod-Base
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,035 changed files
with
104,075 additions
and
14,682 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
DEST=${1} | ||
BIN_SOURCE=${2} | ||
SOURCE=${3} | ||
|
||
mkdir -p $DEST | ||
|
||
PREP_BIN="${PREP_BIN:-true}" | ||
|
||
if [ "$PREP_BIN" = "true" ]; then | ||
cp $BIN_SOURCE/game/gk $DEST | ||
cp $BIN_SOURCE/goalc/goalc $DEST | ||
cp $BIN_SOURCE/decompiler/extractor $DEST | ||
|
||
chmod +x $DEST/gk | ||
chmod +x $DEST/goalc | ||
chmod +x $DEST/extractor | ||
fi | ||
|
||
mkdir -p $DEST/data | ||
mkdir -p $DEST/data/launcher/ | ||
mkdir -p $DEST/data/decompiler/ | ||
mkdir -p $DEST/data/game | ||
mkdir -p $DEST/data/log | ||
mkdir -p $DEST/data/game/graphics/opengl_renderer/ | ||
|
||
cp -r $SOURCE/.github/scripts/releases/error-code-metadata.json $DEST/data/launcher/error-code-metadata.json | ||
cp -r $SOURCE/decompiler/config $DEST/data/decompiler/ | ||
cp -r $SOURCE/goal_src $DEST/data | ||
cp -r $SOURCE/game/assets $DEST/data/game/ | ||
cp -r $SOURCE/game/graphics/opengl_renderer/shaders $DEST/data/game/graphics/opengl_renderer | ||
cp -r $SOURCE/custom_assets $DEST/data | ||
|
||
python ./.github/scripts/releases/replace-mod-version-timestamp.py $DEST/data/goal_src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
DEST=${1} | ||
BIN_SOURCE=${2} | ||
SOURCE=${3} | ||
|
||
mkdir -p $DEST | ||
|
||
cp $BIN_SOURCE/gk.exe $DEST | ||
cp $BIN_SOURCE/goalc.exe $DEST | ||
cp $BIN_SOURCE/extractor.exe $DEST | ||
|
||
mkdir -p $DEST/data | ||
mkdir -p $DEST/data/launcher/ | ||
mkdir -p $DEST/data/decompiler/ | ||
mkdir -p $DEST/data/game | ||
mkdir -p $DEST/data/log | ||
mkdir -p $DEST/data/game/graphics/opengl_renderer/ | ||
|
||
cp -r $SOURCE/.github/scripts/releases/error-code-metadata.json $DEST/data/launcher/error-code-metadata.json | ||
cp -r $SOURCE/decompiler/config $DEST/data/decompiler/ | ||
cp -r $SOURCE/goal_src $DEST/data | ||
cp -r $SOURCE/game/assets $DEST/data/game/ | ||
cp -r $SOURCE/game/graphics/opengl_renderer/shaders $DEST/data/game/graphics/opengl_renderer | ||
cp -r $SOURCE/custom_assets $DEST/data | ||
|
||
python ./.github/scripts/releases/replace-mod-version-timestamp.py $DEST/data/goal_src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import datetime | ||
import json | ||
import os | ||
import glob | ||
import shutil | ||
import tarfile | ||
import urllib.request | ||
import zipfile | ||
import sys | ||
|
||
def patch_mod_timestamp(goal_src_path): | ||
try: | ||
mod_settings_files = glob.glob(f"{goal_src_path}/**/mod-settings.gc", recursive=True) | ||
for settings_file_path in mod_settings_files: | ||
file = open(settings_file_path, "r") | ||
file_data = file.read() | ||
file.close() | ||
# Check if the placeholder string is present in the file | ||
if "%MODVERSIONPLACEHOLDER%" in file_data: | ||
# Replace the placeholder string with the version and date string | ||
version_str = datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%d %H:%M:%S") | ||
file_data = file_data.replace("%MODVERSIONPLACEHOLDER%", version_str) | ||
# Write the updated content back to the mod-settings | ||
file = open(settings_file_path, "w") | ||
file.write(file_data) | ||
file.close() | ||
print( | ||
f"String %MODVERSIONPLACEHOLDER% replaced with '{version_str}' in the file." | ||
) | ||
else: | ||
print(f"Couldn't find %MODVERSIONPLACEHOLDER% in the file.") | ||
except Exception as e: | ||
print( | ||
f"Something went wrong trying to replace placeholder text with mod version info:" | ||
) | ||
print(e) | ||
|
||
if len(sys.argv) > 1: | ||
patch_mod_timestamp(sys.argv[1]) | ||
else: | ||
print(f"No goal_src path provided to replace-mod-version-timestamp") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ on: | |
jobs: | ||
build: | ||
name: ARM | ||
runs-on: macos-12 | ||
runs-on: macos-15 | ||
timeout-minutes: 120 | ||
|
||
steps: | ||
|
@@ -23,18 +23,15 @@ jobs: | |
fetch-depth: 0 | ||
fetch-tags: true | ||
|
||
- name: Set up ARM64 environment | ||
run: sudo softwareupdate --install-rosetta --agree-to-license | ||
|
||
- name: Install Package Dependencies | ||
run: arch -arm64 brew install cmake ninja | ||
run: brew install cmake ninja nasm | ||
|
||
- name: Setup sccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
variant: sccache | ||
key: macos-12-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }}-${{ github.sha }} | ||
restore-keys: macos-12-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }} | ||
key: macos-15-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }}-${{ github.sha }} | ||
restore-keys: macos-15-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }} | ||
max-size: 1000M | ||
|
||
- name: CMake Generation | ||
|
@@ -55,7 +52,7 @@ jobs: | |
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: opengoal-macos-${{ inputs.cachePrefix }} | ||
name: opengoal-macos-arm-${{ inputs.cachePrefix }} | ||
if-no-files-found: error | ||
path: | | ||
./build/goalc/goalc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ on: | |
jobs: | ||
build: | ||
name: Intel | ||
runs-on: macos-12 | ||
runs-on: macos-13 | ||
timeout-minutes: 120 | ||
|
||
steps: | ||
|
@@ -68,8 +68,8 @@ jobs: | |
uses: hendrikmuhs/[email protected] | ||
with: | ||
variant: sccache | ||
key: macos-12-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }}-${{ github.sha }} | ||
restore-keys: macos-12-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }} | ||
key: macos-13-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }}-${{ github.sha }} | ||
restore-keys: macos-13-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }} | ||
max-size: 1000M | ||
|
||
- name: CMake Generation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.