Skip to content

Instantly share code, notes, and snippets.

@florisvanvugt
Last active April 17, 2025 12:18
Show Gist options
  • Save florisvanvugt/0849c9d1eeb9168c2685a1c6c8b41483 to your computer and use it in GitHub Desktop.
Save florisvanvugt/0849c9d1eeb9168c2685a1c6c8b41483 to your computer and use it in GitHub Desktop.
Setting up PCem on Ubuntu 24.04

Setting up PCem on Ubuntu 24.04

Thanks to https://www.youtube.com/watch?v=pN0u2UePEYM for a great starting point.

Preparations

Install PCem dependencies:

sudo apt install libsdl2-dev ninja-build libopenal-dev libpcap-dev

Compiling wxWidgets

"Really do I have to compile?" you might ask. Indeed, I found it's the easiest option. Some sources indicate you can install wxWidgets from codelite.org, but I was unable to find the packages for this Ubuntu distribution (noble, 24.04).

Much of this is copy-pasted from https://gist.github.com/pemd-sys/6aed397bcbdb380cb53bc09183f3a8f4

sudo apt-get install build-essential
sudo apt-get install libgtk2.0-dev
sudo apt-get install libgtk-3-dev
sudo apt-get install mesa-utils
sudo apt-get install freeglut3-dev
sudo apt-get install -y libjpeg-dev
sudo apt-get install liblzma-dev
curl -LJO https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.5/wxWidgets-3.0.5.tar.bz2
tar -xvf wxWidgets-3.0.5.tar.bz2
cd wxWidgets-3.0.5/
mkdir gtk-build
cd gtk-build
../configure  --with-gtk=3 --with-opengl
make -j3 
sudo make install
sudo ldconfig

That's it for wxWidgets! You can run the testing instructions indicated via the link above.

Compiling PCem

This basically follows: https://github.com/sarah-walker-pcem/pcem

cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release .
ninja

Next, you need to install some ROMs. There are many sources for them. One example is to download this Windows 98 SE installation, take the roms directory, and copy it to ~/.pcem/roms/.

That's it! You should now be able to run ./src/pcem to launch PCem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment