Difference between revisions of "Compiling ScummVM/Docker"

From ScummVM :: Wiki
Jump to navigation Jump to search
m
(→‎Compiling ScummVM using Docker: aliases -> alias typo fix)
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Compiling ScummVM using Docker ==
== Compiling ScummVM using Docker ==
The ScummVM buildbot uses [https://www.docker.com/ Docker] for building the toolchains. As such, this makes it possible for the individual toolchains to be used for local builds, avoiding the need to install the toolchain and required libraries manually.
The ScummVM buildbot uses [https://www.docker.com/ Docker] for building the toolchains.
 
As such, this makes it possible for the individual toolchains to be used for local builds, avoiding the need to install the toolchain and required libraries manually.
 
Some convenience aliases are provided in every toolchains to make it easier to build ScummVM for the supported platforms.
There are three commands defined:
* <code>scummvm_configure</code>: invokes the configure script (located in <code>/data/scummvm</code>) with the proper options for the platform
* <code>scummvm_build</code>: builds the project
* <code>scummvm_package</code>: packages the project ready for use on the targeted platform
 
Some toolchains support several platforms at once. In this case, the aliases have been defined per platform with a suffix. The aliases can then be found using the <code>alias</code> command.
 
=== Current platforms ===


The following toolchain images are available:
The following toolchain images are available:
Line 29: Line 41:
|
|
|-
|-
| toolchains/caanoo
| toolchains/appletv
| [[Caanoo]]
| [[Apple TV]]
| <code>--host=caanoo --enable-plugins --default-dynamic --enable-vkeybd</code>
| ?
| <code>make caanoo-bundle</code>
| ?
|
| Requires building the image from source.
|-
|-
| toolchains/devkit3ds
| toolchains/devkit3ds
Line 68: Line 80:
|-
|-
| toolchains/gcw0
| toolchains/gcw0
| [[GCW Zero]]
| [[Dingux|GCW Zero]]
| <code>--host=gcw0 --enable-plugins --default-dynamic --enable-vkeybd</code>
| <code>--host=gcw0 --enable-plugins --default-dynamic --enable-vkeybd</code>
| <code>make gcw-opk</code>
| <code>make gcw-opk</code>
Line 99: Line 111:
| toolchains/mxe
| toolchains/mxe
| [[Windows]] for x86 and x86_64
| [[Windows]] for x86 and x86_64
| <code>--host=i686-w64-mingw32.static --enable-debug --enable-updates</code>
| <code>--host=i686-w64-mingw32.static --enable-updates</code>


<code>--host=x86_64-w64-mingw32.static --enable-debug --enable-updates</code>
<code>--host=x86_64-w64-mingw32.static --enable-updates</code>
| <code>make win32dist-mingw DESTDIR=win32dist-mingw</code>
| <code>make win32dist-mingw DESTDIR=win32dist-mingw</code>
|
|
|-
|-
| toolchains/n64
| toolchains/opendingux-beta
| [[Nintendo 64]]
| [[OpenDingux Beta]]
| <code>--host=n64 --enable-vkeybd</code>
| <code>--host=opendingux-gcw0</code>
| <code>make n64-dist</code>
 
| Requires building with a reduced number of engines.
<code>--host=opendingux-lepus</code>
|-
 
| toolchains/open2x
<code>--host=opendingux-rs90</code>
| [[GP2X]]
| <code>make od-make-opk</code>
| <code>--host=gp2x --enable-vkeybd</code>
| <code>make gp2x-bundle</code>
| Requires building with a reduced number of engines.
|-
| toolchains/opendingux
| [[Dingux]]
| <code>--host=dingux --enable-plugins --default-dynamic --enable-vkeybd --disable-theoradec</code>
| <code>make dingux-dist</code>
|
|-
| toolchains/openpandora
| [[OpenPandora]]
| <code>--host=openpandora --enable-plugins --default-dynamic --enable-vkeybd</code>
| <code>make op-pnd</code>
|
|
|-
|-
Line 138: Line 136:
| [[PlayStation Portable]]
| [[PlayStation Portable]]
| <code>--host=psp --disable-debug --enable-plugins --default-dynamic</code>
| <code>--host=psp --disable-debug --enable-plugins --default-dynamic</code>
| <code>make</code>
|
|
| Requires building with a reduced number of engines.
|-
|-
| toolchains/raspberrypi
| toolchains/raspberrypi
Line 149: Line 147:
| toolchains/riscos
| toolchains/riscos
| [[RISC OS]]
| [[RISC OS]]
| <code>--host=arm-unknown-riscos</code>
| <code>--host=arm-unknown-riscos --enable-plugins --default-dynamic</code>


<code>--host=arm-vfp-riscos</code>
<code>--host=arm-vfp-riscos --enable-plugins --default-dynamic</code>
| <code>make riscosdist</code>
| <code>make riscosdist</code>
| Requires building with a reduced number of engines.
|
|-
|-
| toolchains/vita
| toolchains/vita
| [[PlayStation Vita]]
| [[PlayStation Vita]]
| <code>--host=psp2</code>
| <code>--host=psp2 --enable-plugins --default-dynamic</code>
| <code>make psp2vpk</code>
| <code>make psp2vpk</code>
| Requires building with a reduced number of engines.
|
|-
|-
| toolchains/windows-9x
| toolchains/windows-9x
Line 169: Line 167:


For more details on how to build ScummVM for a specific platform, see the relevant page from [[Compiling ScummVM]].
For more details on how to build ScummVM for a specific platform, see the relevant page from [[Compiling ScummVM]].
=== Obsolete platforms ===
The toolchains for the following platforms are still available, but they're considered '''obsolete'''.
{| class="wikitable sortable"
|-
!Name
!Target platform
!class=unsortable|Required configure flags
!class=unsortable|Packaging command
!class=unsortable|Notes
|-
| toolchains/caanoo
| [[Caanoo]]
| <code>--host=caanoo --enable-plugins --default-dynamic --enable-vkeybd</code>
| <code>make caanoo-bundle</code>
|
|-
| toolchains/n64
| [[Nintendo 64]]
| <code>--host=n64 --enable-vkeybd</code>
| <code>make n64-dist</code>
| Requires building with a reduced number of engines.
|-
| toolchains/opendingux
| [[Dingux]]
| <code>--host=dingux --enable-plugins --default-dynamic --enable-vkeybd --disable-theoradec</code>
| <code>make dingux-dist</code>
|
|-
| toolchains/openpandora
| [[OpenPandora]]
| <code>--host=openpandora --enable-plugins --default-dynamic --enable-vkeybd</code>
| <code>make op-pnd</code>
|
|}


=== Installing the needed packages ===
=== Installing the needed packages ===
Line 174: Line 209:
The following should install all the necessary packages:
The following should install all the necessary packages:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
apt-get install docker.io git
sudo apt-get update
sudo apt-get install git
command -v docker 2>&1 >/dev/null || sudo apt-get install docker.io
</syntaxhighlight>
</syntaxhighlight>


Line 185: Line 222:


=== Using the docker images ===
=== Using the docker images ===
To fetch a toolchain image from the Docker Hub, issue the following command from the ScummVM source directory:
To fetch a toolchain image from the Docker Hub, issue the following commands:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
cd scummvm
# Note: on some systems, it may be necessary to prefix
# the following command with 'sudo'
./devtools/docker.sh <toolchain>
./devtools/docker.sh <toolchain>
</syntaxhighlight>
</syntaxhighlight>
Line 199: Line 240:
Once in the Docker image, the following commands should be issued in order to build ScummVM:
Once in the Docker image, the following commands should be issued in order to build ScummVM:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
./configure <configure-flags>
scummvm_configure <configure-flags>
make -j$(nproc)
scummvm_build
scummvm_package
</syntaxhighlight>
</syntaxhighlight>


where <configure-flags> is the list of required configure flags specified in the table at the top of the page. This should be followed by the packaging command if one is specified.
where <configure-flags> is the list of additional configure flags. The packaging command is optional.
 
On toolchain images supporting several platforms, the aliases are diversified in the form <code>scummvm_<action>_<variant></code>.
Use the <code>alias</code> command to find the proper ones.


Once done, the <code>exit</code> command can be used to leave the Docker image.
Once done, the <code>exit</code> command can be used to leave the Docker image.

Latest revision as of 03:15, 16 November 2024

Compiling ScummVM using Docker

The ScummVM buildbot uses Docker for building the toolchains.

As such, this makes it possible for the individual toolchains to be used for local builds, avoiding the need to install the toolchain and required libraries manually.

Some convenience aliases are provided in every toolchains to make it easier to build ScummVM for the supported platforms. There are three commands defined:

  • scummvm_configure: invokes the configure script (located in /data/scummvm) with the proper options for the platform
  • scummvm_build: builds the project
  • scummvm_package: packages the project ready for use on the targeted platform

Some toolchains support several platforms at once. In this case, the aliases have been defined per platform with a suffix. The aliases can then be found using the alias command.

Current platforms

The following toolchain images are available:

Name Target platform Required configure flags Packaging command Notes
toolchains/amigaos4 AmigaOS 4 --host=ppc-amigaos --enable-plugins --default-dynamic --enable-detection-dynamic make amigaosdist
toolchains/android Android for ARMv7, AArch64, x86 and x86_64 --host=android-arm-v7a --enable-debug

--host=android-arm64-v8a --enable-debug

--host=android-x86 --enable-debug

--host=android-x86_64 --enable-debug

make androiddistdebug
toolchains/appletv Apple TV ? ? Requires building the image from source.
toolchains/devkit3ds Nintendo 3DS --host=3ds --enable-plugins --default-dynamic make dist_3ds
toolchains/devkitnds Nintendo DS --host=ds --enable-plugins --default-dynamic make dsdist
toolchains/devkitppc Nintendo Wii and GameCube --host=wii --enable-plugins --default-dynamic --enable-vkeybd

--host=gamecube --enable-plugins --default-dynamic --enable-vkeybd

make wiidist
toolchains/devkitswitch Nintendo Switch --host=switch make switch_release
toolchains/dreamcast Dreamcast --host=dreamcast --enable-plugins --default-dynamic --enable-vkeybd make dcdist
toolchains/gcw0 GCW Zero --host=gcw0 --enable-plugins --default-dynamic --enable-vkeybd make gcw-opk
toolchains/iphone iOS 7 for AArch64 ? make ios7bundle Requires building the image from source.
toolchains/macosx-arm64 macOS for AArch64 ? make bundle Requires building the image from source.
toolchains/macosx-i386 macOS for x86 ? make bundle Requires building the image from source.
toolchains/macosx-x86_64 macOS for x86_64 ? make bundle Requires building the image from source.
toolchains/mxe Windows for x86 and x86_64 --host=i686-w64-mingw32.static --enable-updates

--host=x86_64-w64-mingw32.static --enable-updates

make win32dist-mingw DESTDIR=win32dist-mingw
toolchains/opendingux-beta OpenDingux Beta --host=opendingux-gcw0

--host=opendingux-lepus

--host=opendingux-rs90

make od-make-opk
toolchains/ps3 PlayStation 3 --host=ps3 make ps3pkg
toolchains/psp PlayStation Portable --host=psp --disable-debug --enable-plugins --default-dynamic make
toolchains/raspberrypi Raspberry Pi --host=raspberrypi make dist-generic
toolchains/riscos RISC OS --host=arm-unknown-riscos --enable-plugins --default-dynamic

--host=arm-vfp-riscos --enable-plugins --default-dynamic

make riscosdist
toolchains/vita PlayStation Vita --host=psp2 --enable-plugins --default-dynamic make psp2vpk
toolchains/windows-9x Windows 95/98/ME --host=mingw32 --disable-windows-unicode make win32dist-mingw DESTDIR=win32dist-mingw

For more details on how to build ScummVM for a specific platform, see the relevant page from Compiling ScummVM.

Obsolete platforms

The toolchains for the following platforms are still available, but they're considered obsolete.

Name Target platform Required configure flags Packaging command Notes
toolchains/caanoo Caanoo --host=caanoo --enable-plugins --default-dynamic --enable-vkeybd make caanoo-bundle
toolchains/n64 Nintendo 64 --host=n64 --enable-vkeybd make n64-dist Requires building with a reduced number of engines.
toolchains/opendingux Dingux --host=dingux --enable-plugins --default-dynamic --enable-vkeybd --disable-theoradec make dingux-dist
toolchains/openpandora OpenPandora --host=openpandora --enable-plugins --default-dynamic --enable-vkeybd make op-pnd

Installing the needed packages

Debian-based distributions

The following should install all the necessary packages:

sudo apt-get update
sudo apt-get install git
command -v docker 2>&1 >/dev/null || sudo apt-get install docker.io

Getting the source

  • Open a Terminal and type:
git clone https://github.com/scummvm/scummvm.git

Using the docker images

To fetch a toolchain image from the Docker Hub, issue the following commands:

cd scummvm

# Note: on some systems, it may be necessary to prefix
# the following command with 'sudo'
./devtools/docker.sh <toolchain>

where <toolchain> is the name of the toolchain you want to use. This will fetch the requested toolchain from the Docker Hub if it isn't installed, mount the scummvm folder in the Docker image and launch a shell that can be used to build ScummVM for the relevant platform. Alternatively, you can use the following command to fetch updates for an already installed toolchain before launching the shell:

./devtools/docker.sh --update <toolchain>

Once in the Docker image, the following commands should be issued in order to build ScummVM:

scummvm_configure <configure-flags>
scummvm_build
scummvm_package

where <configure-flags> is the list of additional configure flags. The packaging command is optional.

On toolchain images supporting several platforms, the aliases are diversified in the form scummvm_<action>_<variant>. Use the alias command to find the proper ones.

Once done, the exit command can be used to leave the Docker image.