BuildingOnMac.wiki
author Wuzzy
Mon, 15 Jul 2019 15:44:47 +0100
changeset 1946 fabbc283a035
parent 1497 7a5b840a3dd4
child 1963 1175d2f6f198
permissions -rw-r--r--
LuaGears: Explain nImpactSounds
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
     1
#summary Instructions for building Hedgewars on Mac OS X
117
5c10784de5cb notes added
vittorio.giovara@gmail.com
parents: 116
diff changeset
     2
#labels Phase-Implementation,Phase-Deploy,Phase-Support
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
     3
756
03c80807b053 BuildingOnMac: Fix title
Wuzzy
parents: 755
diff changeset
     4
= Building on Mac OS X =
1497
7a5b840a3dd4 BuildingOnMac: Warning about outdated info
Wuzzy
parents: 1080
diff changeset
     5
**Note: These instructions are OUTDATED!**
7a5b840a3dd4 BuildingOnMac: Warning about outdated info
Wuzzy
parents: 1080
diff changeset
     6
755
7ba641398b3e BuildingOnMac: Add title, fix header levels
Wuzzy
parents: 335
diff changeset
     7
== Prerequisites ==
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
     8
271
175ecc89f964 added xcode 4 note
vittorio.giovara@gmail.com
parents: 270
diff changeset
     9
  * XCode must be installed with command line tools
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    10
  * some knowledge of Terminal is preferred
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    11
755
7ba641398b3e BuildingOnMac: Add title, fix header levels
Wuzzy
parents: 335
diff changeset
    12
==== Notes ====
116
1c3643e4f6c5 Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 113
diff changeset
    13
117
5c10784de5cb notes added
vittorio.giovara@gmail.com
parents: 116
diff changeset
    14
   # it has been reported that Xcode 3.2.6 creates problem when linking frameworks! If you can't use another version, try this: https://discussions.apple.com/thread/2781968?threadID=2781968&tstart=105
271
175ecc89f964 added xcode 4 note
vittorio.giovara@gmail.com
parents: 270
diff changeset
    15
   # for Xcode 4 onwards, you need to install the command line tools: open Xcode, go to Preferences, select "Downloads" and install the "Command Line Tools".
175ecc89f964 added xcode 4 note
vittorio.giovara@gmail.com
parents: 270
diff changeset
    16
   # for Qt series 4.7, only versions 4.7.0 and 4.7.4 are not suffering from this bug http://bugreports.qt.nokia.com/browse/QTBUG-17333 any other version will not work with online games.
268
d3ee65445401 updated notes and links
vittorio.giovara@gmail.com
parents: 267
diff changeset
    17
   # Lion has an incompatible ABI with older version of Freepascal! Use only the new Freepascal version 2.6.0 or newer. See http://bugs.freepascal.org/view.php?id=19269
116
1c3643e4f6c5 Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 113
diff changeset
    18
755
7ba641398b3e BuildingOnMac: Add title, fix header levels
Wuzzy
parents: 335
diff changeset
    19
=== Necessary libraries ===
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    20
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    21
Download the following libraries and place them under `/Library/Frameworks/`
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    22
1079
254a4e07216e BuildingOnMac: Less specific links
Wuzzy
parents: 756
diff changeset
    23
  * SDL - http://www.libsdl.org/release/
254a4e07216e BuildingOnMac: Less specific links
Wuzzy
parents: 756
diff changeset
    24
  * SDL_image - http://www.libsdl.org/projects/SDL_image/release/
254a4e07216e BuildingOnMac: Less specific links
Wuzzy
parents: 756
diff changeset
    25
  * SDL_mixer - http://www.libsdl.org/projects/SDL_mixer/release/
254a4e07216e BuildingOnMac: Less specific links
Wuzzy
parents: 756
diff changeset
    26
  * SDL_net - http://www.libsdl.org/projects/SDL_net/release/
254a4e07216e BuildingOnMac: Less specific links
Wuzzy
parents: 756
diff changeset
    27
  * SDL_ttf - http://www.libsdl.org/projects/SDL_ttf/release/
254a4e07216e BuildingOnMac: Less specific links
Wuzzy
parents: 756
diff changeset
    28
  * Ogg sources - http://downloads.xiph.org/releases/ogg/
254a4e07216e BuildingOnMac: Less specific links
Wuzzy
parents: 756
diff changeset
    29
  * Vorbis sources - http://downloads.xiph.org/releases/vorbis/
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    30
1080
01583db406ff BuildingOnMac: versions
Wuzzy
parents: 1079
diff changeset
    31
See [Dependencies] for the required versions.
01583db406ff BuildingOnMac: versions
Wuzzy
parents: 1079
diff changeset
    32
755
7ba641398b3e BuildingOnMac: Add title, fix header levels
Wuzzy
parents: 335
diff changeset
    33
=== Optional libraries ===
278
eb590870e063 Added Optional Libraries section, containing Sparkle.
drew1313132@gmail.com
parents: 271
diff changeset
    34
eb590870e063 Added Optional Libraries section, containing Sparkle.
drew1313132@gmail.com
parents: 271
diff changeset
    35
