Squashed 'deps/nostalgia/' changes from 6837a055..98ddb08a
98ddb08a [nostalgia] Cleanup 8d1701b0 [turbine/glfw] Ensure window opens with a standard mandatory refresh period 1048e522 [imgui] Make ImGui not an object lib ee59da4a [glad] Make glad not an object lib 1ba64cb5 Merge commit '07610a5af2aaaac9cfcdcf8359b33f7df40d46cd' 462bebf6 [nostalgia/core] Cleanup unused function declaration e3f84c4e [studio] Make first tab not draw before selected tab when window opens git-subtree-dir: deps/nostalgia git-subtree-split: 98ddb08abd68d2d31864fb44d240b2d79a0022c1
This commit is contained in:
39
util/scripts/pkg-gba.py
Executable file
39
util/scripts/pkg-gba.py
Executable file
@ -0,0 +1,39 @@
|
||||
#! /usr/bin/env python3
|
||||
|
||||
#
|
||||
# Copyright 2016 - 2023 gary@drinkingtea.net
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
|
||||
import platform
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
os = platform.system().lower()
|
||||
arch = platform.machine()
|
||||
host_env = f'{os}-{arch}'
|
||||
|
||||
# get current build type
|
||||
with open(".current_build", "r") as f:
|
||||
current_build = f.readlines()[0]
|
||||
if current_build[len(current_build) - 1] == '\n':
|
||||
current_build = current_build[:len(current_build) - 1]
|
||||
|
||||
project_dir = sys.argv[1]
|
||||
project_name = sys.argv[2]
|
||||
bin = f'./build/{host_env}-{current_build}/bin/'
|
||||
project_bin = f'build/gba-release/bin/{project_name}.bin'
|
||||
project_gba = f'{project_name}.gba'
|
||||
project_manifest = f'{project_name}-manifest.json'
|
||||
|
||||
shutil.copyfile(project_bin, project_gba)
|
||||
subprocess.run([
|
||||
f'{bin}/{project_name}-pack',
|
||||
'-src', project_dir,
|
||||
'-rom-bin', project_gba,
|
||||
'-manifest', project_manifest])
|
||||
subprocess.run(['gbafix', project_gba])
|
Reference in New Issue
Block a user