[Jahshaka-cvs] jah/jahplayer encoder.py, 1.19, 1.20 footer.py, 1.25, 1.26
Status: Beta
Brought to you by:
jahshaka
From: tim <tim...@us...> - 2006-12-21 09:02:16
|
Update of /cvsroot/jahshaka/jah/jahplayer In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv14978/jahplayer Modified Files: encoder.py footer.py Log Message: jahplayer/encoder - first steps to make encoder work on win32 Index: encoder.py =================================================================== RCS file: /cvsroot/jahshaka/jah/jahplayer/encoder.py,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- encoder.py 14 Dec 2006 16:06:19 -0000 1.19 +++ encoder.py 21 Dec 2006 09:02:10 -0000 1.20 @@ -6,22 +6,30 @@ # Released under the GPL. # For more information, see http://www.jahshaka.org. -# -# Mandatory for openpluginlib initialisation -# +# This is required for the executable generated from py2exe +# to use the preinstalled openlibraries python bindings -import platform import sys import os -import os.path -import pickle - -# This is required for the executable generated from py2exe -# to use the preinstalled openlibraries python bindings if sys.platform == 'win32': sys.path.append(os.environ['PYTHONPATH']) +import platform +import os.path +import pickle +import jahwidgets +import utilities +import openpluginlib +import openassetlib +import openmedialib +import uuid +import rpn + +# +# Mandatory for openpluginlib initialisation +# + # Initialise the dynamic linking functionality - note that the ubuntu amd64 # distro lacks the dl module, hence fallback to the non-symbolic values @@ -32,15 +40,6 @@ except: sys.setdlopenflags( 257 ) - -import jahwidgets -import utilities -import openpluginlib -import openassetlib -import openmedialib -import uuid -import rpn - # # Define guid generator class acceptable to oal # @@ -277,7 +276,7 @@ # Turn on trace if required if len( sys.argv ) > 1 and sys.argv[ 1 ] == "--trace": sys.settrace( utilities.traceit ) - + sys.argv.pop( 0 ) # Initialise the application @@ -291,7 +290,8 @@ openassetlib.init( uuid_generator( ) ) enc = encoder( app ) - enc.set_media_information( pickle.loads( " ".join( sys.argv ) ) ) + if len( sys.argv ) > 1: + enc.set_media_information( pickle.loads( " ".join( sys.argv ) ) ) enc.show() # Execute the application Index: footer.py =================================================================== RCS file: /cvsroot/jahshaka/jah/jahplayer/footer.py,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- footer.py 13 Dec 2006 12:33:20 -0000 1.25 +++ footer.py 21 Dec 2006 09:02:10 -0000 1.26 @@ -12,6 +12,7 @@ import assets import pickle import platform +import subprocess # # The common asset viewer @@ -88,10 +89,6 @@ jahwidgets.find( "pb_manager", self.handle ).show( False ) jahwidgets.find( "pb_vector", self.handle ).show( False ) - # temporarily hide encoding on windows until the sub-process work is finished - if platform.system( ) == "Windows": - jahwidgets.find( "pb_encode", self.handle ).show( False ) - def zoom_up( self, property ): self.state.change_zoom( 0.05 ) @@ -143,6 +140,9 @@ bundle = os.path.join( bundle, "Contents/MacOS/encoder" ) print "launching: %s" % bundle os.spawnv( os.P_NOWAIT, bundle, [bundle, pickle.dumps( desc_list )] ) + elif platform.system() == "Windows": + print os.environ[ "PATH" ] + subprocess.Popen( [ "encoder.exe", pickle.dumps( desc_list ) ], env=os.environ ) else: print "launching: %s" % ( "python %s" % ( utilities.get_absolute_path( "encoder.py" ) ) ) os.spawnvpe( os.P_NOWAIT, "python", [ "python", utilities.get_absolute_path( "encoder.py" ), pickle.dumps( desc_list ) ], os.environ ); |