r19973 by jghali - #11316: Update to Windows Build info

scribus-commit scribus-commit at lists.scribus.net
Mon Apr 6 20:31:34 UTC 2015


Author: jghali
Date: Mon Apr  6 20:31:33 2015
New Revision: 19973

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19973
Log:
#11316: Update to Windows Build info

Modified:
    trunk/Scribus/BUILDING_win32_msvc.txt

Modified: trunk/Scribus/BUILDING_win32_msvc.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19973&path=/trunk/Scribus/BUILDING_win32_msvc.txt
==============================================================================
--- trunk/Scribus/BUILDING_win32_msvc.txt (original)
+++ trunk/Scribus/BUILDING_win32_msvc.txt Mon Apr  6 20:31:33 2015
@@ -1,55 +1,116 @@
 BUILDING SCRIBUS ON MICROSOFT WINDOWS WITH MICROSOFT VISUAL STUDIO
 ==================================================================
 
-HOW TO DO THE BUILD
-===================
-
-This documentation is minimal and assume you have a decent knowledge of
+This documentation is minimal and assume you have a decent knowledge of 
 Microsoft Visual Studio. No help regarding use of Visual Studio and
 related tools will be provided.
 
 You will need:
-	- Microsoft Windows XP, Vista, 7 or 8
-	- Microsoft Visual Studio 2010 or superior (including Express editions)
-	- A recent Qt release built with matching Visual Studio version (version >= 5.0)
-	- Cairo sources from cairographics.org (version >= 1.11.4)
-	- Pixman sources from cairographics.org (version >= 0.24.4)
-	- Boost from www.boost.org (version >= 1.35.0)
-	- Freetype sources from freetype.org (version >= 2.4.0)
-	- Libhunspell sources from http://hunspell.sourceforge.net/ (version >= 1.3.2)
-	- Libjpeg win32 libs and binaries from the GnuWin32 project
-	- Libtiff win32 libs and binaries from the GnuWin32 project
-	- Libxml2 win32 binaries from the Libxml project
-	- LittleCMS sources from www.littlecms.com (version >= 2.1)
-	- PoDoFo sources from podofo.sourceforge.net (version >= 0.8.0)
-	- Poppler sources from poppler.freedesktop.org (version >= 0.19.0)
-	- Poppler data from poppler.freedesktop.org (version >= 0.4.5)
-	- A Python 2.7 Windows binary build.
-      For debug builds, you'll need a release that contains the python27_d.dll .
+	- Microsoft Vista, 7 or a more recent version
+	- Microsoft Visual Studio 2012 or later (for 32/64bit build)
+	- A recent Qt release built with corresponding Visual Studio version (minimum 5.2, recommended >= 5.3.2)
+	- Scribus common libraries kit downloaded from http://sourceforge.net/projects/scribus/files/scribus-libs/
+	- Scribus 15x libraries kit downloaded from http://sourceforge.net/projects/scribus/files/scribus-libs/
+	
+It is possible to use Microsoft Visual Studio 2012 or 2013 Express editions.
 
-Some more details can be found below in the section entitled GETTING DEPENDENCIES.
+GETTING DEPENDENCIES
+====================
 
-After having installed all dependencies, open Scribus-build-props.vsprops files located
-in Scribus\win32\vc9 and update the dependency paths to match your system.
+This is a quick and dirty set of notes that will be filled out once everything's
+verified as correct and working. It assumes that you'll be building all your
+dependencies at a single root such as C:\Developer. The root *MUST NOT* have spaces
+in its path.
 
-If you have Visual Studio 2010, open the Visual Studio solution located in Scribus\win32\vc10 and start building.
-If you have Visual Studio 2012, open the Visual Studio solution located in Scribus\win32\vc11 and start building.
 
-After building completed, you will find executables in a Scribus-builds\scribus-$(Configuration)-$(Platform)-*
-directory located in same directory as Scribus sources. Those executables will not function yet.
-Scribus resources must be copied from source directory to install directory first.
+Building Qt:
+------------
 
