Browse Source

Simplify build instructions for macOS (#83)

pull/86/head
Max Desiatov 7 years ago committed by Anders Jenbo
parent
commit
908793fa27
  1. 2
      .travis.yml
  2. 5
      Brewfile
  3. 3
      Brewfile-32bit.rb
  4. 25
      README.md
  5. 3
      macos-build.sh

2
.travis.yml

@ -11,7 +11,7 @@ matrix:
- env: ARCH=--build-all-x64 - env: ARCH=--build-all-x64
script: script:
- bash ./xcode-build.sh $ARCH - bash ./macos-build.sh $ARCH
deploy: deploy:
provider: releases provider: releases

5
Brewfile

@ -0,0 +1,5 @@
brew "cmake"
brew "sdl2_mixer"
brew "sdl2_ttf"
brew "libsodium"
brew "pkg-config"

3
Brewfile-32bit.rb

@ -0,0 +1,3 @@
brew "automake"
brew "autoconf"
brew "libtool"

25
README.md

@ -46,12 +46,9 @@ Note: Be sure that your to select the command line Xcode if you have more then o
``` ```
$ sudo xcode-select --switch /Applications/Xcode.app $ sudo xcode-select --switch /Applications/Xcode.app
``` ```
Install the build tools using [Homebrew](https://brew.sh/):
```
brew install automake autoconf libtool
```
Also, verify that you don't have FreeType and HarfBuzz installed from Homebrew, which will cause build errors for SDL2_ttf: Verify that you don't have FreeType and HarfBuzz installed from
[Homebrew](https://brew.sh/), which will cause build errors for SDL2_ttf:
``` ```
brew info freetype brew info freetype
@ -67,15 +64,9 @@ brew uninstall --ignore-dependencies harfbuzz
You can install FreeType and HarfBuzz from Homebrew again after devilutionX builds successfully. You can install FreeType and HarfBuzz from Homebrew again after devilutionX builds successfully.
Get SDL2, SDL2_mixer, SDL2_ttf and Libsodium: Now you can run the build script:
```
./xcode-build.sh --get-libs
```
### Compiling
``` ```
./xcode-build.sh --build-libs ./macos-build.sh --build-all-x86
./xcode-build.sh --build-project
./xcode-build.sh --package
``` ```
</details> </details>
<details><summary>Windows via MinGW</summary> <details><summary>Windows via MinGW</summary>
@ -125,12 +116,10 @@ make -j$(nproc)
</details> </details>
<details><summary>macOS</summary> <details><summary>macOS</summary>
Install the dependencies using [Homebrew](https://brew.sh/): Make sure you have [Homebrew](https://brew.sh/) installed, then run:
```
brew install cmake sdl2_mixer sdl2_ttf libsodium pkg-config
```
### Compiling
``` ```
brew bundle
mkdir build mkdir build
cd build cd build
cmake .. cmake ..

3
xcode-build.sh → macos-build.sh

@ -110,6 +110,7 @@ function set_working_dir() {
} }
function build_all_x86 (){ function build_all_x86 (){
brew bundle --file=Brewfile-32bit.rb
set_working_dir set_working_dir
get_libs get_libs
decompress_libs decompress_libs
@ -124,7 +125,7 @@ function build_all_x86 (){
} }
function build_all_x64 (){ function build_all_x64 (){
brew install sdl2 sdl2_mixer sdl2_ttf libsodium brew bundle
mkdir build mkdir build
cd build cd build
cmake .. cmake ..
Loading…
Cancel
Save