|These instructions are a work in progress, being based on the Linux Build instructions, there are some sections which need updating.|
These instructions are for the Windows operating systems.
First you should have windows 7 or later installed. If you're a unix user and tired of install windows manually, here is a sample packer template for auto-unattend installation of Windows 7 SP1 x64 in virtualbox:
git clone https://github.com/philacs/calligra-windows-dev-env-setup.git cd calligra-windows-dev-env-setup
Windows 7 PROFESSIONAL in
scripts/Autounattend.xml to use your ProductKey and Edition, replace
win7x64.json to the location of your windows 7 iso file.
kde folder will be copied to
C:/kde so put anything you want to copy there. Install packer following this link, make sure your computer connected to the Internet so it can download needed softwares, then
packer build win7x64.json
Virtualbox Appliance files will be generated under
output-virtualbox-iso folder, import the ovf file in virtualbox to use it.
If you don't use the packer.io builder provided, still download the git repo and copy
kderoot folder as
C:/kderoot manually to continue next step.
Now download and install kde windows build dependencies. Run
C:/kderoot/install-kde-build-deps.bat, an application will be downloaded through IE and click "Run" in the upcoming dialog, then the install starts. The installation is automated including reboot handling, wait until everything finish.
[TODO] Download pre-built calligra dependencies by running
Here is standard directory structure for building KDE applications:
From your %USERPROFILE% directory (assuming you are the only local user)
You can create this structure by opening a command prompt (cmd.exe) and typing:
cd %USERPROFILE% mkdir kde4 mkdir kde4\build mkdir kde4\build\calligra mkdir kde4\inst mkdir kde4\src
Before you begin, you will need to have a minimal set of software installed on your PC:
"emerge" is a Python-based set of scripts which download and build a lot of software KDE depends on. When it works properly emerge very convenient to use, however it must be configured with care. You can learn more about emerge here.
Begin by downloading the emerge repository.
git clone git://anongit.kde.org/emerge.git cd emerge git checkout kde-4.13 mkdir ..\etc copy kdesettings-example.bat ..\etc\kdesettings.bat
(Note: the instructions below use the kde-4.13 branch. However the author never had success with kde-4.13 and MSVC2013, so perhaps kde-4.12 would be the better choice.)
Next you must tell emerge about your build environment. To do this you will need to make the following changes to etc/kdesettings.bat:
One you have done this, you should navigate to the emerge directory and call
This sets up the development environment that you will need to use in order to build the KDE libraries, their dependencies and Calligra.
In order to install the bare minimum set up of KDE libraries, you will need to run a series of calls to emerge, which will take some time:
emerge qt emerge kdelibs emerge kde-runtime emerge boost (required for required for the core libraries, stage, sheets and krita)
Users familiar with development on Linux platforms may also wish to install another couple of libraries
emerge coreutils emerge grep
There are some additional optional libraries that can be used by Calligra, again emerge is used to install them:
emerge lcms2 emerge eigen2 emerge okular (only needed to build a calligra plugin for okular) emerge exiv2 emerge soprano emerge librdf-src
Wordperfect document and graphics support is contained in two additional libraries:
emerge libwpd emerge libwpg
As Windows support is still being improved, it is recommended that you use the development version. If you require stability, it is recommended that you take advantage of the nightly builds.
The latest development version of Calligra is 3.1.0 Alpha; developers always refer to it as to Master. Once tested and released, it will become the new current stable version 3.1.
To retrieve the source code from Git you have to use the following setup:
Add the following text to %USERPROFILE%\.gitconfig:
[url "git://anongit.kde.org/"] insteadOf = kde: [url "ssh://firstname.lastname@example.org/"] pushInsteadOf = kde: [core] autocrlf=false
git clone kde:calligra
By using the kde: prefix, read access will automatically happen over Git, and authenticated SSH is only required for pushes.
Note that pushing your changes will only work if you have a KDE developer identity (https://identity.kde.org/register.php).
This will create a 'calligra' subdirectory with the complete source tree.
From your home directory, navigate to the build\calliga subdirectory and execute cmake to configure the project for building with the following lines:
cd kde4\build\calligra # with versions <= 2.6 cmake -DCMAKE_INSTALL_PREFIX=..\..\inst ..\..\src\calligra -DCMAKE_BUILD_TYPE=%EMERGE_BUILDTYPE% -G "NMake Makefiles JOM" -DTINY=off -DBUILD_active=off -DBUILD_mobile=off -DBUILD_kexi=off # with versions >= 2.7 cmake -DCMAKE_INSTALL_PREFIX=..\..\inst ..\..\src\calligra -DCMAKE_BUILD_TYPE=%EMERGE_BUILDTYPE% -G "NMake Makefiles JOM" -DBUILD_kexi=off
Here we are telling cmake that:
|You can selectively build applications by using the -DBUILD_application=off command to disable building of those you do not want. If you have a full cmake install, you can use the cmake-gui application to let you make changes to the configuration.|
Then, to build Calligra, type:
jom -j 20
|jom is a multi-core port of nmake. You can specify the number of course use with the -j# parameter. e.g. jom -j8 would instruct it to use 8 processes. Setting a large number will instruct it to use all the cores on your machine.|
This will take a while. Once it has completed, type this command to install the software:
Please follow the Running Calligra Applications instructions before trying to run an application.
There are two options to make the Calligra applications available for running.
set KDEDIRS=\path\to\install;%KDEDIRS% set PATH=\path\to\install\bin;%PATH% set KDEHOME=\path\to\a\config\dir
And then you need to execute:
For example for the recommended directory structure:
set KDEDIRS=%USERPROFILE%\kde4\inst;%KDEDIRS% set PATH=%USERPROFILE%\kde4\inst\bin;%PATH% set KDEHOME=%USERPROFILE%\kde4\.kde
Here we are setting KDEHOME to be saved.
If you are using Windows Powershell, the commands are:
$KDEDIRS = $KDEDIRS + ";\path\to\install" $Path = $Path + ";\path\to\install\bin" $KDEHOME = $KDEHOME + "\path\to\a\config\dir"
And then you need to execute:
update-mime-database %KDEROOT%\share\mime kbuildsycoca4 --noincremental
The advantage of this is that KDE4 will always look for the services where Calligra is installed.
If the source code has been checked out, it is possible to update the source code with newly added changes and build again. Usually only changing parts will be built, so this operation would be faster than building the source code from scratch.
cd %USERPROFILE%\kde4\src\calligra git pull --rebase cd %USERPROFILE%\kde4\build\calligra jom jom install
To be able to execute unit tests, you need to explicitely enable them in the build configuration. To do so, set the KDE4_BUILD_TESTS variable to "ON", either by issuing the command in the build directory:
cd %USERPROFILE%/kde4/build/calligra cmake -DKDE4_BUILD_TESTS=ON .
Or you can run cmake-gui in the buld directory and set KDE4_BUILD_TESTS to "on".
It is then recommended that before running the tests, you first execute
You can then run the test by executing:
or individually in the tests directories.
When you enter your build directory, you can type "cmake-gui ." to see many build options, e.g. you can turn off compilation of apps you don't want - you can save time when compiling.
Here is list for Krita related options:
If the Calligra applications do not start properly, or you see the window flash up then disappear, then you need to check the Running Calligra Applications section earlier and make sure you've run update-mime-database and kbuildsycoca4.
You can get some additional insight by installing DebugView, which will let you see warnings and error messages reported by the programs. This is available on Microsoft Technet.
The sources for the WIX-based installer for Calligra on Windows are at https://gitorious.org/calligra-installer-for-windows