Build Instructions: Difference between revisions

From Commontk
Jump to navigationJump to search
(Update Build_Instructions removing obsolete references)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The following instructions are valid as of November 2011 (if something is incorrect, please [https://github.com/commontk/CTK/issues/new report an issue]).
The following instructions are valid as of October 2012 (if something is incorrect, please [https://github.com/commontk/CTK/issues/new report an issue]).


== Prerequisties ==
== Prerequisites ==


* git version 1.6.5 or later
* git version 1.6.5 or later
* Qt version 4.6.3 or later
* Qt version 4.x or 5.x
* CMake 2.8.4 or later
* CMake 3.0 or later


== Download ==
== Download ==


If you have a git hub account:
{|
 
! Anonymous checkout behind a firewall
! CTK developer with write access
|-
|
git clone https://github.com/commontk/CTK.git
|
  git clone git@github.com:commontk/CTK.git
  git clone git@github.com:commontk/CTK.git
 
|}
(configure your ssh id for access)
 
Anonymous checkout:
 
git clone http://github.com/commontk/CTK.git


== Build with CMake ==
== Build with CMake ==
Line 28: Line 28:
=== CMake Configuration ===
=== CMake Configuration ===


* set QT_QMAKE_EXECUTABLE for 4.6 development install if needed (use {path/to/qt}/bin/qmake not {path/to/qt}/qmake/qmake)
* For Qt5, set <tt>Qt5_DIR</tt> to <tt>C:\Qt\5.15.2\msvc2019_64\lib\cmake\Qt5</tt>
* For Qt4, set <tt>QT_QMAKE_EXECUTABLE</tt> (<tt>qmake</tt> is usually found in the <tt>bin</tt> folder)
* turn on the parts of CTK you want to build
* turn on the parts of CTK you want to build


= Simple Git =
=== How to use CTK ? ===
See the [http://www.github.com/commontk/Examples Examples] project that illustrates how CTK can be integrated into applications.
 
= Contribute =
 
== Simple Git ==


These are shortcuts for people used to the 'cvs or svn style' of source code management:
See also https://docs.github.com/en/get-started/using-git


=== Checkout ===
=== Checkout ===
Line 42: Line 48:
=== Update ===
=== Update ===
  git pull --rebase
  git pull --rebase
=== Commit ===
=== Commit ===
* commit (commit is to local version, push sends it to upstream server)
* commit (commit is to local version, push sends it to upstream server)
Line 48: Line 55:
  git push
  git push


= Intermediate Git =
== Intermediate Git ==


* check update before merging (look at diff):
* check update before merging (look at diff):
Line 54: Line 61:
  git diff origin master
  git diff origin master
  git rebase
  git rebase
* Making a repository hosted on github that can track git.vtk.org [http://wiki.github.com/pieper/SlicerVTK/]


* If you have changes pending that you aren't ready to commit, you can't rebase on top of them unless you do this:
* If you have changes pending that you aren't ready to commit, you can't rebase on top of them unless you do this:
Line 71: Line 76:
List of needed tools and libraries used when building CTK:
List of needed tools and libraries used when building CTK:
* [http://git-scm.com/download Git]: To download source code
* [http://git-scm.com/download Git]: To download source code
* [http://qt.nokia.com/downloads Qt]: Dependency needed. You need to compile it in your machine before building CTK
* [https://www.qt.io/download-open-source Qt]: Dependency required.
* [http://www.cmake.org/cmake/resources/software.html CMake]: Cross-platform build system
* [http://www.cmake.org/cmake/resources/software.html CMake]: Cross-platform build system
* [http://gnuwin32.sourceforge.net/packages/patch.htm Patch for Windows]: Needed to apply patches to external thirdparty libraries source code
* [http://gnuwin32.sourceforge.net/packages/patch.htm Patch for Windows]: Needed to apply patches to external thirdparty libraries source code
* [http://www.collab.net/downloads/subversion SVN]: To update some third-party libraries automatically like PythonQt
* [http://ftp.gnu.org/non-gnu/cvs/ CVS]: To update some third-party libraries automatically like KWStyle


Optional:
Optional:

Latest revision as of 19:21, 13 April 2023

Home < Build Instructions

The following instructions are valid as of October 2012 (if something is incorrect, please report an issue).

Prerequisites

  • git version 1.6.5 or later
  • Qt version 4.x or 5.x
  • CMake 3.0 or later

Download

Anonymous checkout behind a firewall CTK developer with write access
git clone https://github.com/commontk/CTK.git
git clone git@github.com:commontk/CTK.git

Build with CMake

mkdir CTK-superbuild
cd CTK-superbuild
ccmake ../CTK
make

CMake Configuration

  • For Qt5, set Qt5_DIR to C:\Qt\5.15.2\msvc2019_64\lib\cmake\Qt5
  • For Qt4, set QT_QMAKE_EXECUTABLE (qmake is usually found in the bin folder)
  • turn on the parts of CTK you want to build

How to use CTK ?

See the Examples project that illustrates how CTK can be integrated into applications.

Contribute

Simple Git

See also https://docs.github.com/en/get-started/using-git

Checkout

  • checkout
git clone git@github.com:commontk/CTK.git

(or use anonymous option listed above)

Update

git pull --rebase

Commit

  • commit (commit is to local version, push sends it to upstream server)
git add <changed files>
git commit -m <message>
git push

Intermediate Git

  • check update before merging (look at diff):
git fetch
git diff origin master
git rebase
  • If you have changes pending that you aren't ready to commit, you can't rebase on top of them unless you do this:
git stash
git pull --rebase
git stash pop
  • to get the code from a branch
git clone <repository> <dir>
cd <dir>
git checkout origin/<branchname>

Links

List of needed tools and libraries used when building CTK:

  • Git: To download source code
  • Qt: Dependency required.
  • CMake: Cross-platform build system
  • Patch for Windows: Needed to apply patches to external thirdparty libraries source code

Optional:

  • Python: If you plan to use Scripting
  • DoxyGen: To generate documentation from source code on your machine
  • GraphViz: To generate documentation from source code on your machine