Skip to content

Commit

Permalink
Merge pull request #136 from kloptops/main
Browse files Browse the repository at this point in the history
Added armhf runtimes. Fixed Iconoclasts.
  • Loading branch information
kloptops authored Mar 1, 2024
2 parents 6a27f4b + 36d6443 commit fdf82f5
Show file tree
Hide file tree
Showing 19 changed files with 134 additions and 30 deletions.
2 changes: 1 addition & 1 deletion ports/iconoclasts/Iconoclasts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if [ -d "/opt/system/Tools/PortMaster/" ]; then
controlfolder="/opt/system/Tools/PortMaster"
elif [ -d "/opt/tools/PortMaster/" ]; then
controlfolder="/opt/tools/PortMaster"
elif [ -d "/roms/roms/ports" ]; then
elif [ -d "/roms/ports/PortMaster" ]; then
controlfolder="/roms/ports/PortMaster"
else
controlfolder="/storage/roms/ports/PortMaster"
Expand Down
File renamed without changes.
Binary file added runtimes/frt_2.1.6.armhf.squashfs
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file added runtimes/frt_3.1.2.armhf.squashfs
Binary file not shown.
File renamed without changes.
Binary file added runtimes/frt_3.2.3.armhf.squashfs
Binary file not shown.
File renamed without changes.
Binary file added runtimes/frt_3.3.4.armhf.squashfs
Binary file not shown.
File renamed without changes.
Binary file added runtimes/frt_3.4.5.armhf.squashfs
Binary file not shown.
File renamed without changes.
Binary file added runtimes/frt_3.5.2.armhf.squashfs
Binary file not shown.
File renamed without changes.
File renamed without changes.
94 changes: 83 additions & 11 deletions runtimes/runtimes.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,85 @@
{
"frt_2.1.6.squashfs": "Godot/FRT 2.1.6",
"frt_3.0.6_v1.squashfs": "Godot/FRT 3.0.5_v1",
"frt_3.1.2.squashfs": "Godot/FRT 3.1.2",
"frt_3.2.3.squashfs": "Godot/FRT 3.2.3",
"frt_3.3.4.squashfs": "Godot/FRT 3.3.4",
"frt_3.4.5.squashfs": "Godot/FRT 3.4.5",
"frt_3.5.2.squashfs": "Godot/FRT 3.5.2",
"frt_4.0.4.squashfs": "Godot/FRT 4.0.4",
"frt_4.1.3.squashfs": "Godot/FRT 4.1.3",
"mono-6.12.0.122-aarch64.squashfs": "Mono 6.12.0.122",
"solarus-1.6.5.squashfs": "Solarus 1.6.5"
"frt_2.1.6.squashfs": {
"name": "Godot/FRT 2.1.6",
"default": "aarch64",
"arch": {
"aarch64": "frt_2.1.6.aarch64.squashfs",
"armhf": "frt_2.1.6.armhf.squashfs"
}
},
"frt_3.0.6_v1.squashfs": {
"name": "Godot/FRT 3.0.6_v1",
"default": "aarch64",
"arch": {
"aarch64": "frt_3.0.6_v1.aarch64.squashfs"
}
},
"frt_3.1.2.squashfs": {
"name": "Godot/FRT 3.1.2",
"default": "aarch64",
"arch": {
"aarch64": "frt_3.1.2.aarch64.squashfs",
"armhf": "frt_3.1.2.armhf.squashfs"
}
},
"frt_3.2.3.squashfs": {
"name": "Godot/FRT 3.2.3",
"default": "aarch64",
"arch": {
"aarch64": "frt_3.2.3.aarch64.squashfs",
"armhf": "frt_3.2.3.armhf.squashfs"
}
},
"frt_3.3.4.squashfs": {
"name": "Godot/FRT 3.3.4",
"default": "aarch64",
"arch": {
"aarch64": "frt_3.3.4.aarch64.squashfs",
"armhf": "frt_3.3.4.armhf.squashfs"
}
},
"frt_3.4.5.squashfs": {
"name": "Godot/FRT 3.4.5",
"default": "aarch64",
"arch": {
"aarch64": "frt_3.4.5.aarch64.squashfs",
"armhf": "frt_3.4.5.armhf.squashfs"
}
},
"frt_3.5.2.squashfs": {
"name": "Godot/FRT 3.5.2",
"default": "aarch64",
"arch": {
"aarch64": "frt_3.5.2.aarch64.squashfs",
"armhf": "frt_3.5.2.armhf.squashfs"
}
},
"frt_4.0.4.squashfs": {
"name": "Godot/FRT 4.0.4",
"default": "aarch64",
"arch": {
"aarch64": "frt_4.0.4.aarch64.squashfs"
}
},
"frt_4.1.3.squashfs": {
"name": "Godot/FRT 4.1.3",
"default": "aarch64",
"arch": {
"aarch64": "frt_4.1.3.aarch64.squashfs"
}
},
"mono-6.12.0.122-aarch64.squashfs": {
"name": "Mono 6.12.0.122",
"default": "aarch64",
"arch": {
"aarch64": "mono-6.12.0.122-aarch64.squashfs"
}
},
"solarus-1.6.5.squashfs": {
"name": "Solarus 1.6.5",
"default": "aarch64",
"arch": {
"aarch64": "solarus-1.6.5.aarch64.squashfs"
}
}
}
File renamed without changes.
68 changes: 50 additions & 18 deletions tools/build_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,13 +581,19 @@ def port_info(file_name, ports_json, ports_status):
ports_json[clean_name]['source']['url'] = current_release_url(ports_status[clean_name]['release_id']) + (file_name.name.replace(" ", ".").replace("..", "."))


