Skip to content

Build guide: Windows

athairus edited this page Jun 12, 2016 · 6 revisions

DRAFT

Prerequisites

  • Phoenix source
    • git clone --recursive https://github.com/team-phoenix/Phoenix.git
  • One of the following:

Visual Studio (recommended if you just want to get Phoenix working)

From C:\path\to\source:

1. mkdir build && cd build
2. qmake -spec win32-msvc2015 -tp vc -recursive ..
	a. Do this from cmd with C:\path\to\Qt\bin in your PATH
3. Open phoenix.sln
	a. Frontend project ("Phoenix"): 
		i. Don't run touch command (not on PATH)
			1) Go to Properties->Build Events->Post-Build Event->Use In Build
			2) Set to No
		ii. Add Qt bin, libsamplerate folders to PATH 
			1) Project->Properties->Debugging
			2) "Environment": PATH=C:\path\to\Qt\bin;C:\path\to\build\folder\externals\libsamplerate-0.1.8\bin;%PATH%
4. Install packages
	a. (Solution 'phoenix' (3 projects))->Manage NuGet Packages for Solution…
		i. For each package, install for all projects
			1) Search for and install sdl2.v140
			2) Search for and install zlib
5. Install libsamplerate
	a. Extract libsamplerate-0.1.8.7z into C:\path\to\build\folder\externals
	b. Verify the path matches C:\path\to\source\backend\msvc.pri
		i. Ex. C:\path\to\build\folder\externals\libsamplerate-0.1.8\bin
6. Set frontend (Phoenix) as startup project, build solution
7. Manually set up backend plugin
	a. Get
		i. qmldir from backend source
		ii. phoenix-backend.dll from backend build folder (debug or release)
	b. Place both into C:\path\to\build\folder\frontend\{debug, release}\vg\phoenix\backend\
		i. debug or release as appropriate
8. Run it!

Qt Creator (recommended for development)

  • Launch Qt Creator from MINGW64 shell: qtcreator
  • Open .pro file

MSYS2 (MINGW64 shell)

  • qmake /path/to/phoenix/source -recursive
  • make -j8
  • make install

Running Phoenix.exe from Explorer

Like any other Qt 5 app, Qt's runtime DLLs must be discoverable by Phoenix.exe via its environment (PATH). You have three choices:

  • (recommended) Add your Qt 5's build folder to your PATH. If you want to do this, you'll have to either:
    • (recommended) Create a batch file that adds Qt's bin folder to your PATH for the duration of the batch file then launches Phoenix. Depending on how you build Phoenix, you'll also have to add the folders that contain SDL2, libsamplerate and zlibs' DLLs to the PATH.
    • Permanently add Qt's bin folder to your PATH (not recommended)
  • Copy the DLLs from the bin folder to the folder containing Phoenix.exe. If you do this, you'll have to also copy many other files (platform plugin, QML stuff) which is beyond the scope of this guide. If you don't copy the extra stuff, Phoenix may not launch at all.