fractorium/Data/BuildGuideQtCreator.md

195 lines
5.1 KiB
Markdown
Raw Normal View History

2016-03-03 23:36:38 -05:00
#Build Guide For Visual Studio 2013 or Qt Creator
2016-03-03 21:55:49 -05:00
##Tools
###git
2016-03-01 20:58:34 -05:00
Install [git](https://git-scm.com/downloads).
2016-03-03 21:55:49 -05:00
###Visual Studio
2016-03-01 20:58:34 -05:00
Install [Microsoft Visual Studio 2013 or later](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx), then install the latest updates.
2016-03-03 21:55:49 -05:00
###Qt
Install Qt for Windows 64-bit (VS 2013) 5.5.x (http://www.qt.io/download/).
2016-03-03 22:32:30 -05:00
Add system environment variable named `QTPATH` and point it to the location of the Qt folder. On a default install, this will be something like:
2016-03-03 21:55:49 -05:00
2016-03-03 22:32:30 -05:00
`C:\Qt\Qt5.5.1\5.5\msvc2013_64`
2016-03-03 21:55:49 -05:00
###Wix
2016-03-03 23:24:45 -05:00
2016-03-03 21:55:49 -05:00
To build the installer, you must have Wix installed. If you are unconcerned with it, you can skip this step and just dismiss the warning that shows when opening the solution later. It's recommended you ignore the installer since official builds are provided on this page.
##Obtaining source
###This project
2016-03-03 23:24:45 -05:00
2016-03-03 21:55:49 -05:00
Open up the Visual Studio x64 Native Tools Command Prompt.
2016-03-01 20:58:34 -05:00
Create a new folder in your development area named fractorium:
2016-03-01 20:58:34 -05:00
`mkdir fractorium`
`cd fractorium`
`git clone https://github.com/mfeemster/fractorium.git`
2016-03-03 21:55:49 -05:00
###Prerequisites
2016-03-03 23:24:45 -05:00
2016-03-01 20:58:34 -05:00
There are six prerequisite dependencies. Two of them must be downloaded manually:
[libjpeg](http://www.ijg.org/)
2016-03-03 21:55:49 -05:00
[tbb](https://www.threadingbuildingblocks.org/download) (Intel provides executable only releases in addition to open source releases. You must get the open source release)
2016-03-01 20:47:59 -05:00
Extract them into the folder you created such that they are arranged like so:
2016-03-01 20:47:59 -05:00
```
[fractorium]
├─libjpeg
├─tbb
```
2016-03-01 20:58:34 -05:00
Go into the fractorium folder and run this script which will get the rest of the prerequisites from git and build them:
2016-03-01 21:10:37 -05:00
`cd fractorium`
`makedeps.bat`
2016-03-01 20:58:34 -05:00
This will download and build `glm libpng libxml zlib`. You will have a folder structure like this:
```
2016-03-03 21:55:49 -05:00
[fractorium]
2016-03-01 20:47:59 -05:00
├─glm
├─libjpeg
├─libpng
├─libxml2
├─tbb
└─fractorium
2016-03-01 21:10:37 -05:00
2016-03-01 20:58:34 -05:00
├─Deps
├─libjpeg.lib
├─libpng.lib
├─libxml2.lib
├─libxml2.dll
├─tbb.dll
├─tbb.lib
├─zlib.lib
```
2016-03-03 21:55:49 -05:00
##Building with Qt Creator or Visual Studio
2016-03-03 23:24:45 -05:00
###Begin build with Qt Creator
Open the Qt Project `fractorium/main.pro` using Qt Creator with the default config of *Desktop Qt [version] MSVC2013 64bit*.
2016-03-09 22:55:24 -05:00
Make sure *Shadow build* in *Edit build configuration* for both *Debug* and *Release* is unchecked.
2016-03-03 23:24:45 -05:00
Switch to the *Release* configuration.
Under *Build Steps*, add an additional argument of `install` to the `make` command to force all dependencies to be copied to the output folder. The final make command should look like:
2016-03-09 22:55:24 -05:00
`jom.exe install in /path/to/fractorium`
2016-03-03 23:24:45 -05:00
Ensure all projects are in the *Release* configuration and build main.pro.
2016-03-01 21:24:21 -05:00
The outputs will be placed in `fractorium/Bin/release` several minutes later if no error occurs.
2016-03-03 23:24:45 -05:00
###Begin build with Visual Studio
2016-03-03 21:55:49 -05:00
####Visual Studio Qt Addon
Install the [Visual Studio Qt Addon](http://www.qt.io/download/).
2016-03-03 22:00:18 -05:00
Run Visual Studio and verify there is a menu item named *Qt5*. Click on it and click *Qt Options*.
2016-03-03 21:55:49 -05:00
2016-03-03 22:32:30 -05:00
Add a new Qt version to the list with the exact name of "Qt 5.5", and set its path to the same as `$QTPATH`, which will be something like:
2016-03-03 21:55:49 -05:00
`C:\Qt\Qt5.5.1\5.5\msvc2013_64`
The name "Qt 5.5" must match exactly and this step must be completed before the Fractorium solution is opened. If not, the Qt add-in will completely ruin all solution and project files that use Qt.
2016-03-03 22:00:18 -05:00
Set the default version to the newly created Qt version and click *Ok*.
2016-03-03 21:55:49 -05:00
2016-03-01 21:00:02 -05:00
Open the file Fractorium.sln under Builds/MSVC/2013
Set the configuration to release, and build all.
2016-03-03 21:55:49 -05:00
###Outputs
2016-03-03 22:45:27 -05:00
The outputs will be the same whether Visual Studio or Qt Creator was used, however their locations will be different.
Qt Creator will place its outputs in:
`fractorium/Bin/Release`
and Visual Studio will place its outputs in:
2016-03-01 21:00:02 -05:00
2016-03-01 21:24:21 -05:00
`fractorium/Bin/x64/Release`
2016-03-01 21:00:02 -05:00
2016-03-03 23:24:45 -05:00
The output contents will be:
2016-03-01 21:00:02 -05:00
```
2016-03-03 21:55:49 -05:00
dark.qss
2016-03-09 22:58:00 -05:00
ember.dll
ember.exp
ember.lib
emberanimate.exe
2016-03-09 22:58:41 -05:00
embercl.dll
embercl.exp
embercl.lib
embergenome.exe
emberrender.exe
2016-03-03 21:55:49 -05:00
flam3-palettes.xml
fractorium.exe
2016-03-03 21:55:49 -05:00
libxml2.dll
2016-03-03 22:43:31 -05:00
Qt5Core.dll
Qt5Gui.dll
Qt5Widgets.dll
2016-03-03 21:55:49 -05:00
tbb.dll
2016-03-03 22:43:31 -05:00
platforms\qwindows.dll
```
2016-03-01 21:24:21 -05:00
Double click fractorium.exe to run it, and use the command line to run the others.
2016-03-01 20:47:59 -05:00
To run on a computer without Visual Studio 2013, these files also need to be in the folder:
```
MSVC2013\VC\redist\x64\Microsoft.VC120.CRT\msvcp120.dll
MSVC2013\VC\redist\x64\Microsoft.VC120.CRT\msvcr120.dll
MSVC2013\VC\redist\x64\Microsoft.VC120.CRT\vccorlib120.dll
```
2016-03-03 21:55:49 -05:00
or you can install [Visual C++ Redistributable Packages for Visual Studio 2013 (64 bit)](https://www.microsoft.com/en-us/download/details.aspx?id=40784)
2016-03-01 21:10:37 -05:00
##Final file structure for distribution
```
[YOUR FOLDER]
2016-03-03 21:55:49 -05:00
├─ dark.qss
2016-03-09 22:58:00 -05:00
├─ ember.dll
2016-03-03 21:55:49 -05:00
├─ emberanimate.exe
2016-03-09 22:58:41 -05:00
├─ embercl.dll
2016-03-03 21:55:49 -05:00
├─ embergenome.exe
├─ emberrender.exe
├─ flam3-palettes.xml
├─ fractorium.exe
├─ libxml2.dll
├─ Qt5Core.dll
├─ Qt5Gui.dll
├─ Qt5Widgets.dll
├─ tbb.dll
├─ vccorlib120.dll (optional)
├─ msvcp120.dll (optional)
├─ msvcr120.dll (optional)
└─platforms
2016-03-03 21:55:49 -05:00
├─qwindows.dll
```