- Timestamp:
- Jul 2, 2005, 6:28:26 PM (19 years ago)
- Location:
- orxonox/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/config.h.in
r4698 r4774 1 1 /* config.h.in. Generated from configure.ac by autoheader. */ 2 3 /* Define to the read-only architecture-independent data directory. */ 4 #undef DATADIR 2 5 3 6 /* in which debug mode we are */ -
orxonox/trunk/configure
r4772 r4774 869 869 --disable-modular-debug compiles in modular-debug mode, that logs 870 870 differently on the many modules of orxonox. 871 --enable-sub-projects also builds the subProjects while make from srcdir 871 --disable-gtk Prevents GTK from being loaded 872 --disable-curl Prevents libcURL from being loaded 872 873 --enable-profile builds orxonox with profiling support 873 874 --enable-efence builds orxonox with efence support … … 878 879 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 879 880 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 880 --without-gtk Prevents GTK from being loaded 881 --without-curl Prevents libcURL from being loaded 881 --with-sub-projects also builds the subProjects while make from srcdir 882 882 883 883 Some influential environment variables: … … 3925 3925 3926 3926 3927 ## THIS IS OUR DEFAULT-DATA-DIRECTORY 3928 3927 3929 ################################## 3928 3930 ## CHECKING OPTIONAL ARGUMENTS ## 3929 3931 ################################## 3932 #----------------# 3933 # Data-Directory # 3934 #----------------# 3935 DATA_DIR=$datadir 3936 echo \$\{prefix\} 3937 if test $DATA_DIR = \$\{prefix\}/share ; then 3938 echo "not given" 3939 DATA_DIR=/usr/share 3940 else 3941 echo "given: $DATA_DIR" 3942 fi 3943 3944 cat >>confdefs.h <<_ACEOF 3945 #define DATADIR "$DATA_DIR" 3946 _ACEOF 3947 3930 3948 3931 3949 #-----------------# … … 3988 4006 echo "$as_me:$LINENO: checking if gtk should be enabled" >&5 3989 4007 echo $ECHO_N "checking if gtk should be enabled... $ECHO_C" >&6 3990 3991 # Check whether --with-gtk or --without-gtk was given. 3992 if test "${with_gtk+set}" = set; then 3993 withval="$with_gtk" 4008 # Check whether --enable-gtk or --disable-gtk was given. 4009 if test "${enable_gtk+set}" = set; then 4010 enableval="$enable_gtk" 3994 4011 def_gtk=no 3995 4012 else … … 4008 4025 echo "$as_me:$LINENO: checking if libcURL should be enabled" >&5 4009 4026 echo $ECHO_N "checking if libcURL should be enabled... $ECHO_C" >&6 4010 4011 # Check whether --with-curl or --without-curl was given. 4012 if test "${with_curl+set}" = set; then 4013 withval="$with_curl" 4027 # Check whether --enable-curl or --disable-curl was given. 4028 if test "${enable_curl+set}" = set; then 4029 enableval="$enable_curl" 4014 4030 def_curl=no 4015 4031 else … … 4029 4045 echo "$as_me:$LINENO: checking if the SubProjects should be built" >&5 4030 4046 echo $ECHO_N "checking if the SubProjects should be built... $ECHO_C" >&6 4031 # Check whether --enable-sub-projects or --disable-sub-projects was given. 4032 if test "${enable_sub_projects+set}" = set; then 4033 enableval="$enable_sub_projects" 4047 4048 # Check whether --with-sub-projects or --without-sub-projects was given. 4049 if test "${with_sub_projects+set}" = set; then 4050 withval="$with_sub_projects" 4034 4051 def_sub_projects=yes 4035 4052 fi; … … 4114 4131 DOCUMENTATION_FALSE= 4115 4132 fi 4133 4116 4134 4117 4135 ####################### -
orxonox/trunk/configure.ac
r4772 r4774 42 42 AC_HEADER_STDC 43 43 44 ## THIS IS OUR DEFAULT-DATA-DIRECTORY 45 44 46 ################################## 45 47 ## CHECKING OPTIONAL ARGUMENTS ## 46 48 ################################## 49 #----------------# 50 # Data-Directory # 51 #----------------# 52 DATA_DIR=$datadir 53 echo \$\{prefix\} 54 if test $DATA_DIR = \$\{prefix\}/share ; then 55 echo "not given" 56 DATA_DIR=/usr/share 57 else 58 echo "given: $DATA_DIR" 59 fi 60 AC_DEFINE_UNQUOTED([DATADIR], ["$DATA_DIR"], 61 [Define to the read-only architecture-independent 62 data directory.]) 47 63 48 64 #-----------------# … … 90 106 #--------------# 91 107 AC_MSG_CHECKING([if gtk should be enabled]) 92 AC_ARG_ WITH([gtk],93 AC_HELP_STRING( [-- without-gtk],108 AC_ARG_ENABLE([gtk], 109 AC_HELP_STRING( [--disable-gtk], 94 110 [Prevents GTK from being loaded]), [def_gtk=no], [def_gtk=yes]) 95 111 if test x$def_gtk = xyes; then … … 104 120 #------------------# 105 121 AC_MSG_CHECKING([if libcURL should be enabled]) 106 AC_ARG_ WITH([curl],107 AC_HELP_STRING( [-- without-curl],122 AC_ARG_ENABLE([curl], 123 AC_HELP_STRING( [--disable-curl], 108 124 [Prevents libcURL from being loaded]), [def_curl=no], [def_curl=yes]) 109 125 if test x$def_curl = xyes; then … … 119 135 def_sub_projects=no 120 136 AC_MSG_CHECKING([if the SubProjects should be built]) 121 AC_ARG_ ENABLE([sub-projects],122 AC_HELP_STRING( [-- enable-sub-projects],137 AC_ARG_WITH([sub-projects], 138 AC_HELP_STRING( [--with-sub-projects], 123 139 [also builds the subProjects while make from srcdir]), [def_sub_projects=yes]) 124 140 if test x$def_sub_projects = xyes; then … … 176 192 fi 177 193 AM_CONDITIONAL(DOCUMENTATION, test x$def_documentation = xyes) 194 178 195 ####################### 179 196 ## PROGRAMM CHECKING ## -
orxonox/trunk/scripts/gentoo/orxonox-0.3.0_alpha-r4772.ebuild
r4773 r4774 3 3 # $Header: $ 4 4 5 inherit eutils 5 inherit eutils games 6 7 DATA_VERSION=65 6 8 7 9 DESCRIPTION="orxonox is an open-source vertical scroller game programmed in C++, OpenGL, OpenAL and SDL" 8 10 HOMEPAGE="http://www.orxonox.ethz.ch" 9 11 SRC_URI="http://www.orxonox.ethz.ch/files/snapshots/${P}-${PR}.tar.bz2 10 http://www.orxonox.ethz.ch/files/snapshots/ data-r65.tar.bz2"12 http://www.orxonox.ethz.ch/files/snapshots/${PN}-data-r${DATA_VERSION}.tar.bz2" 11 13 LICENSE="GPL-2" 12 14 SLOT="0" … … 25 27 S=${WORKDIR}/${P} 26 28 29 src_unpack() { 30 unpack ${P}-${PR}.tar.bz2 31 cd "${S}" 32 unpack ${PN}-data-r${DATA_VERSION}.tar.bz2 33 } 34 27 35 src_compile() { 28 econf || die "econf failed" 29 30 #./configure \ 31 # --host=${CHOST} \ 32 # --prefix=/usr \ 33 # --infodir=/usr/share/info \ 34 # --mandir=/usr/share/man || die "./configure failed" 36 egamesconf || die 35 37 36 38 emake || die "emake failed" … … 39 41 src_install() { 40 42 make DESTDIR=${D} install || die 43 44 dodir ${GAMES_DATADIR}/${PN} 45 cp -r data/* ${D}/${GAMES_DATADIR}/${PN}/ \ 46 || die "data copy failed" 47 48 dodoc AUTHORS ChangeLog README 49 50 prepgamesdirs 41 51 42 52 #make \ … … 49 59 #einstall || die 50 60 } 61 62 pkg_postinst() { 63 games_pkg_postinst 64 } -
orxonox/trunk/src/defs/globals.h
r4766 r4774 1 1 /*! 2 2 \file globals.h 3 \brief This file defines some default values.3 \brief This file defines some global default values. 4 4 5 5 no Class is defined here. … … 8 8 #ifndef _GLOBALS_H 9 9 #define _GLOBALS_H 10 11 #include "confincl.h" 12 10 13 11 14 #define ORXONOX_STAFF "Patrick Boenzli - Captain\n" \ … … 18 21 #define DEFAULT_CONFIG_FILE "~/.orxonox/orxonox.conf" 19 22 #define DEFAULT_LOCK_FILE "~/.orxonox/orxonox.lock" 20 #define DEFAULT_DATA_DIR "/usr/share/orxonox/data/"23 #define DEFAULT_DATA_DIR DATADIR "/orxonox" 21 24 #define DEFAULT_DATA_DIR_CHECKFILE "data.oxd" 22 25 -
orxonox/trunk/src/lib/gui/gui_update.cc
r4746 r4774 1 /* 1 /* 2 2 orxonox - the future of 3D-vertical-scrollers 3 3 Copyright (C) 2004 orx … … 15 15 You should have received a copy of the GNU General Public License 16 16 along with this program; if not, write to the Free Software Foundation, 17 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 18 19 19 … … 40 40 Button* dataDirButton; //!< A Button for the selection of the DataRepos 41 41 OptionLabel* dataDirLabel; //!< A Label fot the selection of the DataRepos 42 42 43 43 44 44 this->tmpDir = NULL; … … 61 61 dataDirDialog->setDefaultFileName("data"); 62 62 dataDirDialog->setMask(DATA_IDENTIFIER); 63 this->checkDataDir( "../data/"DATA_IDENTIFIER, dataDirLabel);63 this->checkDataDir(DEFAULT_DATA_DIR DATA_IDENTIFIER, dataDirLabel); 64 64 dataDirDialog->disableFileOpts(); 65 65 dataDirDialog->setOpenUpButton(dataDirButton); … … 78 78 this->autoUpdate->saveability(); 79 79 80 80 81 81 82 82 … … 89 89 #else /* HAVE_CURL */ 90 90 Label* noCurlLabel = new Label("since you do not have cURL-support,\nupdate options are not availible"); 91 this->updateBox->fill(noCurlLabel); 91 this->updateBox->fill(noCurlLabel); 92 92 #endif /* HAVE_CURL */ 93 93 this->updateFrame->fill(this->updateBox); … … 107 107 /** 108 108 \brief checks if the Folder containing selected File is data.oxd, and if so sets it. 109 \param 109 \param 110 110 */ 111 111 bool GuiUpdate::checkDataDir(const char* fileName, void* object) … … 115 115 char* tmpName = new char[strlen(fileName)-strlen(DATA_IDENTIFIER)+1]; 116 116 strncpy(tmpName, fileName, strlen(fileName)-strlen(DATA_IDENTIFIER)); 117 tmpName[strlen(fileName)-strlen(DATA_IDENTIFIER)] = '\0'; 117 tmpName[strlen(fileName)-strlen(DATA_IDENTIFIER)] = '\0'; 118 118 static_cast<OptionLabel*>(object)->setValue(tmpName); 119 119 delete tmpName; … … 125 125 126 126 127 /** 127 /** 128 128 \brief Look what info we can get from this system 129 129 */ … … 162 162 updateFileInfo.webRoot = "http://www.orxonox.ethz.ch/files/data"; 163 163 updateFileInfo.localRoot = this->tmpDir; 164 164 165 165 download(&updateFileInfo); 166 166 } … … 171 171 void GuiUpdate::updateDataWindowCreate() 172 172 { 173 this->updateDataWindow = new Window("update orxonox::Data"); 173 this->updateDataWindow = new Window("update orxonox::Data"); 174 174 this->updateDataBox = new Box('v'); 175 175 … … 230 230 test = new Button("increment"); 231 231 232 #ifdef HAVE_GTK2 232 #ifdef HAVE_GTK2 233 233 test->connectSignal("button_press_event", updateSourceBar, updateSourceFunc); 234 234 #endif /* HAVE_GTK2 */ 235 235 236 236 this->updateSourceBox->fill(test); 237 this->updateSourceWindow->fill(updateSourceBox); 238 #ifdef HAVE_GTK2 237 this->updateSourceWindow->fill(updateSourceBox); 238 #ifdef HAVE_GTK2 239 239 this->updateSourceWindowButton->connectSignal("button_press_event", this->updateSourceWindow, Window::windowOpen); 240 240 this->updateSourceWindow->connectSignal("destroy", this->updateSourceWindow, Window::windowClose); … … 253 253 254 254 255 #ifdef HAVE_GTK2 255 #ifdef HAVE_GTK2 256 256 /** 257 257 \brief updates the Data of orxonox. … … 367 367 strcat(fileOnDisk, "/"); 368 368 strcat(fileOnDisk, info->fileName); 369 369 370 370 if(localCurl) 371 371 { 372 372 373 373 info->fileHandle = fopen(fileOnDisk, "w"); 374 374 375 375 curl_easy_setopt(localCurl, CURLOPT_URL, fileOnNet); 376 376 curl_easy_setopt(localCurl, CURLOPT_WRITEDATA, info->fileHandle); … … 378 378 curl_easy_setopt(localCurl, CURLOPT_READFUNCTION, curlReadFunc); 379 379 curl_easy_setopt(localCurl, CURLOPT_NOPROGRESS, true); 380 380 381 381 curl_easy_perform(localCurl); 382 382 … … 413 413 if(curlHandle) 414 414 { 415 415 416 416 info->fileHandle = fopen(fileOnDisk, "w"); 417 417 418 418 curl_easy_setopt(curlHandle, CURLOPT_URL, fileOnNet); 419 419 curl_easy_setopt(curlHandle, CURLOPT_WRITEDATA, info->fileHandle); … … 425 425 426 426 if(!isDownloading) 427 428 #ifdef HAVE_GTK2 429 430 431 #endif /* HAVE_GTK2 */ 432 433 434 435 436 437 438 439 440 441 else 442 427 { 428 #ifdef HAVE_GTK2 429 info->stateButton->disconnectSignal(info->buttonSignal); 430 info->buttonSignal = info->stateButton->connectSignal("button_press_event", info, cancelDownload); 431 #endif /* HAVE_GTK2 */ 432 info->stateButton->setTitle("please wait"); 433 434 downloadThread(info); 435 downloadThreadFinished(info); 436 437 // res = curl_easy_perform(curlHandle); 438 439 // fclose(outfile); 440 } 441 else 442 PRINTF(1)("thread already in use\n"); 443 443 444 444 } … … 459 459 460 460 /** 461 \brief Finishes a downloading process. 461 \brief Finishes a downloading process. 462 462 \param fileInfo the FileInfo. 463 463 */ 464 464 void* GuiUpdate::downloadThreadFinished(void* fileInfo) 465 { 465 { 466 466 FileInfo* info =(FileInfo*)fileInfo; 467 467 if(curlHandle) 468 468 curl_easy_cleanup(curlHandle); 469 469 470 470 PRINTF(4)("Closing the downloaded file.\n"); 471 471 fclose(info->fileHandle); … … 475 475 // else 476 476 // info->stateButton->setTitle("done"); 477 #ifdef HAVE_GTK2 477 #ifdef HAVE_GTK2 478 478 info->stateButton->disconnectSignal(info->buttonSignal); 479 479 info->buttonSignal = info->stateButton->connectSignal("button_press_event", info, updateDataFunc);
Note: See TracChangeset
for help on using the changeset viewer.