Skip to content

Commit

Permalink
working on macOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
kdschlosser committed May 8, 2024
1 parent 76fdcf9 commit 0dcddef
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions builder/macOS.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ def build_sdl():
global variant

if variant is None:
variant = 'build-standard'
varnt = 'build-standard'
else:
variant = f'build-{variant}'
varnt = f'build-{variant}'

dst = f'lib/micropython/ports/unix/{variant}/SDL'
dst = f'lib/micropython/ports/unix/{varnt}/SDL'

if not os.path.exists(dst):
os.makedirs(dst)
Expand Down Expand Up @@ -216,6 +216,27 @@ def compile(): # NOQA

build_sdl()

if variant is None:
varnt = 'build-standard'
else:
varnt = f'build-{variant}'

path = f'lib/micropython/ports/unix/{varnt}/SDL'

def _iter_print(p, indent=''):
child = os.path.split(p)[-1]
print(f'{indent}{child}')

for f in os.listdir(p):
file = os.path.join(p, f)
if os.path.isdir(file):
_iter_print(file, indent + ' ')
else:
print(f'{indent} {f}')
print()

_iter_print(path)

return_code, _ = spawn(compile_cmd)
if return_code != 0:
sys.exit(return_code)
Expand Down

0 comments on commit 0dcddef

Please sign in to comment.