Skip to content

Building

athairus edited this page Jul 4, 2016 · 54 revisions

Note: Phoenix has switched to CMake. You'll need 3.6.0 or newer to build Phoenix. This guide has not been updated yet.

Building Phoenix

Note: Make sure you have installed all dependencies before building Phoenix.

Get the source

Windows: Use the MSYS shell

OS X, Linux: Use the console/terminal

  1. git clone --recursive https://github.com/team-phoenix/Phoenix.git
  2. cd Phoenix

Build Phoenix from Qt Creator

  1. Start Qt Creator (Windows: from the MINGW shell (shortcut created on installation), you cannot launch it directly from Explorer: /mingw64/bin/qtcreator, see note at bottom), open the .pro file
  2. You will be asked to create a build directory for Phoenix's build files and executable to reside. The default is fine!
  3. Build -> Build All
  4. Copy a set of 64-bit libretro cores to the cores directory next to the executable (see tip below)
  5. You can now run it from Qt Creator or from the terminal. (Windows: You must run it from the MINGW shell or Qt Creator, you cannot launch it in Explorer without putting the right folder in your PATH)

Build Phoenix from the terminal

Windows: Use the MinGW-w64 shell

OS X, Linux: You must have the Qt 5 shared libraries on your path in order to run Phoenix from the terminal. Qt Creator will set up these paths automatically so you don't have to. Why not try building/running from that instead?

  1. (from Phoenix) cd ..
  2. mkdir Phoenix-build
  3. cd Phoenix-build
  4. qmake ../Phoenix -r
  5. make -j8
  6. cd frontend
  7. Copy a set of 64-bit libretro cores to the cores directory next to the executable (see tip below)
  8. Launch Phoenix. Windows: ./Phoenix.exe Linux: ./phoenix OS X: open -a Phoenix.app

NOTE: Qt Creator on Windows

If you want to launch Qt Creator from a shortcut, be aware that the PATH variable Qt Creator will spawn with won't have the MSYS2 bin directory (C:\msys2\usr\bin), which will prevent you from building the frontend. To fix this, go to Tools -> Options -> Build & Run -> Kits and, for the (default) kit, Change... the Environment to include this:

PATH=C:\msys64\usr\bin;${PATH}

TIP: Libretro cores

To grab the latest nightly (highly recommended), navigate to:

Windows: http://buildbot.libretro.com/nightly/windows/x86_64/

OS X: http://buildbot.libretro.com/nightly/apple/osx/x86_64/

Linux: http://buildbot.libretro.com/nightly/linux/x86_64/

...check the box next to "latest" (put your mouse over it first) then hit the download button on the top left. Extract the zip, then extract all the cores out of their archive files. Copy these cores (*.dll, *.dylib or *.so) to the proper place next to the Phoenix executable (Windows, Linux: Cores OS X: Phoenix.app/Contents/MacOS/Cores)

Next step: Code Style