Hacking:Building: Difference between revisions
Content added Content deleted
(Created page with "Main repository: https://bitbucket.org/dismine/valentina<br /> Mirror on GitHub: https://github.com/dismine/Valentina") |
(Update build steps) |
||
(37 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<languages /> |
|||
Main repository: https://bitbucket.org/dismine/valentina<br /> |
|||
<br /> |
|||
Mirror on GitHub: https://github.com/dismine/Valentina |
|||
__TOC__ |
|||
<translate> |
|||
== Getting the sources == <!--T:1--> |
|||
Clone from the [https://github.com/FashionFreedom/Seamly2D/ Seamly2D repository] on GitHub. |
|||
In Git, create a feature branch to hold your changes. |
|||
== Build Seamly2D and SeamlyMe == |
|||
=== Basic Software Prerequisites: === |
|||
*[https://www.qt.io/download-open-source Qt 5.15.2] (includes Qt, QtCreator, QtChooser, and Qt Maintenance Tool) |
|||
*[https://git-scm.com/downloads Git] or [https://desktop.github.com Github Desktop for Windows and MacOS] |
|||
*Compiler - MSVC 2022, gcc, and g++ are included with QtCreator, and you can add or update them using the Qt Maintenance Tool (Maintenance.exe). |
|||
*Pdftops (from XpdfReader or poppler) - Required to create PS or EPS layout files. |
|||
*Check the sections below for your operating system to find additional installation requirements. |
|||
=== Development methods and styles: === |
|||
*[https://githubflow.github.io GitHub Flow workflow] |
|||
*[https://www.conventionalcommits.org/en/v1.0.0/ GibHub commit message style guide] |
|||
*[https://guides.github.com/features/issues/ GitHub issue description style guide] |
|||
=== Build method: === |
|||
*Read more about code styles and other developer items of interest on our [https://github.com/FashionFreedom/Seamly2D/wiki Developer wiki]. |
|||
*Review our [https://github.com/FashionFreedom/Seamly2D/blob/develop/.github/workflows/build-release.yml GitHub Action CI script]. |
|||
___________________________________________________ |
|||
==== Build on Linux ==== |
|||
These instructions apply in general to all distros |
|||
*Install Qt 5.15.2. Example for Ubuntu 18.04: Install the following packages to have Qt5 build environment ready: |
|||
$ sudo apt install -y libfuse2 qt5-qmake qtbase5-dev libqt5xmlpatterns5-dev libqt5svg5-dev qttools5-dev-tools |
|||
*Install QtCreator https://wiki.qt.io/VendorPackages |
|||
*Install Additional libraries |
|||
**gnu compiler |
|||
**poppler (pdftops) |
|||
Example for Ubuntu 18.04: |
|||
$ sudo apt install -y build-essential git poppler-tools |
|||
*Build and install: |
|||
$ qmake Seamly2D.pro CONFIG+=noDebugSymbols |
|||
$ make -j$(nproc) |
|||
$ sudo make install |
|||
Note: The default prefix for command `make install` is `/usr`. To define another prefix, build with qmake's PREFIX option. This example sets `/usr/local` as the new prefix for Seamly's installation binary files: |
|||
$ qmake PREFIX=/usr/local Seamly2D.pro CONFIG+=noDebugSymbols |
|||
*Copy pdftops to Seamly build directory if you need to create post script (.ps and .eps) pattern piece layouts. |
|||
___________________________________________________ |
|||
==== Build on MacOSX and Windows 10/11 ==== |
|||
'''Step 1: MacOS only''' |
|||
*Read about Qt for macOS [https://doc.qt.io/qt-5/macos.html here] |
|||
*Install [https://developer.apple.com/download/all/ Xcode 11] |
|||
*Setup/validate build environment. Read more [https://doc.qt.io/qt-5/macos.html#build-environment here]. |
|||
*Switch to Xcode: `sudo xcode-select --switch /Applications/Xcode.app` |
|||
*Validate clang compiler points to Xcode: `xcrun -sdk macosx -find clang` |
|||
*Validate SDK version (macOS 10.15): `xcrun -sdk macosx --show-sdk-path` |
|||
*Install Xpdf: `sudo port install xpdf` |
|||
'''Step 2: Both MacOS and Windows''' |
|||
*Download & run the [https://www.qt.io/download-qt-installer Qt unified installer]. Create a Qt account for open source Community Edition if you don't have one. |
|||
**Select: |
|||
***Custom Installation |
|||
***Qt - _Minimize your options, otherwise your download size could be in Gs_ |
|||
****Qt 5.15.2 |
|||
****MSVC 2019 |
|||
****Qt Debug Information Files |
|||
***Developer and Designer Tools |
|||
****Qt Creator |
|||
****Qt Creator CDB Debugger Support |
|||
****Debugging Tools for Windows |
|||
****Qt Creator Debug Symbols |
|||
Note: (Qt Maintenance Tool is always installed with Developer & Designer Tools - this will be highlighted) |
|||
'''Step 3: Windows only''' |
|||
**Download [http://www.xpdfreader.com/download.html XpdfReader] for Windows. Extract to `C:/Program Files`. Rename folder to `:/Program Files/Xpdf`. |
|||
*Read about Qt for Windows [https://doc.qt.io/qt-5/windows.html here]. |
|||
*Add Qt and QtCreator directories to the Windows PATH environment variable through Control Panel: |
|||
[Control Panel | System And Security | System | Advanced Tab | Environment Variables button] |
|||
'''Step 4: Both MacOS and Windows''' |
|||
*To build with Qt's *QtCreator* IDE: |
|||
**Create your compiler kit. Read more about adding compilers [https://doc.qt.io/qtcreator/creator-tool-chains.html on the Qt website]. |
|||
**Complete your build settings. Read more about build settings [https://doc.qt.io/qtcreator/creator-build-settings.html here]. |
|||
**Open the Seamly2D project with 'File > Open File or Project'. Navigate to the 'seamly2d/src' directory and select 'Seamly2D.pro'. |
|||
**Open the Configure Project tab and select your compiler kit. Read more [https://doc.qt.io/qtcreator/creator-project-opening.html here]. |
|||
**Build with the 'Build and Run Kit Selector' icon, or use 'Build' and 'Run' from the Tools menu. Read more [https://doc.qt.io/qtcreator/creator-building-targets.html here]. |
|||
*To build with Qt's *qmake* from a terminal window: |
|||
**Read more about jom [https://wiki.qt.io/Jom here]. |
|||
**Read more about nmake [https://learn.microsoft.com/en-us/cpp/build/reference/nmake-reference?view=msvc-170 here]. |
|||
cd $SOURCE_DIRECTORY\build |
|||
qmake ..\Seamly2D.pro CONFIG+=noDebugSymbols |
|||
nmake # (or jom. Assign multiple CPUs to speed up compilation time but don't use all - leave at least one CPU for your OS.) |
|||
*Copy the `C:\Program Files\Xpdf\bin64\pdftops.exe` (or bin32) file to the Seamly build directory to enable the creation of post script (.ps and .eps) pattern piece layouts. |
|||
</translate> |
Latest revision as of 21:12, 14 January 2023
Getting the sources[edit | edit source]
Clone from the Seamly2D repository on GitHub. In Git, create a feature branch to hold your changes.
Build Seamly2D and SeamlyMe[edit | edit source]
Basic Software Prerequisites:[edit | edit source]
- Qt 5.15.2 (includes Qt, QtCreator, QtChooser, and Qt Maintenance Tool)
- Git or Github Desktop for Windows and MacOS
- Compiler - MSVC 2022, gcc, and g++ are included with QtCreator, and you can add or update them using the Qt Maintenance Tool (Maintenance.exe).
- Pdftops (from XpdfReader or poppler) - Required to create PS or EPS layout files.
- Check the sections below for your operating system to find additional installation requirements.
Development methods and styles:[edit | edit source]
Build method:[edit | edit source]
- Read more about code styles and other developer items of interest on our Developer wiki.
- Review our GitHub Action CI script.
___________________________________________________
Build on Linux[edit | edit source]
These instructions apply in general to all distros
- Install Qt 5.15.2. Example for Ubuntu 18.04: Install the following packages to have Qt5 build environment ready:
$ sudo apt install -y libfuse2 qt5-qmake qtbase5-dev libqt5xmlpatterns5-dev libqt5svg5-dev qttools5-dev-tools
- Install QtCreator https://wiki.qt.io/VendorPackages
- Install Additional libraries
- gnu compiler
- poppler (pdftops)
Example for Ubuntu 18.04:
$ sudo apt install -y build-essential git poppler-tools
- Build and install:
$ qmake Seamly2D.pro CONFIG+=noDebugSymbols $ make -j$(nproc) $ sudo make install
Note: The default prefix for command `make install` is `/usr`. To define another prefix, build with qmake's PREFIX option. This example sets `/usr/local` as the new prefix for Seamly's installation binary files:
$ qmake PREFIX=/usr/local Seamly2D.pro CONFIG+=noDebugSymbols
- Copy pdftops to Seamly build directory if you need to create post script (.ps and .eps) pattern piece layouts.
___________________________________________________
Build on MacOSX and Windows 10/11[edit | edit source]
Step 1: MacOS only
- Read about Qt for macOS here
- Install Xcode 11
- Setup/validate build environment. Read more here.
- Switch to Xcode: `sudo xcode-select --switch /Applications/Xcode.app`
- Validate clang compiler points to Xcode: `xcrun -sdk macosx -find clang`
- Validate SDK version (macOS 10.15): `xcrun -sdk macosx --show-sdk-path`
- Install Xpdf: `sudo port install xpdf`
Step 2: Both MacOS and Windows
- Download & run the Qt unified installer. Create a Qt account for open source Community Edition if you don't have one.
- Select:
- Custom Installation
- Qt - _Minimize your options, otherwise your download size could be in Gs_
- Qt 5.15.2
- MSVC 2019
- Qt Debug Information Files
- Developer and Designer Tools
- Qt Creator
- Qt Creator CDB Debugger Support
- Debugging Tools for Windows
- Qt Creator Debug Symbols
- Select:
Note: (Qt Maintenance Tool is always installed with Developer & Designer Tools - this will be highlighted)
Step 3: Windows only
- Download XpdfReader for Windows. Extract to `C:/Program Files`. Rename folder to `:/Program Files/Xpdf`.
- Read about Qt for Windows here.
- Add Qt and QtCreator directories to the Windows PATH environment variable through Control Panel:
[Control Panel | System And Security | System | Advanced Tab | Environment Variables button]
Step 4: Both MacOS and Windows
- To build with Qt's *QtCreator* IDE:
- Create your compiler kit. Read more about adding compilers on the Qt website.
- Complete your build settings. Read more about build settings here.
- Open the Seamly2D project with 'File > Open File or Project'. Navigate to the 'seamly2d/src' directory and select 'Seamly2D.pro'.
- Open the Configure Project tab and select your compiler kit. Read more here.
- Build with the 'Build and Run Kit Selector' icon, or use 'Build' and 'Run' from the Tools menu. Read more here.
- To build with Qt's *qmake* from a terminal window:
cd $SOURCE_DIRECTORY\build qmake ..\Seamly2D.pro CONFIG+=noDebugSymbols nmake # (or jom. Assign multiple CPUs to speed up compilation time but don't use all - leave at least one CPU for your OS.)
- Copy the `C:\Program Files\Xpdf\bin64\pdftops.exe` (or bin32) file to the Seamly build directory to enable the creation of post script (.ps and .eps) pattern piece layouts.