Hacking:Building: Difference between revisions

Content deleted Content added
No edit summary
Marked this version for translation
Line 7: Line 7:
Mirror on GitHub: https://github.com/dismine/Valentina
Mirror on GitHub: https://github.com/dismine/Valentina


<!--T:46-->
'''Note.''' Path to the source code after extraction should not contains spaces.
'''Note.''' Path to the source code after extraction should not contains spaces.


Line 12: Line 13:
This method recommended for newbies. Just download the Valentina's source code from the [https://bitbucket.org/dismine/valentina/downloads/ downloads section] and extract it.
This method recommended for newbies. Just download the Valentina's source code from the [https://bitbucket.org/dismine/valentina/downloads/ downloads section] and extract it.


In this case you have two options:
* Use tab '''Tags''' if you wanna get code for a specific version.
<!--T:3-->
<!--T:3-->
In this case you have two options:
* Use tab '''Tags''' if you wanna get code for a specific version.
[[File:Download tab tags.png|center]]
[[File:Download tab tags.png|center]]


* Use tab '''Branches''' if you wanna get code for '''develop branch'''. More about our [[Hacking:Making_pull_requests#Branch_model|branching model]].
<!--T:4-->
<!--T:4-->
* Use tab '''Branches''' if you wanna get code for '''develop branch'''. More about our [[Hacking:Making_pull_requests#Branch_model|branching model]].
[[File:Download tab branches.png|center]]
[[File:Download tab branches.png|center]]


Line 24: Line 25:
This is more advanced way getting Valentina's source code. Please, visit [[Hacking:Tools#Mercurial]] for more information.
This is more advanced way getting Valentina's source code. Please, visit [[Hacking:Tools#Mercurial]] for more information.


== Dependencies ==
== Dependencies == <!--T:13-->
<!--T:13-->
=== Mac OS X ===
=== Mac OS X ===
* Xcode.
* Xcode.
Line 32: Line 32:
* (''optional'') 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.
* (''optional'') 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 === <!--T:14-->
=== Windows ===
* The last Qt version for MinGW from the official website: [https://www.qt.io/download/ Download Qt].
* The last Qt version for MinGW from the official website: [https://www.qt.io/download/ Download Qt].
* (''optional'') TortoiseHG.
* (''optional'') TortoiseHG.


<!--T:47-->
''Note. Valenina's source code can be compiled with Visual Studio, but without support creating an installer.''
''Note. Valenina's source code can be compiled with Visual Studio, but without support creating an installer.''


<!--T:15-->
=== Linux === <!--T:15-->
=== Linux ===
* g++ (at least GCC 4.6 is needed and GCC 4.8 is recommended)
* g++ (at least GCC 4.6 is needed and GCC 4.8 is recommended)
* Qt 5.0.0 and higher required. Qt 5.2.1 and higher recommended.
* Qt 5.0.0 and higher required. Qt 5.2.1 and higher recommended.
* (''optional'') ccache. Recommended for speed up often re-compilations.
* (''optional'') ccache. Recommended for speed up often re-compilations.


<!--T:48-->
You can find all our scripts for creating packages in a folder '''<root_source_directory>/dist/'''.
You can find all our scripts for creating packages in a folder '''<root_source_directory>/dist/'''.


Line 50: Line 50:
'''The installed toolchains have to match the one Qt was compiled with.'''
'''The installed toolchains have to match the one Qt was compiled with.'''


=== Build keys ===<!--T:18-->
=== Build keys === <!--T:18-->
Depend on your purposes you can build Valentina with different keys:
Depend on your purposes you can build Valentina with different keys:


Line 63: Line 63:
By default all keys are disabled.
By default all keys are disabled.


=== Building from command line ===<!--T:21-->
=== Building from command line === <!--T:21-->
Usual way to build sources is described below, however on Windows and Linux you have the opportunity to [[#Deploying|build packages]]. Mac OS X users will get package automatically.
Usual way to build sources is described below, however on Windows and Linux you have the opportunity to [[#Deploying|build packages]]. Mac OS X users will get package automatically.
<source lang=bash>
<source lang=bash>
Line 74: Line 74:
'''Note.''' In order to build and use Valentina on Windows, the PATH environment variable needs to be extended.
'''Note.''' In order to build and use Valentina on Windows, the PATH environment variable needs to be extended.


=== Building with Qt Creator ===
=== Building with Qt Creator === <!--T:49-->
Some more advanced users may find using IDE more preferable choice. Please, read [[Hacking:Tools#Qt_Creator]].
Some more advanced users may find using IDE more preferable choice. Please, read [[Hacking:Tools#Qt_Creator]].


<!--T:50-->
'''Note.''' Building with Qt Creator on Windows and Linux doesn't support [[#Deploying|creating packages]].
'''Note.''' Building with Qt Creator on Windows and Linux doesn't support [[#Deploying|creating packages]].


Line 83: Line 84:
All you need is to find Valentina in the build directory and move it to the Applications folder.
All you need is to find Valentina in the build directory and move it to the Applications folder.


<!--T:51-->
Usually path is '''<build_folder>/src/app/valentina/bin/Valentina'''.
Usually path is '''<build_folder>/src/app/valentina/bin/Valentina'''.


Line 91: Line 93:
Install Inno Setup 5 '''unicode''' from the [http://www.jrsoftware.org/isdl.php download page].
Install Inno Setup 5 '''unicode''' from the [http://www.jrsoftware.org/isdl.php download page].


==== Building ====
==== Building ==== <!--T:52-->
# Open Windows Qt command prompt window.[[File:Qt terminal.png|frameless|center]]
# Open Windows Qt command prompt window.[[File:Qt terminal.png|frameless|center]]
# Go to '''scripts''' folder. Just find full path to the folder, copy it and run command inside the command prompt window: <code>cd path_to_scripts_folder</code>.
# Go to '''scripts''' folder. Just find full path to the folder, copy it and run command inside the command prompt window: <code>cd path_to_scripts_folder</code>.
Line 98: Line 100:
# Find an installer inside '''build/package''' folder.
# Find an installer inside '''build/package''' folder.


<!--T:53-->
Please, read information about fixing [[Hacking:Building#Issues_with_build|Issues with build]].
Please, read information about fixing [[Hacking:Building#Issues_with_build|Issues with build]].


Line 161: Line 164:
For Gentoo we provide ebuild scripts. You can find them on [https://bitbucket.org/dismine/valentina/downloads download page].
For Gentoo we provide ebuild scripts. You can find them on [https://bitbucket.org/dismine/valentina/downloads download page].


==== Slackware ====
==== Slackware ==== <!--T:54-->
Find and use our SlackBuild script inside the '''<root_source_folder>/dist/SlackBuild''' folder.
Find and use our SlackBuild script inside the '''<root_source_folder>/dist/SlackBuild''' folder.