From 4cffd47f4746816081fd4713c44965691ccbf0b2 Mon Sep 17 00:00:00 2001 From: Matt Feemster Date: Tue, 1 Mar 2016 17:47:59 -0800 Subject: [PATCH] Update BuildGuideQtCreator.md --- Data/BuildGuideQtCreator.md | 190 ++++++++++-------------------------- 1 file changed, 52 insertions(+), 138 deletions(-) diff --git a/Data/BuildGuideQtCreator.md b/Data/BuildGuideQtCreator.md index d7cec8e..c230aea 100644 --- a/Data/BuildGuideQtCreator.md +++ b/Data/BuildGuideQtCreator.md @@ -1,162 +1,75 @@ #Building Guide for Fractorium Using MSVC2013 and Qt Creator (64 bit) ##Requirements -You need to have MSVC2013 compiler and Qt for Windows 64-bit (VS 2013) like Qt 5.5.1 (http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-windows-x86-msvc2013_64-5.5.1.exe) +Install git. + +Install Microsoft Visual Studio 2013 or later, then install the latest updates. + +Install Qt for Windows 64-bit (VS 2013) 5.4 or later (http://www.qt.io/download/). + +##Get this project +Open up the Visual Studio x64 Native Tools Command Prompt + +Create a folder named fractorium: + +`mkdir fractorium +`cd fractorium +`git clone https://github.com/mfeemster/fractorium.git ##Prerequisites -Download Prerequisites ( /glm /libjpeg /libpng /libxml2 /tbb /zlib ) according to [mfeemster's wiki](https://github.com/mfeemster/fractorium/wiki/Building). -Extract them in the parallel folder of `fractorium` named `External` -You can refer to the [folder structure](#folder-structure) below -Open your `Visual Studio Tools Command Prompt (amd64 2013)` and do the followings in folders below: +There are six prerequisite dependencies. Two of them must be downloaded manually, and the rest can be cloned from git. -######\External\libjpeg (jpegsr9a.zip) -- run in prompt +[libjpeg](http://www.ijg.org/) +[tbb](https://www.threadingbuildingblocks.org/download) + +Extract them into the folder you created such that they are arranged like so: + +``` +[fractorium] +│ +├─libjpeg +├─tbb +``` + +Go into the fractorium folder and run this script which will get the rest of the prerequisites and build them: + +`cd fractorium +`makedeps.bat + +Now you should already have these files in the folder: ``` - SET Include=%Include%;"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include" - ``` - - (to include WIN32.mak) - (I use `SET Include=%Include%;"B:\MSVC2013\Windows Kits\v7.1A\Include"`) - - ``` - nmake /f makefile.vc setup-v10 - nmake nodebug=1 /f makefile.vc clean all - ``` - - copy `libjpeg.lib` in `External\libjpeg` to `External\libs` - - -###### \External\zlib (zlib128.zip) -- run in prompt - - ``` - nmake -f win32/Makefile.msc clean all - ``` - - copy `zlib.lib` in `External\zlib` to `External\libs` - -###### \External\libxml2 (libxml2-2.9.3.zip) -- cd to `External\libxml2\win32` - - ``` - cscript configure.js compiler=msvc iconv=no zlib=yes include=..\..\zlib lib=..\..\zlib - nmake /f Makefile.msvc clean all - ``` - - copy `libxml2.lib` in `External\libxml2\win32\bin.msvc` to `External\libs` - -###### \External\libpng (lpng1620.zip) -- First, copy `zlib.lib` `zlib.h` and `zconf.h` to `External\libpng\zlib` (create this folder if no exsiting) - - ``` - nmake -f scripts\makefile.vcwin32 clean all - ``` - - copy `libpng.lib` in `External\libpng` to `External\libs` - -###### \External\glm (glm-0.9.6.3.zip) -- noting to do, make sure you extract it correctly. - -###### \External\tbb (tbb44_20151115oss_win_0.zip) -- copy `External\tbb\lib\intel64\vc12\tbb_debug.lib` and `External\tbb\lib\intel64\vc12\tbb.lib` to `External\libs` - -##Collect libs and includes -###### \External\libs -- copy `GlU32.Lib` `WS2_32.Lib` `OpenGL32.Lib` under `MSVC2013\Windows Kits\8.1\Lib\winv6.3\um\x64` - to this folder (`\External\libs`) - install CUDA toolkit and copy `CUDA\v7.5\lib\x64\OpenCL.lib` to this folder (`\External\libs`) - -- Now you should already have these files in the folder: - - ``` - GlU32.Lib libjpeg.lib libpng.lib libxml2.lib - OpenCL.lib - OpenGL32.Lib + libxml2.dll + tbb.dll tbb.lib - tbb_debug.lib - WS2_32.Lib zlib.lib ``` - -###### \fractorium\Builds\lib -- copy anything(they are `*.h`) under `CUDA\v7.5\include\CL` - to this folder `\fractorium\Builds\include\vendor\CL` (overwrite) - **All Done!** -You shuold have folder structure like this: +You shuold have a folder structure like this: ``` [YOUR ROOT FOLDER] │ -├─External -│ ├─glm -│ │ ├─glm -│ │ ... -│ ├─libjpeg -│ ├─libpng -│ │ ├─scripts -│ │ ├─zlib -│ │ ... -│ ├─libs -│ │ GlU32.Lib -│ │ libjpeg.lib -│ │ libpng.lib -│ │ libxml2.lib -│ │ OpenCL.lib -│ │ OpenGL32.Lib -│ │ tbb.lib -│ │ tbb_debug.lib -│ │ WS2_32.Lib -│ │ zlib.lib -│ │ -│ ├─libxml2 -│ │ ├─include -│ │ │ └─libxml -│ │ ... -│ ├─tbb -│ │ ├─include -│ │ │ ├─serial -│ │ │ │ └─tbb -│ │ │ └─tbb -│ │ │ ├─compat -│ │ │ ├─internal -│ │ │ └─machine -│ │ ├─lib -│ │ │ ├─ia32 -│ │ │ │ -│ │ │ └─intel64 -│ │ │ ├─vc10 -│ │ │ ├─vc12 -│ │ ... ... -│ └─zlib -│ ├─win32 -│ ... +├─glm +├─libjpeg +├─libpng +├─libxml2 +├─tbb └─fractorium - ├─archive - ├─Builds - │ ├─lib - │ ├─QtCreator - │ ... - ├─Data - │ - ├─debian - │ - └─Source ``` ##Begin to build Open Qt Project `fractorium/main.pro` using Qt Creator with config like *Desktop Qt 5.5.1 MSVC2013 OpenGL 64bit* -**DO TURN OFF** "shadow build option" in "Edit build configuration" for both `Debug` and `Release` +Select "shadow build" in "Edit build configuration" for both `Debug` and `Release` -Switch to `Release` configuration and Build! +Switch to `Release` configuration for all projects and Build. -You can find outputs `under fractorium\Bin\release` several minutes later if no error occurs. +You can find outputs under `fractorium\Bin\release` several minutes later if no error occurs. ``` Ember.dll @@ -171,20 +84,21 @@ emberrender.exe fractorium.exe ``` -To run it, put exes and dlls above and these files together in one folder +To run it, just double click any of the .exe files. + +To run it on a machine which does not have Qt installed, put the .exe and .dll files above along with these files together in one folder ``` -Qt5.5.1\5.5\msvc2013_64\bin\Qt5OpenGL.dll -Qt5.5.1\5.5\msvc2013_64\bin\Qt5Widgets.dll Qt5.5.1\5.5\msvc2013_64\bin\Qt5Core.dll Qt5.5.1\5.5\msvc2013_64\bin\Qt5Gui.dll +Qt5.5.1\5.5\msvc2013_64\bin\Qt5Widgets.dll Qt5.5.1\5.5\msvc2013_64\plugins\platforms\qwindows.dll (put in folder "platforms") -External\libxml2\win32\bin.msvc\libxml2.dll -External\tbb\bin\intel64\vc12\tbb.dll +Deps\libxml2.dll +Deps\tbb.dll fractorium\Data\dark.qss fractorium\Data\flam3-palettes.xml ``` -To run on another computer, maybe these files are needed to be shipped with: +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 @@ -194,7 +108,7 @@ MSVC2013\VC\redist\x64\Microsoft.VC120.CRT\vccorlib120.dll or you can install *Visual C++ Redistributable Packages for Visual Studio 2013 (64 bit)* -####Output file structure +####Final file structure ``` [YOUR FOLDER]