The following libraries are optional:
1079
254a4e07216e BuildingOnMac: Less specific links
Wuzzy
parents: 756
diff changeset
    36
 * Sparkle (auto-updater) - https://github.com/sparkle-project/Sparkle/releases/latest
278
eb590870e063 Added Optional Libraries section, containing Sparkle.
drew1313132@gmail.com
parents: 271
diff changeset
    37
755
7ba641398b3e BuildingOnMac: Add title, fix header levels
Wuzzy
parents: 335
diff changeset
    38
==== Compiling Ogg Vorbis ====
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    39
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    40
Since there is no framework distribution for ogg vorbis libraries, we will need to compile our own. Extract the sources and open the relative .xcodeproj file.
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    41
108
c2f5407f8c19 Edited wiki page BuildingOnMac through web user interface.
henrik.rostedt@gmail.com
parents: 104
diff changeset
    42
It is likely that you will need to adjust some parameters, such as the Base SDK you have installed and for which architecture (ppc, i386, x86_64) you want to build. Go into "Project"->"Edit Project Settings", under "Build" set Architectures to Standard and Base SDK to 10.5 (otherwise newer).
c2f5407f8c19 Edited wiki page BuildingOnMac through web user interface.
henrik.rostedt@gmail.com
parents: 104
diff changeset
    43
c2f5407f8c19 Edited wiki page BuildingOnMac through web user interface.
henrik.rostedt@gmail.com
parents: 104
diff changeset
    44
After that build as usual and copy the generated framework to the usual `/Library/Frameworks/` directory.
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    45
755
7ba641398b3e BuildingOnMac: Add title, fix header levels
Wuzzy
parents: 335
diff changeset
    46
==== (Optional) Server ====
33
397cb8bbddde Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 27
diff changeset
    47
104
6ce496fecb0c updated (removed references to ghc deps and bundle macro)
vittorio.giovara@gmail.com
parents: 91
diff changeset
    48
If you want to compile server for hosting lan games, you need to download a Haskell compiler: we are going to use the Glasgow Haskell Compiler.
33
397cb8bbddde Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 27
diff changeset
    49
1079
254a4e07216e BuildingOnMac: Less specific links
Wuzzy
parents: 756
diff changeset
    50
 * Download the Haskell Platform and install both the GHC and Haskell Platform - https://www.haskell.org/downloads#platform
254a4e07216e BuildingOnMac: Less specific links
Wuzzy
parents: 756
diff changeset
    51
 * Run `cabal update` to get an updated list of available libraries and install the necessary dependencies with
33
397cb8bbddde Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 27
diff changeset
    52
{{{
104
6ce496fecb0c updated (removed references to ghc deps and bundle macro)
vittorio.giovara@gmail.com
parents: 91
diff changeset
    53
sudo cabal install gameServer/hedgewars-server.cabal
33
397cb8bbddde Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 27
diff changeset
    54
}}}
1079
254a4e07216e BuildingOnMac: Less specific links
Wuzzy
parents: 756
diff changeset
    55
  * _(even more optional)_ if you feel experimental, you can also try to use the 64bit variant of Haskell, just make sure that your `~/.cabal/` directory doesn't conflict with previous installations
33
397cb8bbddde Edited wiki page BuildingOnMac through web user interface.
vittorio.giovara@gmail.com
parents: 27
diff changeset
    56
755
7ba641398b3e BuildingOnMac: Add title, fix header levels
Wuzzy
parents: 335
diff changeset
    57
=== Necessary tools ===
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    58
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    59
Download and install the following toolchains
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    60
1079
254a4e07216e BuildingOnMac: Less specific links
Wuzzy
parents: 756
diff changeset
    61
 * Freepascal compiler - https://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/
254a4e07216e BuildingOnMac: Less specific links
Wuzzy
parents: 756
diff changeset
    62
 * CMake - https://cmake.org/download/
254a4e07216e BuildingOnMac: Less specific links
Wuzzy
parents: 756
diff changeset
    63
 * Qt - https://www1.qt.io/download/
254a4e07216e BuildingOnMac: Less specific links
Wuzzy
parents: 756
diff changeset
    64
  * Note that for compiling the 64 bit version you need download the `cocoa` version of Qt
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    65
755
7ba641398b3e BuildingOnMac: Add title, fix header levels
Wuzzy
parents: 335
diff changeset
    66
== Building process ==
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    67
1079
254a4e07216e BuildingOnMac: Less specific links
Wuzzy
parents: 756
diff changeset
    68
  * Download the source tarball or clone the Mercurial repo
254a4e07216e BuildingOnMac: Less specific links
Wuzzy
parents: 756
diff changeset
    69
  * Configure the sources with the following line
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    70
{{{
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    71
cmake . -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake -DCMAKE_BUILD_TYPE=Release
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    72
}}}
1079
254a4e07216e BuildingOnMac: Less specific links
Wuzzy
parents: 756
diff changeset
    73
  * Run `make` and `make install`
25
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    74
4f6f055c0848 Created wiki page through web user interface.
vittorio.giovara@gmail.com
parents:
diff changeset
    75
Enjoy!