Difference between revisions of "Compiling Inkscape on Windows 64-bit"

From Inkscape Wiki
Jump to navigation Jump to search
(Update for latest devlibs64)
Line 3: Line 3:
----
----


This is a work in progress. Please spend a few minutes improving this wiki page, thank you very very much!
Compiling Inkscape on Windows 64-bit works similar to [[Compiling Inkscape on Windows|compiling Inkscape on Windows 32-bit]] where you can find additional information.


== MinGW ==
This page only describes the basic steps that are required while highlighting the differences compared to a 32-bit build.
Get MinGW 64-bit from here:
[http://mingw-w64.sourceforge.net/index.php MinGW-w64 on Sourceforge], taking the package from the Mingw-builds Project.


The version you need is POSIX with SJLJ exception handling, because inkscape-devlibs64 has been compiled with SJLJ exception handling, and POSIX is needed for C++11 thread capabilities.
== Requirements ==
=== MinGW-w64 ===


Direct link to what I got: [http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.0/threads-posix/sjlj/x86_64-4.9.0-release-posix-sjlj-rt_v3-rev1.7z/download x86_64-4.9.0-release-posix-sjlj-rt_v3-rev1.7z]
Get [http://mingw-w64.org/ MinGW-w64] which contains the necessary GNU developer tools to build Inkscape on Windows.


== Devlibs 64 ==
You have to download a version that is configured for building native win64 applications with ''win32 threading model'' and ''SEH exception handling'', to ensure compatibility with the inkscape-devlibs64.


Checkout lp:inkscape-devlibs64 into, e.g., c:\devlibs64.
A matching build based on GCC 5.3 can be downloaded [https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/5.3.0/threads-win32/seh/ here]. The exact version used for building the inkscape-devlibs64 is [https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/5.3.0/threads-win32/seh/x86_64-5.3.0-release-win32-seh-rt_v4-rev0.7z/download MinGW-w64 x86_64-5.3.0-release-win32-seh-rt_v4-rev0.7z].


Also see: [[Inkscape Devlibs 64-bit]]
=== Inkscape development libraries for Windows 64-bit ===
 
Get the [https://code.launchpad.net/inkscape-devlibs64 inkscape-devlibs64] which include pre-compiled binaries of all Inkscape dependencies.
 
To checkout via Bazaar use the command
<pre>bzr checkout --lightweight lp:inkscape-devlibs64 C:\devlibs64</pre>
The <code>--lightweight</code> switch ensures that you only have to download the latest version of all binaries, <code>C:\devlibs64</code> is the folder you want them to be downloaded to.
 
See also [[Inkscape Devlibs 64-bit]] ''(only relevant if you want to update the development libraries)''
 
=== Inkscape source code ===
 
Get the [https://launchpad.net/inkscape Inkscape source code] from launchpad
 
To checkout via Bazaar use the command
<pre>bzr checkout lp:inkscape C:\inkscape</pre>
 
See also additional information on [[Compiling_Inkscape_on_Windows#Obtaining_Inkscape_source_code|obtaining Inkscape source code]] and [[Working with Bazaar|working with Bazaar]].


== Building ==
== Building ==


set the paths correctly in mingwenv.bat! Specifically, I have:
=== Environment variables ===
    IF "%DEVLIBS_PATH%"=="" set DEVLIBS_PATH=c:\devlibs64
 
    IF "%MINGW_PATH%"=="" set MINGW_PATH=C:\mingw64\mingw64_posix
Edit the file <code>mingwenv.bat</code> in the root directory of the Inkscape source to match you local paths. Most importantly the two lines
<pre>
IF "%DEVLIBS_PATH%"=="" set DEVLIBS_PATH=c:\devlibs64
IF "%MINGW_PATH%"=="" set MINGW_PATH=C:\mingw64
</pre>
should point to the folders containing MinGW-w64 and the inkscape-devlibs64.
 
Whenever you want to build Inkscape open a command prompt (<code>cmd.exe</code>), change into the root directory of the Inkscape source and execute <code>mingwenv.bat</code> to set environment variables.
 
=== Compiling build tool ===
 
Compile <code>btool</code> (the command line tool that handles the actual build) using
<pre>g++ buildtool.cpp -o btool</pre>
 
=== Compiling Inkscape ===


build using buildtool as usual, but with build-x64.xml:
Use <code>btool</code> to compile Inkscape and create the distribution directory:
    btool -file build-x64.xml
<pre>btool -file build-x64.xml</pre>
The file <code>build-x64.xml</code> contains the necessary instructions for creating standard 64-bit build.


== Known issues ==
If you want to make a GTK+ 3 build use <code>build-x64-gtk3.xml</code> instead (please note that GTK+3 builds are experimental and not ready for production yet).

Revision as of 16:29, 28 February 2016

For 32 bit: see Compiling Inkscape on Windows


Compiling Inkscape on Windows 64-bit works similar to compiling Inkscape on Windows 32-bit where you can find additional information.

This page only describes the basic steps that are required while highlighting the differences compared to a 32-bit build.

Requirements

MinGW-w64

Get MinGW-w64 which contains the necessary GNU developer tools to build Inkscape on Windows.

You have to download a version that is configured for building native win64 applications with win32 threading model and SEH exception handling, to ensure compatibility with the inkscape-devlibs64.

A matching build based on GCC 5.3 can be downloaded here. The exact version used for building the inkscape-devlibs64 is MinGW-w64 x86_64-5.3.0-release-win32-seh-rt_v4-rev0.7z.

Inkscape development libraries for Windows 64-bit

Get the inkscape-devlibs64 which include pre-compiled binaries of all Inkscape dependencies.

To checkout via Bazaar use the command

bzr checkout --lightweight lp:inkscape-devlibs64 C:\devlibs64

The --lightweight switch ensures that you only have to download the latest version of all binaries, C:\devlibs64 is the folder you want them to be downloaded to.

See also Inkscape Devlibs 64-bit (only relevant if you want to update the development libraries)

Inkscape source code

Get the Inkscape source code from launchpad

To checkout via Bazaar use the command

bzr checkout lp:inkscape C:\inkscape

See also additional information on obtaining Inkscape source code and working with Bazaar.

Building

Environment variables

Edit the file mingwenv.bat in the root directory of the Inkscape source to match you local paths. Most importantly the two lines

IF "%DEVLIBS_PATH%"=="" set DEVLIBS_PATH=c:\devlibs64
IF "%MINGW_PATH%"=="" set MINGW_PATH=C:\mingw64

should point to the folders containing MinGW-w64 and the inkscape-devlibs64.

Whenever you want to build Inkscape open a command prompt (cmd.exe), change into the root directory of the Inkscape source and execute mingwenv.bat to set environment variables.

Compiling build tool

Compile btool (the command line tool that handles the actual build) using

g++ buildtool.cpp -o btool

Compiling Inkscape

Use btool to compile Inkscape and create the distribution directory:

btool -file build-x64.xml

The file build-x64.xml contains the necessary instructions for creating standard 64-bit build.

If you want to make a GTK+ 3 build use build-x64-gtk3.xml instead (please note that GTK+3 builds are experimental and not ready for production yet).