Difference between revisions of "Building from source"
(Created page with " ==Build instructions== ===Dependencies=== * [http://qt-project.org Qt Framework], should work with versions 4.8 and 5.0 ===From a shell=== ./configure.sh && make The...") |
|||
(7 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
===Dependencies=== | ===Dependencies=== | ||
− | * [http://qt-project.org Qt Framework], | + | * [http://qt-project.org Qt Framework], version 4.8 or 5.0. |
+ | : It's possible to compile Knotter for Qt 4.7 but the sources need to be ported with the script {{src|package/qt-4.7/port-back.sh}} | ||
===From a shell=== | ===From a shell=== | ||
+ | <source lang="bash"> | ||
./configure.sh && make | ./configure.sh && make | ||
+ | </source> | ||
The configuration script will generate the makefile using qmake and set up | The configuration script will generate the makefile using qmake and set up | ||
the installation directories, for more information run | the installation directories, for more information run | ||
+ | <source lang="bash"> | ||
./configure.sh --help | ./configure.sh --help | ||
+ | </source> | ||
If the configure script fails despite being in a proper build environment you | If the configure script fails despite being in a proper build environment you | ||
− | can run directly qmake | + | can run directly qmake on knotter.pro. Be advised that this will make some |
make targets buggy or unavailable. | make targets buggy or unavailable. | ||
If you want to regenerate the files created by the Qt build tools, run | If you want to regenerate the files created by the Qt build tools, run | ||
+ | <source lang="bash"> | ||
make clean | make clean | ||
make | make | ||
+ | </source> | ||
To install the binaries run | To install the binaries run | ||
+ | <source lang="bash"> | ||
make install | make install | ||
+ | </source> | ||
To install in a specific directory, you can set INSTALL_ROOT | To install in a specific directory, you can set INSTALL_ROOT | ||
+ | <source lang="bash"> | ||
make install INSTALL_ROOT=/some/directory | make install INSTALL_ROOT=/some/directory | ||
+ | </source> | ||
The default install prefix is /usr/local (see ./configure.sh --help) | The default install prefix is /usr/local (see ./configure.sh --help) | ||
Line 43: | Line 54: | ||
===From Qt Creator=== | ===From Qt Creator=== | ||
− | Open | + | Open {{src|knotter.pro}} and click ''Build'' ('''Ctrl+B''') to compile and ''Run'' ('''Ctrl+R''') to start Knotter. |
==Getting the latest sources== | ==Getting the latest sources== | ||
Line 55: | Line 66: | ||
This source tree uses git submodules, this means that the submodules need to | This source tree uses git submodules, this means that the submodules need to | ||
− | be initialized when the repo is | + | be initialized when the repo is cloned: |
+ | <source lang="bash"> | ||
+ | #Clone repo | ||
+ | git clone git://github.com/mbasaglia/Knotter.git | ||
− | + | # Initialize submodules | |
− | + | git submodule init | |
− | + | # Clone submodules | |
− | + | git submodule update | |
+ | </source> | ||
− | + | ||
− | + | And to update all the sources: | |
+ | <source lang="bash"> | ||
+ | #Update repo | ||
+ | git pull origin master | ||
+ | |||
+ | # Initialize new submodules | ||
+ | git submodule update --init | ||
+ | |||
+ | # Pull submodules | ||
+ | git submodule foreach git pull origin master | ||
+ | </source> | ||
+ | For convenience, Knotter has the helper script '''pull.sh''' that does these three steps. |
Latest revision as of 09:01, 6 June 2013
Contents
Build instructions
Dependencies
- Qt Framework, version 4.8 or 5.0.
- It's possible to compile Knotter for Qt 4.7 but the sources need to be ported with the script
package/qt-4.7/port-back.sh
From a shell
./configure.sh && make
The configuration script will generate the makefile using qmake and set up the installation directories, for more information run
./configure.sh --help
If the configure script fails despite being in a proper build environment you can run directly qmake on knotter.pro. Be advised that this will make some make targets buggy or unavailable.
If you want to regenerate the files created by the Qt build tools, run
make clean
make
To install the binaries run
make install
To install in a specific directory, you can set INSTALL_ROOT
make install INSTALL_ROOT=/some/directory
The default install prefix is /usr/local (see ./configure.sh --help)
Misc make
targets
- dist
- Generate source tarball
- src_doc
- Generate Doxygen documentation from the source files
From Qt Creator
Open knotter.pro
and click Build (Ctrl+B) to compile and Run (Ctrl+R) to start Knotter.
Getting the latest sources
- The git repository is located at git://github.com/mbasaglia/Knotter.git
- You can browse the repo on GitHub
- See also Download
Cloning from Git
This source tree uses git submodules, this means that the submodules need to be initialized when the repo is cloned:
#Clone repo
git clone git://github.com/mbasaglia/Knotter.git
# Initialize submodules
git submodule init
# Clone submodules
git submodule update
And to update all the sources:
#Update repo
git pull origin master
# Initialize new submodules
git submodule update --init
# Pull submodules
git submodule foreach git pull origin master
For convenience, Knotter has the helper script pull.sh that does these three steps.