-
Notifications
You must be signed in to change notification settings - Fork 1
/
SCsub
33 lines (26 loc) · 1.03 KB
/
SCsub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env python
import version
Import("env")
files = [
"drivers/audren/audio_driver_audren.cpp",
"godot_switch.cpp",
"os_switch.cpp",
"joypad_switch.cpp",
"context_gl_switch_egl.cpp",
]
prog = env.add_program("#bin/godot", files)
build_target = env["target"]
env.Command(
"#bin/switch_" + env["target"] + ".nro",
prog,
"/opt/devkitpro/tools/bin/elf2nro $SOURCE $TARGET --icon=platform/switch/icon.jpg --nacp=platform/switch/nacp_default.nacp --romfsdir=platform/switch/romfs",
)
env.Depends(target="#bin/switch_" + env["target"] + ".nro", dependency="nacp_default.nacp")
version_str = "{}.{}.{}-{}".format(version.major, version.minor, version.patch, version.status)
env.Command(
"nacp_default.nacp",
None,
"/opt/devkitpro/tools/bin/nacptool --create 'Godot Engine' 'Homebrodot Contributors' " + version_str + " $TARGET",
)
# if someone needs this they can enable it themselves..
# env.Command("#bin/switch_" + env['target'] + ".nso", prog, "/opt/devkitpro/tools/bin/elf2nso $SOURCE $TARGET")