Commit 425894a1 authored by Rishab Arora's avatar Rishab Arora
Browse files

Merge branch 'master' into gsoc2012-spacetime

Conflicts:
	CMakeLists.txt
parents b4ebeab5 06e65385
......@@ -10,3 +10,6 @@
*.lai
*.la
*.a
# Dolphin stuff
.directory
......@@ -18,15 +18,16 @@ macro_bool_to_01(CFITSIO_FOUND HAVE_CFITSIO_H)
macro_log_feature(CFITSIO_FOUND "libcfitsio0" "Support for the FITS (Flexible Image Transport System) data format in KStars." "http://indi.sf.net" FALSE "3.09" "")
# INDI is a Linux-specific addon
set(INDI_MINIMUM_VERSION 0.9.6)
IF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
macro_optional_find_package(INDI)
macro_optional_find_package(INDI ${INDI_MINIMUM_VERSION})
macro_bool_to_01(INDI_FOUND HAVE_INDI_H)
macro_log_feature(INDI_FOUND "libindi" "Support for controlling astronomical devices with KStars." "http://www.indilib.org" FALSE "0.8.0" "")
macro_log_feature(INDI_FOUND "libindi" "Support for controlling astronomical devices with KStars." "http://www.indilib.org" FALSE "${INDI_MINIMUM_VERSION}" "")
ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
check_include_files(linux/videodev2.h HAVE_LINUX_VIDEODEV2_H)
check_include_files(termios.h TERMIOS_FOUND)
macro_bool_to_01(TERMIOS_FOUND HAVE_TERMIOS_H)
macro_optional_find_package(WCSLIB)
macro_bool_to_01(WCSLIB_FOUND HAVE_WCSLIB)
macro_log_feature(WCSLIB_FOUND "WCSLib" "Support for World Coordinate System in KStars." "http://www.atnf.csiro.au/people/mcalabre/WCS/" FALSE "" "WCS enables KStars to read and process world coordinate systems in FITS header.")
macro_optional_find_package(Xplanet)
macro_bool_to_01(XPLANET_FOUND HAVE_XPLANET)
......@@ -48,10 +49,13 @@ if (EIGEN2_FOUND)
add_subdirectory( kstars )
endif (EIGEN2_FOUND)
add_subdirectory(datahandlers)
add_subdirectory(Tests)
if (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
macro_display_feature_log()
endif (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
\ No newline at end of file
endif (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
THIS FILE IS OUTDATED.
See http://techbase.kde.org/Getting_Started/Build/KDE4
Basic Installation
==================
==---> Don't forget to specify the install directory on the configure
command line: `./configure --prefix=$KDEDIR'. If KDEDIR is not
defined, then substitute the top-level directory of your KDE
installation. You can determine this with, for example
"which konqueror". The KDEDIR is everything before "bin"
(i.e., if it's /usr/bin/konqueror, then use
"./configure --prefix=/usr").
KDEDIR is typically /usr or /opt/kde or /opt/kde2 or /opt/kde3
==---> Dependencies: KStars is a KDE application. To build it from
source code, you will need to have the following packages installed.
You will need both the base package and the "-devel" version.
XFree86(-devel) (X11 libraries and headers)
libqt2(-devel) (QT libraries and headers)
kdelibs(-devel) (KDE libraries and headers)
libpng(-devel) (PNG graphics library)
libjpeg(-devel) (JPEG graphics library)
fam(-devel) (file monitoring library)
zlib(-devel) (image compression, may be named zlib1)
arts(-devel) (why does kstars need sound libs?)
libart_lgpl(-devel) (GNOME library required by KDE apps (why?))
If you are using an RPM-based distro (e.g., redhat or mandrake), you
can check for these packages with "rpm -qa |grep <package-name>".
A good place to find these packages is http://speakeasy.rpmfind.net
Make sure you match the versions of the KDE and QT packages to your
current installation, and try to find the RPM that was made specifically
for your distribution.
If you find a dependency other than those listed here, please let us
know! (email to kstars@30doradus.org)
(NOTE: you only need the devel packages if you are compiling from
the source code, not if you are installing a precompiled binary)
---------------------------------------------------------------------
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
**IMPORTANT NOTE: For some reason, the configure script isn't
reading the $KDEDIR environemnt variable. As a result, it
will install files below the root directort (/) because it
sets $prefix="". So, be sure to give the cmd-line
argument to set this directly:
'configure --prefix=$KDEDIR'
or, if KDEDIR is not defined, substitute the top-lavel directory of
your KDE installation. For example:
'configure --prefix=/usr' (default for Redhat and Mandrake)
Running `configure' takes a while. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Type `make install' to install the programs and any data files and
documentation. (run this step as root)
4. You can remove the program binaries and object files from the
source code directory by typing `make clean'.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
This file assumes you have already downloaded the KStars source since
you are reading it, otherwise get it from KDE git repo at git://anongit.kde.org/kstars.git
After that you need to do only a handful of steps
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/path/to/your/kde4/install/dir ..
make
make install
Obviously /path/to/your/kde4/install/dir is not a real path, you need to choose what you want to do:
* Use the value returned by kde4-config --prefix
- Will install it in the same prefix than your system kdelibs is installed
- Will overwrite your distribution KStars if you have it installed
- Will probably need administrator password
* Use a random subdirectory in your home, e.g. /home/myuser/kstars_install
- You will need to run
export KDEDIRS=/home/myuser/kstars_install:$(kde4-config --prefix)
kbuildsycoca4
- You will need to make sure the /home/myuser/kstars_install/bin is in your PATH environment variable
Happy hacking!
......@@ -10,6 +10,7 @@
# INDI_DATA_DIR - INDI shared data dir.
# Copyright (c) 2011, Jasem Mutlaq <mutlaqja@ikarustech.com>
# Copyright (c) 2012, Pino Toscano <pino@kde.org>
# Based on FindLibfacile by Carsten Niehaus, <cniehaus@gmx.de>
#
# Redistribution and use is allowed according to the terms of the BSD license.
......@@ -24,60 +25,53 @@ if (INDI_INCLUDE_DIR AND INDI_DATA_DIR AND INDI_LIBRARIES AND INDI_DRIVER_LIBRAR
else (INDI_INCLUDE_DIR AND INDI_DATA_DIR AND INDI_LIBRARIES AND INDI_DRIVER_LIBRARIES AND INDI_MAIN_LIBRARIES)
find_path(INDI_INCLUDE_DIR indidevapi.h
PATH_SUFFIXES libindi
${_obIncDir}
${GNUWIN32_DIR}/include
)
find_package(PkgConfig)
find_path(INDI_DATA_DIR drivers.xml
PATHS /usr/share /usr/local/share /opt ${GNUWIN32_DIR}/share
PATH_SUFFIXES indi
)
if (PKG_CONFIG_FOUND)
if (INDI_FIND_VERSION)
set(version_string ">=${INDI_FIND_VERSION}")
endif()
pkg_check_modules(PC_INDI libindi${version_string})
else()
# assume it was found
set(PC_INDI_FOUND TRUE)
endif()
find_library(INDI_LIBRARIES NAMES indi
PATHS
${_obLinkDir}
${GNUWIN32_DIR}/lib
)
if (PC_INDI_FOUND)
find_path(INDI_INCLUDE_DIR indidevapi.h
PATH_SUFFIXES libindi
HINTS ${PC_INDI_INCLUDE_DIRS}
)
find_library(INDI_DRIVER_LIBRARIES NAMES indidriver
PATHS
${_obLinkDir}
${GNUWIN32_DIR}/lib
)
find_library(INDI_LIBRARIES NAMES indi
HINTS ${PC_INDI_LIBRARY_DIRS}
)
find_library(INDI_MAIN_LIBRARIES NAMES indimain
PATHS
${_obLinkDir}
${GNUWIN32_DIR}/lib
)
find_library(INDI_DRIVER_LIBRARIES NAMES indidriver
HINTS ${PC_INDI_LIBRARY_DIRS}
)
find_library(INDI_CLIENT_LIBRARIES NAMES indiclient
PATHS
${_obLinkDir}
${GNUWIN32_DIR}/lib
)
find_library(INDI_MAIN_LIBRARIES NAMES indimain
HINTS ${PC_INDI_LIBRARY_DIRS}
)
# Find pkg-config
FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config PATHS /usr/bin/ /usr/local/bin )
# query pkg-config asking for a libindi >= 0.9.5
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.9.5 libindi RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
if(_return_VALUE STREQUAL "0")
set(INDI_FOUND TRUE)
else(_return_VALUE STREQUAL "0")
set(INDI_FOUND FALSE)
message(STATUS "Could NOT find libindi. pkg-config indicates that libindi >= 0.8.0 is not installed.")
endif(_return_VALUE STREQUAL "0")
if (INDI_FOUND)
if (NOT INDI_FIND_QUIETLY)
message(STATUS "Found INDI: ${INDI_LIBRARIES}, ${INDI_MAIN_LIBRARIES}")
message(STATUS "INDI Include: ${INDI_INCLUDE_DIR}, INDI Data: ${INDI_DATA_DIR}")
endif (NOT INDI_FIND_QUIETLY)
endif (INDI_FOUND)
find_library(INDI_CLIENT_LIBRARIES NAMES indiclient
HINTS ${PC_INDI_LIBRARY_DIRS}
)
find_path(INDI_DATA_DIR drivers.xml
PATH_SUFFIXES share/indi
)
set(INDI_VERSION "${PC_INDI_VERSION}")
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(INDI
REQUIRED_VARS INDI_INCLUDE_DIR INDI_LIBRARIES INDI_DRIVER_LIBRARIES INDI_MAIN_LIBRARIES INDI_CLIENT_LIBRARIES
VERSION_VAR INDI_VERSION
)
mark_as_advanced(INDI_INCLUDE_DIR INDI_DATA_DIR INDI_LIBRARIES INDI_DRIVER_LIBRARIES INDI_MAIN_LIBRARIES INDI_CLIENT_LIBRARIES)
......
# - Try to find WCSLIB
# Once done this will define
#
# WCSLIB_FOUND - system has WCSLIB
# WCSLIB_INCLUDE_DIR - the WCSLIB include directory
# WCSLIB_LIBRARIES - Link these to use WCSLIB
# Copyright (c) 2006, Jasem Mutlaq <mutlaqja@ikarustech.com>
# Based on FindLibfacile by Carsten Niehaus, <cniehaus@gmx.de>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if (WCSLIB_INCLUDE_DIR AND WCSLIB_LIBRARIES)
# in cache already
set(WCSLIB_FOUND TRUE)
message(STATUS "Found WCSLIB: ${WCSLIB_LIBRARIES}, ${WCSLIB_INCLUDE_DIR}")
else (WCSLIB_INCLUDE_DIR AND WCSLIB_LIBRARIES)
if (NOT WIN32)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_check_modules(PC_WCSLIB wcslib)
endif (PKG_CONFIG_FOUND)
endif (NOT WIN32)
find_path(WCSLIB_INCLUDE_DIR wcs.h
PATH_SUFFIXES wcslib
${PC_WCSLIB_INCLUDE_DIRS}
${_obIncDir}
${GNUWIN32_DIR}/include
)
find_library(WCSLIB_LIBRARIES NAMES wcs
PATHS
${PC_WCSLIB_LIBRARY_DIRS}
${_obLinkDir}
${GNUWIN32_DIR}/lib
)
if(WCSLIB_INCLUDE_DIR AND WCSLIB_LIBRARIES)
set(WCSLIB_FOUND TRUE)
else (WCSLIB_INCLUDE_DIR AND WCSLIB_LIBRARIES)
set(WCSLIB_FOUND FALSE)
endif(WCSLIB_INCLUDE_DIR AND WCSLIB_LIBRARIES)
if (WCSLIB_FOUND)
if (NOT WCSLIB_FIND_QUIETLY)
message(STATUS "Found WCSLIB: ${WCSLIB_LIBRARIES}, ${WCSLIB_INCLUDE_DIR}")
endif (NOT WCSLIB_FIND_QUIETLY)
else (WCSLIB_FOUND)
if (WCSLIB_FIND_REQUIRED)
message(FATAL_ERROR "WCSLIB not found. Please install wcslib and try again.")
endif (WCSLIB_FIND_REQUIRED)
endif (WCSLIB_FOUND)
mark_as_advanced(WCSLIB_INCLUDE_DIR WCSLIB_LIBRARIES)
endif (WCSLIB_INCLUDE_DIR AND WCSLIB_LIBRARIES)
/* Define to 1 if you have the <linux/videodev2.h> header file. */
#cmakedefine HAVE_LINUX_VIDEODEV2_H 1
/* The symbol timezone is an int, not a function */
#define TIMEZONE_IS_INT 1
/* Define if you have termios.h */
#cmakedefine HAVE_TERMIOS_H 1
/* Define if you have fitsio.h */
#cmakedefine HAVE_CFITSIO_H 1
......@@ -15,3 +6,6 @@
/* Define if you have xplanet */
#cmakedefine HAVE_XPLANET 1
/* Define if you have wcslibt */
#cmakedefine HAVE_WCSLIB 1
......@@ -141,8 +141,8 @@ The window is depicted below:
</para>
<para>
The <guilabel>Configure &kstars;</guilabel> window is divided into seven
page:
The <guilabel>Configure &kstars;</guilabel> window is divided into nine
pages:
<guilabel>Catalogs</guilabel>, <guilabel>Solar System</guilabel>, <guilabel>Satellites</guilabel>,
<guilabel>Supernovae</guilabel>, <guilabel>Guides</guilabel>, <guilabel>Colors</guilabel>,
<guilabel>INDI</guilabel>, <guilabel>Xplanet</guilabel>, and <guilabel>Advanced</guilabel>.
......
......@@ -44,8 +44,8 @@ associated with the object are listed. These are the links that
appear in the popup menu when the object is
<mousebutton>right</mousebutton>-clicked. You can add custom
links to the object with the <guibutton>Add Link...</guibutton>
button. This will open a window in which you fill in the URL and link
text for the new link (you can also test the URL in the web browser
button. This will open a window in which you fill in the &URL; and link
text for the new link (you can also test the &URL; in the web browser
from this window). Keep in mind that the custom link can easily point
to a file on your local disk, so you can use this feature to index
your personal astronomical images or observing logs.
......
......@@ -30,6 +30,6 @@ The most popular epoch used currently is J2000.0,
UTC. Other epochs include B1900 and B1950.
</para>
<para>
KStars supports catalogs based on J2000.0 and B1950.0 epochs.
&kstars; supports catalogs based on J2000.0 and B1950.0 epochs.
</para>
</sect1>
......@@ -257,7 +257,7 @@ It depends on the image, but many of the images restrict against commercial usag
Yes, definitely! Introduce yourself on our mailing list:
<email>kstars-devel@kde.org</email>. If you want to
help with the coding, download the latest <ulink
url="http://techbase.kde.org/Projects/Edu/KStars/Building_KStars">&kstars; GIT</ulink> version of the
url="http://techbase.kde.org/Projects/Edu/KStars/Building_KStars">&kstars; Git</ulink> version of the
code and dive right in. There are several README files in the
distribution that explain some of the code's subsystems. If you
need ideas of what to work on, see the TODO file. You can submit
......@@ -265,7 +265,7 @@ patches to kstars-devel, and feel free to post any questions you
have about the code there as well.
</para><para>
If you are not into coding, we can still use your help with i18n, docs,
AstroInfo articles, URL links, bug reports, and feature requests.
AstroInfo articles, &URL; links, bug reports, and feature requests.
</para>
</answer>
</qandaentry>
......
......@@ -73,7 +73,7 @@
<!ENTITY % English "INCLUDE"><!-- change language only here -->
]>
<book lang="&language;">
<book id="kstars" lang="&language;">
<title>The &kstars; Handbook</title>
<bookinfo>
......
......@@ -8,6 +8,7 @@ if (CFITSIO_FOUND)
set (fits_SRCS
fitsviewer/fitshistogram.cpp
fitsviewer/fitsimage.cpp
fitsviewer/fitsview.cpp
fitsviewer/fitsviewer.cpp
fitsviewer/fitshistogramdraw.cpp
fitsviewer/fitstab.cpp
......@@ -28,6 +29,7 @@ if (INDI_FOUND)
indi/clientmanager.cpp
indi/guimanager.cpp
indi/driverinfo.cpp
indi/deviceinfo.cpp
indi/indidevice.cpp
indi/indigroup.cpp
indi/indiproperty.cpp
......@@ -52,6 +54,7 @@ if (INDI_FOUND)
)
set(ekosui_SRCS
ekos/opsekos.ui
ekos/ekosmanager.ui
ekos/capture.ui
ekos/focus.ui
......@@ -65,7 +68,8 @@ if (INDI_FOUND)
ekos/capture.cpp
ekos/focus.cpp
ekos/guide.cpp
ekos/opsekos.cpp
ekos/QProgressIndicator.cpp
ekos/guide/common.cpp
ekos/guide/gmath.cpp
ekos/guide/guider.cpp
......@@ -78,6 +82,10 @@ if (INDI_FOUND)
include_directories(${INDI_INCLUDE_DIR})
endif(INDI_FOUND)
if (WCSLIB_FOUND)
include_directories( ${WCSLIB_INCLUDE_DIR} )
endif (WCSLIB_FOUND)
if ( XPLANET_FOUND )
set (xplanet_SRCS
xplanet/opsxplanet.cpp
......@@ -95,9 +103,6 @@ if ( OPENGL_FOUND )
add_definitions(-DHAVE_OPENGL)
endif( OPENGL_FOUND )
include_directories(
${kstars_SOURCE_DIR}/kstars/tools
${kstars_SOURCE_DIR}/kstars/skyobjects
......@@ -471,6 +476,9 @@ endif (CFITSIO_FOUND)
if (INDI_FOUND)
target_link_libraries(KStarsLib ${INDI_LIBRARIES} ${INDI_CLIENT_LIBRARIES} z)
endif (INDI_FOUND)
if (WCSLIB_FOUND)
target_link_libraries(kstars ${WCSLIB_LIBRARIES})
endif (WCSLIB_FOUND)
if( OPENGL_FOUND )
target_link_libraries(KStarsLib
......