Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
compiling_sheepshaver_basilisk [2014/10/19 23:16] – [Building BasiliskII in Linux flavours] cat_7 | compiling_sheepshaver_basilisk [2021/10/24 08:44] (current) – [Building BasiliskII and SheepShaver in OSX/macOS] ronald_p._regensburg | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Compiling BasiliskII and SheepShaver for various | + | ====== Compiling BasiliskII and SheepShaver for different |
- | IMPORTANT NOTICE: | + | The official |
- | The source code can now be downloaded from: \\ | + | It can now be downloaded from: \\ |
* https:// | * https:// | ||
- | THIS GUIDE ONLY DESCRIBES BUILDING BASILISK OR SHEEPSHAVER FROM THE OFFICIAL SOURCE CODE.\\ | + | **HOWEVER NOTE:** This guide describes building BasiliskII and Sheepshaver from the currently most advanced |
- | There are other repositories with forked code, solving particular problems. You are on your own if you want to build the code in those repositories!\\ | + | * https:// |
- | * https:// | + | |
- | * https:// | + | |
- | ===== ++++ WORK IN PROGRESS, HELP IF YOU CAN ++++ ===== | ||
- | ==== Preparing your build environment ==== | ||
- | Common assumptions: | + | ==== Building |
- | * You have a folder called " | + | |
- | * src | + | |
- | * src\SDL-1.2.15 | + | |
- | * src\macemu\BasiliskII | + | |
- | * src\macemu\SheepShaver | + | |
- | === Windows | + | === Prepare your build environment |
+ | Install **msys2 32-bit** from https:// | ||
- | You need a Windows port of the GCC and G++ compilers, X-headers, libgnome development etc. You can use either Cygwin 1.5 or 1.7, or MinGW with MSYS: | + | **Note: |
+ | to get the installation going.\\ | ||
- | * To set up Cygwin, follow [[https:// | + | Update msys2: |
- | * To set up MinGW with MSYS, follow [[http:// | + | * pacman -Syu (closing and restarting msys2 when requested) |
+ | * pacman -Su | ||
- | When building on Windows, | + | Install |
+ | * pacman -S base-devel | ||
+ | * pacman -S git | ||
+ | * pacman -S mingw-w64-i686-toolchain | ||
+ | * pacman -S mingw-w64-i686-glib2 | ||
+ | * pacman -S mingw32/mingw-w64-i686-gcc | ||
+ | * pacman -S mingw32/mingw-w64-i686-gtk2 | ||
+ | * pacman -S mingw32/mingw-w64-i686-SDL2 | ||
+ | Close msys2 \\ | ||
+ | Start mingw32.exe \\ | ||
- | ==Build SDL 1.2.15== | + | Download the source code (we use the source from kanjitalk755 on github): |
- | | + | |
- | * Extract the zip file to the SDL-1.2.15 folder in your " | + | |
- | * start Cygwin or MSYS shell. | + | |
- | * (only in case you're using Cygwin 1.7 execute: "chmod 755 / | + | |
- | * cd to the folder containing the SDL source and run the following commands: \\ | + | |
- | ./ | + | == Build Basilisk II == |
- | | + | |
- | make | + | |
- | make install | + | ./configure --with-bincue |
- | + | make | |
- | If you want to install multiple versions of SDL, use these commands:\\ | + | |
- | ./ | + | |
- | ./configure --disable-shared --prefix=`pwd` | + | |
- | make | + | |
- | | + | |
- | | + | |
- | export PATH | + | |
- | * You will then need to cd into the corresponding SDL folder every time you start Cygwin or MSYS and set and export the path to sdl-config to build SheepShaver, | + | == Build SheepShaver == |
- | + | cd macemu/ | |
- | == To build the Windows GUIs == | + | |
- | The Windows GUIs are built by using the gtk+ Win32 development packages. This section assume you installed them in C:\GTK | + | |
- | * Install http:// | + | |
- | * Find a file called pixman-1.pc on the Internet and place it in: C: | + | |
- | * Start the Cygwin or MSYS shell | + | |
- | * Export the path to PKG_CONFIG \\ | + | |
- | + | ||
- | (disregard a possible error message) | + | |
- | export PKG_CONFIG_PATH=' | + | |
- | + | ||
- | == OSX Snow Leopard== | + | |
- | Please note that the current code only builds in Snow Leopard with XCode 3.x (latest 3.2.6)! Newer versions of OSX and XCode are not supported. | + | |
- | + | ||
- | To build BasiliskII there is only the command line method. To build SheepShaver | + | |
- | + | ||
- | **Using the command line** \\ | + | |
- | Cd to your " | + | |
- | * Download the source code from: http:// | + | |
- | * unpack the code in the folder " | + | |
- | * start a terminal window | + | |
- | * cd to the folder containing the SDL source and run the following: | + | |
- | + | ||
- | ./ | + | |
- | ./configure --disable-shared --prefix=`pwd` | + | |
- | make | + | |
- | make install | + | |
- | PATH=`pwd`/ | + | |
- | | + | |
- | + | ||
- | * You need to cd into the SDL folder every time you start a new terminal window and export the path (the last two command lines above) to sdl-config to build SheepShaver, | + | |
- | + | ||
- | **Using Xcode (3.x, with 10.4 SDK installed)** \\ | + | |
- | * download the SDL-framework from [[http:// | + | |
- | * find the SDL.framework folder and copy it to your / | + | |
- | + | ||
- | == Linux == | + | |
- | You need GCC and G++ installed, plus several other development packages, like SDL-1.2.15 development, | + | |
- | + | ||
- | * Your SDL installation and other packages should be found automatically when you start building SheepShaver or BasiliskII | + | |
- | + | ||
- | === Actions for all environments === | + | |
- | + | ||
- | Download the source code: | + | |
- | + | ||
- | == If you have Git installed == | + | |
- | + | ||
- | Use the following command to download the source code:\\ | + | |
- | + | ||
- | git clone https:// | + | |
- | + | ||
- | Find the " | + | |
- | + | ||
- | == If you don't have Git installed == | + | |
- | + | ||
- | * Go to https:// | + | |
- | * Extract the zip file in your " | + | |
- | + | ||
- | The SheepShaver code is not needed if you only want to compile BasiliskII.\\ | + | |
- | + | ||
- | ==== Building BasiliskII in Windows ==== | + | |
- | If your version of gcc is 4.7.0 or more recent, you need to remove all occurrences of \\ | + | |
- | | + | |
- | -mno-cygwin | + | |
- | + | ||
- | from the build files, as this option has been deprecated and will give an error while building. See [[http:// | + | |
- | + | ||
- | Now cd to the BasiliskII folder and:\\ | + | |
cd src/Windows | cd src/Windows | ||
NO_CONFIGURE=1 ../ | NO_CONFIGURE=1 ../ | ||
- | ./configure | + | ./configure --with-bincue |
- | + | ||
- | ==Optional: prepare for building the GUI== | + | |
- | Edit the file " | + | |
- | + | ||
- | Change | + | |
- | " | + | |
- | to | + | |
- | " | + | |
- | + | ||
- | Open a command window in Windows and enter: | + | |
- | pkg-config | + | |
- | pkg-config --libs gtk+-win32-2.0 | + | |
- | and copy-paste the outputs of the respective commands behind the lines GTK_CFLAGS = and GTK_LIBS = | + | |
- | + | ||
- | It would look something like: | + | |
- | WANT_GTK = yes | + | |
- | GTK_CFLAGS = -mms-bitfields -IC:/ | + | |
- | GTK_LIBS = -Wl,-luuid -LC:/ | + | |
- | + | ||
- | + | ||
- | === Finally run: === | + | |
make | make | ||
- | strip BasiliskII.exe | + | strip SheepShaver.exe |
+ | strip SheepShaverGUI.exe | ||
| | ||
- | And if you also built the GUI, run: | + | ==== Building BasiliskII and SheepShaver in OSX/macOS ==== |
- | strip BasiliskIIGUI.exe | + | |
+ | === First === | ||
- | ==== Building BasiliskII in OSX Snow Leopard ==== | + | - Install latest Xcode from Apple' |
- | If you started a new terminal window, then don't forget to export the path to SDL (see above at " | + | - Download SDL2 2.0.14 or later for Mac OS X from https:// |
- | cd src/SDL-1.2.15/ | + | - Download BasiliskII and SheepShaver source code (we use the source from kanjitalk755 on GitHub): |
- | PATH=`pwd`/bin:$PATH | + | Go to https:// |
- | export PATH | + | |
- | cd to the BasiliskII | + | === Build BasiliskII |
- | cd src/Unix | + | **With Xcode:**\\ |
- | | + | - Open macemu-master/BasiliskII/src/MacOSX/ |
- | | + | - Product menu > Scheme: Make sure BasiliskII is selected\\ |
- | | + | - Product menu > Scheme > Edit Scheme...: Set Build Configuration to Release for all five items Run, Test, Profile, Analyze, and Archive\\ |
- | | + | - Product menu > Build |
- | make | + | |
- | make BasiliskII_app | + | |
- | For an "in depth" overview | + | The default location |
- | ==== Building | + | ~/Library/Developer/Xcode/DerivedData/BasiliskII-xxxxxxxxxxx/ |
- | Ubuntu, Fedora, SuSE:\\ | + | **Or use the command line:**\\ |
+ | Recent versions of autoconf, automake, and libtool need to be installed separately (not installed with Xcode). | ||
- | cd BasiliskII | + | cd macemu-master/ |
- | cd src/Unix | + | ./ |
- | | + | |
- | ./configure --enable-sdl-video --enable-sdl-audio --disable-vosf --enable-jit-compiler | + | |
make | make | ||
- | strip BasiliskII | ||
+ | ===Build SheepShaver=== | ||
- | CentOS-64:\\ | + | **With Xcode:**\\ |
- | * First edit the file \src\BasiliskII\src\Unix\configure.ac and comment out the lines 113 to 125, like this \\ | + | - Open macemu-master/ |
+ | - Product menu > Scheme: Make sure SheepShaver is selected\\ | ||
+ | - Product menu > Scheme > Edit Scheme...: Set Build Configuration | ||
+ | - Product menu > Build | ||
- | dnl Check if we should really | + | The default location of the built product will be:\\ |
- | dnl if [[ " | + | ~/ |
- | dnl AC_TRY_RUN([ | + | |
- | dnl int main(void) { | + | |
- | dnl #if defined(__x86_64__) | + | |
- | dnl return 0; | + | |
- | dnl #else | + | |
- | dnl return 1; | + | |
- | dnl #endif | + | |
- | dnl } | + | |
- | dnl ], [ | + | |
- | dnl HAVE_I386=no | + | |
- | dnl HAVE_X86_64=yes | + | |
- | dnl ]) | + | |
- | dnl fi | + | |
- | cd BasiliskII | + | **Or use the command line:**\\ |
- | cd src/Unix | + | Recent versions of autoconf, automake, and libtool need to be installed separately (not installed with Xcode). |
- | NO_CONFIGURE=1 | + | |
- | ./configure --enable-sdl-video --enable-sdl-audio --disable-vosf --enable-jit-compiler | + | |
- | make | + | |
- | strip BasiliskII | + | |
- | + | ||
- | ==== Building SheepShaver in Windows ==== | + | |
- | cd to the SheepShaver | + | |
- | + | ./ | |
- | make links | + | |
- | cd src/Windows | + | |
- | | + | |
- | + | ||
- | Go into the SheepShaver/ | + | |
- | CC=' | + | |
make | make | ||
- | strip SheepShaver.exe | ||
- | If you also want to build the GUI, use \\ | + | ==== Building BasiliskII and SheepShaver |
- | cd src/ | + | |
- | NO_CONFIGURE=1 ../ | + | |
- | CC='gcc-3 -mwin32' | + | |
- | Edit the file " | + | |
- | Change " | + | |
- | Open a command window | + | |
- | pkg-config --cflags gtk+-win32-2.0 | + | |
- | pkg-config --libs gtk+-win32-2.0 | + | |
- | copy the outputs of the respective commands behind the lines GTK_CFLAGS = and GTK_LIBS | + | |
- | + | ||
- | It would look something like: | + | |
- | WANT_GTK | + | |
- | GTK_CFLAGS | + | |
- | GTK_LIBS | + | |
- | make | + | Basilisk and SheepShaver |
- | strip SheepShaver.exe | + | |
- | strip SheepShaverGUI.exe | + | |
- | ==== Building SheepShaver in OSX Snow Leopard ==== | + | |
- | You have two option to build Sheepshaver in OSX, using the command line or using the XCode project file. Stick to the method you used to prepare your build environment as described above. \\ | + | |
- | **Using | + | We recommend compiling from the kanjitalk755/ |
- | If you started a new terminal window, then don't forget to export the path to SDL (see above at " | + | == BasiliskII == |
- | | + | |
- | PATH=`pwd`/bin:$PATH | + | cd macemu/ |
- | export PATH | + | |
- | + | ||
- | cd to the SheepShaver folder and do: \\ | + | |
- | + | ||
- | make links | + | |
- | cd src/Unix | + | |
NO_CONFIGURE=1 ./ | NO_CONFIGURE=1 ./ | ||
- | ./configure --enable-sdl-audio --enable-sdl-video --disable-vosf | + | ./configure --enable-sdl-video=yes |
make | make | ||
- | | + | |
- | **Using the Xcode project file**\\ | + | == SheepShaver == |
- | Open a terminal and cd to the SheepShaver folder and do: | + | |
- | make links | + | |
- | Close the terminal \\ | + | |
- | * open the src/ | + | |
- | * in the "Debug | SheepShaver | …" drop-down menu choose " | + | |
- | * build the project by selecting Build in the Build menu | + | |
- | * SheepShaver is then found in the src/ | + | |
- | ==== Building | + | |
- | | + | |
- | + | cd macemu/SheepShaver | |
- | Ubuntu, Fedora, SuSE:\\ | + | |
- | + | ||
- | cd to the SheepShaver | + | |
make links | make links | ||
cd src/Unix | cd src/Unix | ||
NO_CONFIGURE=1 ./ | NO_CONFIGURE=1 ./ | ||
- | ./configure --enable-sdl-video --enable-sdl-audio --disable-vosf | + | ./configure --enable-sdl-video=yes --enable-sdl-audio=yes --with-bincue |
make | make | ||
strip SheepShaver | strip SheepShaver | ||
+ | == Sheep_net driver == | ||
+ | If you plan to use the sheep_net driver for networking, you should compile your own: | ||
- | ==== Cross-compiling in Linux for Windows ==== | + | cd macemu/BasiliskII/src/Unix/Linux/NetDriver |
- | + | ||
- | These instructions apply to Ubuntu 12.10 32Bits, Debian 7.1 64bits | + | |
- | + | ||
- | Start with preparing your build environment: | + | |
- | Make sure you have installed build-essentials, | + | |
- | + | ||
- | You can install these prerequisites from the command line with: | + | |
- | sudo apt-get install build-essential automake autoconf mingw32 | + | |
- | + | ||
- | The rest of these instructions assume you use \home\yourusername\src as folder for the source code for SDL and BasiliskII: | + | |
- | + | ||
- | Download the SDL source code from the command line and build SDL: | + | |
- | wget http://www.libsdl.org/release/ | + | |
- | tar -xzf SDL-1.2.15.tar.gz | + | |
- | cd SDL-1.2.15 | + | |
- | ./configure --host=i586-mingw32msvc --disable-shared --prefix=`pwd` | + | |
make | make | ||
- | make install | + | |
- | | + | |
- | + | | |
- | For BasiliskII, go to the /src/ | + | |
- | NO_CONFIGURE=1 ../ | + | |
- | echo ac_cv_have_win32_exceptions=yes > extra.cache | + | |
- | ./configure --host=i586-mingw32msvc --cache-file=extra.cache --enable-sdl-video --enable-sdl-audio --enable-jit-compiler | + | |
- | make | + | |
- | + | ||
- | For SheepShaver, | + | |
- | | + | |
- | cd / | + | |
- | NO_CONFIGURE=1 ../ | + | |
- | echo ac_cv_have_win32_exceptions=yes > extra.cache | + | |
- | ./configure --host=i586-mingw32msvc --cache-file=extra.cache --enable-sdl-video --enable-sdl-audio | + | |
- | make | + | |
- | + | ||
- | If you also want to build the Basilisk GUI: | + | |
- | wget http:// | + | |
- | Extract the archive in your /src folder. Next, create a file / | + | |
- | #!/bin/sh | + | |
- | PKG_CONFIG_LIBDIR=/ | + | |
- | PKG_CONFIG_PATH=/ | + | |
- | + | ||
- | and chmod +x it to make it executable | + | |
- | + | ||
- | Next, patch up the libraries: | + | |
- | cd / | + | |
- | sed -i ' | + | |
- | cd ./lib | + | |
- | for f in *.lib; do mv $f lib${f%%lib}a; | + | |
- | + | ||
- | Use this configure command for Basilisk II: | + | |
- | ./configure --host=i586-mingw32msvc --cache-file=extra.cache --with-gtk --disable-gtktest --enable-sdl-video --enable-sdl-audio --enable-jit-compiler | + | |
- | + | ||
- | You have to edit the makefile in the BasiliskII/ | + | |
- | change a reference to b2ether/ | + | |
- | make | + | |
- | + | ||
- | ==== Tidbits ==== | + | |
- | + | ||
- | * Source code for Visual C for basiliskII and SheepShaver: | + | |
- | There are some unfinished attempts (jan. 2011) to update the source code for Basilisk and SheepShaver for Windows that build in Visual C. The code also builds in MinGW. It originates from here: https:// | + | |
- | + | ||
- | The code is mirrored here: \\ | + | |
- | [[http:// | + | |
- | [[http:// | + | |
- | + | ||
- | + | ||
- | * A version of Basilisk for Haiku is available: | + | |
- | http:// | + | |
- | + | ||
- | The application is mirrored here: \\ | + | |
- | [[http:// | + | |
- | You need to set the correct rights on the application, | + | |
+ | Please read the readme on how to use the Sheep_net driver here: https:// | ||
- | * SDL 1.2.15 doesn' | ||
- | source: http:// | ||
- | @@ -91,7 +91,9 @@ typedef struct SDL_PrivateVideoData { | ||
- | | ||
- | const void | ||
- | const void | ||
- | +#if (MAC_OS_X_VERSION_MIN_REQUIRED < 1070) | ||
- | | ||
- | +#endif | ||
- | | ||
- | | ||
- | |