MacOS P2P Hashlink and Krom

This commit is contained in:
Gorochu
2026-10-20 16:37:13 -07:00
parent ee04bb87dd
commit 478a97d2ed
14 changed files with 41 additions and 8 deletions

View File

@ -1286,13 +1286,23 @@ def build_success():
else:
krom_location = sdk_path + '/Krom/Krom.app'
shutil.copytree(krom_location, files_path + '/Krom.app')
app_path = files_path + '/Krom.app'
app_name = lnx.utils.safestr(wrd.lnx_project_name)
os.rename(os.path.join(app_path, 'Contents/MacOS/Krom'),
os.path.join(app_path, 'Contents/MacOS/' + app_name))
subprocess.call(['/usr/libexec/PlistBuddy', '-c', 'Set :CFBundleExecutable ' + app_name,
os.path.join(app_path, 'Contents/Info.plist')])
deploy_dir = os.path.join(app_path, 'Contents/Resources/Deployment')
os.makedirs(deploy_dir, exist_ok=True)
game_files = os.listdir(files_path)
for f in game_files:
f = files_path + '/' + f
if os.path.isfile(f):
shutil.move(f, files_path + '/Krom.app/Contents/MacOS')
krom_exe = lnx.utils.safestr(wrd.lnx_project_name) + '.app'
os.rename(files_path + '/Krom.app', files_path + '/' + krom_exe)
shutil.move(f, deploy_dir)
shutil.rmtree(os.path.join(app_path, 'Contents/_CodeSignature'), ignore_errors=True)
subprocess.call(['codesign', '--force', '--deep', '--sign', '-', app_path])
krom_exe = app_name + '.app'
os.rename(app_path, files_path + '/' + krom_exe)
# Rename
ext = state.target.split('-')[-1] # krom-windows