Hacking:Building: Difference between revisions
No edit summary |
Ronanletiec (talk | contribs) Changing valentina to seamly / seamly2D |
||
Line 4: | Line 4: | ||
<translate> |
<translate> |
||
== Getting the sources == <!--T:1--> |
== Getting the sources == <!--T:1--> |
||
Main repository: https:// |
Main repository: https://github.com/FashionFreedom/Seamly2D/ |
||
Mirror on GitHub: https://github.com/dismine/Valentina |
|||
<!--T:46--> |
<!--T:46--> |
||
Line 11: | Line 10: | ||
=== From the download section === <!--T:2--> |
=== From the download section === <!--T:2--> |
||
This method recommended for newbies. Just download the |
This method recommended for newbies. Just download the Seamly2D's source code from the [https://github.com/FashionFreedom/Seamly2D/downloads downloads section] and extract it. |
||
<!--T:3--> |
<!--T:3--> |
||
Line 23: | Line 22: | ||
=== With Mercurial === <!--T:5--> |
=== With Mercurial === <!--T:5--> |
||
This is more advanced way getting |
This is more advanced way getting Seamly2D's source code. Please, visit [[Hacking:Tools#Mercurial]] for more information. |
||
== Dependencies == <!--T:13--> |
== Dependencies == <!--T:13--> |
||
Line 35: | Line 34: | ||
* 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. |
||
* |
* Seamly2D doesn't support devices that require supporting the Windows Store App APIs. This includes devices running Windows RT 8.1 and Windows Phone 8.1 and up. |
||
<!--T:47--> |
<!--T:47--> |
||
Line 52: | Line 51: | ||
=== Build keys === <!--T:18--> |
=== Build keys === <!--T:18--> |
||
Depend on your purposes you can build |
Depend on your purposes you can build Seamly2D with different keys: |
||
<!--T:19--> |
<!--T:19--> |
||
Line 68: | Line 67: | ||
<source lang=bash> |
<source lang=bash> |
||
cd $SOURCE_DIRECTORY |
cd $SOURCE_DIRECTORY |
||
qmake "CONFIG += noTests noRunPath no_ccache noDebugSymbols" |
qmake "CONFIG += noTests noRunPath no_ccache noDebugSymbols" Seamly2D.pro -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> |
||
<!--T:22--> |
<!--T:22--> |
||
'''Note.''' In order to build and use |
'''Note.''' In order to build and use Seamly2D on Windows, the PATH environment variable needs to be extended. |
||
=== Building with Qt Creator === <!--T:49--> |
=== Building with Qt Creator === <!--T:49--> |
||
Line 83: | Line 82: | ||
== Deploying == <!--T:26--> |
== Deploying == <!--T:26--> |
||
=== Mac OS X === |
=== Mac OS X === |
||
All you need is to find |
All you need is to find Seamly2D in the build directory and move it to the Applications folder. |
||
<!--T:51--> |
<!--T:51--> |
||
Usually path is '''<build_folder>/src/app/ |
Usually path is '''<build_folder>/src/app/seamly2D/bin/Seamly2D'''. |
||
=== Windows === <!--T:27--> |
=== Windows === <!--T:27--> |
||
Line 103: | Line 102: | ||
* Set path to the binary in the PATH variable. |
* Set path to the binary in the PATH variable. |
||
* Configure InnoSetup. |
* Configure InnoSetup. |
||
# Open the file /dist/win/inno/ |
# Open the file /dist/win/inno/seamly2D.iss with Inno Setup Compiler. |
||
# Select ''Tools'' > ''Configure Sign Tools''. |
# Select ''Tools'' > ''Configure Sign Tools''. |
||
# Select Add button. |
# Select Add button. |
||
Line 184: | Line 183: | ||
<!--T:39--> |
<!--T:39--> |
||
For example if name of package was ** |
For example if name of package was **seamly2D**: |
||
<!--T:40--> |
<!--T:40--> |
||
<source lang=bash> |
<source lang=bash> |
||
mv /var/lib/dpkg/info/ |
mv /var/lib/dpkg/info/seamly2D.* /tmp/ |
||
dpkg --remove --force-remove-reinstreq |
dpkg --remove --force-remove-reinstreq seamly2D |
||
</source> |
</source> |
||
==== Gentoo ==== <!--T:41--> |
==== Gentoo ==== <!--T:41--> |
||
For Gentoo we provide ebuild scripts. |
For Gentoo we provide ebuild scripts. |
||
==== Slackware ==== <!--T:54--> |
==== Slackware ==== <!--T:54--> |
||
Line 202: | Line 201: | ||
== Issues with build == <!--T:43--> |
== Issues with build == <!--T:43--> |
||
If you have issues with build |
If you have issues with build Seamly2D check if you satisfied all dependencies. If this not help, [[Hacking:How To Report Seamly2D Bugs|create new issue in the issues tracker]] or new topic in the [http://forum.valentina-project.org/ forum]. Add information about your system and full log of compilation. We also need information about which branch did you fail try to build. |
||
<!--T:44--> |
<!--T:44--> |
Revision as of 18:42, 13 April 2018
Getting the sources
Main repository: https://github.com/FashionFreedom/Seamly2D/
Note. Path to the source code after extraction should not contains spaces.
From the download section
This method recommended for newbies. Just download the Seamly2D's source code from the downloads section and extract it.
In this case you have two options:
- Use tab Tags if you wanna get code for a specific version.
![](http://static.miraheze.org/seamlywiki/3/39/Download_tab_tags.png)
- Use tab Branches if you wanna get code for develop branch. More about our branching model.
![](http://static.miraheze.org/seamlywiki/3/35/Download_tab_branches.png)
With Mercurial
This is more advanced way getting Seamly2D's source code. Please, visit Hacking:Tools#Mercurial for more information.
Dependencies
Mac OS X
- Xcode.
- The last Qt version for OS X from the official website: Download Qt.
- (optional) TortoiseHG.
- (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.
Windows
- The last Qt version for MinGW from the official website: Download Qt.
- (optional) TortoiseHG.
- Seamly2D doesn't support devices that require supporting the Windows Store App APIs. This includes devices running Windows RT 8.1 and Windows Phone 8.1 and up.
Note. Valenina's source code can be compiled with Visual Studio, but without support creating an installer.
Linux
- 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.
- (optional) ccache. Recommended for speed up often re-compilations.
You can find all our scripts for creating packages in a folder <root_source_directory>/dist/.
Configuring and building
The installed toolchains have to match the one Qt was compiled with.
Build keys
Depend on your purposes you can build Seamly2D 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.
Building from command line
Usual way to build sources is described below, however on Windows and Linux you have the opportunity to build packages. Mac OS X users will get package automatically.
cd $SOURCE_DIRECTORY
qmake "CONFIG += noTests noRunPath no_ccache noDebugSymbols" Seamly2D.pro -r
make (or mingw32-make or nmake or jom, depending on your platform)
Note. In order to build and use Seamly2D on Windows, the PATH environment variable needs to be extended.
Building with Qt Creator
Some more advanced users may find using IDE more preferable choice. Please, read Hacking:Tools#Qt_Creator.
Note. Building with Qt Creator on Windows and Linux doesn't support creating packages.
Deploying
Mac OS X
All you need is to find Seamly2D in the build directory and move it to the Applications folder.
Usually path is <build_folder>/src/app/seamly2D/bin/Seamly2D.
Windows
Requirements for version 0.4.x and early
Install NSIS from the download page.
Requirements for version 0.5.x and later
Install Inno Setup 5 unicode from the download page.
Code signing
Note. This option is available only for Inno Setup.
In some cases you may want to create a signed installer. For this you should:
- Buy a certificate.
- Export it to Windows.
- Install Microsoft signtool.exe.
- Set path to the binary in the PATH variable.
- Configure InnoSetup.
- Open the file /dist/win/inno/seamly2D.iss with Inno Setup Compiler.
- Select Tools > Configure Sign Tools.
- Select Add button.
- Enter Name of the Sign Tool (MySign).
- Enter an associated Command (signtool.exe sign /v /a /n $qSeamly, LLC$q /t http://timestamp.comodoca.com/authenticode /d $qPatternmaking program$q $f).
- Uncomment string SignTool=MySign
- Done.
SignTool.exe options
/v - Displays verbose output regardless of whether the command runs successfully or fails, and displays warning messages.
/a - Automatically selects the best signing certificate. Sign Tool will find all valid certificates that satisfy all specified conditions and select the one that is valid for the longest time. If this option is not present, Sign Tool expects to find only one valid signing certificate.
/n SubjectName - Specifies the name of the subject of the signing certificate. This value can be a substring of the entire subject name.
/t URL - Specifies the URL of the time stamp server. If this option (or /tr) is not present, the signed file will not be time stamped. A warning is generated if time stamping fails. This option cannot be used with the /tr option.
/d - Desc specifies a description of the signed content.
InnoSetup Constants
$q is an Inno Setup constant representing a quote.
$f is a constant containing the name and path of the setup EXE created by Inno Setup.
Building
- Open Windows Qt command prompt window.
- Go to scripts folder. Just find full path to the folder, copy it and run command inside the command prompt window:
cd path_to_scripts_folder
. - Run command
make_install.bat
. It will run the script for building and creating an installer. Wait until the end of the operation. - The script creates folder build on the same level with scripts, where in the end you will find your installer.
- Find an installer inside build/package folder.
Please, read information about fixing Issues with build.
Linux
Debian package
- Install tool
sudo apt-get install dh-make
- Create directory deb_build
mkdir deb_build
- Copy source directory to *deb_build*
- Copy *debian/* directory from *dist/debian* to root source directory.
- In root source directory with *debian/* directory run:
If you want sign package
dpkg-buildpackage -k<public_key> -rfakeroot
or
dpkg-buildpackage -rfakeroot
if not.
That's all. In directory deb_build you will find deb package.
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 :
mv /var/lib/dpkg/info/PAQUET.* /tmp/
dpkg --remove --force-remove-reinstreq PAQUET
For example if name of package was **seamly2D**:
mv /var/lib/dpkg/info/seamly2D.* /tmp/
dpkg --remove --force-remove-reinstreq seamly2D
Gentoo
For Gentoo we provide ebuild scripts.
Slackware
Find and use our SlackBuild script inside the <root_source_folder>/dist/SlackBuild folder.
Additionaly you can find templates for scripts in folder <root>/dist/ebuild.
Issues with build
If you have issues with build Seamly2D check if you satisfied all dependencies. If this not help, create new issue in the issues tracker or new topic in the forum. Add information about your system and full log of compilation. We also need information about which branch did you fail try to build.
Currently 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.
Also look at Hacking:Problems_and_solutions.