diff --git a/README.md b/README.md index 3b33706018..0fc5720b7e 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ This name must not clash with any other existing ports. ### New Port Structure: -Ports are now contained within the `port` top level directory, each port has its own sub-directory named after the port itself. Each port must adhere to the `portname` rules stated above. Each port must have a `port.json`, `screenshot.{jpg,png}`, `README.md`, a port script and a port directory. It may optionally include a `cover.{jpg,png}`. +Ports are now contained within the `port` top level directory, each port has its own sub-directory named after the port itself. Each port must adhere to the `portname` rules stated above. Each port must have a `port.json`, `screenshot.{jpg,png}`, `README.md`, a port script and a port directory. It may optionally include a `cover.{jpg,png}` and a `gameinfo.xml`. The script should have capital letters (like `Port Name.sh`) and must end in `.sh`, the port directory should be the same as the containing directory. Some legacy ports have different names, new ports won't be accepted unless they follow the new convention. @@ -73,6 +73,7 @@ A port directory might look like the following: - README.md - screenshot.jpg - cover.jpg + - gameinfo.xml - Port Name.sh - portname/ - @@ -121,7 +122,11 @@ Example from 2048. "image": {}, "rtr": true, "runtime": null, - "reqs": [] + "reqs": [], + "arch": [ + "aarch64", + "armhf" + ] } } ``` @@ -132,6 +137,7 @@ Example from 2048. - [x] Load port data - [x] Check port has reqired files - [ ] Check for common errors in ports. +- [ ] Check for gameinfo.xml errors. - [x] Check if port clashes with other ports - [x] Run port.spec before zipping port - [x] Create portname.zip only if port is changed diff --git a/ports/stardewvalley/StardewValley.sh b/ports/stardewvalley/StardewValley.sh index af41fed37a..0d65af7330 100644 --- a/ports/stardewvalley/StardewValley.sh +++ b/ports/stardewvalley/StardewValley.sh @@ -41,7 +41,7 @@ ln -sfv "$gamedir/savedata" ~/.config/StardewValley export MONOGAME_PATCH="$gamedir/dlls/StardewPatches.dll" export MONO_PATH="$gamedir/dlls":"$gamedir" export PATH="$monodir/bin":"$PATH" -export LD_LIBRARY_PATH="$gamedir/libs" +export LD_LIBRARY_PATH="$gamedir/libs:$LD_LIBRARY_PATH" # Delete older GL4ES installs... rm -f $gamedir/libs/libGL.so.1 $gamedir/libs/libEGL.so.1 diff --git a/ports/supertuxkart/SuperTuxKart.sh b/ports/supertuxkart/SuperTuxKart.sh index ebfae43cb5..4c8afe4bb0 100644 --- a/ports/supertuxkart/SuperTuxKart.sh +++ b/ports/supertuxkart/SuperTuxKart.sh @@ -44,7 +44,7 @@ export SUPERTUXKART_ASSETS_DIR="$GAMEDIR/data/" echo "Starting game." > $CUR_TTY $GPTOKEYB "supertuxkart" -c supertuxkart.gptk textinput & -LD_LIBRARY_PATH="$PWD/libs" $TASKSET ./supertuxkart 2>&1 | $ESUDO tee -a ./log.txt +LD_LIBRARY_PATH="$PWD/libs:$LD_LIBRARY_PATH" $TASKSET ./supertuxkart 2>&1 | $ESUDO tee -a ./log.txt $ESUDO kill -9 $(pidof gptokeyb) unset LD_LIBRARY_PATH diff --git a/tools/build_header.py b/tools/build_header.py index cba82d885d..6b859482be 100644 --- a/tools/build_header.py +++ b/tools/build_header.py @@ -44,6 +44,7 @@ def load_headers(header_file): header_data = fh.read() header_map = {} + headers_fixed = set() for block in header_data.split(HEADER_OLD): if block.strip() == '': @@ -56,9 +57,12 @@ def load_headers(header_file): header_data, footer_data = block.split(HEADER_NEW, 1) header_map[header_data.strip()] = footer_data.strip() - print(json.dumps(header_map, indent=4)) + if footer_data.strip() != '': + headers_fixed.add(footer_data.strip()) - return header_map + # print(json.dumps(header_map, indent=4)) + + return header_map, headers_fixed def save_headers(header_file, header_map): @@ -79,9 +83,10 @@ def main(argv): hash_cache = HashCache(CACHE_FILE) if HEADER_MAP.is_file(): - header_map = load_headers(HEADER_MAP) + header_map, headers_fixed = load_headers(HEADER_MAP) else: header_map = {} + headers_fixed = set() seen_headers = {} script_data = {} @@ -94,7 +99,7 @@ def main(argv): script_text = script_file.read_text() if '$controlfolder/control.txt' not in script_text: - print(f"check {script_file}\n") + print(f"[ BAD ] {script_file}") continue header_text, body_text = script_text.split('$controlfolder/control.txt', 1) @@ -105,6 +110,13 @@ def main(argv): header_text = re.sub(r'\n#\s+PORTMASTER:[^\n]*\n', '\n', header_text, re.I|re.MULTILINE) + if header_text.strip() in headers_fixed: + if '-q' not in argv: + print(f"[ OK ] {script_file}") + continue + + print(f"[REPLACE] {script_file}") + seen_headers.setdefault(header_text, []) header_map.setdefault(header_text.strip(), '') script_data[script_file] = [header_text.rstrip(), body_text.lstrip()] diff --git a/tools/build_release.py b/tools/build_release.py index c88d58197a..e19861c990 100644 --- a/tools/build_release.py +++ b/tools/build_release.py @@ -58,12 +58,14 @@ ROOT_DIR = Path('.') -CACHE_FILE = ROOT_DIR / '.hash_cache' -RELEASE_DIR = ROOT_DIR / 'releases' -RUNTIMES_DIR = ROOT_DIR / 'runtimes' +CACHE_FILE = ROOT_DIR / '.hash_cache' +RELEASE_DIR = ROOT_DIR / 'releases' +RUNTIMES_DIR = ROOT_DIR / 'runtimes' MANIFEST_FILE = RELEASE_DIR / 'manifest.json' -STATUS_FILE = RELEASE_DIR / 'ports_status.json' -PORTS_DIR = ROOT_DIR / 'ports' +STATUS_FILE = RELEASE_DIR / 'ports_status.json' +PORTS_DIR = ROOT_DIR / 'ports' + +SPLIT_IMAGES = True GITHUB_RUN = (ROOT_DIR / '.github_check').is_file() @@ -944,7 +946,8 @@ def generate_ports_json(all_ports, port_status, old_manifest, new_manifest): ) ## Jank :| - build_new_images_zip(old_manifest, new_manifest, port_status) + if SPLIT_IMAGES: + build_new_images_zip(old_manifest, new_manifest, port_status) utils = [] @@ -954,13 +957,14 @@ def generate_ports_json(all_ports, port_status, old_manifest, new_manifest): utils.append(RELEASE_DIR / 'gameinfo.zip') utils.append(RELEASE_DIR / 'images.zip') - for img_id in range(1000): - image_xxx_zip = f"images.{img_id:03d}.zip" + if SPLIT_IMAGES: + for img_id in range(1000): + image_xxx_zip = f"images.{img_id:03d}.zip" - if image_xxx_zip not in new_manifest: - break + if image_xxx_zip not in new_manifest: + break - utils.append(RELEASE_DIR / image_xxx_zip) + utils.append(RELEASE_DIR / image_xxx_zip) runtimes_map = {}