Selaa lähdekoodia

*** empty log message ***

Mark Mine 25 vuotta sitten
vanhempi
sitoutus
cb1c30fbd7

+ 2 - 2
direct/src/configfiles/direct.init

@@ -1,9 +1,9 @@
 ATTACH panda
 ATTACH panda
 MODREL ETC_PATH etc
 MODREL ETC_PATH etc
-SEP PYTHONPATH :
+SEP PYTHONPATH ;
 MODREL PYTHONPATH lib
 MODREL PYTHONPATH lib
 MODREL PYTHONPATH lib/py
 MODREL PYTHONPATH lib/py
+MODREL PYTHONPATH src/ffi
 MODREL PYTHONPATH src/actor
 MODREL PYTHONPATH src/actor
 MODREL PYTHONPATH src/distributed
 MODREL PYTHONPATH src/distributed
 MODREL PYTHONPATH src/showbase
 MODREL PYTHONPATH src/showbase
-MODREL PYTHONPATH src/ffi

+ 3 - 1
direct/src/ffi/generatePythonCode

@@ -79,7 +79,9 @@ if (not outputDir):
     FFIConstants.notify.info('Setting output directory to current directory')
     FFIConstants.notify.info('Setting output directory to current directory')
     outputDir = '.'
     outputDir = '.'
 elif (not os.path.exists(outputDir)):
 elif (not os.path.exists(outputDir)):
-    FFIConstants.notify.error('Directory does not exists: ' + outputDir)
+    FFIConstants.notify.info('Directory does not exist, creating: ' + outputDir)
+    os.mkdir(outputDir)
+    FFIConstants.notify.info('Setting output directory to: ' + outputDir)
 else:
 else:
     FFIConstants.notify.info('Setting output directory to: ' + outputDir)
     FFIConstants.notify.info('Setting output directory to: ' + outputDir)
 
 

+ 13 - 13
direct/src/showbase/ppython

@@ -1,26 +1,26 @@
 #! /bin/sh
 #! /bin/sh
 
 
-if [ -z "$CYGWIN_ROOT" ]; then
-  # Add our LD_LIBRARY_PATH to the python path so we can pull in panda modules
-  PYTHONPATH="$DIRECT"/src/all/python:"$DIRECT"/lib/py:"$LD_LIBRARY_PATH"
+# Linux case
+if [ -z "$PANDA_ROOT" ]; then
+  # Convert semicolons back to colons
+  PYTHONPATH=`echo $PYTHONPATH | sed 'y/;/:/'`
   export PYTHONPATH
   export PYTHONPATH
-
   # Run unbuffered output, with any options passed in
   # Run unbuffered output, with any options passed in
   exec python -u $*
   exec python -u $*
   exit 1
   exit 1
 fi
 fi
 
 
 # Under Windows/Cygwin, we have to do this whole thing a little differently.
 # Under Windows/Cygwin, we have to do this whole thing a little differently.
-
-# First, we have to mangle the LD_LIBRARY_PATH into a series of Windows
-# paths separated by semicolons.
-PYTHONPATH=
-for path in `echo $LD_LIBRARY_PATH | sed 'y/:/ /'`; do
-  PYTHONPATH=$PYTHONPATH\;`cygpath -w $path`
+# We have to de-cygwinify the semicolon separated PYTHONPATH
+# The new path
+NEWPYTHONPATH=
+# Temporarily change the semicolons into spaces
+for path in `echo $PYTHONPATH | sed 'y/;/ /'`; do
+    # For each entry run it through the cygwin filter
+    NEWPYTHONPATH=$NEWPYTHONPATH\;`cygpath -w $path`
 done
 done
-
-# And now prefix that with the python source directories.
-PYTHONPATH=`cygpath -w $DIRECT/src/all/python`\;`cygpath -w $DIRECT/lib/py`$PYTHONPATH
+# Set the new PYTHONPATH
+PYTHONPATH=$NEWPYTHONPATH
 export PYTHONPATH
 export PYTHONPATH
 
 
 # We can't run with -u under windows for some reason.  But we do need to
 # We can't run with -u under windows for some reason.  But we do need to