-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathplatforms.py
887 lines (780 loc) · 28.5 KB
/
platforms.py
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
import copy
from buildbot.plugins import util
import config
import builds
import workers
def _getFromBuild(data, build):
if not isinstance(data, dict):
return data
if len(data) == 0:
return None
if build.name in data:
return data[build.name]
for cls in type(build).mro():
if cls in data:
return data[cls]
if None in data:
return data[None]
def _buildInData(data, build):
if data is None:
return True
if len(data) == 0:
return None
if build.name in data:
return True
for cls in type(build).mro():
if cls in data:
return True
return False
class Platform:
__slots__ = ['name',
'compatibleBuilds', 'incompatibleBuilds',
'env', 'buildenv',
'configureargs', 'buildconfigureargs',
'packageable', 'built_files', 'data_files',
'packaging_cmd', 'strip_cmd', 'archiveext',
'run_tests', 'build_devtools',
'workerimage', 'lock_access',
'icon', 'description_']
def __init__(self, name):
self.name = name
self.compatibleBuilds = None
# To blacklist stable ScummVM for example
self.incompatibleBuilds = []
self.env = copy.deepcopy(config.common_env)
self.buildenv = {}
self.configureargs = []
self.buildconfigureargs = {}
self.packageable = True
self.built_files = []
self.data_files = []
self.packaging_cmd = None
self.strip_cmd = None
self.archiveext = "tar.xz"
# Can run tests
self.run_tests = False
self.build_devtools = False
self.workerimage = name
# A callable taking the build object as argument and
# which returns a LockAccess to be used when building platform
self.lock_access = None
# For daily builds list
self.icon = None
self.description_ = None
@property
def description(self):
return self.description_ or self.name
@description.setter
def description(self, value):
self.description_ = value
def canBuild(self, build):
return (_buildInData(self.compatibleBuilds, build) and
not _buildInData(self.incompatibleBuilds, build))
def getEnv(self, build):
ret = dict(self.env)
add = _getFromBuild(self.buildenv, build)
if add is not None:
ret.update(add)
return ret
def getConfigureArgs(self, build):
ret = list(self.configureargs)
add = _getFromBuild(self.buildconfigureargs, build)
if add is not None:
ret.extend(add)
return ret
def canPackage(self, build):
return _getFromBuild(self.packageable, build)
def getBuiltFiles(self, build):
return _getFromBuild(self.built_files, build)
def getDataFiles(self, build):
return _getFromBuild(self.data_files, build)
def getPackagingCmd(self, build):
return _getFromBuild(self.packaging_cmd, build)
def getStripCmd(self, build):
return _getFromBuild(self.strip_cmd, build)
def canRunTests(self, build):
return _getFromBuild(self.run_tests, build)
def getWorkerImage(self, build):
return _getFromBuild(self.workerimage, build)
platforms = []
def register_platform(platform):
if (config.platforms_whitelist and
platform.name not in config.platforms_whitelist):
return
if (config.platforms_blacklist and
platform.name in config.platforms_blacklist):
return
platforms.append(platform)
def _3ds():
platform = Platform("3ds")
platform.workerimage = "devkit3ds"
platform.compatibleBuilds = (builds.ScummVMBuild, )
platform.configureargs.append("--host=3ds")
platform.buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-plugins", "--default-dynamic" ],
}
platform.packaging_cmd = "dist_3ds"
platform.built_files = {
builds.ScummVMBuild: [ "dist_3ds/*" ],
}
platform.archiveext = "zip"
platform.description = "Nintendo 3DS"
platform.icon = "3ds"
register_platform(platform)
_3ds()
def amigaos4():
platform = Platform("amigaos4")
platform.configureargs.append("--host=ppc-amigaos")
platform.buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-plugins", "--default-dynamic", "--enable-detection-dynamic" ],
}
platform.packaging_cmd = {
builds.ScummVMBuild: "amigaosdist",
builds.ScummVMToolsBuild: "amigaosdist"
}
platform.built_files = {
builds.ScummVMBuild: [ "install", "install.info" ],
builds.ScummVMToolsBuild: [
"construct_mohawk",
"create_sjisfnt",
"decine",
#"decompile", # Decompiler currently not built - BOOST library not present
"degob",
"dekyra",
"descumm",
"desword2",
"extract_mohawk",
"gob_loadcalc",
#"scummvm-tools", # GUI tools currently not built - WxWidgets library not present
"scummvm-tools-cli"
],
}
platform.archiveext = "zip"
platform.description = "Amiga OS4"
platform.icon = "amiga"
register_platform(platform)
amigaos4()
# Android environment can't be specified in worker Dockerfile as it's a unified toolchain
# So we must pollute our configuration
def android(suffix, scummvm_target, ndk_target, cxx_target, abi_version,
description=None):
platform = Platform("android-{0}".format(suffix))
platform.compatibleBuilds = (builds.ScummVMBuild, )
# Use a lock between all Android builds to avoid concurrency conflicts in gradle
platform.lock_access = (lambda build: android.lock.access('exclusive'))
platform.workerimage = {
builds.ScummVMBuild: "android",
}
platform.buildenv = {
builds.ScummVMBuild: {
"CXX": "${{ANDROID_TOOLCHAIN}}/bin/{0}{1}-clang++".format(
cxx_target, abi_version),
# Worker has all libraries installed in the NDK sysroot
"PKG_CONFIG_LIBDIR": "${{ANDROID_TOOLCHAIN}}/sysroot/usr/lib/{0}/{1}/pkgconfig".format(
ndk_target, abi_version),
# Altering PATH for curl-config, that lets us reuse environment variables instead of using configure args
"PATH": [ "${PATH}", "${{ANDROID_TOOLCHAIN}}/sysroot/usr/bin/{0}/{1}".format(
ndk_target, abi_version)],
},
}
# Include CA certificates bundle to allow HTTPS
platform.env["DIST_ANDROID_CACERT_PEM"] = "${RO_ANDROID_ROOT}/cacert.pem"
platform.configureargs.append("--host=android-{0}".format(scummvm_target))
platform.configureargs.append("--enable-debug")
platform.packaging_cmd = "androiddistdebug"
platform.built_files = {
builds.ScummVMBuild: [ "debug" ],
}
platform.archiveext = "zip"
platform.description = description
platform.icon = "android"
register_platform(platform)
android.lock = util.MasterLock("android")
android(suffix="arm",
scummvm_target="arm-v7a",
ndk_target="arm-linux-androideabi",
cxx_target="armv7a-linux-androideabi",
abi_version=16,
description="Android (ARM)")
android(suffix="arm64",
scummvm_target="arm64-v8a",
ndk_target="aarch64-linux-android",
cxx_target="aarch64-linux-android",
abi_version=21,
description="Android (ARM 64\xa0bits)")
android(suffix="x86",
scummvm_target="x86",
ndk_target="i686-linux-android",
cxx_target="i686-linux-android",
abi_version=16,
description="Android (x86)")
android(suffix="x86-64",
scummvm_target="x86_64",
ndk_target="x86_64-linux-android",
cxx_target="x86_64-linux-android",
abi_version=21,
description="Android (x86 64\xa0bits)")
def appletv():
platform = Platform("appletv")
platform.compatibleBuilds = (builds.ScummVMBuild, )
platform.configureargs.append("--host=tvos")
platform.buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-static", "--with-staticlib-prefix=${PREFIX}"],
}
platform.packaging_cmd = {
builds.ScummVMBuild: "tvosbundle",
}
platform.built_files = {
builds.ScummVMBuild: [ "ScummVM.app" ],
}
platform.archiveext = "tar.bz2"
platform.description = "Apple TV"
platform.icon = 'appletv'
register_platform(platform)
appletv()
def debian(name_suffix, image_suffix, host,
package=True,
run_tests=True, build_devtools=False,
buildconfigureargs=None, env=None, tools=True,
description=None):
platform = Platform("debian-{0}".format(name_suffix))
platform.workerimage = "debian-{0}".format(image_suffix)
if not tools:
platform.compatibleBuilds = (builds.ScummVMBuild, )
if env:
platform.env.update(env)
platform.configureargs.append("--host={0}".format(host))
if buildconfigureargs:
platform.buildconfigureargs = buildconfigureargs
platform.packaging_cmd = {
builds.ScummVMBuild: "dist-generic",
}
platform.built_files = {
builds.ScummVMBuild: [ "dist-generic/*" ],
builds.ScummVMToolsBuild: [
"construct_mohawk",
"create_sjisfnt",
"decine",
"decompile",
"degob",
"dekyra",
"descumm",
"desword2",
"extract_mohawk",
"gob_loadcalc",
"scummvm-tools",
"scummvm-tools-cli"
]
}
platform.run_tests = run_tests
platform.build_devtools = build_devtools
platform.packageable = package
platform.description = description
platform.icon = 'debian'
register_platform(platform)
debian("i686", "x86", "i686-linux-gnu", description="Debian (32\xa0bits)")
debian("x86-64", "x86_64", "x86_64-linux-gnu", description="Debian (64\xa0bits)",
build_devtools=True)
debian("x86-64-nullbackend", "x86_64", "x86_64-linux-gnu", package=False, tools=False,
run_tests=False,
buildconfigureargs = {
builds.ScummVMBuild: [ "--backend=null", "--enable-opl2lpt", "--enable-text-console" ],
})
debian("x86-64-clang", "x86_64-clang", "x86_64-linux-gnu", package=False, tools=False,
run_tests=False, build_devtools=True)
debian("x86-64-plugins", "x86_64", "x86_64-linux-gnu", package=False, tools=False,
run_tests=False,
buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-plugins", "--default-dynamic" ],
})
debian("x86-64-dynamic-detection", "x86_64", "x86_64-linux-gnu", package=False, tools=False,
run_tests=False,
buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-plugins", "--default-dynamic", "--enable-detection-dynamic" ],
})
debian("x86-64-sdl1.2", "x86_64", "x86_64-linux-gnu", package=False, tools=False,
run_tests=False,
buildconfigureargs = {
builds.ScummVMBuild: [ "--disable-all-engines", "--enable-engine=testbed",],
},
env = {
'SDL_CONFIG':'sdl-config',
})
def dreamcast():
platform = Platform("dreamcast")
platform.compatibleBuilds = (builds.ScummVMBuild, )
platform.configureargs.append("--host=dreamcast")
platform.buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-plugins", "--default-dynamic", "--enable-vkeybd" ],
}
platform.packaging_cmd = "dcdist"
platform.built_files = {
builds.ScummVMBuild: [ "dcdist/scummvm" ],
}
platform.archiveext = "tar.xz"
platform.description = "Dreamcast"
platform.icon = 'dc'
register_platform(platform)
# Dreamcast with serial debugging
platform = copy.deepcopy(platform)
platform.name = "dreamcast-debug"
platform.buildconfigureargs[builds.ScummVMBuild].append('--enable-debug')
platform.description = "Dreamcast with serial port debugging"
register_platform(platform)
dreamcast()
def gamecube():
platform = Platform("gamecube")
platform.workerimage = "devkitppc"
platform.compatibleBuilds = (builds.ScummVMBuild, )
platform.configureargs.append("--host=gamecube")
platform.buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-plugins", "--default-dynamic", "--enable-detection-dynamic", "--enable-vkeybd" ],
}
platform.packaging_cmd = "wiidist"
platform.built_files = {
builds.ScummVMBuild: [ "wiidist/scummvm" ],
}
platform.archiveext = "tar.xz"
platform.description = "Nintendo Gamecube"
platform.icon = 'gc'
register_platform(platform)
gamecube()
def ios7_arm64():
platform = Platform("ios7-arm64")
platform.workerimage = "iphone"
platform.compatibleBuilds = (builds.ScummVMBuild, )
platform.configureargs.append("--host=ios7-arm64")
platform.buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-static", "--with-staticlib-prefix=${PREFIX}"],
}
platform.packaging_cmd = {
builds.ScummVMBuild: "ios7bundle",
}
platform.built_files = {
builds.ScummVMBuild: [ "ScummVM.app" ],
}
platform.archiveext = "tar.bz2"
platform.description = "iOS 7.1+ (arm64)"
platform.icon = 'iphone'
register_platform(platform)
ios7_arm64()
def macosx_arm64():
platform = Platform("macosx-arm64")
# configure script doesn't compile discord check with proper flags
platform.env["DISCORD_LIBS"] = "-framework AppKit"
platform.configureargs.append("--host=aarch64-apple-darwin24")
platform.buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-static",
"--with-staticlib-prefix=${DESTDIR}/${PREFIX}",
"--with-sparkle-prefix=${DESTDIR}/${PREFIX}/Library/Frameworks",
"--disable-osx-dock-plugin", "--enable-updates"],
}
platform.packaging_cmd = {
builds.ScummVMBuild: "bundle",
builds.ScummVMToolsBuild: None
}
platform.built_files = {
builds.ScummVMBuild: [ "ScummVM.app" ],
builds.ScummVMToolsBuild: [
"construct_mohawk",
"create_sjisfnt",
"decine",
#"decompile", # Decompiler currently not built - BOOST library not present
"degob",
"dekyra",
"descumm",
"desword2",
"extract_mohawk",
"gob_loadcalc",
#"scummvm-tools", # GUI tools currently not built - WxWidgets library not present
"scummvm-tools-cli"
]
}
platform.archiveext = "tar.xz"
platform.description = "Mac OS (Apple Silicon)"
platform.icon = 'macos'
register_platform(platform)
macosx_arm64()
def macosx_x86_64():
platform = Platform("macosx-x86_64")
# configure script doesn't compile discord check with proper flags
platform.env["DISCORD_LIBS"] = "-framework AppKit"
platform.configureargs.append("--host=x86_64-apple-darwin24")
platform.buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-static",
"--with-staticlib-prefix=${DESTDIR}/${PREFIX}",
"--with-sparkle-prefix=${DESTDIR}/${PREFIX}/Library/Frameworks",
"--disable-osx-dock-plugin", "--enable-updates"],
}
platform.packaging_cmd = {
builds.ScummVMBuild: "bundle",
builds.ScummVMToolsBuild: None
}
platform.built_files = {
builds.ScummVMBuild: [ "ScummVM.app" ],
builds.ScummVMToolsBuild: [
"construct_mohawk",
"create_sjisfnt",
"decine",
#"decompile", # Decompiler currently not built - BOOST library not present
"degob",
"dekyra",
"descumm",
"desword2",
"extract_mohawk",
"gob_loadcalc",
#"scummvm-tools", # GUI tools currently not built - WxWidgets library not present
"scummvm-tools-cli"
]
}
platform.archiveext = "tar.xz"
platform.description = "Mac OS (Intel x64)"
platform.icon = 'macos'
register_platform(platform)
macosx_x86_64()
def macosx_i386():
platform = Platform("macosx-i386")
platform.configureargs.append("--host=i386-apple-darwin17")
platform.buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-static", "--with-staticlib-prefix=${DESTDIR}/${PREFIX}",
"--disable-osx-dock-plugin"],
}
platform.packaging_cmd = {
builds.ScummVMBuild: "bundle",
builds.ScummVMToolsBuild: None
}
platform.built_files = {
builds.ScummVMBuild: [ "ScummVM.app" ],
builds.ScummVMToolsBuild: [
"construct_mohawk",
"create_sjisfnt",
"decine",
#"decompile", # Decompiler currently not built - BOOST library not present
"degob",
"dekyra",
"descumm",
"desword2",
"extract_mohawk",
"gob_loadcalc",
#"scummvm-tools", # GUI tools currently not built - WxWidgets library not present
"scummvm-tools-cli"
]
}
platform.archiveext = "tar.bz2"
platform.description = "Mac OS (Intel x86)"
platform.icon = 'macos'
register_platform(platform)
macosx_i386()
def miyoo():
platform = Platform("miyoo")
platform.compatibleBuilds = (builds.ScummVMBuild, )
platform.configureargs.append("--host=miyoo")
platform.buildconfigureargs = {
builds.ScummVMBuild: [ "--disable-detection-full", "--enable-plugins", "--default-dynamic" ],
}
platform.packaging_cmd = "sd-root"
platform.built_files = {
builds.ScummVMBuild: [ "sd-root/games", "sd-root/gmenu2x" ],
}
platform.archiveext = "tar.xz"
platform.description = "Miyoo"
platform.icon = 'miyoo'
register_platform(platform)
miyoo()
def nds():
platform = Platform("nds")
platform.workerimage = "devkitnds"
platform.compatibleBuilds = (builds.ScummVMBuild, )
platform.configureargs.append("--host=ds")
platform.buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-plugins", "--default-dynamic" ],
}
# stable build don't have this target yet
platform.packaging_cmd = {
builds.ScummVMBuild: "dsdist",
}
platform.built_files = {
builds.ScummVMBuild: [ "dsdist/*" ],
}
platform.archiveext = "zip"
platform.description = "Nintendo DS"
platform.icon = 'ds'
register_platform(platform)
nds()
# OpenDingux environment can't be specified in worker Dockerfile as it's multiple toolchains
# So we must pollute tell it here
def opendingux_beta(target, toolchain, libc, description=None):
platform = Platform("opendingux-beta-{0}".format(target))
platform.compatibleBuilds = (builds.ScummVMBuild, )
platform.workerimage = "opendingux-beta"
platform.buildenv = {
builds.ScummVMBuild: {
"CXX": "${{OPENDINGUX_ROOT}}/{0}-toolchain/bin/mipsel-linux-c++".format(
toolchain),
"PKG_CONFIG_LIBDIR": "${{OPENDINGUX_ROOT}}/{0}-toolchain/mipsel-{0}-linux-{1}/sysroot/usr/lib/pkgconfig".format(
toolchain, libc),
"PKG_CONFIG_SYSROOT_DIR": "${{OPENDINGUX_ROOT}}/{0}-toolchain/mipsel-{0}-linux-{1}/sysroot".format(
toolchain, libc),
# Alter PATH for all binaries and sdl2-config, that lets us avoid to define all tools we use
"PATH": [ "${PATH}",
"${{OPENDINGUX_ROOT}}/{0}-toolchain/mipsel-{0}-linux-{1}/sysroot/usr/bin".format(
toolchain, libc),
"${{OPENDINGUX_ROOT}}/{0}-toolchain/bin".format(
toolchain),
],
},
}
platform.configureargs.append("--host=opendingux-{0}".format(target))
platform.packaging_cmd = "od-make-opk"
platform.built_files = {
builds.ScummVMBuild: [ "scummvm_{0}.opk".format(target) ],
}
platform.archiveext = "zip"
platform.description = "OpenDingux beta - {0}".format(description)
platform.icon = "dingux"
register_platform(platform)
opendingux_beta(target="gcw0",
toolchain="gcw0",
libc="uclibc",
description="GCW0")
opendingux_beta(target="lepus",
toolchain="lepus",
libc="musl",
description="Lepus based boards")
opendingux_beta(target="rs90",
toolchain="rs90",
libc="musl",
description="RS90 & RG99 handhelds")
def ps3():
platform = Platform("ps3")
platform.compatibleBuilds = (builds.ScummVMBuild, )
# Include CA certificates bundle to allow HTTPS
platform.env["DIST_PS3_EXTRA_FILES"] = "${PS3DEV}/cacert.pem"
platform.configureargs.append("--host=ps3")
platform.packaging_cmd = "ps3pkg"
platform.built_files = {
builds.ScummVMBuild: [ "scummvm-ps3.pkg" ],
}
platform.description = "PlayStation 3"
platform.icon = 'ps3'
register_platform(platform)
ps3()
def psp():
platform = Platform("psp")
platform.compatibleBuilds = (builds.ScummVMBuild, )
platform.configureargs.extend(["--host=psp", "--disable-debug", "--enable-plugins", "--default-dynamic"])
platform.buildconfigureargs = {
builds.ScummVMBuild: [
"--enable-engine=testbed",
],
}
platform.built_files = {
builds.ScummVMBuild: [
"EBOOT.PBP",
"plugins",
],
}
platform.data_files = {
builds.ScummVMBuild: [
"backends/platform/psp/kbd.zip",
],
}
platform.archiveext = "tar.xz"
platform.description = "PlayStation Portable"
platform.icon = 'psp'
register_platform(platform)
psp()
def raspberrypi():
platform = Platform("raspberrypi")
platform.configureargs.append("--host=raspberrypi")
platform.packaging_cmd = {
builds.ScummVMBuild: "dist-generic",
}
platform.built_files = {
builds.ScummVMBuild: [ "dist-generic/*" ],
builds.ScummVMToolsBuild: [
"construct_mohawk",
"create_sjisfnt",
"decine",
"decompile",
"degob",
"dekyra",
"descumm",
"desword2",
"extract_mohawk",
"gob_loadcalc",
"scummvm-tools",
"scummvm-tools-cli"
]
}
platform.description = "Raspberry Pi OS (Bookworm)"
platform.icon = 'raspberry'
register_platform(platform)
raspberrypi()
def riscos(suffix, prefix_subdir, variable_suffix, host, description = None):
if len(prefix_subdir) and prefix_subdir[-1:] != '/':
prefix_subdir += '/'
platform = Platform("riscos{0}{1}".format('-' if suffix else '', suffix))
platform.workerimage = 'riscos'
include_dir = "-isysroot ${{PREFIX}}/{0}include".format(prefix_subdir)
lib_dir = "-L${{PREFIX}}/{0}lib".format(prefix_subdir)
env_paths = {
'CFLAGS': include_dir,
'CPPFLAGS': include_dir,
'CXXFLAGS': include_dir,
'LDFLAGS': lib_dir,
}
platform.env["PKG_CONFIG_LIBDIR"] = "${{PREFIX}}/{0}lib/pkgconfig".format(prefix_subdir)
for v, p in env_paths.items():
platform.env[v] = ' '.join([
p, # Path specified above
platform.env.get(v, "${{{0}}}".format(v)), # User provided flags or worker default ones
"${{{0}_{1}}}".format(v, variable_suffix) # Variant specific flags (vfp...)
])
platform.configureargs.append("--host={0}".format(host))
platform.buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-plugins", "--default-dynamic" ],
}
platform.packaging_cmd = "riscosdist"
platform.built_files = {
builds.ScummVMBuild: [ "!ScummVM" ],
builds.ScummVMToolsBuild: [ "!ScummTool" ],
}
platform.archiveext = "zip"
platform.icon = 'riscos'
platform.description = description
register_platform(platform)
riscos("", "", "STD", "arm-unknown-riscos", "RISC OS")
riscos("vfp", "vfp", "VFP", "arm-vfp-riscos", "RISC OS with VFP")
def switch():
platform = Platform("switch")
platform.workerimage = "devkitswitch"
platform.compatibleBuilds = (builds.ScummVMBuild, )
platform.configureargs.append("--host=switch")
platform.packaging_cmd = "switch_release"
platform.built_files = {
builds.ScummVMBuild: [ "switch_release/*" ],
}
platform.archiveext = "zip"
platform.description = "Nintendo Switch"
platform.icon = 'switch'
register_platform(platform)
switch()
def vita():
platform = Platform("vita")
platform.compatibleBuilds = (builds.ScummVMBuild, )
platform.configureargs.append("--host=psp2")
platform.buildconfigureargs = {
builds.ScummVMBuild: [
"--enable-plugins"
],
}
platform.packaging_cmd = "psp2vpk"
platform.built_files = {
builds.ScummVMBuild: [ "scummvm.vpk" ],
}
platform.archiveext = "zip"
platform.description = "PlayStation Vita"
platform.icon = 'psp2'
register_platform(platform)
vita()
def wii():
platform = Platform("wii")
platform.workerimage = "devkitppc"
platform.compatibleBuilds = (builds.ScummVMBuild, )
platform.configureargs.append("--host=wii")
platform.buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-plugins", "--default-dynamic", "--enable-detection-dynamic", "--enable-vkeybd" ],
}
platform.packaging_cmd = "wiidist"
platform.built_files = {
builds.ScummVMBuild: [ "wiidist/scummvm" ],
}
platform.archiveext = "tar.xz"
platform.description = "Nintendo Wii"
platform.icon = 'wii'
register_platform(platform)
wii()
def windows_mxe(suffix, target, description=None):
platform = Platform("windows-{0}".format(suffix))
platform.workerimage = "mxe"
platform.env["CXX"] = "${{MXE_PREFIX_DIR}}/bin/{0}-c++".format(target)
# strip is specified below, just be coherent and define it with environment
platform.env["STRIP"] = "${{MXE_PREFIX_DIR}}/bin/{0}-strip".format(target)
# strings is detected using host alias and not host, override it here
platform.env["STRINGS"] = "${{MXE_PREFIX_DIR}}/bin/{0}-strings".format(target)
platform.env["PKG_CONFIG_LIBDIR"] = "${{MXE_PREFIX_DIR}}/{0}/lib/pkgconfig".format(target)
# Altering PATH for curl-config, that lets us reuse environment variables instead of using configure args
platform.env["PATH"] = [ "${PATH}", "${{MXE_PREFIX_DIR}}/{0}/bin".format(target)]
platform.configureargs.append("--host={0}".format(target))
if suffix != 'x86':
platform.buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-updates"],
}
platform.strip_cmd = {
# As we use an environment variable, we need to use string to spawn a shell
builds.ScummVMBuild: '"${STRIP}" scummvm.exe',
}
platform.packaging_cmd = {
builds.ScummVMBuild: ["win32dist-mingw", "DESTDIR=win32dist-mingw"],
}
platform.built_files = {
builds.ScummVMBuild: [ "win32dist-mingw" ],
builds.ScummVMToolsBuild: [
"construct_mohawk.exe",
"create_sjisfnt.exe",
"decine.exe",
#"decompile.exe", # Decompiler currently not built - BOOST library not present
"degob.exe",
"dekyra.exe",
"descumm.exe",
"desword2.exe",
"extract_mohawk.exe",
"gob_loadcalc.exe",
#"scummvm-tools.exe", # GUI tools currently not built - WxWidgets library not present
"scummvm-tools-cli.exe"
]
}
platform.archiveext = "zip"
platform.description = description
platform.icon = 'windows'
register_platform(platform)
windows_mxe(suffix="x86",
target="i686-w64-mingw32.static",
description="Windows (32\xa0bits)")
windows_mxe(suffix="x86-64",
target="x86_64-w64-mingw32.static",
description="Windows (64\xa0bits)")
def win9x():
platform = Platform("win9x")
platform.workerimage = "windows-9x"
platform.configureargs.append("--host=mingw32")
platform.buildconfigureargs = {
# Disable ENet to not depend on ws2_32.dll which isn't here on vanilla Win95
builds.ScummVMBuild: [ "--disable-windows-unicode", "--disable-enet" ],
}
platform.packaging_cmd = {
builds.ScummVMBuild: ["win32dist-mingw", "DESTDIR=win32dist-mingw"],
}
platform.built_files = {
builds.ScummVMBuild: [ "win32dist-mingw" ],
builds.ScummVMToolsBuild: [
"construct_mohawk.exe",
"create_sjisfnt.exe",
"decine.exe",
#"decompile.exe", # Decompiler currently not built - BOOST library not present
"degob.exe",
"dekyra.exe",
"descumm.exe",
"desword2.exe",
"extract_mohawk.exe",
"gob_loadcalc.exe",
#"scummvm-tools.exe", # GUI tools currently not built - WxWidgets library not present
"scummvm-tools-cli.exe"
]
}
platform.archiveext = "zip"
platform.description = "Windows 9x"
platform.icon = 'win95'
register_platform(platform)
win9x()