Guide to Building AppleWin on Linux - FujiNetWIFI/fujinet-firmware GitHub Wiki

Rough Guide For Building AppleWin Linux Version to use with FujiNet

Just the Facts TL;DR Version

build AppleWin

git clone https://github.com/FujiNetWIFI/AppleWin.git
cd AppleWin
git fetch --all
git checkout linux
git submodule update --init --recursive
# c = clean, b = build. use -h for help
./build.sh -cb

build fujinet-pc

git clone https://github.com/FujiNetWIFI/fujinet-firmware.git
cd fujinet-firmware
./build.sh -cp APPLE

run them

cd fujinet-firmware/build/dist
./run-fujinet

# another shell
cd AppleWin/build
./sa2 --log

Back to the regular version

Note: when you have finished this you will also need to run FujiNet-PC (and build it) from the fujinet-firmware repo. There may be guides for that but it boils down to checking out the repo if you don't have it and then building with: $./build.sh -cp APPLE

[Prereqs: note: may not be all, but build for me on a base Ubuntu 22.x Linux machine]

Prereqs

sudo apt install -y build-essential checkinstall zlib1g-dev libpcap-dev libssl-dev libyaml-dev libtool autoconf libslirp-dev libminizip-dev libboost-all-dev libsdl2-image-dev unzip curl wget git python3.10-venv libmbedtls-dev default-jre

sudo snap install cmake --classic

Clone repos

This assumes you have your own forks of each of these, if not just clone the direct repo in the FujiNet Org Area.

I am just clonging AppleWin directly as I'm going to assume not many people expect to commit to that repo. But if you do want to you know what you should do.

mkdir code
cd code
git clone https://github.com/dillera/fujinet-firmware
git clone https://github.com/dillera/fujinet-apps
git clone https://github.com/dillera/AppleWin

cd fujinet-apps
git remote upstream https://github.com/FujiNetWIFI/fujinet-apps

cd fujinet-firmware
git remote upstream https://github.com/FujiNetWIFI/fujinet-firmware

cd AppleWin
git remote upstream https://github.com/FujiNetWIFI/AppleWin

Building

cd AppleWin
git remote add upstream https://github.com/FujiNetWIFI/AppleWin.git
git fetch --all
git checkout linux
# checkout submodules
git submodule update --init --recursive
mkdir build
cd build
# You can also use RELEASE instead of DEBUG if you're not going to be doing any gdb style debugging
cmake -DCMAKE_BUILD_TYPE=DEBUG -DBUILD_SA2=on .. 
make

Running

To run it:

# logs are hardcoded to /tmp/AppleWin.log by the app if you specify --log
# the configuration file is at ~/.applewin/applewin.conf, you can remove slots if you have issues in that file
# sa2 stands for "SDL Apple 2", i.e. sa2
# use "./sa2 -h" to see help, defaults to x11:

./sa2 --log

# OPTIONAL! you can also specify a gfx driver specifically, e.g. x11, wayland.
SDL_VIDEODRIVER=wayland ./sa2

Once running, open the configuration menu (System/Settings), open the Hardware TAB, In an empty slot (I've been using slot 5), choose "SPoverSLIP". This will load the card. If you exit AppleWin, your config is saved to the previously mentioned applwin.conf. Then when you run it again, it'll auto start with the card in.

You can preconfigure your config to load SPoverSLIP with the following section: [Configuration\Slot 5] Card type=25

change the Slot number as you desire.

Good Config Files

BenK already has a nice set of good config files that will make using this much easier. Head over to: https://github.com/FujiNetWIFI/fujinet-vm/blob/main/scripts/install-applewin-linux.sh and take a look at that script which he uses to build the VM for all this. Those HERE docs should be used for your system to setup and configure AppleWin so that it does all the SLIP networking to talk to the FujiNet-PC instance that you also built and are running.