Hacking:Building: Difference between revisions

Marked this version for translation
No edit summary
(Marked this version for translation)
Line 1:
__TOC__
<translate>
== Getting the sources == <!--T:1-->
Main repository: https://bitbucket.org/dismine/valentina<br />
Mirror on GitHub: https://github.com/dismine/Valentina
 
=== From the download section === <!--T:2-->
Just download the Valentina sources from the [https://bitbucket.org/dismine/valentina/downloads/ downloads section] and extract it.
 
<!--T:3-->
[[File:Download tab tags.png|center]]
Use tab '''Tags''' if you want to get code for specific version.
 
<!--T:4-->
[[File:Download tab branches.png|center]]
Use tab '''Branches''' if you wan to get code for [[Hacking:Making pull requests|develop branch]].
 
=== With mercurial === <!--T:5-->
To get a copy of Valentina's repository, run:
 
<!--T:6-->
<source lang=bash>
hg clone https://bitbucket.org/dismine/valentina
Line 22 ⟶ 25:
</source>
 
<!--T:7-->
To update that repository, run:
 
<!--T:8-->
<source lang=bash>
hg pull
Line 29 ⟶ 34:
</source>
 
<!--T:9-->
'''Note.''' By default mercurial makeі active [[Hacking:Making pull requests|branch default]].
 
<!--T:10-->
Run <code>hg branch</code> to find out which branch is active now.
 
<!--T:11-->
For example if need to update to 'develop' use command <code>hg update develop</code>.
 
== Dependencies == <!--T:12-->
Common:
* Qt 5.2.1 or later (on Unix development packages needed)
* mercurial (TortoiseHG is recommended.)
 
<!--T:13-->
Mac OS X:
* Xcode.
* Mercurial that shipped with TortoiseHG can't be reached outside. So, if you want nice tag hash number in dialog About App install mercurial independent for this.
 
<!--T:14-->
Windows:
* MinGW or Visual Studio (both are part of Qt packages)
 
<!--T:15-->
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)
 
<!--T:16-->
For Windows and Mac OS X you can get Qt from official website: [https://www.qt.io/download/ Download Qt].
 
== Configuring and building == <!--T:17-->
'''The installed toolchains have to match the one Qt was compiled with.'''
 
<!--T:18-->
Depend on your purposes You can build Valentina with different keys:
 
<!--T:19-->
* 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.
Line 64 ⟶ 78:
* debug - Compile the project in debug mode.
 
<!--T:20-->
By default all keys are disabled.
 
<!--T:21-->
Usuall way to build sources is described below, however on Windows and Linux you have the opportunity to [[#Deploying|build packages]].
<source lang=bash>
Line 73 ⟶ 89:
</source>
 
<!--T:22-->
'''Note.''' In order to build and use Valentina, the PATH environment variable needs to be extended:
 
<!--T:23-->
PATH - to locate qmake, moc and other Qt tools This is done by adding c:\Qt\%VERSION%\bin to the PATH variable.
 
<!--T:24-->
For newer versions of Windows, PATH can be extended through the Control Panel|System|Advanced|Environment variables menu.
 
<!--T:25-->
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.
 
== Deploying == <!--T:26-->
=== Mac OS X ===
All you need is to find Valentina in build directory and move it to Applications folder.
 
=== Windows === <!--T:27-->
Go to ''scripts'' folder and run make_install.bat script. It will run building and creating an installer. The script create folder build where in the end you will find your installer.
 
<!--T:28-->
Note. For making installer you will need to install [http://nsis.sourceforge.net/Main_Page NSIS].
 
=== Linux === <!--T:29-->
==== Debian package ====
* Install tool
 
<!--T:30-->
<source lang=bash>
sudo apt-get install dh-make
</source>
 
<!--T:31-->
* Create directory deb_build
 
<!--T:32-->
<source lang=bash>
mkdir deb_build
Line 113 ⟶ 137:
</source>
 
<!--T:33-->
or
 
<!--T:34-->
<source lang=bash>
dpkg-buildpackage -rfakeroot
</source>
 
<!--T:35-->
if not.
 
<!--T:36-->
That's all. In directory deb_build you will find deb package.
 
<!--T:37-->
'''Note.''' If your deb package broken and you can't delete him use these two commands. Run commands below as a root in Debian, preceded by sudo in Ubuntu :
 
<!--T:38-->
<source lang=bash>
mv /var/lib/dpkg/info/PAQUET.* /tmp/
Line 130 ⟶ 160:
</source>
 
<!--T:39-->
For example if name of package was **valentina**:
 
<!--T:40-->
<source lang=bash>
mv /var/lib/dpkg/info/valentina.* /tmp/
Line 137 ⟶ 169:
</source>
 
==== Gentoo ==== <!--T:41-->
For Gentoo we provide ebuild scripts. You can find them on [https://bitbucket.org/dismine/valentina/downloads download page].
 
<!--T:42-->
Additionaly you can find templates for scripts in folder ''<root>/dist/ebuild''.
 
== Issues with build == <!--T:43-->
If you have issues with build Valentina check if you satisfy all dependencies. If this not help, [[Hacking:How To Report Valentina Bugs|create new issue in the issues tracker]] or new topic in the [https://groups.google.com/forum/#!forum/valentina-project-list 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.
 
<!--T:44-->
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.
 
<!--T:45-->
Also look at [[Hacking:Problems_and_solutions]].
</translate>