-In order to do that, create a batch script and copy/paste following lines:
+Download the latest Qt 5 release from http://download.qt.io/official_releases/qt/ and unpack it to C:\Developer.
+
+Follow instructions in following pages to get Qt build dependencies, noticeably perl, python and ruby:
+http://doc.qt.io/qt-5/windows-requirements.html
+http://doc.qt.io/qt-5/windows-building.html
+
+Start a command line and import your Visual Studio environment:
+- for building 32bit : \path\to\visual\studio\VC\vcvarsall.bat x86
+- for building 64bit : \path\to\visual\studio\VC\vcvarsall.bat x86_amd64
+
+now cd to C:\Developer\qt-everywhere-whatever and run configure:
+	- Visuak Studio 2012 : configure -platform win32-msvc2012 -prefix /path/where/you/want/qt5/to/be/installed -nomake examples -nomake tests -opengl desktop -opensource -mp
+	- Visuak Studio 2013 : configure -platform win32-msvc2013 -prefix /path/where/you/want/qt5/to/be/installed -nomake examples -nomake tests -opengl desktop -opensource -mp 
+
+After configure has finished its work, run nmake. Depending on the number of processors available on your machine, a complete Qt build may 
+take from a few hours to several days. Once Qt has finished building, run following command to install Qt to its install directory:
+nmake install
+
+If you want to build Qt docs, you might want to run following command afterwards:
+nmake docs
+nmake install_docs
+
+Once you finished building and installing Qt, you can run following command to clean Qt source directory:
+nmake distclean
+
+Building 3rd party libraries:
+-----------------------------
+
+Archives with ready-to-build solutions for scribus dependencies have been made available on sourceforge. These archives can be used to
+compile all dependencies necessary for Scribus.
+
+Two different archives are needed :
+	- common libraries for 14x and trunk : contains boost and python, no compilation is required here
+	- Scribus 15x specific libraries : libraries used to compile current Scribus 1.5.x releases
+
+Common libraries and version specific libraries can be downloaded on Sourceforge from this directory:
+http://sourceforge.net/projects/scribus/files/scribus-libs/
+
+Common libraries are named with following scheme : scribus-commmon-libs-XXXXXX where XXXXX represents a date.
+Archives with version specific libraries are named using following scheme scribus-15x-libs-msvcXXXX-XXXXXX where :
+	- msvcXXXX represent the Visual Studio version needed to compile provided Visual Studio solution
+	- XXXXXX is a series of numbers representing a date.
+
+For building 15x dependencies,  an archive for Visual Studio 2012 is provided. The Visual Studio 2012 archive allows to build 
+libraries for 32bit and 64bit platforms using the different available toolsets. The default configuration, corresponding to the
+msvc 2012 default toolset (v110), allows to build binaries compatible with Windows Vista and up.
+
+Once you downloaded the two appropriate archives :
+	- decompress them in the *same* directory.
+	- open the visual studio solution (*.sln) located in the scribus-1.5.x-libs-* directory
+	- build debug and release configurations for all platforms (Win32 and/or x64) you plan to execute scribus on
+	
+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 
+build-all-platform-libs.bat script. For example :
+- to build with Visual Studio 2010 toolset for Win32 platform: build-all-platform-libs.bat Win32 v100
+- to build with Visual Studio 2012 XP compatible toolset for Win32 platform: build-all-platform-libs.bat Win32 v110_xp
+
+BUILDING SCRIBUS
+====================
+
+After having installed all dependencies, open Scribus-build-props.props files located in Scribus\win32\vc11 in a text editor
+Update the dependency paths to match your system.
+
+Open the Visual Studio solution located in same directoy and start building. Note: if you built dependencies with a different 
+toolset than the default one, you should either modify toolset directly in all projects or build the solution through command 
+line using msbuild.
+
+After building completed, you will find executables in a Scribus-builds\scribus-$(configuration)-$(platform)-$(platformtoolset)\
+directory, located in same directory as Scribus sources. Those executables will not function yet. Scribus resources and
+dependencies must be copied to install directory first.
+
+INSTALLING RESOURCES AND DEPENDENCIES
+=====================================
+
+To copy resources to build directory, create a batch script and copy/paste following lines :
 
 set SCRIBUS_SRC_PATH=.\Scribus
 set SCRIBUS_BUILD_ROOT=.\Scribus-builds
