WiiUDownloader/data/create_bundle.py
2023-07-19 01:27:30 +02:00

17 lines
703 B
Python

import os
import shutil
# Set the paths to the executable and Info.plist
executable_path = 'main'
info_plist_path = 'data/Info.plist'
# Set the path to the .app bundle
app_bundle_path = 'out/WiiUDownloader.app'
# Create the .app bundle
os.makedirs(os.path.join(app_bundle_path, 'Contents', 'MacOS'))
shutil.copy(info_plist_path, os.path.join(app_bundle_path, 'Contents', 'Info.plist'))
shutil.copy(executable_path, os.path.join(app_bundle_path, 'Contents', 'MacOS', 'WiiUDownloader'))
# Run dylibbundler
os.system(f"dylibbundler -od -b -x {os.path.join(app_bundle_path, 'Contents', 'MacOS', 'WiiUDownloader')} -d {os.path.join(app_bundle_path, 'Contents', 'MacOS', 'lib')} -p @executable_path/lib")