Hacking:Building: Difference between revisions
Line 53: | Line 53: | ||
== Configuring and building == |
== Configuring and building == |
||
The installed toolchains have to match the one Qt was compiled with. |
'''The installed toolchains have to match the one Qt was compiled with.''' |
||
You can build Valentina |
Depend on your purposes You can build Valentina with different keys: |
||
* noTests - disable compiling tests. Use if you don't need tests and what to speed up compilation time. |
|||
* noRunPath - disable adding [https://en.wikipedia.org/wiki/Rpath Rpath attribute]. Works only for Linux. |
|||
* no_ccache - have sens only on Linux. Disable using ccache for speed up compilation. [https://en.wikipedia.org/wiki/Precompiled_header PCH] will be used instead. |
|||
* noDebugSymbols - By default for release mode debug symbols will be placed outside of binary file. We use them for debugging and sending crash reports on Windows. Have sens only for Linux/Windows with GCC. |
|||
* debug - Compile the project in debug mode. |
|||
By default all keys are disabled. |
|||
<source lang=bash> |
<source lang=bash> |
||
cd $SOURCE_DIRECTORY |
cd $SOURCE_DIRECTORY |
||
qmake "CONFIG += noTests noRunPath no_ccache noDebugSymbols" Valentina.pro -r |
|||
qmake -r |
|||
make (or mingw32-make or nmake or jom, depending on your platform) |
make (or mingw32-make or nmake or jom, depending on your platform) |
||
</source> |
</source> |
||
Note |
'''Note.''' In order to build and use Valentina, the PATH environment variable needs to be extended: |
||
PATH - to locate qmake, moc and other Qt tools This is done by adding c:\Qt\%VERSION%\bin to the PATH variable. |
PATH - to locate qmake, moc and other Qt tools This is done by adding c:\Qt\%VERSION%\bin to the PATH variable. |
Revision as of 09:20, 2 June 2016
Getting the sources
Main repository: https://bitbucket.org/dismine/valentina
Mirror on GitHub: https://github.com/dismine/Valentina
From the download section
Just download the Valentina sources from the downloads section and extract it.
![](http://static.miraheze.org/seamlywiki/3/39/Download_tab_tags.png)
Use tab Tags if you want to get code for specific version.
![](http://static.miraheze.org/seamlywiki/3/35/Download_tab_branches.png)
Use tab Branches if you wan to get code for develop branch.
With mercurial
To get a copy of Valentina's repository, run:
hg clone https://bitbucket.org/dismine/valentina
cd $SOURCE_DIRECTORY
To update that repository, run:
hg pull
hg up
Note. By default mercurial makeі active branch default.
Run hg branch
to find out which branch is active now.
For example if need to update to 'develop' use command hg update develop
.
Dependencies
Common:
- Qt 5.2.1 or later (on Unix development packages needed)
- mercurial (TortoiseHG is recommended.)
Mac OS X:
- Xcode.
- Mercurial that shipped with TortoiseHG can't reached outside. So, if you want nice tag hash number in dialog About App install mercurial independent for this.
Windows:
- MinGW or Visual Studio (both are part of Qt packages)
Linux:
- ccache (on Linux) Recommended for speed up often re-compilations.
- g++ (at least GCC 4.6 is needed and GCC 4.8 is recommended)
For Windows and Mac OS X you can get Qt from official website: Download Qt.
Configuring and building
The installed toolchains have to match the one Qt was compiled with.
Depend on your purposes You can build Valentina with different keys:
- noTests - disable compiling tests. Use if you don't need tests and what to speed up compilation time.
- noRunPath - disable adding Rpath attribute. Works only for Linux.
- no_ccache - have sens only on Linux. Disable using ccache for speed up compilation. PCH will be used instead.
- noDebugSymbols - By default for release mode debug symbols will be placed outside of binary file. We use them for debugging and sending crash reports on Windows. Have sens only for Linux/Windows with GCC.
- debug - Compile the project in debug mode.
By default all keys are disabled.
cd $SOURCE_DIRECTORY
qmake "CONFIG += noTests noRunPath no_ccache noDebugSymbols" Valentina.pro -r
make (or mingw32-make or nmake or jom, depending on your platform)
Note. In order to build and use Valentina, the PATH environment variable needs to be extended:
PATH - to locate qmake, moc and other Qt tools This is done by adding c:\Qt\%VERSION%\bin to the PATH variable.
For newer versions of Windows, PATH can be extended through the Control Panel|System|Advanced|Environment variables menu.
You may also need to ensure that the locations of your compiler and other build tools are listed in the PATH variable. This will depend on your choice of software development environment.
Issues with build
If you have issues with build Valentina check if you satisfy all dependencies. If this not help, create new issue in the issues tracker or new topic in the mailing list. Add information about your system and full log of compilation. We also need information about what branch did you fail try to build.
Current known issue, and solution, on building with QtCreator 3.4.0 based on Qt 5.4.1 on Windows 8 64-bit with Avira AntiVirus Pro version 15.0.10.434 (as of June 11 2015): Build fails with 'file previously exists' errors when writing build files to destination directory. Problem is based on Avira scanning each file causing delay, Qt retries writing the file and generates the error. Other versions of Qt Creator and Avira may exhibit similar behavior. Set Avira Real-Time Protection to 'off' before building.