Rev 23566 | Rev 23882 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
16720 | jghali | 1 | BUILDING SCRIBUS ON MICROSOFT WINDOWS WITH MICROSOFT VISUAL STUDIO |
2 | ================================================================== |
||
3 | |||
19973 | jghali | 4 | This documentation is minimal and assume you have a decent knowledge of |
16720 | jghali | 5 | Microsoft Visual Studio. No help regarding use of Visual Studio and |
6 | related tools will be provided. |
||
7 | |||
8 | You will need: |
||
20188 | jghali | 9 | - Microsoft Vista, 7 or a more recent version |
23582 | jghali | 10 | - Microsoft Visual Studio 2015 or later (for 32/64bit build) |
23566 | jghali | 11 | - A recent Qt release built with corresponding Visual Studio version (minimum 5.11, recommended >= 5.12.0) |
23582 | jghali | 12 | - Scribus common libraries kit downloaded from https://sourceforge.net/projects/scribus/files/scribus-libs/ |
13 | - Scribus 15x libraries kit downloaded from https://sourceforge.net/projects/scribus/files/scribus-libs/ |
||
20188 | jghali | 14 | |
23582 | jghali | 15 | Provided solutions have been tested with following Microsoft Visual Studion editions: |
16 | - Microsoft Visual Studio 2015 Express and Professional |
||
17 | - Microsoft Visual Studio 2017 Express, Community and Professional |
||
16720 | jghali | 18 | |
19 | GETTING DEPENDENCIES |
||
20 | ==================== |
||
21 | |||
22 | This is a quick and dirty set of notes that will be filled out once everything's |
||
19104 | jghali | 23 | verified as correct and working. It assumes that you'll be building all your |
19973 | jghali | 24 | dependencies at a single root such as C:\Developer. The root *MUST NOT* have spaces |
16720 | jghali | 25 | in its path. |
26 | |||
27 | |||
19973 | jghali | 28 | Building Qt: |
29 | ------------ |
||
16720 | jghali | 30 | |
23582 | jghali | 31 | Due to the complexity involved in compiling Qt, it is suggested to download precompiled binaries. To do so, |
32 | get Qt Online installer at https://www.qt.io/download-qt-installer, execute installer and follow instructions. |
||
16720 | jghali | 33 | |
23582 | jghali | 34 | If you want to compile Qt yourself, you will find some basic instructions below. |
35 | |||
36 | Download the latest Qt 5 release from https://download.qt.io/official_releases/qt/ and unpack it to C:\Developer. |
||
37 | |||
19973 | jghali | 38 | Follow instructions in following pages to get Qt build dependencies, noticeably perl, python and ruby: |
23582 | jghali | 39 | https://doc.qt.io/qt-5/windows-requirements.html |
40 | https://doc.qt.io/qt-5/windows-building.html |
||
16720 | jghali | 41 | |
19973 | jghali | 42 | Start a command line and import your Visual Studio environment: |
23582 | jghali | 43 | - for building 32bit on Visual Studio 2015: \path\to\visual\studio\VC\vcvarsall.bat x86 |
44 | - for building 64bit on Visual Studio 2015: \path\to\visual\studio\VC\vcvarsall.bat x86_amd64 |
||
45 | - for building 32bit on Visual Studio 2017: \path\to\visual\studio\VC\Auxiliary\Build\vcvarsall.bat x86 |
||
46 | - for building 64bit on Visual Studio 2017: \path\to\visual\studio\VC\Auxiliary\Build\vcvarsall.bat x86_amd64 |
||
16720 | jghali | 47 | |
20188 | jghali | 48 | Now cd to C:\Developer\qt-everywhere-whatever and run configure: |
23582 | jghali | 49 | configure -platform win32-msvc -prefix /path/where/you/want/qt5/to/be/installed -nomake examples -nomake tests -opengl dynamic -opensource -mp |
16720 | jghali | 50 | |
19973 | jghali | 51 | After configure has finished its work, run nmake. Depending on the number of processors available on your machine, a complete Qt build may |
52 | take from a few hours to several days. Once Qt has finished building, run following command to install Qt to its install directory: |
||
53 | nmake install |
||
16720 | jghali | 54 | |
19973 | jghali | 55 | If you want to build Qt docs, you might want to run following command afterwards: |
56 | nmake docs |
||
57 | nmake install_docs |
||
16720 | jghali | 58 | |
19973 | jghali | 59 | Once you finished building and installing Qt, you can run following command to clean Qt source directory: |
60 | nmake distclean |
||
16720 | jghali | 61 | |
19973 | jghali | 62 | Building 3rd party libraries: |
63 | ----------------------------- |
||
16720 | jghali | 64 | |
20188 | jghali | 65 | Archives with ready-to-build solutions for scribus dependencies have been made available on Sourceforge: |
23582 | jghali | 66 | https://sourceforge.net/projects/scribus/files/scribus-libs/ |
16720 | jghali | 67 | |
23582 | jghali | 68 | Archives for Visual Studio 2015 and Visual Studio 2017 are provided. These archives can be used to compile all dependencies |
69 | necessary for Scribus. These archives allows to build libraries for 32bit and 64bit platforms using default toolsets. |
||
70 | The default configuration allows to build binaries compatible with Windows Vista and up. |
||
71 | |||
19973 | jghali | 72 | Two different archives are needed : |
20188 | jghali | 73 | - scribus-commmon-libs-YYYYMMDD.7z : common libraries for 14x and trunk, no compilation is required here |
74 | - scribus-15x-libs-msvcXXXX-YYYYMMDD.7z : Scribus 15x specific libraries used for current Scribus 1.5.x releases |
||
16720 | jghali | 75 | |
20188 | jghali | 76 | These archives are named using a scheme where: |
77 | - msvcXXXX represents the Visual Studio version needed to compile provided Visual Studio solution |
||
78 | - YYYYMMDD represents the date where the archive has been prepared/uploaded to Sourceforge. |
||
16720 | jghali | 79 | |
19973 | jghali | 80 | Once you downloaded the two appropriate archives : |
20188 | jghali | 81 | - decompress them in the *same* directory so as to get a layout similar to this one : |
23582 | jghali | 82 | - your_scribus_libs_directory |
22152 | jghali | 83 | |- scribus-1.5.x-libs-msvc2015 |
20188 | jghali | 84 | |- scribus-common-libs |
85 | - open the visual studio solution (*.sln) located in the scribus-1.5.x-libs-* directory |
||
86 | - build debug and release configurations for all platforms (Win32 and/or x64) you plan to execute scribus on |
||
87 | |||
19973 | jghali | 88 | If you want to build using a different toolset, you can use msbuild through the command line. To do so you can use the provided |
89 | build-all-platform-libs.bat script. For example : |
||
23582 | jghali | 90 | - to build with Visual Studio 2015 default toolset for x64 platform: build-all-platform-libs.bat x64 v140 |
91 | - to build with Visual Studio 2015 default toolset for Win32 platform: build-all-platform-libs.bat Win32 v140 |
||
92 | - to build with Visual Studio 2017 default toolset for x64 platform: build-all-platform-libs.bat x64 v141 |
||
93 | - to build with Visual Studio 2017 default toolset for Win32 platform: build-all-platform-libs.bat Win32 v141 |
||
17505 | jghali | 94 | |
19973 | jghali | 95 | BUILDING SCRIBUS |
96 | ==================== |
||
17505 | jghali | 97 | |
23582 | jghali | 98 | After having compiled all dependencies, open the Scribus-build-props.props file located in Scribus\win32\msvc2015 or |
99 | Scribus\win32\msvc2017 depending on the Visual Studio version you are using in a text editor. |
||
19973 | jghali | 100 | Update the dependency paths to match your system. |
17505 | jghali | 101 | |
19973 | jghali | 102 | Open the Visual Studio solution located in same directoy and start building. Note: if you built dependencies with a different |
103 | toolset than the default one, you should either modify toolset directly in all projects or build the solution through command |
||
104 | line using msbuild. |
||
17505 | jghali | 105 | |
19973 | jghali | 106 | After building completed, you will find executables in a Scribus-builds\scribus-$(configuration)-$(platform)-$(platformtoolset)\ |
23582 | jghali | 107 | directory, located in same directory as Scribus sources. Those executables will not function yet. Scribus dependencies must be |
108 | copied to install directory first. |
||
17505 | jghali | 109 | |
19973 | jghali | 110 | INSTALLING RESOURCES AND DEPENDENCIES |
111 | ===================================== |
||
17505 | jghali | 112 | |
23582 | jghali | 113 | The provided Visual Studio solutions are configured in such a way that resources provided by Scribus source code will be copied |
114 | to appropriate directories during the build process. Before being able to run Scribus, you will have however to copy dependency |
||
115 | dlls to build directories. |
||
17505 | jghali | 116 | |
19973 | jghali | 117 | To install common libs: |
23582 | jghali | 118 | - open the scribus-common-libs directory where you uncompressed common libraries |
20188 | jghali | 119 | - open the copy-dlls-to-15x-build-dir.bat file from scribus-common-libs directory in a text editor |
23582 | jghali | 120 | - modify the SCRIBUS_BUILDS_DIR, SCRIBUS_LIB_TOOLSET variables appropriately |
20188 | jghali | 121 | - execute batch file |
17505 | jghali | 122 | |
19973 | jghali | 123 | To install version specific libs: |
20188 | jghali | 124 | - open the scribus-15x-libs-msvc* directory where you uncompressed Scribus 15x libs |
23582 | jghali | 125 | - open the copy-dlls-to-build-dir file in a text editor |
20188 | jghali | 126 | - modify the SCRIBUS_BUILDS_DIR and SCRIBUS_LIB_TOOLSET variables appropriately |
127 | - execute batch file |
||
17505 | jghali | 128 | |
19973 | jghali | 129 | Finally copy Qt DLLs to build directory and Qt plugins directory to "qtplugins" directory. |
130 | Scribus should now run. |
||
17505 | jghali | 131 | |
19973 | jghali | 132 | Crash problems at runtime? Verify that Scribus and all its dependencies use the same runtime, and that all were built |
133 | for debug or release configurations and not a mixture of the two. On Windows, it is strictly not recommended to mix |
||
134 | debug and release binaries. Doing so is not supported and will usually trigger unpredictable issues and crashes. |
||
16720 | jghali | 135 | |
19973 | jghali | 136 | You can use depends.exe to check that the runtimes match. |