-set SCRIBUS_INSTALL_PATH=.\Scribus-builds\scribus-debug-win32-v100
+set SCRIBUS_INSTALL_PATH=.\Scribus-builds\scribus-debug-win32-v110
 
  copy %SCRIBUS_SRC_PATH%\AUTHORS %SCRIBUS_INSTALL_PATH%\share\doc
  copy %SCRIBUS_SRC_PATH%\COPYING %SCRIBUS_INSTALL_PATH%\share\doc
  copy %SCRIBUS_SRC_PATH%\LINKS %SCRIBUS_INSTALL_PATH%\share\doc
  copy %SCRIBUS_SRC_PATH%\TRANSLATION %SCRIBUS_INSTALL_PATH%\share\doc
-xcopy %SCRIBUS_SRC_PATH%\doc %SCRIBUS_INSTALL_PATH%\share\doc /s /y /D
+xcopy %SCRIBUS_SRC_PATH%\scribus\doc %SCRIBUS_INSTALL_PATH%\share\doc /s /y /D
 xcopy %SCRIBUS_SRC_PATH%\resources\dicts %SCRIBUS_INSTALL_PATH%\share\dicts /s /y /D
 xcopy %SCRIBUS_SRC_PATH%\resources\editorconfig %SCRIBUS_INSTALL_PATH%\share\editorconfig /s /y
 xcopy %SCRIBUS_SRC_PATH%\resources\icons %SCRIBUS_INSTALL_PATH%\share\icons /s /y /D
@@ -57,278 +118,37 @@
 xcopy %SCRIBUS_SRC_PATH%\resources\profiles %SCRIBUS_INSTALL_PATH%\share\profiles /s /y
 xcopy %SCRIBUS_SRC_PATH%\resources\swatches %SCRIBUS_INSTALL_PATH%\share\swatches /s /y
 xcopy %SCRIBUS_SRC_PATH%\resources\templates %SCRIBUS_INSTALL_PATH%\share\templates /s /y /D
+ copy %SCRIBUS_SRC_PATH%\scribus\scribus.css %SCRIBUS_INSTALL_PATH%\libs\scribus.css /y
  copy %SCRIBUS_SRC_PATH%\scribus\plugins\tools\pathcut\*.png %SCRIBUS_INSTALL_PATH%\share\icons\ /y
  copy %SCRIBUS_SRC_PATH%\scribus\plugins\tools\pathfinder\*.png %SCRIBUS_INSTALL_PATH%\share\icons\ /y
 xcopy %SCRIBUS_SRC_PATH%\scribus\plugins\scriptplugin\scripts %SCRIBUS_INSTALL_PATH%\share\scripts /s /y /D
 xcopy %SCRIBUS_SRC_PATH%\scribus\plugins\scriptplugin\samples %SCRIBUS_INSTALL_PATH%\share\samples /s /y
-copy %SCRIBUS_SRC_PATH%\scribus\plugins\import\ps\import.prolog %SCRIBUS_INSTALL_PATH%\libs\import.prolog
-copy %SCRIBUS_SRC_PATH%\scribus\plugins\barcodegenerator\barcode.ps %SCRIBUS_INSTALL_PATH%\share\plugins\barcode.ps
-copy %SCRIBUS_SRC_PATH%\scribus\unicodemap\unicodenameslist.txt %SCRIBUS_INSTALL_PATH%\share\unicodenameslist.txt
-del %SCRIBUS_BUILD_ROOT%\*CMake* /s
-del %SCRIBUS_BUILD_ROOT%\*MakeFile* /s
+copy  %SCRIBUS_SRC_PATH%\scribus\plugins\import\ps\import.prolog %SCRIBUS_INSTALL_PATH%\libs\import.prolog
+copy  %SCRIBUS_SRC_PATH%\scribus\plugins\barcodegenerator\barcode.ps %SCRIBUS_INSTALL_PATH%\share\plugins\barcode.ps
+xcopy %SCRIBUS_SRC_PATH%\scribus\ui\qml %SCRIBUS_INSTALL_PATH%\share\qml /s /y
+copy  %SCRIBUS_SRC_PATH%\scribus\unicodemap\unicodenameslist.txt %SCRIBUS_INSTALL_PATH%\share\unicodenameslist.txt
+del  %SCRIBUS_BUILD_ROOT%\*CMake* /s
+del  %SCRIBUS_BUILD_ROOT%\*MakeFile* /s
 
 Adjust SCRIBUS_SRC_PATH, SCRIBUS_BUILD_ROOT and SCRIBUS_INSTALL_PATH as needed and run batch script.
 
-Download poppler data package on poppler.freedesktop.org. Copy content of archive
-in %SCRIBUS_INSTALL_PATH%\share\poppler.
+To install common libs:
+	- open the scribus-common-libs directory where you uncompressed 15x/trunk libs
+	- open the copy-dlls-to-15x-build-dir.bat file from scribus-common-libs directory in a text editor
+	- modify the SCRIBUS_BUILDS_DIR, SCRIBUS_LIB_TOOLSET and PYTHON_DIR_* variables appropriately
+	- execute batch file
 
-Now copy the DLLs from the zlib, libpng, qt, lcms, freetype, libtiff, libjpeg,
-libxml, and podofo directories into the Scribus install directory (where
-scribus.exe is). Copy also the Dlls, lib and tcl directories from your python
-install to scribus install path. Finally copy python27.dll. Scribus should now run.
+To install version specific libs:
+	- open the scribus-15x-libs-msvc* directory where you uncompressed Scribus 15x libs
+	- open the copy-*-dlls-to-build-dir.bat file in a text editor
+	- modify the SCRIBUS_BUILDS_DIR and SCRIBUS_LIB_TOOLSET variables appropriately
+	- execute batch file
 
-Crash problems at runtime? Verify that Qt, freetype, lcms, and Scribus all use
-the same runtime, and that all were built for debugging or all for release not
-a mixture of the two. Windows does not permit you to mix debug and release
-executables like other platforms do.
+Finally copy Qt DLLs to build directory and Qt plugins directory to "qtplugins" directory.
+Scribus should now run.
+
+Crash problems at runtime? Verify that Scribus and all its dependencies use the same runtime, and that all were built 
+for debug or release configurations and not a mixture of the two. On Windows, it is strictly not recommended to mix 
+debug and release binaries. Doing so is not supported and will usually trigger unpredictable issues and crashes.
 
 You can use depends.exe to check that the runtimes match.
-
-GETTING DEPENDENCIES
-====================
-
-This is a quick and dirty set of notes that will be filled out once everything's
-verified as correct and working. It assumes that you'll be building all your
-dependencies at a single root, like C:\Developer. The root *MUST* not have spaces
-in its path.
-
-----
-Qt:
-
-Download the latest qt >= 5.0 release matching with your Visual Studio version 
-from qt-project.org and install it.
-
-----
-Boost:
-
-Download the latest boost libraries from www.boost.org. Unpack, no need to compile
-anything as Scribus only use functionnalities embedded in C++ templates.
-
-----
-Zlib and LibPNG:
-
-Zlib and LibPNG are both embedded in the QtCore library with symbols exported
-for public use . If you're using a Qt binary redist you may still need to
-download these libraries sources for their headers. In most cases your
-copy of Qt will contain a directory called  %QTDIR%\src\3rdparty\zlib
-(and one for libpng), in which case you need not worry about these libraries at
-all.
-
----
-Cairo and Pixman:
-
-Cairo and pixman sources can be downloaded from cairographics.org at following address:
-
-http://cairographics.org/releases/
-
-Follow instructions in sources packages to build pixman, then cairo.
-
-You will however probably find easier to directly download packages with Visual Studio 2008
-solutions ready to build. You can find required file at following address:
-
-https://sourceforge.net/projects/scribus/files/scribus-libs/win32-msvc2008/
-
-Download the both scribus-pixman-* and scribus-cairo-* zip files. Unpack them.
-
-Build pixman first: open the pixman-win32 solution located in pixman-whatever\win32
-directory and build Debug and Release configurations.
-
-Build cairo afterwards: open the cairo-win32 solution located in cairo-whatever\win32
-directory and build Debug and Release configurations.
-
-----
-Freetype:
-
-Unpack freetype
-
-Open include\freetype\config\ftoption.h and replace the DLL export compilation section
-by following lines:
-
-#ifndef __GNUC__
-# define __DLL_IMPORT__  __declspec(dllimport)
-# define __DLL_EXPORT__  __declspec(dllexport)
-#else
-# define __DLL_IMPORT__  __attribute__((dllimport)) extern
-# define __DLL_EXPORT__  __attribute__((dllexport)) extern
-#endif 
-
-#if (defined __WIN32__) || (defined _WIN32)
-# ifdef BUILD_FREETYPE2_DLL
-#  define FREETYPE2_DLL_IMPEXP     __DLL_EXPORT__
-# elif defined(FREETYPE2_STATIC)
-#  define FREETYPE2_DLL_IMPEXP      
-# elif defined (USE_FREETYPE2_DLL)
-#  define FREETYPE2_DLL_IMPEXP     __DLL_IMPORT__
-# elif defined (USE_FREETYPE2_STATIC)
-#  define FREETYPE2_DLL_IMPEXP      
-# else /* assume USE_FREETYPE2_DLL */
-#  define FREETYPE2_DLL_IMPEXP     __DLL_IMPORT__
-# endif
-#else /* __WIN32__ */
-# define FREETYPE2_DLL_IMPEXP  
-#endif
-
-#define FT_EXPORT(x)	FREETYPE2_DLL_IMPEXP x
-#define FT_BASE(x)		FREETYPE2_DLL_IMPEXP x
-
-Open builds\win32\vc2008
-Build "Release Multithreaded" and "Debug Multithreaded"
-
-At the end of the process you must have those files in your freetype lib
-directory:
-- freetype.dll
-- freetype.lib
-- freetypeD.dll
-- freetypeD.lib
-
-----
-Libhunspell:
-
-You will probably find easier to directly download packages with Visual
-Studio 2008 solutions ready to build. You can find required file at
-following address:
-
-https://sourceforge.net/projects/scribus/files/scribus-libs/win32-msvc2008/
-
-Download the scribus-hunspell-*.zip archive. Unpack it.
-
-Open the visual studio solution located in hunspell-whatever/src/win-api directory and build
-Debug and Release configurations of Libhunspell project.
-
-----
-Libjpeg:
-
-While Qt also bundles libjpeg, it's not linked to the main DLL but rather a plugin.
-As such, we need to link to it directly.
-
-Get jpeg libraries from GnuWin32 project on Sourceforge:
-
-http://sourceforge.net/projects/gnuwin32/files/jpeg/6b-3/jpeg-6b-3-lib.zip/download
-
-Unpack in C:\Developer. After unpacking you directory layout must be as following:
-
-C:\Developer
-	|- libjpeg-6b-3
-		|- include
-		|- lib
-		|- manifest
-
-----
-LittleCMS:
-
-Get lcms sources (>= 2.1). Although it is possible to build Scribus with lcms 1,
-you can only do so without modifying lcms sources with lcms >= 2.1.
-We will only describe here instructions related to lcms >= 2.1.
-
-Build using VC project in Projects\VC2008 dir. Modify projects if necessary so
-as to make them use the multithreaded dll runtim libraries.
-Build the static libraries in debug and release configurations.
-
-After building you must have a lcms2_static.lib and lcms2_staticd.lib in
-your lcms source directory. If this is not the case modify projects as necessary.
-
-----
-Libtiff:
-
-While Qt also bundles libtiff, it's not linked to the main DLL but rather a plugin.
-As such, we need to link to it directly.
-
-Download libtiff libraries, binaries and dependency packages from GnuWin32 project
-on sourceforge:
-
-http://sourceforge.net/projects/gnuwin32/files/tiff/3.8.2/
-
-Unpack them in C:\Developer. After unpacking you directory layout must be as following:
-
-C:\Developer
-	|- libtiff-3.8.2
-	    |- bin
-		|- contrib
-		|- include
-		|- lib
-		|- man
-		|- manifest
-
-----
-Libxml2 / iconv:
-
-Download libxml2 and icon win32 binaries from following address:
-
-ftp://ftp.zlatkovic.com/libxml/
-
-Note that these binaries do not use the same runtime
-as the rest of the binaries we're building. Feel free to
-rebuild libxml to fix this, but in practice it doesn't
-matter since we never pass a FILE* nor do we allocate memory
-to be deallocated in libxml or vice versa.
-
-Remember that iconv from the same package must be on the
-header search path too. If in doubt, just drop iconv.h
-into the libxml tree.
-
----
-Podofo:
-
-Podofo sources can be downloaded from podofo.sourceforge.net. At the moment
-those instructions are written, the recommended version to build Scribus on
-Windows is one of the 0.8.x series.
-
-Follow instructions in sources packages to build Podofo.
-
-You will however probably find easier to directly download packages with a
-Visual Studio 2008 solution ready to build. You can find required file at
-following address:
-
-https://sourceforge.net/projects/scribus/files/scribus-libs/win32-msvc2008/
-
-Download the scribus-podofo-*.zip archive. Unpack it.
-
-If present, open the PoDoFoLib-build.vsprops file located in podofo-whatever
-directory and set all build variables according to your system. Then open the
-podofo solution located in same directory and build Debug and Release configurations
-of PoDoFoLib project.
-
-Note: freetype, libtiff and libjpeg must have been installed and if
-necessary compiled before attempting to build podofo.
-
----
-Poppler:
-
-Poppler sources can be downloaded http://poppler.freedesktop.org. At the moment
-those instruction are written, the only version known to work with scribus is 0.17.1.
-
-As Poppler is a bit tricky to build on Windows, you will however probably find easier
-to directly download a ready to build package for Visual Studio 2008. You can find
-required file at following address:
-
-https://sourceforge.net/projects/scribus/files/scribus-libs/win32-msvc2008/
-
-Download the scribus-poppler-*.zip archive. Unpack it.
-
-Open the poppler-build.vsprops file located in poppler-whatever\win32 directory and set
-all build variables according to your system. Then open the poppler.sln solution and
-buid Debug-static and Release-static configurations.
-
-Note: freetype, libtiff and libjpeg must have been installed and if
-necessary compiled before attempting to build poppler.
-
----
-Python: 
-
-Download latest Python 2.7 binaries (and only 2.7, 3.x will not work).
-Unpack or install.
-Copy the python27.lib file in python 'libs' directory to python27_d.lib
-
-Open pyconfig.h in python include directory
-
-Replace those lines:
-
-#ifdef _DEBUG
-#	define Py_DEBUG
-#endif
-
-by:
-
-#ifdef _DEBUG
-#	//define Py_DEBUG
-#endif




More information about the scribus-commit mailing list