Difference between revisions of "Projects/Edu/KStars/Building KStars"

< Projects‎ | Edu‎ | KStars
Jump to: navigation, search
(Add how to build kstars from git using the procedure described on http://kate-editor.org/get-it/)
(Git: Checkout latest KDE4 branch instead of master. Fix IRC channel name.)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Introduction ==
+
This page is a community effort to document the procedure to build various versions of KStars for KDE4 on various platforms and environments. We have a [[../Building KStars KF5|separate page for the Frameworks5 version]].
This page is a community effort to document the procedure to build various versions of KStars on various platforms and environments.
+
  
 
== Why build from source? ==
 
== Why build from source? ==
Line 12: Line 11:
 
* cmake -- buildsystem used by KDE
 
* cmake -- buildsystem used by KDE
 
* eigen -- linear algebra library
 
* eigen -- linear algebra library
 +
* zlib -- compression library
 +
 
=== Optional dependencies ===
 
=== Optional dependencies ===
 
* libcfitsio -- FITS library
 
* libcfitsio -- FITS library
Line 20: Line 21:
 
==== Debian / Kubuntu ====
 
==== Debian / Kubuntu ====
  
   sudo apt-get install build-essential cmake kdelibs5-dev libeigen2-dev libcfitsio3-dev
+
   sudo apt-get install build-essential cmake kdelibs5-dev libeigen3-dev libcfitsio3-dev libindi-dev zlib1g-dev
 
+
Please note that INDI is unavailable in Debian testing as of this writing.
+
  
 
== Documentation on building various versions ==
 
== Documentation on building various versions ==
Line 31: Line 30:
 
   mkdir ~/kde; cd ~/kde
 
   mkdir ~/kde; cd ~/kde
 
2) to fetch the KStars source code:
 
2) to fetch the KStars source code:
   git clone git://anongit.kde.org/kstars
+
   git clone git://anongit.kde.org/kstars -b Applications/14.12
 
3) create and change into a build directory for compilation:
 
3) create and change into a build directory for compilation:
 
   mkdir build; cd build
 
   mkdir build; cd build
 
4) run the configure process with cmake:
 
4) run the configure process with cmake:
   cmake ../KStars -DCMAKE_BUILD_TYPE=debugfull -DCMAKE_INSTALL_PREFIX=~/kde/usr
+
   cmake ../kstars -DCMAKE_BUILD_TYPE=debugfull -DCMAKE_INSTALL_PREFIX=~/kde/usr
 
5) compile KStars:
 
5) compile KStars:
 
   make
 
   make
Line 59: Line 58:
 
Make the script executable with chmod 755 ~/kde/run.sh. Now you can run the compiled KStars version with `~/kde/run.sh kstars`. Just calling `kstars` directly will start the system version of KStars.  
 
Make the script executable with chmod 755 ~/kde/run.sh. Now you can run the compiled KStars version with `~/kde/run.sh kstars`. Just calling `kstars` directly will start the system version of KStars.  
  
You can keep your copy up-to-date by typing `git pull --rebase` in ~/kde/kstars. Feel free to send patches to our mailing list kstars-devel@kde.org. And join #kdeedu on irc.kde.org :–)
+
You can keep your copy up-to-date by typing `git pull --rebase` in ~/kde/kstars. Feel free to send patches to our mailing list kstars-devel@kde.org. And join #kde-edu on irc.kde.org :–)

Latest revision as of 03:49, 20 December 2014

This page is a community effort to document the procedure to build various versions of KStars for KDE4 on various platforms and environments. We have a separate page for the Frameworks5 version.

Contents

[edit] Why build from source?

Typically, you would want to build KStars from source if you plan to develop KStars, or stay on the bleeding edge and contribute valuable feedback.

[edit] Prerequisite Packages

To build and develop KStars, several packages may be required from your distribution. Here's a list.

[edit] Required dependencies

  • GNU Make, GCC -- Essential tools for building
  • kdelibs -- KDE libraries
  • cmake -- buildsystem used by KDE
  • eigen -- linear algebra library
  • zlib -- compression library

[edit] Optional dependencies

  • libcfitsio -- FITS library
  • libindi -- Instrument Neutral Distributed Interface, for controlling equipment.

[edit] Installing these packages

To install all of these, use the following commands:

[edit] Debian / Kubuntu

  sudo apt-get install build-essential cmake kdelibs5-dev libeigen3-dev libcfitsio3-dev libindi-dev zlib1g-dev

[edit] Documentation on building various versions

[edit] Git

KStars development happens on KDE's git repository. (Git is an open-source version control software.). The code on git is the bleeding-edge developers' version of KStars. It does break occasionally.

1) create and change into a KDE development directory:

  mkdir ~/kde; cd ~/kde

2) to fetch the KStars source code:

  git clone git://anongit.kde.org/kstars -b Applications/14.12

3) create and change into a build directory for compilation:

  mkdir build; cd build

4) run the configure process with cmake:

  cmake ../kstars -DCMAKE_BUILD_TYPE=debugfull -DCMAKE_INSTALL_PREFIX=~/kde/usr

5) compile KStars:

  make

6) finally install KStars:

  make install

That’s all! This installs KStars locally into the separate directory ~/kde/usr, so that your global KDE installation will not be touched at all.

Now on to starting the newly compiled KStars. Create a file ~/kde/run.sh with the following content:

 #!/bin/bash
 export KSTARS_DIR=~/kde/usr
 export PATH=$KSTARS_DIR/bin:$PATH
 export LD_LIBRARY_PATH=$KSTARS_DIR/lib:$LD_LIBRARY_PATH
 export KDEDIR=$KSTARS_DIR
 export KDEDIRS=$KDEDIR
 export XDG_DATA_DIRS=$XDG_DATA_DIRS:$KSTARS_DIR/share
 # update KDE's system configuration cache
 kbuildsycoca4
 # start app
 $@

Make the script executable with chmod 755 ~/kde/run.sh. Now you can run the compiled KStars version with `~/kde/run.sh kstars`. Just calling `kstars` directly will start the system version of KStars.

You can keep your copy up-to-date by typing `git pull --rebase` in ~/kde/kstars. Feel free to send patches to our mailing list kstars-devel@kde.org. And join #kde-edu on irc.kde.org :–)


This page was last modified on 20 December 2014, at 03:49. This page has been accessed 11,705 times. Content is available under Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal