-
Notifications
You must be signed in to change notification settings - Fork 173
Build\macOS
NOTE: In macOS/OS X 10.14 (Mojave) and earlier, Windows binaries also perform well on macOS as both clients and server, including station transparency effects, when run with Wine 4+ (
brew cask install wine-stable
if Homebrew is installed).As of macOS 10.15 (Catalina), 32-bit applications are no longer supported. As of Feb. 2020,
wine
does not run on Catalina andwine64
will not run EmptyEpsilon.
Be sure to check Build for generic instructions.
Install XCode:
xcode-select --install
Install the Homebrew package manager to install some dependencies before compiling EmptyEpsilon.
Install cmake
to compile your code and the sfml
dependency that EmptyEpsilon needs. You can also install git
via brew
if necessary.
brew install cmake sfml
You can also compile or install pre-compiled SFML libraries yourself. See the SFML documentation:
- With cmake: https://www.sfml-dev.org/tutorials/2.5/compile-with-cmake.php
- With XCode: https://www.sfml-dev.org/tutorials/2.5/start-osx.php
Create a new directory named emptyepsilon
where the game sources will be fetched, and download SeriousProton (game engine) and EmptyEpsilon (the actual game).
mkdir -p emptyepsilon && cd emptyepsilon
git clone git@github.com:daid/SeriousProton.git
git clone git@github.com:daid/EmptyEpsilon.git
NOTE: To get the source anonymously (if you don't have a GitHub account), use these two commands instead:
git clone https://github.com/daid/SeriousProton.git git clone https://github.com/daid/EmptyEpsilon.gitIf you're building a specific release of EmptyEpsilon, remember to checkout the correct tag in both repositories!
Go to the EmptyEpsilon
directory and compile the game.
cd EmptyEpsilon
mkdir _build
cd _build
cmake .. -DCMAKE_INSTALL_PREFIX=. -DSERIOUS_PROTON_DIR=../../SeriousProton/
make && make install
make
builds the binary executable only, while make install
copies necessary assets into the .app
bundle.
Once it's built, you can open the game normally by double-clicking the app bundle, or by running it:
EmptyEpsilon.app
To output log information to a terminal window, run the executable within the bundle:
EmptyEpsilon.app/Contents/MacOS/EmptyEpsilon
Game assets, including models, scripts, and music, are stored within the bundle at EmptyEpsilon.app/Contents/Resources/
. The Preferences file is saved to ~/.emptyepsilon/options.ini
.
NOTE: The compiled app still requires SFML libraries (ie. the Homebrew
sfml
package) to be installed locally. See the next section to add SFML to the app bundle.
To aid compatibility with specific older versions of OS X/macOS, use the MACOSX_DEPLOYMENT_TARGET
environment variable to set a minimum Mac OS X/macOS target version. Setting this lower than 10.15 (EE's default since may 2021) might cause problems when compiling with newer versions of XCode, and SFML 2.5 onward does not support targeting OS X 10.7 and older.
You can also set this in EmptyEpsilon's CMakeLists.txt
, around the top:
set(ENV{MACOSX_DEPLOYMENT_TARGET} "11.0")
Since may 2021, EE supports DMG packaging directly through CMake.
To generate a DMG package, you cannot use the sfml from homebrew!. Relocatable packages requires Frameworks to be fixed up properly.
Download the official release and extract it in a convenient location:
# Downloads and extracts SFML to the current directory (thereafter <SFML_PACKAGE_DIR>)
curl -sSL https://www.sfml-dev.org/files/SFML-2.5.1-macOS-clang.tar.gz | tar xzf -
It follows the standard setup, with a slight twist in the CMake build command to point towards the sfml frameworks:
SFML_PACKAGE_DIR=where/you/extracted/sfml/see/above
# Get sources
git clone https://github.com/daid/SeriousProton
git clone https://github.com/daid/EmptyEpsilon
# Configure
cmake -G Ninja \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DCPACK_GENERATOR:STRING=DragNDrop \
-DSFML_ROOT:PATH=$SFML_PACKAGE_DIR/Frameworks \
-S EmptyEpsilon -B _build
# Package
cmake --build _build --target package --parallel
If all goes well, you should end up with a EmptyEpsilon*.dmg
in _build
that is shareable.
The content below is old, kept for posterity. Dive in at your own risk!
By using the above process, end users who try to run your app bundle builds must also install sfml
in order to play. To avoid this, you can bundle the required dependencies using dylibbundler
, which copies the libraries into the app bundle and updates the EmptyEpsilon executable within the bundle to link them.
You'll need to build dylibbundler
from source to get the --search-path
feature, which as of Feb. 2020 is not yet in a released version.
If you've followed the steps to build EmptyEpsilon, you already have everything you need to build dylibbundler
:
git clone https://github.com/auriamg/macdylibbundler.git
cd macdylibbundler
make && make install
Once dylibbundler
is built and installed, go to the EmptyEpsilon build directory containing your newly built EmptyEpsilon.app
bundle and run:
dylibbundler \
--overwrite-dir \
--bundle-deps \
--search-path "/usr/local/lib" \
--fix-file "EmptyEpsilon.app/Contents/MacOS/EmptyEpsilon" \
--dest-dir "EmptyEpsilon.app/Contents/libs"
This will output many warnings that you can disregard. The changes this makes to EmptyEpsilon.app
will increase the bundle's size slightly but should allow you to run the app bundle on Macs that do not have SFML libraries installed.
To compress the EmptyEpsilon.app
bundle and other useful files (such as script_reference.html
), you can build a disk image (DMG).
Copy EmptyEpsilon.app
and any other files you want on the image into a staging directory. For example, from the directory where you built EmptyEpsilon, you can run:
mkdir _staging
cp -r EmptyEpsilon.app script_reference.html _staging
Then use hdiutil
to create a temporary image using that directory as the source:
hdiutil \
create "/tmp/tmp.dmg" \
-ov \
-volname "EmptyEpsilon" \
-fs HFS+ \
-srcfolder "_staging"
Finally, convert the image to a read-only distributible image:
hdiutil \
convert "/tmp/tmp.dmg" \
-format UDZO \
-o "EmptyEpsilon.dmg"
- Home
- Stations
- Main Screen/Captain
- 5-6 Player Crews
- 3-4 Player Crews
- 1 Player Crew
- Game Master
- Additional Stations and Views
- Setting up a Game
- Lore
- Expanding the Game
- Additional Features
- Building from Source