Subversion Repositories Scribus

Rev

Rev 25065 | 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:
24972 jghali 9
- Microsoft Windows 10 build 1809 or a more recent version
10
- Microsoft Visual Studio 2019 or later (for 32/64bit build)
24937 craig 11
- A recent Qt release built with corresponding Visual Studio version (minimum 6.2, recommended >= 6.2.3)
23582 jghali 12
- Scribus common libraries kit downloaded from https://sourceforge.net/projects/scribus/files/scribus-libs/
24972 jghali 13
- Scribus 17x 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:
23882 jghali 16
- Microsoft Visual Studio 2019 Community and Professional
24972 jghali 17
- Microsoft Visual Studio 2022 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
 
19973 jghali 35
Building 3rd party libraries:
36
-----------------------------
16720 jghali 37
 
20188 jghali 38
Archives with ready-to-build solutions for scribus dependencies have been made available on Sourceforge:
23582 jghali 39
https://sourceforge.net/projects/scribus/files/scribus-libs/
16720 jghali 40
 
25066 jghali 41
Archives for Visual Studio 2019 and 2022 are provided. These archives can be used to compile  all dependencies
42
necessary for Scribus. These archives allows to build libraries for 32bit and 64bit platforms using default toolsets.
43
The default configuration  allows to build binaries compatible with Windows Vista and up.
23582 jghali 44
 
19973 jghali 45
Two different archives are needed :
20188 jghali 46
- scribus-commmon-libs-YYYYMMDD.7z : common libraries for 14x and trunk, no compilation is required here
25066 jghali 47
- scribus-17x-libs-msvcXXXX-YYYYMMDD.7z : Scribus 17x specific libraries used for current Scribus 1.7.x releases
16720 jghali 48
 
25066 jghali 49
These archives are named using a scheme where:
50
- msvcXXXX represents the Visual Studio version needed to compile provided Visual Studio solution
51
- YYYYMMDD represents the date where the archive has been prepared/uploaded to Sourceforge.
16720 jghali 52
 
19973 jghali 53
Once you downloaded the two appropriate archives :
20188 jghali 54
- decompress them in the *same* directory so as to get a layout similar to this one :
23582 jghali 55
    - your_scribus_libs_directory
25066 jghali 56
       |- scribus-1.7.x-libs-msvc2019
20188 jghali 57
       |- scribus-common-libs
24972 jghali 58
- open the visual studio solution (*.sln) located in the scribus-1.7.x-libs-* directory
20188 jghali 59
- build debug and release configurations for all platforms (Win32 and/or x64) you plan to execute scribus on
60
 
24972 jghali 61
You can also use msbuild through the command line. To do so you can use the provided build-libs.bat script.
62
Execute the script and a menu will allow you to choose amongst the different supported Microsoft Visual Studio
63
versions and platforms.
17505 jghali 64
 
19973 jghali 65
BUILDING SCRIBUS
66
====================
17505 jghali 67
 
24972 jghali 68
After having compiled all dependencies, open the Scribus-build-props.props file located in Scribus\win32\msvc2019,
69
or Scribus\win32\msvc2022 depending on the Visual Studio version you are using in a text editor. Update the dependency paths
70
to match your system.
17505 jghali 71
 
24665 jghali 72
Open the Visual Studio solution located in same directory and start building. Note: if you built dependencies with a different
19973 jghali 73
toolset than the default one, you should either modify toolset directly in all projects or build the solution through command
74
line using msbuild.
17505 jghali 75
 
19973 jghali 76
After building completed, you will find executables in a Scribus-builds\scribus-$(configuration)-$(platform)-$(platformtoolset)\
23582 jghali 77
directory, located in same directory as Scribus sources. Those executables will not function yet. Scribus dependencies must be
78
copied to install directory first.
17505 jghali 79
 
19973 jghali 80
INSTALLING RESOURCES AND DEPENDENCIES
81
=====================================
17505 jghali 82
 
23582 jghali 83
The provided Visual Studio solutions are configured in such a way that resources provided by Scribus source code will be copied
84
to appropriate directories during the build process. Before being able to run Scribus, you will have however to copy dependency
85
dlls to build directories.
17505 jghali 86
 
19973 jghali 87
To install common libs:
23582 jghali 88
- open the scribus-common-libs directory where you uncompressed common libraries
24972 jghali 89
- open the copy-dlls-to-17x-build-dir.bat file from scribus-common-libs directory in a text editor
23582 jghali 90
- modify the SCRIBUS_BUILDS_DIR, SCRIBUS_LIB_TOOLSET variables appropriately
20188 jghali 91
- execute batch file
17505 jghali 92
 
19973 jghali 93
To install version specific libs:
24972 jghali 94
- open the scribus-17x-libs-msvc* directory where you uncompressed Scribus 17x libs
23582 jghali 95
- open the copy-dlls-to-build-dir file in a text editor
20188 jghali 96
- modify the SCRIBUS_BUILDS_DIR and SCRIBUS_LIB_TOOLSET variables appropriately
97
- execute batch file
17505 jghali 98
 
19973 jghali 99
Finally copy Qt DLLs to build directory and Qt plugins directory to "qtplugins" directory.
100
Scribus should now run.
17505 jghali 101
 
19973 jghali 102
Crash problems at runtime? Verify that Scribus and all its dependencies use the same runtime, and that all were built
103
for debug or release configurations and not a mixture of the two. On Windows, it is strictly not recommended to mix
104
debug and release binaries. Doing so is not supported and will usually trigger unpredictable issues and crashes.
16720 jghali 105
 
19973 jghali 106
You can use depends.exe to check that the runtimes match.