Changeset 3268 in orxonox.OLD for orxonox/branches/updater
- Timestamp:
- Dec 24, 2004, 4:25:41 PM (20 years ago)
- Location:
- orxonox/branches/updater
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/updater/Makefile.in
r3262 r3268 102 102 EGREP = @EGREP@ 103 103 EXEEXT = @EXEEXT@ 104 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@105 GTHREAD_LIBS = @GTHREAD_LIBS@106 104 GTK2_CFLAGS = @GTK2_CFLAGS@ 107 105 GTK2_LIBS = @GTK2_LIBS@ 108 106 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 109 107 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 110 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@111 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@112 108 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 113 109 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ -
orxonox/branches/updater/configure
r3264 r3268 312 312 #endif" 313 313 314 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP DEBUG DOXYGEN DOXYGEN_TRUE DOXYGEN_FALSE MSBITFIELDS GTK2_LIBS GTK2_CFLAGS HAVE_GTK2_TRUE HAVE_GTK2_FALSE GTHREAD_LIBS GTHREAD_CFLAGS HAVE_GTHREAD_TRUE HAVE_GTHREAD_FALSECURL_LIBS CURL_CFLAGS HAVE_CURL_TRUE HAVE_CURL_FALSE LIBOBJS LTLIBOBJS'314 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP DEBUG DOXYGEN DOXYGEN_TRUE DOXYGEN_FALSE MSBITFIELDS GTK2_LIBS GTK2_CFLAGS HAVE_GTK2_TRUE HAVE_GTK2_FALSE CURL_LIBS CURL_CFLAGS HAVE_CURL_TRUE HAVE_CURL_FALSE LIBOBJS LTLIBOBJS' 315 315 ac_subst_files='' 316 316 … … 872 872 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 873 873 --without-gtk Prevents GTK from being loaded 874 --without-gthread Prevents gThread from being loaded875 874 --without-curl Prevents libcURL from being loaded 876 875 --without-sdl-image Prevents SDL_image from being loaded … … 3888 3887 fi 3889 3888 3890 ## gThread-disabled3891 echo "$as_me:$LINENO: checking if gThread should be enabled" >&53892 echo $ECHO_N "checking if gThread should be enabled... $ECHO_C" >&63893 3894 # Check whether --with-gthread or --without-gthread was given.3895 if test "${with_gthread+set}" = set; then3896 withval="$with_gthread"3897 def_gthread=no3898 else3899 def_gthread=yes3900 fi;3901 if test "$def_gthread" = yes; then3902 echo "yes"3903 fi3904 if test "$def_gthread" = no; then3905 echo "no"3906 fi3907 3908 3889 ## libCurl disabled? 3909 3890 echo "$as_me:$LINENO: checking if libcURL should be enabled" >&5 … … 6691 6672 6692 6673 6693 ## checking for gThread6694 if test "$def_gthread" = yes; then6695 6696 echo "$as_me:$LINENO: checking for gthread" >&56697 echo $ECHO_N "checking for gthread... $ECHO_C" >&66698 if `pkg-config --exists gthread-2.0`; then6699 echo "yes"6700 have_gthread=yes6701 GTHREAD_LIBS=`pkg-config --libs gthread-2.0`6702 GTHREAD_CFLAGS=`pkg-config --cflags gthread-2.0`6703 6704 cat >>confdefs.h <<_ACEOF6705 #define HAVE_GTHREAD 16706 _ACEOF6707 6708 else6709 echo "no"6710 fi6711 6712 fi6713 6714 6715 6716 6717 if test x$have_gthread = xyes; then6718 HAVE_GTHREAD_TRUE=6719 HAVE_GTHREAD_FALSE='#'6720 else6721 HAVE_GTHREAD_TRUE='#'6722 HAVE_GTHREAD_FALSE=6723 fi6724 6725 6726 6674 ## checking for libcURL 6727 6675 if test "$def_curl" = yes; then … … 7987 7935 Usually this means the macro was only invoked conditionally." >&5 7988 7936 echo "$as_me: error: conditional \"HAVE_GTK2\" was never defined. 7989 Usually this means the macro was only invoked conditionally." >&2;}7990 { (exit 1); exit 1; }; }7991 fi7992 if test -z "${HAVE_GTHREAD_TRUE}" && test -z "${HAVE_GTHREAD_FALSE}"; then7993 { { echo "$as_me:$LINENO: error: conditional \"HAVE_GTHREAD\" was never defined.7994 Usually this means the macro was only invoked conditionally." >&57995 echo "$as_me: error: conditional \"HAVE_GTHREAD\" was never defined.7996 7937 Usually this means the macro was only invoked conditionally." >&2;} 7997 7938 { (exit 1); exit 1; }; } … … 8605 8546 s,@HAVE_GTK2_TRUE@,$HAVE_GTK2_TRUE,;t t 8606 8547 s,@HAVE_GTK2_FALSE@,$HAVE_GTK2_FALSE,;t t 8607 s,@GTHREAD_LIBS@,$GTHREAD_LIBS,;t t8608 s,@GTHREAD_CFLAGS@,$GTHREAD_CFLAGS,;t t8609 s,@HAVE_GTHREAD_TRUE@,$HAVE_GTHREAD_TRUE,;t t8610 s,@HAVE_GTHREAD_FALSE@,$HAVE_GTHREAD_FALSE,;t t8611 8548 s,@CURL_LIBS@,$CURL_LIBS,;t t 8612 8549 s,@CURL_CFLAGS@,$CURL_CFLAGS,;t t -
orxonox/branches/updater/configure.ac
r3264 r3268 53 53 fi 54 54 if test "$def_gtk" = no; then 55 echo "no"56 fi57 58 ## gThread-disabled59 AC_MSG_CHECKING([if gThread should be enabled])60 AC_ARG_WITH([gthread],61 AC_HELP_STRING( [--without-gthread],62 [Prevents gThread from being loaded]), [def_gthread=no], [def_gthread=yes])63 if test "$def_gthread" = yes; then64 echo "yes"65 fi66 if test "$def_gthread" = no; then67 55 echo "no" 68 56 fi … … 364 352 AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes) 365 353 366 ## checking for gThread367 if test "$def_gthread" = yes; then368 369 AC_MSG_CHECKING([for gthread])370 if `pkg-config --exists gthread-2.0`; then371 echo "yes"372 have_gthread=yes373 GTHREAD_LIBS=`pkg-config --libs gthread-2.0`374 GTHREAD_CFLAGS=`pkg-config --cflags gthread-2.0`375 AC_DEFINE_UNQUOTED(HAVE_GTHREAD, 1, [if we have gThread])376 else377 echo "no"378 fi379 380 fi381 AC_SUBST(GTHREAD_LIBS)382 AC_SUBST(GTHREAD_CFLAGS)383 AM_CONDITIONAL(HAVE_GTHREAD, test x$have_gthread = xyes)384 385 354 ## checking for libcURL 386 355 if test "$def_curl" = yes; then -
orxonox/branches/updater/src/Makefile.in
r3262 r3268 127 127 EGREP = @EGREP@ 128 128 EXEEXT = @EXEEXT@ 129 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@130 GTHREAD_LIBS = @GTHREAD_LIBS@131 129 GTK2_CFLAGS = @GTK2_CFLAGS@ 132 130 GTK2_LIBS = @GTK2_LIBS@ 133 131 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 134 132 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 135 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@136 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@137 133 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 138 134 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ -
orxonox/branches/updater/src/console/Makefile.in
r3262 r3268 104 104 EGREP = @EGREP@ 105 105 EXEEXT = @EXEEXT@ 106 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@107 GTHREAD_LIBS = @GTHREAD_LIBS@108 106 GTK2_CFLAGS = @GTK2_CFLAGS@ 109 107 GTK2_LIBS = @GTK2_LIBS@ 110 108 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 111 109 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 112 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@113 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@114 110 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 115 111 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ -
orxonox/branches/updater/src/gui/Makefile.am
r3262 r3268 1 AM_CXXFLAGS=$(GTK2_CFLAGS) $( GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)2 #AM_LDFLAGS=$(GTK2_LIBS) $(GTHREAD_LIBS)3 LIBS=$(GTK2_LIBS) $( GTHREAD_LIBS) $(CURL_LIBS)1 AM_CXXFLAGS=$(GTK2_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS) 2 #AM_LDFLAGS=$(GTK2_LIBS) 3 LIBS=$(GTK2_LIBS) $(CURL_LIBS) 4 4 5 5 bin_PROGRAMS=gui -
orxonox/branches/updater/src/gui/Makefile.in
r3262 r3268 113 113 EGREP = @EGREP@ 114 114 EXEEXT = @EXEEXT@ 115 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@116 GTHREAD_LIBS = @GTHREAD_LIBS@117 115 GTK2_CFLAGS = @GTK2_CFLAGS@ 118 116 GTK2_LIBS = @GTK2_LIBS@ 119 117 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 120 118 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 121 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@122 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@123 119 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 124 120 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ … … 129 125 LDFLAGS = @LDFLAGS@ 130 126 LIBOBJS = @LIBOBJS@ 131 #AM_LDFLAGS=$(GTK2_LIBS) $(GTHREAD_LIBS)132 LIBS = $(GTK2_LIBS) $( GTHREAD_LIBS) $(CURL_LIBS)127 #AM_LDFLAGS=$(GTK2_LIBS) 128 LIBS = $(GTK2_LIBS) $(CURL_LIBS) 133 129 LTLIBOBJS = @LTLIBOBJS@ 134 130 MAKEINFO = @MAKEINFO@ … … 188 184 target_os = @target_os@ 189 185 target_vendor = @target_vendor@ 190 AM_CXXFLAGS = $(GTK2_CFLAGS) $( GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)186 AM_CXXFLAGS = $(GTK2_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS) 191 187 gui_SOURCES = orxonox_gui.cc \ 192 188 orxonox_gui_gtk.cc \ -
orxonox/branches/updater/src/gui/orxonox_gui_gtk.cc
r3263 r3268 47 47 bool initGTK(int argc, char *argv[]) 48 48 { 49 #ifdef HAVE_GTHREAD50 PRINTF(3)("Initializing the ThreadSystem of the GUI\n");51 g_thread_init(NULL);52 gdk_threads_init();53 #endif /* HAVE_GTHREAD */54 49 gtk_init (&argc, &argv); 55 50 gtk_rc_parse( "rc" ); … … 61 56 bool mainloopGTK(void) 62 57 { 63 gdk_threads_enter();64 58 PRINTF(1)("test\n"); 65 59 gtk_main(); 66 gdk_threads_leave();67 60 } 68 61 #endif /* HAVE_GTK2 */ … … 1210 1203 this->progress = this->totalSize; 1211 1204 1205 1212 1206 #ifdef HAVE_GTK2 1213 1207 gtk_progress_set_value(GTK_PROGRESS(widget), this->progress*100.0/this->totalSize); 1208 while (gtk_events_pending()) 1209 gtk_main_iteration_do(TRUE); 1214 1210 #endif /* HAVE_GTK2 */ 1215 1211 PRINTF(3)("Progress: %f\n", progress*100.0/totalSize); -
orxonox/branches/updater/src/gui/orxonox_gui_update.cc
r3267 r3268 158 158 info->Bar = (ProgressBar*)bar; 159 159 PRINTF(3)("Preparing to download file %s.\n", info->fileName); 160 // downloadThread (info); 161 162 if (downloadThreadID == NULL) 163 { 164 if ( (downloadThreadID =g_thread_create(&downloadThread, info, TRUE, NULL)) == 0 ) 165 PRINTF(1)("can't create the thread"); 166 } 167 else 168 PRINTF(1)("thread already in use\n"); 169 160 download(info); 170 161 } 171 162 … … 198 189 int OrxonoxGuiUpdate::curlProgressFunc (ProgressBar* Bar, double totalSize, double progress, double upTotal, double upProgress) 199 190 { 200 gdk_threads_enter();201 191 Bar->setProgress(progress); 202 192 Bar->setTotalSize(totalSize); 203 gdk_threads_leave();204 193 return 0; 205 206 } 207 208 GThread* OrxonoxGuiUpdate::downloadThreadID = NULL; 209 210 void* OrxonoxGuiUpdate::downloadThread (void* fileInfo) 194 } 195 196 197 void* OrxonoxGuiUpdate::download (void* fileInfo) 211 198 { 212 199 … … 241 228 curl_easy_cleanup(curl); 242 229 } 243 downloadThreadID = NULL;244 230 return NULL; 245 231 } 232 233 #ifdef HAVE_GTK2 234 gint OrxonoxGuiUpdate::cancelDownload(GtkWidget* w, GdkEventKey* event, void* bar) 235 { 236 } 237 #endif /* HAVE_GTK2 */ 246 238 247 239 #endif /* HAVE_CURL */ -
orxonox/branches/updater/src/gui/orxonox_gui_update.h
r3267 r3268 53 53 static int curlProgressFunc (ProgressBar* Bar, double totalSize, double progress, double upTotal, double upProgress); 54 54 55 static GThread* downloadThreadID; 56 static void* downloadThread (void* fileInfo); 57 55 static void* download (void* fileInfo); 56 #ifdef HAVE_GTK2 57 static gint cancelDownload(GtkWidget* w, GdkEventKey* event, void* bar); 58 #endif /* HAVE_GTK2 */ 58 59 #endif /* HAVE_CURL */ 59 60 -
orxonox/branches/updater/src/importer/Makefile.in
r3262 r3268 105 105 EGREP = @EGREP@ 106 106 EXEEXT = @EXEEXT@ 107 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@108 GTHREAD_LIBS = @GTHREAD_LIBS@109 107 GTK2_CFLAGS = @GTK2_CFLAGS@ 110 108 GTK2_LIBS = @GTK2_LIBS@ 111 109 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 112 110 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 113 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@114 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@115 111 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 116 112 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@
Note: See TracChangeset
for help on using the changeset viewer.