Skip to content

Commit a199a5e

Browse files
committed
switch: use dynamic values from meson, instead of hardcoded ones from the cross files
1 parent e97d36f commit a199a5e

File tree

2 files changed

+8
-26
lines changed

2 files changed

+8
-26
lines changed

platforms/build-switch.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,6 @@ needs_exe_wrapper = true
101101
library_dirs= ['$LIBNX_LIB','$PORTLIBS_LIB']
102102
libnx='$LIBNX'
103103
104-
APP_NAME = 'oopetris'
105-
APP_AUTHOR = 'coder2k'
106-
APP_VERSION = true
107-
108104
USE_NACP = true
109105
110106
APP_ROMFS='$ROMFS'

platforms/switch/meson.build

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -81,28 +81,14 @@ fs = import('fs')
8181

8282
if use_nacp
8383
nacptool = find_program('nacptool')
84-
NACP_FLAGS = [nacptool, '--create']
85-
86-
APP_NAME = meson.get_external_property('APP_NAME', switch_exe_name)
87-
NACP_FLAGS += APP_NAME
88-
89-
APP_AUTHOR = meson.get_external_property('APP_AUTHOR', '')
90-
if APP_AUTHOR == ''
91-
error('If USE_NACP is set, you have to provide an APP_AUTHOR')
92-
endif
93-
NACP_FLAGS += APP_AUTHOR
94-
95-
APP_VERSION = meson.get_external_property('APP_VERSION', '')
96-
if APP_VERSION == true
97-
APP_VERSION = meson.project_version()
98-
endif
99-
100-
if APP_VERSION == ''
101-
error('If USE_NACP is set, you have to provide an APP_VERSION')
102-
endif
103-
NACP_FLAGS += APP_VERSION
104-
105-
NACP_FLAGS += (switch_exe_name + '.nacp')
84+
NACP_FLAGS = [
85+
nacptool,
86+
'--create',
87+
oopetris_name,
88+
oopetris_author,
89+
meson.project_version(),
90+
switch_exe_name + '.nacp',
91+
]
10692

10793
APP_TITLEID = meson.get_external_property('APP_TITLEID', '')
10894

0 commit comments

Comments
 (0)