Difference between revisions of "Compiling ScummVM/RPI"

Jump to navigation Jump to search
613 bytes added ,  05:05, 17 December 2020
(Edited commands to create a distribution folder rather than a scummvm binary only)
 
(5 intermediate revisions by the same user not shown)
Line 22: Line 22:


As an example, on the Raspberry Pi running Raspbian (Buster) OS 3.2 (January 2020) we can execute the following to install third party libraries that ScummVM needs for its features and various game engines:
As an example, on the Raspberry Pi running Raspbian (Buster) OS 3.2 (January 2020) we can execute the following to install third party libraries that ScummVM needs for its features and various game engines:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y --no-install-recommends \
              libsdl2-dev \
              liba52-0.7.4-dev \
              libjpeg62-turbo-dev \
              libmpeg2-4-dev \
              libogg-dev \
              libvorbis-dev \
              libflac-dev \
              libmad0-dev \
              libpng-dev \
              libtheora-dev \
              libfaad-dev \
              libfluidsynth-dev \
              libfreetype6-dev \
              libcurl4-openssl-dev  \
              libsdl2-net-dev \
              libspeechd-dev \
              zlib1g-dev \
              libfribidi-dev \
              libglew-dev


  <nowiki>
On the '''host PC''' first we make sure we have some pre-requisite packages installed for the build.
sudo apt-get update
  sudo apt-get update
sudo apt-get upgrade
sudo apt-get upgrade
sudo apt-get install -y --no-install-recommends \
sudo apt-get install -y make pkg-config
            libsdl2-dev \
Then we export the path where we will copy the directories from the RPi SD card into, and then we manually copy them. One option (shown in the example commands below) is to copy the Raspberry Pi headers and libraries to ''/opt/rpi_root'', but any other path with the right permissions for our user (within common sense) should be ok:
            liba52-0.7.4-dev \
            libjpeg62-turbo-dev \
            libmpeg2-4-dev \
            libogg-dev \
            libvorbis-dev \
            libflac-dev \
            libmad0-dev \
            libpng-dev \
            libtheora-dev \
            libfaad-dev \
            libfluidsynth-dev \
            libfreetype6-dev \
            libcurl4-openssl-dev  \
            libsdl2-net-dev \
            libspeechd-dev \
            zlib1g-dev</nowiki>


On the '''host PC''' we first export the path where we will copy these into, and then we manually copy them. One option (shown in the example commands below) is to copy the Raspberry Pi headers and libraries to ''/opt/rpi_root'', but any other path with the right permissions for our user (within common sense) should be ok:
  mkdir -p /opt/rpi_root
 
export RPI_ROOT=/opt/rpi_root
  <nowiki>
cd <Raspbian_SD_card_mountpoint_directory>
mkdir -p /opt/rpi_root
cp -R usr lib opt $RPI_ROOT
export RPI_ROOT=/opt/rpi_root
cd <Raspbian_SD_card_mountpoint_directory>
cp -R usr lib opt $RPI_ROOT</nowiki>


The above copying of files has the unfortunate side-effect that many symbolic links that were copied over are now invalid, particularly those linking to absolute paths. Fortunately, we can remedy this situation by downloading and running a python script that will fix those links:
The above copying of files has the unfortunate side-effect that many symbolic links that were copied over are now invalid, particularly those linking to absolute paths. Fortunately, we can remedy this situation by downloading and running a python script that will fix those links:
Line 59: Line 62:
./sysroot-relativelinks.py $RPI_ROOT</nowiki>
./sysroot-relativelinks.py $RPI_ROOT</nowiki>


Note that the last command above is supposed to run the python script <code>sysroot-relativelinks.py</code>. You will need to have python3 installed on your host PC for that. The script assumes a location for your python binary, but that may not be a valid path on your host PC. An alternative to that would be to run:
$(which python3) ./sysroot-relativelinks.py $RPI_ROOT
Finally, update the ''PATH'' variable to be preceded by the ''RPI_ROOT'' path, since this is required for proper detection of ''libcurl'' related files by ScummVM's ''configure'' script.
Finally, update the ''PATH'' variable to be preceded by the ''RPI_ROOT'' path, since this is required for proper detection of ''libcurl'' related files by ScummVM's ''configure'' script.
  <nowiki>export PATH=$RPI_ROOT:$PATH</nowiki>
  <nowiki>export PATH=$RPI_ROOT:$PATH</nowiki>
1,310

edits

Navigation menu