# HG changeset patch # User Wuzzy # Date 1568763270 -3600 # Node ID 12b6619171bb6be7678d95af9dfc9012af068498 # Parent c764a1bf5795cab66e9a71c47d715c0b20e68f25 BuildingOnMac: More formatting (2) diff -r c764a1bf5795 -r 12b6619171bb BuildingOnMac.wiki --- a/BuildingOnMac.wiki Wed Sep 18 00:31:55 2019 +0100 +++ b/BuildingOnMac.wiki Wed Sep 18 00:34:30 2019 +0100 @@ -16,28 +16,29 @@ ==== Compilers and Environment ==== - * Xcode command line tools - * CMake 3.9 or later - * fpc 2.6.x OR fpc 3.1.1+ (nothing in between, due a crashing bug) + * Xcode command-line tools + * CMake 3.9 or later + * fpc 2.6.x OR fpc 3.1.1+ (nothing in between, due a crashing bug) ==== Libraries ==== Libraries can be dynamically linked libraries (`.dylib`) or Apple frameworks (`.framework`). All must be on the system library or framework paths for CMake to find them. Frameworks can be put in your home directory at `~/Library/Frameworks`. - * Qt 5.9.x or later (unified installer works) - * SDL2 - * SDL2_image (2.0.4 works, 2.0.5 might be buggy) - * SDL2_mixer - * SDL2_net - * SDL2_ttf - * Ogg - * Vorbis - * libpng 1.6.x - * physfs 3.0.x + * Qt 5.9.x or later (unified installer works) + * SDL2 + * SDL2_image (2.0.4 works, 2.0.5 might be buggy) + * SDL2_mixer + * SDL2_net + * SDL2_ttf + * Ogg + * Vorbis + * libpng 1.6.x + * physfs 3.0.x ==== Notes ==== -# Other dependencies are linked with the SDL2 libraries, but not specifically used in Hedgewars. They may include: + + # Other dependencies are linked with the SDL2 libraries, but not specifically used in Hedgewars. They may include: * FreeType * FLAC * Opus @@ -45,30 +46,30 @@ * modplug * mpg123 * webp -# Good places to find required frameworks are found in the development packages for the various SDL2 libraries. They are found in the `Frameworks` subdirectory within the .framework itself. Example: `SDL2_ttf.framework/Frameworks/FreeType.framework` -# Another good place for the frameworks/libraries are in the Hedgewars.app of a previous version (E.g. Hedgewars 1.0.0 Beta 2) + # Good places to find required frameworks are found in the development packages for the various SDL2 libraries. They are found in the `Frameworks` subdirectory within the .framework itself. Example: `SDL2_ttf.framework/Frameworks/FreeType.framework` + # Another good place for the frameworks/libraries are in the Hedgewars.app of a previous version (E.g. Hedgewars 1.0.0 Beta 2) === Optional Dependencies === By default, the following optional features are turned on in the build system, and require the following dependencies. - * Video recording - * ffmpeg 4.2 (later versions are untested) - * yasm 1.3+ - * Automatic updates - * Sparkle - * hedgewar-server - * ghc, cabal (Haskell) - * xz + * Video recording + * ffmpeg 4.2 (later versions are untested) + * yasm 1.3+ + * Automatic updates + * Sparkle + * hedgewar-server + * ghc, cabal (Haskell) + * xz ==== Haskell Installation ==== Steps to get the Haskell environment set up for compiling hedgewars-server: -# Install ghc, cabal with instructions at https://www.haskell.org/ghcup/ -# Load ghc environment: `source ~/.ghcup/env` -# Install cabal-uninstall: `cabal install cabal-uninstall` -# Install haskell packages: `cabal install vector bytestring 'network < 2.7' time mtl sandi 'hslogger < 1.3' process utf8-string SHA entropy zlib random regex-tdfa deepseq` + # Install ghc, cabal with instructions at https://www.haskell.org/ghcup/ + # Load ghc environment: `source ~/.ghcup/env` + # Install cabal-uninstall: `cabal install cabal-uninstall` + # Install haskell packages: `cabal install vector bytestring 'network < 2.7' time mtl sandi 'hslogger < 1.3' process utf8-string SHA entropy zlib random regex-tdfa deepseq` `cabal-uninstall` is for when you accidentally install newer package versions that don't work with hedgewars-server (e.g. hslogger-1.3.0.0) @@ -77,15 +78,15 @@ === Environment Setup === - * Set macOS version to target for Xcode tools. The earlier the better: + * Set macOS version to target for Xcode tools. The earlier, the better: {{{ export MACOSX_DEPLOYMENT_TARGET=10.8 }}} - * (Optional) Load haskell environment: + * (Optional) Load haskell environment: {{{ source ~/.ghcup/env }}} - * Create (mkdir) a `build` subdirectory in the hedgewars source code + * Create (mkdir) a `build` subdirectory in the Hedgewars source code === Build === @@ -96,21 +97,21 @@ Steps to build: -# `cd /path/to/hg/hedgewars/build` -# `cmake .. -DCMAKE_PREFIX_PATH=/Users/user/Qt/5.9.8/clang_64/ -DCMAKE_BUILD_TYPE=Release` -# `make -j2` -# `make install` + # `cd /path/to/hg/hedgewars/build` + # `cmake .. -DCMAKE_PREFIX_PATH=/Users/user/Qt/5.9.8/clang_64/ -DCMAKE_BUILD_TYPE=Release` + # `make -j2` + # `make install` A `Hedgewars.app` file will be created in the same folder you ran CMake. To build the DMG, also run: -# `make dmg` + * `make dmg` ==== Notes ==== -# To build a debug build, use the flag `-DCMAKE_BUILD_TYPE=Debug` instead of the `Release` one -# To build a minimum-features build, use the additional flags of `-DNOSERVER=1`, `-DNOVIDEOREC=1`, and `-DNOAUTOUPDATE=1`, for disabling of hedgewars-server, video recording, and Sparkle autoupdating, respectively. -# The build uses CMake BundleUtilities which automatically deploys all libraries and dependencies into the `.app`, and repairs the `RPATH` of each library and binary as needed. If there is a missing dependency, the `make install` portion of the build will fail. The fix is usually to find the correct `.framework` and put in on library path, then run `make dmg` again. + * To build a debug build, use the flag `-DCMAKE_BUILD_TYPE=Debug` instead of the `Release` one + * To build a minimum-features build, use the additional flags of `-DNOSERVER=1`, `-DNOVIDEOREC=1`, and `-DNOAUTOUPDATE=1`, for disabling of hedgewars-server, video recording, and Sparkle autoupdating, respectively. + * The build uses CMake BundleUtilities which automatically deploys all libraries and dependencies into the `.app`, and repairs the `RPATH` of each library and binary as needed. If there is a missing dependency, the `make install` portion of the build will fail. The fix is usually to find the correct `.framework` and put in on library path, then run `make dmg` again. Enjoy!