Skip to content

Guide to Building AppleWin on Linux

andy diller edited this page Apr 6, 2024 · 13 revisions

Rough Guide For Building AppleWin Linux Version to use with FujiNet

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 -e 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


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


[fork AppleWin from Fujinet project into your own repo...- using web UI]
[https://github.com/FujiNetWIFI/AppleWin.git]
[on your computer....]


# clone the applewin repo (or fork it if you're going to be making changes)
git clone [email protected]:[YOURUSERNAME]/AppleWin.git

# from either https://github.com/FujiNetWIFI/AppleWin.git
# or          [email protected]:FujiNetWIFI/AppleWin.git

cd AppleWin
git remote add upstream https://github.com/FujiNetWIFI/AppleWin.git
git fetch --all
git checkout linux
# as per instructions at https://github.com/markjfisher/AppleWin/tree/linux?tab=readme-ov-file#build
# you have to checkout the git 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

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

# can also specify gfx, 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.

Clone this wiki locally