anchor:building[] == Building From Source The Epple ][ Emulator is written in C+\+, and can be built using the standard +make+ program. The primary dependency is http://www.libsdl.org/[Simple DirectMedia Layer] (SDL). Your linux distribution may provide a package. Or else you can download it directly from SDL's web site. In either case, be sure to install the ``Development Libraries'' for your particular platform. === Docker Using Docker is the easiest way to build Epple ][. Assuming Docker and git are installed, you can build as follows: [source,sh] --------------------------------------------------- git clone git@github.com:cmosher01/Epple-II.git cd Epple-II docker build -t epple2 . --------------------------------------------------- This will build everything inside the container. You can run Epple-II directly from the container, and access it with your favorite VNC client. For example: [source,sh] --------------------------------------------------- docker run -d -p 5900:5900 epple2 vinagre :0 --------------------------------------------------- === Arch Linux Example [source,sh] --------------------------------------------------- sudo pacman -S base-devel sdl2 # <1> cd mkdir epple2 cd epple2 wget http://mosher.mine.nu/epple2/download/epple2-{VERSION}.tar.gz # <2> tar xzvf epple2-{VERSION}.tar.gz mkdir build # <3> cd build ../epple2-{VERSION}/configure # <4> make # <5> sudo make install # <6> --------------------------------------------------- <1> Install dependencies: gcc, make, SDL <2> Retrieve the latest Epple ][ source distribution <3> Use this directory for a VPATH-style build <4> Run one-time configuration script for your system. Use +--help+ for more information. <5> Compile and link. Program will be +src/epple2+ <6> Install into standard system directories === Windows/MSYS Example ==== Install MinGW/MSYS Install MinGW into +C:\MinGW\+ For more information on MinGW, see http://www.mingw.org/[]. ==== Install WiX See http://wixtoolset.org/[] for more information. Download the latest version, for example: win38.exe, and install it. Run MSYS.BAT and add WiX to your PATH in +~/.profile+. For example: [source,sh] -------- export PATH="$PATH:/c/Program Files (x86)/WiX Toolset v3.8/bin" -------- ==== Install SDL At http://www.libsdl.org/[] find the download page for SDL 2.0. Download the ``Development Libraries'' for MinGW, for example: +SDL2-devel-2.0.1-mingw.tar.gz+ and save it to your MSYS home directory (for example, +C:\Users\Administrator+). Run MSYS.BAT, and at the bash prompt, go to your home directory and untar the SDL archive to your home directory: [source,sh] -------- $ cd $ tar xzvf SDL2-devel-2.0.1-mingw.tar.gz -------- Then follow the instructions to install SDL, for example: [source,sh] -------- $ cd SDL2-2.0.1 $ make native -------- I also needed to create a symlink for the SDL include files: [source,sh] -------- $ cd /usr/include $ ln -s SDL2 SDL -------- ==== Untar Epple ][ Source Download the Epple ][ Source Distribution and save it to your MSYS home directory (for example, +C:\Users\Administrator+). Run MSYS, and at the bash prompt, go to your home directory and untar the epple2 source distribution tar file. For example: [source,sh] -------- $ cd $ tar xzvf epple2-1.1.tar.gz -------- ==== Build Epple ][ Then build as follows. I recommend doing a VPATH build, where you build into a different directory than the source directory. To accomplish this, create a new directory for building, somewhere, such as: [source,sh] -------- $ cd $ mkdir buildepple2 $ cd buildepple2 -------- Then run +configure+ from there. For the MSYS build to work, you need some extra parameters to the build, and you could also add some compiler options to optimize the build. For example (from the +buildepple2+ directory you just created): [source,sh] -------- $ ~/epple2/configure --prefix= CXXFLAGS=-I/usr/include LDFLAGS=-L/usr/lib $ make CXXFLAGS="-I/usr/include `sdl2-config --cflags`" LDFLAGS="`sdl2-config --cflags` -static-libstdc++ -static-libgcc" -------- If all goes well, it will build without any errors. If you get errors about not finding +SDL.h+, make sure SDL is installed, and make sure the configure command is correct. (If you just run configure without the options shown above, you will get this error at build time.) The result of the build (on Windows platform) is +installer/epple2.msi+ which is an installable file for Windows. To install epple2, just double-click on this file from Explorer.