building celestia QT4

116

building Celestia is normally very easy .

 

The recommended way has been to go grab a copy from SVN and build the standard GTK or Gnome or older kde3 (QT3) .Now seeing as kde3 is , for the most part, no more and qt4 is becoming the DEFAULT across all 3 major platforms . A qt 4 build is now needed .

BUT That is easier said than done qt4 is still a bit “experimental ” and still has a few bugs to work out . not everything 100% working and the auto tools ?? well it basically is a ‘makefile’ project using QT-Creator ( celesita.pro)
some things need to be done by hand .
 The *.pro file needs to have a minor edit , or you install some software where it is listed in the pro file .

The config.h is NOT made and is needed –an oops & bug , being worked on  — some system values need setting using the config.h

So to begin make sure software is installed Nvidia.run warning  ( some are VERY familiar with this – most do not know about this ) the .run REPLACES mesa system files and headers that celestia DOSE need to match mesa that is installed .
so if you use the .run driver you need reinstall the correct GL.h ( -dev or -devel )
for fedora that is ” yum reinstall mesa-devel ” after you install the .run after the kernel update —- consult your own distro . on this issue —-

read the README and INSTALL install all the source packages needed for png,lua, ogg ,…

Install SPICE http://naif.jpl.nasa.gov/naif/index.html
so you can use the spacecraft pointing and location kernels — this is optional BUT NICE to use a link to using spice for Cassini at Saturn http://www.shatters.net/forum/viewtopic.php?f=6&t=12275&hilit=cassini&start=0
and my update to it on the second page . spice is used by the cassini imaging team http://www.ciclops.org/news/looking_ahead.php?js=1

the current SVN pull “5162” builds using gcc 4.5 and png14 ( will also build using png12) 
”  svn co https://celestia.svn.sourceforge.net/svnroot/celestia/trunk celestia  “

copy celestia/celestia to your WORKING directory !!!!!!!!!! I build code on a labeled DATA partition to keep things separate from the OS
/DATA/src/QTcelestia — or your install folder ( there is NO install script !)
Now run ”  autoreconf -v -i   “
as normal for svn
the missing “config.h” and system variables
for the basic file i DO use the qt3 configure option to make it BUT this will sill have to be edited ” ./configure –with-kde ” there will be errors but seeing as all you need is ONE file .
Add to the “config.h”  the install folder YOU ARE GOING TO USE this is VERY important so celestia can find it’s config file !!!!
if you do not there WILL be a start error !!!
— copy/paste #######################

#define CELESTIA_DATA_DIR “/Your/install/folder”
#define CONFIG_DATA_DIR “/Your/install/folder”

#######################

i use — CELESTIA_DATA_DIR “/usr/opt/Qtcelestia”

Now almost there edit the pro file in the src folder celestia/src/celestia.pro
near the end is
###########

unix {
    INCLUDEPATH += /usr/local/cspice/include
    LIBS += -ljpeg -llua  /usr/local/cspice/lib/cspice.a
}
#############

edit that to reflect YOUR system
ready to build
fire up QT Creator use “open an existing project” navigate to celestia/src/celestia.pro
and click on ” build all ” ( debug is the DEFAULT )
if there are no errors then build the release — there will be some warnings  about 8 —
copy the contents of the build folder to your install folder ( unless you built in place )
–these are the required / needed files
celestia-qt4

data
extras
extras-standard
fonts
locale
models
scripts
shaders
textures

win32-installer-image.bmp
splash.png

celestia.cfg
demo.cel
guide.cel
start.cel

now make a “celestia.desktop ” file – Gnome or a desktop launcher file
( if you did NOT add the #define’s to “config.h” – the launcher WILL NOT WORK !!! )