|
| 1 | +# Build from Source |
| 2 | + |
| 3 | +To build the PPUC executable you need to compile the source files: |
| 4 | + |
| 5 | +1. Install the compiler and some helper tools for automation of the build process. |
| 6 | +2. Get the target dependent header files for the system libraries used by PPUC. |
| 7 | +3. Run the appropiate build.sh (located in the platforms dir). |
| 8 | + |
| 9 | +## Linux |
| 10 | + |
| 11 | +You can build for an ARM CPU (aarch64) or AMD/Intel CPU (x64) depending on the CPU of the target computer you want to use for PPUC. It does not really matter which Linux distro is used. |
| 12 | + |
| 13 | +The easiest way to compile is on a Linux computer. This guide is tested with Ubuntu and Debian. Both use the Advanced Package Tool (APT). On a Windows PC, you can use VirtualBox. |
| 14 | + |
| 15 | +It is advised to update the list of packages, upgrade installed packages and cleanup first: |
| 16 | + |
| 17 | +``` |
| 18 | +sudo apt-get update |
| 19 | +sudo apt-get upgrade |
| 20 | +sudo apt-get autoremove |
| 21 | +``` |
| 22 | + |
| 23 | +### Compiler |
| 24 | + |
| 25 | +Install the compiler: |
| 26 | +```shell |
| 27 | +sudo apt-get install build-essential |
| 28 | +``` |
| 29 | + |
| 30 | +Install the tools used by build.sh: |
| 31 | +```shell |
| 32 | +sudo apt install cmake curl autoconf libtool pkg-config zlib1g zlib1g-dev |
| 33 | +``` |
| 34 | + |
| 35 | +### Header files |
| 36 | + |
| 37 | +Install the header files to be used by the compiler: |
| 38 | +```shell |
| 39 | +sudo apt install libudev-dev libasound2-dev libpulse-dev libaudio-dev libjack-dev |
| 40 | +sudo apt install libsndio-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev |
| 41 | +sudo apt install libxfixes-dev libxi-dev libxss-dev libxtst-dev libxkbcommon-dev |
| 42 | +sudo apt install libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev |
| 43 | +sudo apt install libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev |
| 44 | +sudo apt install libpipewire-0.3-dev libwayland-dev libdecor-0-dev liburing-dev |
| 45 | +``` |
| 46 | + |
| 47 | +### Build |
| 48 | + |
| 49 | +Get the source files: |
| 50 | +``` |
| 51 | +git clone https://github.com/PPUC/ppuc.git |
| 52 | +``` |
| 53 | + |
| 54 | +Compile: |
| 55 | +``` |
| 56 | +cd ppuc |
| 57 | +platforms/linux/x64/build.sh |
| 58 | +``` |
| 59 | + |
| 60 | +### Test |
| 61 | + |
| 62 | +Use the example/t2.yml to try: |
| 63 | + |
| 64 | +- Download the ROM for Terminator 2 Judgement Day (L-8): t2_l8.zip |
| 65 | +- Create a directory for pinmame: $HOME/.pinmame |
| 66 | +- Create a subdirectory: $HOME/.pinmame/roms |
| 67 | +- Copy t2_l8.zip to roms |
| 68 | + |
| 69 | +Run from the ppcu directory (where you called build.sh): |
| 70 | +``` |
| 71 | +ppuc/ppuc-pinmame -c examples/t2.yml -n -i |
| 72 | +``` |
| 73 | +This should run PPUC without RS484 communication. Exit with CTRL-C. |
| 74 | + |
| 75 | +To see all commandline options: |
| 76 | +``` |
| 77 | +ppuc/ppuc_pinmame --help |
| 78 | +``` |
0 commit comments