def util_info(file_name, util_json, ports_status, runtimes_json):
def util_info(file_name, util_json, ports_status, runtimes_map):
clean_name = name_cleaner(file_name.name)

file_md5 = hash_file(file_name)
file_size = file_name.stat().st_size

if file_name.name.lower().endswith('.squashfs'):
clean_name = name_cleaner(runtimes_map[file_name.name]['export_name'])
export_name = runtimes_map[file_name.name]['export_name']

nice_name = runtimes_map[file_name.name]['nice_name']
runtime_name = runtimes_map[file_name.name]['runtime_name']
runtime_arch = runtimes_map[file_name.name]['runtime_arch']

default_status = {
'date_added': TODAY,
Expand All @@ -600,33 +606,37 @@ def util_info(file_name, util_json, ports_status, runtimes_json):
if clean_name not in ports_status:
ports_status[clean_name] = default_status

if GITHUB_RUN:
file_name.rename(RELEASE_DIR / file_name.name)
file_name = RELEASE_DIR / file_name.name
shutil.copy(file_name, RELEASE_DIR / file_name.name)

elif ports_status[clean_name]['md5'] != file_md5:
ports_status[clean_name]['md5'] = file_md5
ports_status[clean_name]['size'] = file_size
ports_status[clean_name]['release_id'] = CURRENT_RELEASE_ID
ports_status[clean_name]['date_updated'] = TODAY

if GITHUB_RUN:
file_name.rename(RELEASE_DIR / file_name.name)
file_name = RELEASE_DIR / file_name.name
shutil.copy(file_name, RELEASE_DIR / export_name)

url = current_release_url(ports_status[clean_name]['release_id']) + (export_name.replace(" ", ".").replace("..", "."))

name = runtimes_json.get(clean_name, clean_name)
url = current_release_url(ports_status[clean_name]['release_id']) + (file_name.name.replace(" ", ".").replace("..", "."))
util_json[clean_name] = {
'name': nice_name,
'runtime_name': runtime_name,
'runtime_arch': runtime_arch,
'md5': file_md5,
'size': file_size,
'url': url,
}

else:
name = file_name.name
url = current_release_url(CURRENT_RELEASE_ID) + (file_name.name.replace(" ", ".").replace("..", "."))

util_json[clean_name] = {
"name": name,
'md5': file_md5,
'size': file_size,
'url': url,
}
util_json[clean_name] = {
"name": name,
'md5': file_md5,
'size': file_size,
'url': url,
}


def port_diff(port_name, old_manifest, new_manifest):
Expand Down Expand Up @@ -697,7 +707,7 @@ def generate_ports_json(all_ports, port_status):
utils.append(RELEASE_DIR / 'PortMaster.zip')

utils.append(RELEASE_DIR / 'images.zip')
runtimes_json = {}
runtimes_map = {}

if RUNTIMES_DIR.is_dir():
if (RUNTIMES_DIR / 'runtimes.json').is_file():
Expand All @@ -708,14 +718,36 @@ def generate_ports_json(all_ports, port_status):

# print(json.dumps(runtimes_json, indent=4))

utils.extend(RUNTIMES_DIR.glob('*.squashfs'))
for runtime_name, runtime_data in runtimes_json.items():
runtime_nice_name = runtime_data['name']

for runtime_arch, runtime_file_name in runtime_data['arch'].items():
if not (RUNTIMES_DIR / runtime_file_name).is_file():
error(runtime_file_name, f"Unknown runtime {runtime_file_name}")
continue

if runtime_arch == runtime_data['default']:
runtime_export_name = runtime_name
else:
runtime_export_name = runtime_file_name

runtimes_map[runtime_file_name] = {
'nice_name': runtime_nice_name,
'export_name': runtime_export_name,
'runtime_name': runtime_name,
'runtime_arch': runtime_arch,
}

utils.append(RUNTIMES_DIR / runtime_file_name)

print(json.dumps(runtimes_map, indent=4))

for file_name in sorted(utils, key=lambda x: str(x).casefold()):
util_info(
file_name,
ports_json_output['utils'],
port_status,
runtimes_json
runtimes_map
)

with open(RELEASE_DIR / 'ports.json', 'w') as fh:
Expand Down

0 comments on commit fdf82f5

Please sign in to comment.