Added Deon Ramsey's UNIX installer.
parent
fe88709038
commit
07c54e0c26
20
INSTALL
20
INSTALL
|
@ -9,12 +9,7 @@ what you need to do to build and run Celestia:
|
|||
|
||||
configure
|
||||
make
|
||||
cp src/celestia .
|
||||
./celestia
|
||||
|
||||
The cp command should really be automatic, but I'm not quite there yet. It's
|
||||
very important run Celestia from the base directory in which it was unpacked;
|
||||
otherwise, it won't find the configuration and data files.
|
||||
make install
|
||||
|
||||
There are two versions of Celestia which can be built--the default version
|
||||
uses GLUT and has no GUI. The other version uses Gtk+ to provide a basic
|
||||
|
@ -26,6 +21,15 @@ Gtk+ support, run configure with --enable-gtk:
|
|||
The GtkGLArea widget is required in order build Celestia with Gtk+. It can
|
||||
be downloaded from http://www.student.oulu.fi/~jlof/gtkglarea/
|
||||
|
||||
--Chris Laurel
|
||||
claurel@www.shatters.net
|
||||
Celestia will be installed into /usr/local by default, with data files landing
|
||||
in /usr/local/share/Celestia , but you may specify a new location with the
|
||||
--prefix option to configure:
|
||||
|
||||
configure --prefix=/home/my_directory
|
||||
|
||||
All the other usual configure parameters apply; you may see which options
|
||||
are available using 'configure --help'
|
||||
|
||||
Chris Laurel
|
||||
claurel@.shatters.net
|
||||
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
SUBDIRS = src
|
||||
pkgdata_DATA = celestia.cfg $(wildcard *.cel)
|
||||
|
||||
DIST = $(pkgdata_DATA)
|
||||
|
||||
SUBDIRS = src data textures models shaders fonts
|
||||
|
|
96
Makefile.in
96
Makefile.in
|
@ -90,15 +90,21 @@ ZVT_LIBS = @ZVT_LIBS@
|
|||
cflags_set = @cflags_set@
|
||||
cxxflags_set = @cxxflags_set@
|
||||
|
||||
SUBDIRS = src
|
||||
pkgdata_DATA = celestia.cfg $(wildcard *.cel)
|
||||
|
||||
DIST = $(pkgdata_DATA)
|
||||
|
||||
SUBDIRS = src data textures models shaders fonts
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_HEADER = config.h config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \
|
||||
Makefile.am Makefile.in NEWS TODO acconfig.h aclocal.m4 config.guess \
|
||||
config.h.in config.sub configure configure.in install-sh missing \
|
||||
mkinstalldirs
|
||||
DATA = $(pkgdata_DATA)
|
||||
|
||||
DIST_COMMON = README ./stamp-h1.in ./stamp-h2.in AUTHORS COPYING \
|
||||
ChangeLog INSTALL Makefile.am Makefile.in NEWS TODO acconfig.h \
|
||||
aclocal.m4 config.guess config.h.in config.sub configure configure.in \
|
||||
install-sh missing mkinstalldirs
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
@ -122,34 +128,72 @@ config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
|||
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
config.h: stamp-h
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h; \
|
||||
$(MAKE) stamp-h; \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) stamp-h1; \
|
||||
else :; fi
|
||||
stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES= CONFIG_HEADERS=config.h \
|
||||
$(SHELL) ./config.status
|
||||
@echo timestamp > stamp-h 2> /dev/null
|
||||
$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
|
||||
@echo timestamp > stamp-h1 2> /dev/null
|
||||
$(srcdir)/config.h.in: $(srcdir)/stamp-h1.in
|
||||
@if test ! -f $@; then \
|
||||
rm -f $(srcdir)/stamp-h.in; \
|
||||
$(MAKE) $(srcdir)/stamp-h.in; \
|
||||
rm -f $(srcdir)/stamp-h1.in; \
|
||||
$(MAKE) $(srcdir)/stamp-h1.in; \
|
||||
else :; fi
|
||||
$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
|
||||
$(srcdir)/stamp-h1.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
|
||||
@echo timestamp > $(srcdir)/stamp-h1.in 2> /dev/null
|
||||
|
||||
config.h: stamp-h2
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h2; \
|
||||
$(MAKE) stamp-h2; \
|
||||
else :; fi
|
||||
stamp-h2: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES= CONFIG_HEADERS=config.h \
|
||||
$(SHELL) ./config.status
|
||||
@echo timestamp > stamp-h2 2> /dev/null
|
||||
$(srcdir)/config.h.in: $(srcdir)/stamp-h2.in
|
||||
@if test ! -f $@; then \
|
||||
rm -f $(srcdir)/stamp-h2.in; \
|
||||
$(MAKE) $(srcdir)/stamp-h2.in; \
|
||||
else :; fi
|
||||
$(srcdir)/stamp-h2.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
@echo timestamp > $(srcdir)/stamp-h2.in 2> /dev/null
|
||||
|
||||
mostlyclean-hdr:
|
||||
|
||||
clean-hdr:
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h
|
||||
-rm -f config.h config.h
|
||||
|
||||
maintainer-clean-hdr:
|
||||
|
||||
install-pkgdataDATA: $(pkgdata_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
|
||||
@list='$(pkgdata_DATA)'; for p in $$list; do \
|
||||
if test -f $(srcdir)/$$p; then \
|
||||
echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$p"; \
|
||||
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$p; \
|
||||
else if test -f $$p; then \
|
||||
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p"; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \
|
||||
fi; fi; \
|
||||
done
|
||||
|
||||
uninstall-pkgdataDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(pkgdata_DATA)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(pkgdatadir)/$$p; \
|
||||
done
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
|
@ -215,7 +259,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP)
|
|||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in config.h.in $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
|
@ -227,8 +271,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LI
|
|||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
|
||||
test -z "$(ETAGS_ARGS)config.h.in config.h.in$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in config.h.in $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
|
@ -310,26 +354,27 @@ check-am: all-am
|
|||
check: check-recursive
|
||||
installcheck-am:
|
||||
installcheck: installcheck-recursive
|
||||
all-recursive-am: config.h
|
||||
all-recursive-am: config.h config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
install-exec-am:
|
||||
install-exec: install-exec-recursive
|
||||
|
||||
install-data-am:
|
||||
install-data-am: install-pkgdataDATA
|
||||
install-data: install-data-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-recursive
|
||||
uninstall-am:
|
||||
uninstall-am: uninstall-pkgdataDATA
|
||||
uninstall: uninstall-recursive
|
||||
all-am: Makefile config.h
|
||||
all-am: Makefile $(DATA) config.h config.h
|
||||
all-redirect: all-recursive-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
@ -363,7 +408,8 @@ maintainer-clean: maintainer-clean-recursive
|
|||
-rm -f config.status
|
||||
|
||||
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
|
||||
install-data-recursive uninstall-data-recursive install-exec-recursive \
|
||||
uninstall-pkgdataDATA install-pkgdataDATA install-data-recursive \
|
||||
uninstall-data-recursive install-exec-recursive \
|
||||
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
|
||||
all-recursive check-recursive installcheck-recursive info-recursive \
|
||||
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
|
||||
|
|
6
README
6
README
|
@ -35,7 +35,11 @@ computer. After setup is complete, launch Celestia by selecting it from
|
|||
the start menu.
|
||||
|
||||
UNIX:
|
||||
See the file INSTALL for UNIX installation instructions.
|
||||
See the file INSTALL for detailed UNIX installation instructions. Briefly,
|
||||
though:
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
|
||||
Running Celestia:
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
#undef HAVE_LIBSM
|
||||
|
||||
#undef CONFIG_DATA_DIR
|
||||
|
||||
/* Define if you have the <GL/gl.h> header file. */
|
||||
#undef HAVE_GL_GL_H
|
||||
|
||||
|
|
|
@ -725,7 +725,7 @@ fi
|
|||
|
||||
PACKAGE=Celestia
|
||||
|
||||
VERSION=1.1.2
|
||||
VERSION=1.1.4
|
||||
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
|
||||
{ echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
|
||||
|
@ -3956,6 +3956,19 @@ EOF
|
|||
fi
|
||||
|
||||
|
||||
if test "$prefix" = "NONE" ; then
|
||||
prefix=$ac_default_prefix
|
||||
fi
|
||||
PKGDATADIR=`eval echo "${datadir}/$PACKAGE"`
|
||||
cat >> confdefs.h <<EOF
|
||||
#define CONFIG_DATA_DIR "$PKGDATADIR"
|
||||
EOF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
trap '' 1 2 15
|
||||
cat > confcache <<\EOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
|
@ -4059,6 +4072,11 @@ ac_given_INSTALL="$INSTALL"
|
|||
|
||||
trap 'rm -fr `echo "Makefile \
|
||||
src/Makefile \
|
||||
data/Makefile \
|
||||
textures/Makefile \
|
||||
models/Makefile \
|
||||
shaders/Makefile \
|
||||
fonts/Makefile \
|
||||
config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
@ -4188,6 +4206,11 @@ cat >> $CONFIG_STATUS <<EOF
|
|||
|
||||
CONFIG_FILES=\${CONFIG_FILES-"Makefile \
|
||||
src/Makefile \
|
||||
data/Makefile \
|
||||
textures/Makefile \
|
||||
models/Makefile \
|
||||
shaders/Makefile \
|
||||
fonts/Makefile \
|
||||
"}
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
|
@ -4358,9 +4381,11 @@ EOF
|
|||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
|
||||
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
|
||||
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
|
||||
|
||||
exit 0
|
||||
EOF
|
||||
|
@ -4372,7 +4397,8 @@ test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
|
|||
echo "$ac_t""" 1>&6
|
||||
echo "$ac_t""" 1>&6
|
||||
echo "$ac_t""********************************************************************" 1>&6
|
||||
echo "$ac_t""*** Celestia configuration complete." 1>&6
|
||||
echo "$ac_t""*** Celestia configuration complete. Now do a 'make' followed ***" 1>&6
|
||||
echo "$ac_t""*** by 'make install' ***" 1>&6
|
||||
echo "$ac_t""********************************************************************" 1>&6
|
||||
echo "$ac_t""" 1>&6
|
||||
echo "$ac_t""" 1>&6
|
||||
|
|
18
configure.in
18
configure.in
|
@ -4,7 +4,7 @@ dnl Process this file with autoconf to make a configure script
|
|||
dnl
|
||||
|
||||
AC_INIT(configure.in)
|
||||
AM_INIT_AUTOMAKE(Celestia, 1.1.2)
|
||||
AM_INIT_AUTOMAKE(Celestia, 1.1.4)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
AM_ACLOCAL_INCLUDE(macros)
|
||||
|
@ -152,14 +152,28 @@ AC_CHECK_HEADERS(GL/gl.h GL/glut.h)
|
|||
AC_CHECK_HEADERS(byteswap.h)
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
if test "$prefix" = "NONE" ; then
|
||||
prefix=$ac_default_prefix
|
||||
fi
|
||||
PKGDATADIR=`eval echo "${datadir}/$PACKAGE"`
|
||||
AC_DEFINE_UNQUOTED(CONFIG_DATA_DIR, "$PKGDATADIR")
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
AC_OUTPUT( Makefile \
|
||||
src/Makefile \
|
||||
data/Makefile \
|
||||
textures/Makefile \
|
||||
models/Makefile \
|
||||
shaders/Makefile \
|
||||
fonts/Makefile \
|
||||
)
|
||||
|
||||
AC_MSG_RESULT()
|
||||
AC_MSG_RESULT()
|
||||
AC_MSG_RESULT(********************************************************************)
|
||||
AC_MSG_RESULT(*** Celestia configuration complete.)
|
||||
AC_MSG_RESULT(*** Celestia configuration complete. Now do a 'make' followed ***)
|
||||
AC_MSG_RESULT(*** by 'make install' ***)
|
||||
AC_MSG_RESULT(********************************************************************)
|
||||
AC_MSG_RESULT()
|
||||
AC_MSG_RESULT()
|
||||
|
|
|
@ -59,3 +59,10 @@ COMMONSOURCES = \
|
|||
vertexprog.cpp
|
||||
|
||||
celestia_SOURCES = $(COMMONSOURCES) $(FRONTENDSOURCE)
|
||||
|
||||
noinst_DATA= ../celestia
|
||||
CLEANFILES= ../celestia
|
||||
|
||||
../celestia: celestia
|
||||
(cd ..; ln -s src/celestia)
|
||||
|
||||
|
|
|
@ -94,17 +94,20 @@ bin_PROGRAMS = celestia
|
|||
@ENABLE_GTK_TRUE@FRONTENDSOURCE = gtkmain.cpp
|
||||
@ENABLE_GTK_FALSE@FRONTENDSOURCE = glutmain.cpp
|
||||
|
||||
COMMONSOURCES = 3dsmesh.cpp 3dsmodel.cpp 3dsread.cpp asterism.cpp astro.cpp bigfix.cpp body.cpp celestiacore.cpp cmdparser.cpp color.cpp command.cpp configfile.cpp constellation.cpp debug.cpp destination.cpp dispmap.cpp execution.cpp favorites.cpp filetype.cpp frustum.cpp galaxy.cpp glext.cpp meshmanager.cpp observer.cpp octree.cpp orbit.cpp overlay.cpp parser.cpp perlin.cpp regcombine.cpp render.cpp selection.cpp simulation.cpp solarsys.cpp spheremesh.cpp star.cpp stardb.cpp starname.cpp stellarclass.cpp texfont.cpp texmanager.cpp texture.cpp texturefont.cpp tokenizer.cpp univcoord.cpp unixtimer.cpp util.cpp vertexlist.cpp vertexprog.cpp
|
||||
COMMONSOURCES = 3dsmesh.cpp 3dsmodel.cpp 3dsread.cpp asterism.cpp astro.cpp bigfix.cpp body.cpp celestiacore.cpp cmdparser.cpp color.cpp command.cpp configfile.cpp constellation.cpp customorbit.cpp debug.cpp destination.cpp dispmap.cpp execution.cpp favorites.cpp filetype.cpp frustum.cpp galaxy.cpp glext.cpp lodspheremesh.cpp meshmanager.cpp observer.cpp octree.cpp orbit.cpp overlay.cpp parser.cpp perlin.cpp regcombine.cpp render.cpp selection.cpp simulation.cpp solarsys.cpp spheremesh.cpp star.cpp stardb.cpp starname.cpp stellarclass.cpp texmanager.cpp texture.cpp texturefont.cpp tokenizer.cpp univcoord.cpp unixtimer.cpp util.cpp vertexlist.cpp vertexprog.cpp
|
||||
|
||||
|
||||
celestia_SOURCES = $(COMMONSOURCES) $(FRONTENDSOURCE)
|
||||
|
||||
noinst_DATA = ../celestia
|
||||
CLEANFILES = ../celestia
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_HEADER = ../config.h ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I..
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I.. -I..
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
|
@ -115,27 +118,27 @@ X_PRE_LIBS = @X_PRE_LIBS@
|
|||
@ENABLE_GTK_TRUE@celestia_OBJECTS = 3dsmesh.o 3dsmodel.o 3dsread.o \
|
||||
@ENABLE_GTK_TRUE@asterism.o astro.o bigfix.o body.o celestiacore.o \
|
||||
@ENABLE_GTK_TRUE@cmdparser.o color.o command.o configfile.o \
|
||||
@ENABLE_GTK_TRUE@constellation.o debug.o destination.o dispmap.o \
|
||||
@ENABLE_GTK_TRUE@execution.o favorites.o filetype.o frustum.o galaxy.o \
|
||||
@ENABLE_GTK_TRUE@glext.o meshmanager.o observer.o octree.o orbit.o \
|
||||
@ENABLE_GTK_TRUE@overlay.o parser.o perlin.o regcombine.o render.o \
|
||||
@ENABLE_GTK_TRUE@selection.o simulation.o solarsys.o spheremesh.o \
|
||||
@ENABLE_GTK_TRUE@star.o stardb.o starname.o stellarclass.o texfont.o \
|
||||
@ENABLE_GTK_TRUE@texmanager.o texture.o texturefont.o tokenizer.o \
|
||||
@ENABLE_GTK_TRUE@univcoord.o unixtimer.o util.o vertexlist.o \
|
||||
@ENABLE_GTK_TRUE@vertexprog.o gtkmain.o
|
||||
@ENABLE_GTK_TRUE@constellation.o customorbit.o debug.o destination.o \
|
||||
@ENABLE_GTK_TRUE@dispmap.o execution.o favorites.o filetype.o frustum.o \
|
||||
@ENABLE_GTK_TRUE@galaxy.o glext.o lodspheremesh.o meshmanager.o \
|
||||
@ENABLE_GTK_TRUE@observer.o octree.o orbit.o overlay.o parser.o \
|
||||
@ENABLE_GTK_TRUE@perlin.o regcombine.o render.o selection.o \
|
||||
@ENABLE_GTK_TRUE@simulation.o solarsys.o spheremesh.o star.o stardb.o \
|
||||
@ENABLE_GTK_TRUE@starname.o stellarclass.o texmanager.o texture.o \
|
||||
@ENABLE_GTK_TRUE@texturefont.o tokenizer.o univcoord.o unixtimer.o \
|
||||
@ENABLE_GTK_TRUE@util.o vertexlist.o vertexprog.o gtkmain.o
|
||||
@ENABLE_GTK_FALSE@celestia_OBJECTS = 3dsmesh.o 3dsmodel.o 3dsread.o \
|
||||
@ENABLE_GTK_FALSE@asterism.o astro.o bigfix.o body.o celestiacore.o \
|
||||
@ENABLE_GTK_FALSE@cmdparser.o color.o command.o configfile.o \
|
||||
@ENABLE_GTK_FALSE@constellation.o debug.o destination.o dispmap.o \
|
||||
@ENABLE_GTK_FALSE@execution.o favorites.o filetype.o frustum.o galaxy.o \
|
||||
@ENABLE_GTK_FALSE@glext.o meshmanager.o observer.o octree.o orbit.o \
|
||||
@ENABLE_GTK_FALSE@overlay.o parser.o perlin.o regcombine.o render.o \
|
||||
@ENABLE_GTK_FALSE@selection.o simulation.o solarsys.o spheremesh.o \
|
||||
@ENABLE_GTK_FALSE@star.o stardb.o starname.o stellarclass.o texfont.o \
|
||||
@ENABLE_GTK_FALSE@texmanager.o texture.o texturefont.o tokenizer.o \
|
||||
@ENABLE_GTK_FALSE@univcoord.o unixtimer.o util.o vertexlist.o \
|
||||
@ENABLE_GTK_FALSE@vertexprog.o glutmain.o
|
||||
@ENABLE_GTK_FALSE@constellation.o customorbit.o debug.o destination.o \
|
||||
@ENABLE_GTK_FALSE@dispmap.o execution.o favorites.o filetype.o \
|
||||
@ENABLE_GTK_FALSE@frustum.o galaxy.o glext.o lodspheremesh.o \
|
||||
@ENABLE_GTK_FALSE@meshmanager.o observer.o octree.o orbit.o overlay.o \
|
||||
@ENABLE_GTK_FALSE@parser.o perlin.o regcombine.o render.o selection.o \
|
||||
@ENABLE_GTK_FALSE@simulation.o solarsys.o spheremesh.o star.o stardb.o \
|
||||
@ENABLE_GTK_FALSE@starname.o stellarclass.o texmanager.o texture.o \
|
||||
@ENABLE_GTK_FALSE@texturefont.o tokenizer.o univcoord.o unixtimer.o \
|
||||
@ENABLE_GTK_FALSE@util.o vertexlist.o vertexprog.o glutmain.o
|
||||
celestia_LDADD = $(LDADD)
|
||||
celestia_DEPENDENCIES =
|
||||
celestia_LDFLAGS =
|
||||
|
@ -143,6 +146,8 @@ CXXFLAGS = @CXXFLAGS@
|
|||
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
|
||||
DATA = $(noinst_DATA)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
|
@ -153,17 +158,17 @@ GZIP_ENV = --best
|
|||
DEP_FILES = .deps/3dsmesh.P .deps/3dsmodel.P .deps/3dsread.P \
|
||||
.deps/asterism.P .deps/astro.P .deps/bigfix.P .deps/body.P \
|
||||
.deps/celestiacore.P .deps/cmdparser.P .deps/color.P .deps/command.P \
|
||||
.deps/configfile.P .deps/constellation.P .deps/debug.P \
|
||||
.deps/destination.P .deps/dispmap.P .deps/execution.P .deps/favorites.P \
|
||||
.deps/filetype.P .deps/frustum.P .deps/galaxy.P .deps/glext.P \
|
||||
.deps/glutmain.P .deps/gtkmain.P .deps/meshmanager.P .deps/observer.P \
|
||||
.deps/octree.P .deps/orbit.P .deps/overlay.P .deps/parser.P \
|
||||
.deps/perlin.P .deps/regcombine.P .deps/render.P .deps/selection.P \
|
||||
.deps/simulation.P .deps/solarsys.P .deps/spheremesh.P .deps/star.P \
|
||||
.deps/stardb.P .deps/starname.P .deps/stellarclass.P .deps/texfont.P \
|
||||
.deps/texmanager.P .deps/texture.P .deps/texturefont.P \
|
||||
.deps/tokenizer.P .deps/univcoord.P .deps/unixtimer.P .deps/util.P \
|
||||
.deps/vertexlist.P .deps/vertexprog.P
|
||||
.deps/configfile.P .deps/constellation.P .deps/customorbit.P \
|
||||
.deps/debug.P .deps/destination.P .deps/dispmap.P .deps/execution.P \
|
||||
.deps/favorites.P .deps/filetype.P .deps/frustum.P .deps/galaxy.P \
|
||||
.deps/glext.P .deps/glutmain.P .deps/gtkmain.P .deps/lodspheremesh.P \
|
||||
.deps/meshmanager.P .deps/observer.P .deps/octree.P .deps/orbit.P \
|
||||
.deps/overlay.P .deps/parser.P .deps/perlin.P .deps/regcombine.P \
|
||||
.deps/render.P .deps/selection.P .deps/simulation.P .deps/solarsys.P \
|
||||
.deps/spheremesh.P .deps/star.P .deps/stardb.P .deps/starname.P \
|
||||
.deps/stellarclass.P .deps/texmanager.P .deps/texture.P \
|
||||
.deps/texturefont.P .deps/tokenizer.P .deps/univcoord.P \
|
||||
.deps/unixtimer.P .deps/util.P .deps/vertexlist.P .deps/vertexprog.P
|
||||
SOURCES = $(celestia_SOURCES)
|
||||
OBJECTS = $(celestia_OBJECTS)
|
||||
|
||||
|
@ -344,7 +349,7 @@ install-am: all-am
|
|||
install: install-am
|
||||
uninstall-am: uninstall-binPROGRAMS
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
all-am: Makefile $(PROGRAMS) $(DATA)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
|
@ -355,6 +360,7 @@ installdirs:
|
|||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
|
@ -398,6 +404,9 @@ mostlyclean-generic distclean-generic clean-generic \
|
|||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
../celestia: celestia
|
||||
(cd ..; ln -s src/celestia)
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
#ifdef __GNUC__
|
||||
|
||||
#ifndef DEBUG
|
||||
#define DPRINTF(fmt, ...)
|
||||
#define DPRINTF(fmt, args...)
|
||||
#else
|
||||
#define DPRINTF(fmt, ...) DebugPrint(fmt, __VA_ARGS__)
|
||||
#define DPRINTF(fmt, args...) DebugPrint(fmt, args)
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
|
|
@ -123,11 +123,11 @@ CelestiaCore::CelestiaCore() :
|
|||
currentTime(0.0),
|
||||
timeScale(1.0),
|
||||
paused(false),
|
||||
joystickRotation(0.0f, 0.0f, 0.0f),
|
||||
KeyAccel(1.0),
|
||||
contextMenuCallback(NULL),
|
||||
logoTexture(NULL),
|
||||
alerter(NULL),
|
||||
joystickRotation(0.0f, 0.0f, 0.0f),
|
||||
KeyAccel(1.0)
|
||||
alerter(NULL)
|
||||
{
|
||||
execEnv = new CoreExecutionEnvironment(*this);
|
||||
|
||||
|
@ -394,6 +394,8 @@ void CelestiaCore::keyDown(int key)
|
|||
KeyAccel *= 1.1;
|
||||
|
||||
// Only process alphanumeric keys if we're not in text enter mode
|
||||
if (islower(key))
|
||||
key = toupper(key);
|
||||
if (!(key >= 'A' && key <= 'Z' && textEnterMode))
|
||||
keysPressed[key] = true;
|
||||
}
|
||||
|
@ -401,6 +403,8 @@ void CelestiaCore::keyDown(int key)
|
|||
void CelestiaCore::keyUp(int key)
|
||||
{
|
||||
KeyAccel = 1.0;
|
||||
if (islower(key))
|
||||
key = toupper(key);
|
||||
keysPressed[key] = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include <cctype>
|
||||
#include <cstring>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include "gl.h"
|
||||
#include <GL/glut.h>
|
||||
#include "celestia.h"
|
||||
|
@ -110,11 +111,11 @@ void MouseButton(int button, int state, int x, int y)
|
|||
// mouse button 4 and 5 down events.
|
||||
if (button == MOUSE_WHEEL_UP)
|
||||
{
|
||||
appCore->mouseWheel(-1.0f);
|
||||
appCore->mouseWheel(-1.0f, 0);
|
||||
}
|
||||
else if (button == MOUSE_WHEEL_DOWN)
|
||||
{
|
||||
appCore->mouseWheel(1.0f);
|
||||
appCore->mouseWheel(1.0f, 0);
|
||||
}
|
||||
else if (button == GLUT_LEFT_BUTTON)
|
||||
{
|
||||
|
@ -153,6 +154,12 @@ void KeyPress(unsigned char c, int x, int y)
|
|||
exit(0);
|
||||
|
||||
appCore->charEntered((char) c);
|
||||
appCore->keyDown((int) c);
|
||||
}
|
||||
|
||||
void KeyUp(unsigned char c, int x, int y)
|
||||
{
|
||||
appCore->keyUp((int) c);
|
||||
}
|
||||
|
||||
|
||||
|
@ -226,6 +233,12 @@ int main(int argc, char* argv[])
|
|||
// Not ready to render yet
|
||||
ready = false;
|
||||
|
||||
if (chdir(CONFIG_DATA_DIR) == -1)
|
||||
{
|
||||
cerr << "Cannot chdir to '" << CONFIG_DATA_DIR <<
|
||||
"', probably due to improper installation\n";
|
||||
}
|
||||
|
||||
appCore = new CelestiaCore();
|
||||
if (appCore == NULL)
|
||||
{
|
||||
|
@ -251,6 +264,7 @@ int main(int argc, char* argv[])
|
|||
glutMouseFunc(MouseButton);
|
||||
glutMotionFunc(MouseDrag);
|
||||
glutKeyboardFunc(KeyPress);
|
||||
glutKeyboardUpFunc(KeyUp);
|
||||
glutSpecialFunc(SpecialKeyPress);
|
||||
glutSpecialUpFunc(SpecialKeyUp);
|
||||
|
||||
|
|
|
@ -16,12 +16,14 @@
|
|||
#include <cctype>
|
||||
#include <cstring>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include "gl.h"
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#include <gtkgl/gtkglarea.h>
|
||||
#include <gnome.h>
|
||||
#include "../config.h"
|
||||
#include "celestia.h"
|
||||
#include "vecmath.h"
|
||||
#include "quaternion.h"
|
||||
|
@ -211,7 +213,7 @@ static void menuAbout()
|
|||
};
|
||||
GtkWidget* about;
|
||||
about = gnome_about_new("Celestia",
|
||||
"1.1.2",
|
||||
VERSION,
|
||||
"(c) 2001 Chris Laurel",
|
||||
authors,
|
||||
"3D Space Simulation",
|
||||
|
@ -613,11 +615,11 @@ gint glarea_button_press(GtkWidget* widget, GdkEventButton* event)
|
|||
{
|
||||
if (event->button == 4)
|
||||
{
|
||||
appCore->mouseWheel(-1.0f);
|
||||
appCore->mouseWheel(-1.0f, 0);
|
||||
}
|
||||
else if (event->button == 5)
|
||||
{
|
||||
appCore->mouseWheel(1.0f);
|
||||
appCore->mouseWheel(1.0f, 0);
|
||||
}
|
||||
else if (event->button <= 3)
|
||||
{
|
||||
|
@ -748,6 +750,12 @@ int main(int argc, char* argv[])
|
|||
// Say we're not ready to render yet.
|
||||
bReady = false;
|
||||
|
||||
if (chdir(CONFIG_DATA_DIR) == -1)
|
||||
{
|
||||
cerr << "Cannot chdir to '" << CONFIG_DATA_DIR <<
|
||||
"', probably due to improper installation\n";
|
||||
}
|
||||
|
||||
appCore = new CelestiaCore();
|
||||
if (appCore == NULL)
|
||||
{
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include "gl.h"
|
||||
#include "glext.h"
|
||||
#include "mathlib.h"
|
||||
|
@ -362,7 +363,6 @@ void LODSphereMesh::renderSection(int phi0, int theta0,
|
|||
// assert(phi0 + extent <= maxDivisions);
|
||||
// assert(theta0 + extent / 2 < maxDivisions);
|
||||
// assert(isPow2(extent));
|
||||
int count = 0;
|
||||
int thetaExtent = extent;
|
||||
int phiExtent = extent / 2;
|
||||
int theta1 = theta0 + thetaExtent;
|
||||
|
|
|
@ -15,27 +15,6 @@
|
|||
#include "spheremesh.h"
|
||||
|
||||
|
||||
static bool trigArraysInitialized = false;
|
||||
static int maxDivisions = 4096;
|
||||
static float* sinArray = NULL;
|
||||
static float* cosArray = NULL;
|
||||
|
||||
|
||||
static void InitTrigArrays()
|
||||
{
|
||||
sinArray = new float[maxDivisions * 2 + 1];
|
||||
cosArray = new float[maxDivisions * 2 + 1];
|
||||
|
||||
for (int i = 0; i < maxDivisions * 2 + 1; i++)
|
||||
{
|
||||
double theta = ((double) i / (double) maxDivisions - 1.0) * 2.0 * PI;
|
||||
sinArray[i] = (float) sin(theta);
|
||||
cosArray[i] = (float) cos(theta);
|
||||
}
|
||||
trigArraysInitialized = true;
|
||||
}
|
||||
|
||||
|
||||
SphereMesh::SphereMesh(float radius, int _nRings, int _nSlices) :
|
||||
vertices(NULL), normals(NULL), texCoords(NULL), indices(NULL)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue