Skip to content

Commit 0915f20

Browse files
committed
Support another platform
1 parent b40cfa1 commit 0915f20

File tree

6 files changed

+14
-5
lines changed

6 files changed

+14
-5
lines changed

kmake/src/Platform.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export interface PlatformType {
1111
PS4: string;
1212
XboxOne: string;
1313
Switch: string;
14+
Switch2: string;
1415
XboxSeries: string;
1516
PS5: string;
1617
FreeBSD: string;
@@ -30,6 +31,7 @@ export let Platform: PlatformType = {
3031
PS4: 'ps4',
3132
XboxOne: 'xboxone',
3233
Switch: 'switch',
34+
Switch2: 'switch2',
3335
XboxSeries: 'xboxseries',
3436
PS5: 'ps5',
3537
FreeBSD: 'freebsd',

kmake/src/main.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ function fromPlatform(platform: string): string {
5757
return 'Xbox Series X|S';
5858
case Platform.PS5:
5959
return 'PlayStation 5';
60+
case Platform.Switch2:
61+
return 'Switch 2';
6062
case Platform.FreeBSD:
6163
return 'FreeBSD';
6264
case Platform.Wasm:
@@ -633,7 +635,7 @@ async function exportKoremakeProject(from: string, to: string, platform: string,
633635
else if (platform === Platform.Wasm) exporter = new WasmExporter(options);
634636
else if (platform === Platform.Linux || platform === Platform.Pi) exporter = new LinuxExporter(options);
635637
else if (platform === Platform.FreeBSD) exporter = new FreeBSDExporter(options);
636-
else if (platform === Platform.PS4 || platform === Platform.XboxOne || platform === Platform.Switch || platform === Platform.XboxSeries || platform === Platform.PS5) {
638+
else if (platform === Platform.PS4 || platform === Platform.XboxOne || platform === Platform.Switch || platform === Platform.XboxSeries || platform === Platform.PS5 || platform === Platform.Switch2) {
637639
let libsdir = path.join(from.toString(), 'Backends');
638640
if (Project.koreDir && !fs.existsSync(libsdir)) {
639641
libsdir = path.join(Project.koreDir, '..', 'Backends');
@@ -1094,6 +1096,7 @@ export async function run(options: any, loglog: any): Promise<string> {
10941096
|| isPlatform(options, Platform.PS5)
10951097
|| isPlatform(options, Platform.XboxOne)
10961098
|| isPlatform(options, Platform.XboxSeries)
1099+
|| isPlatform(options, Platform.Switch2)
10971100
) {
10981101
let vsvars: string = null;
10991102
const bits = dothemath ? '64' : '32';

lib/kmake/Platform.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/kmake/Platform.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/kmake/main.js

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/kmake/main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)