mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 11:28:17 -04:00
cleanup temp files
This commit is contained in:
parent
274cbb24e4
commit
d16605943f
@ -436,6 +436,7 @@ class Packager:
|
|||||||
|
|
||||||
if tempFile.exists():
|
if tempFile.exists():
|
||||||
filenames = self.__parseDependenciesWindows(tempFile)
|
filenames = self.__parseDependenciesWindows(tempFile)
|
||||||
|
tempFile.unlink()
|
||||||
if filenames is None:
|
if filenames is None:
|
||||||
print "Unable to determine dependencies from %s" % (file.filename)
|
print "Unable to determine dependencies from %s" % (file.filename)
|
||||||
continue
|
continue
|
||||||
@ -518,6 +519,7 @@ class Packager:
|
|||||||
|
|
||||||
if tempFile.exists():
|
if tempFile.exists():
|
||||||
filenames = self.__parseDependenciesOSX(tempFile)
|
filenames = self.__parseDependenciesOSX(tempFile)
|
||||||
|
tempFile.unlink()
|
||||||
if filenames is None:
|
if filenames is None:
|
||||||
print "Unable to determine dependencies from %s" % (file.filename)
|
print "Unable to determine dependencies from %s" % (file.filename)
|
||||||
continue
|
continue
|
||||||
@ -589,6 +591,7 @@ class Packager:
|
|||||||
|
|
||||||
if tempFile.exists():
|
if tempFile.exists():
|
||||||
filenames = self.__parseDependenciesPosix(tempFile)
|
filenames = self.__parseDependenciesPosix(tempFile)
|
||||||
|
tempFile.unlink()
|
||||||
if filenames is None:
|
if filenames is None:
|
||||||
print "Unable to determine dependencies from %s" % (file.filename)
|
print "Unable to determine dependencies from %s" % (file.filename)
|
||||||
continue
|
continue
|
||||||
|
@ -37,15 +37,8 @@ Options:
|
|||||||
|
|
||||||
-s search_dir
|
-s search_dir
|
||||||
Additional directories to search for previously-built packages.
|
Additional directories to search for previously-built packages.
|
||||||
This option may be repeated as necessary.
|
This option may be repeated as necessary. These directories may
|
||||||
|
also be specified with the pdef-path Config.prc variable.
|
||||||
-x
|
|
||||||
If this is specified, a version-independent application is built.
|
|
||||||
This stores source py files instead of compiled pyc files, and
|
|
||||||
egg files instead of bam files. This application can then be run
|
|
||||||
with any version of Panda (provided you are careful not to make
|
|
||||||
any Python or Panda calls that are version-specific). This is
|
|
||||||
not recommended except for very small, simple applications.
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -61,14 +54,13 @@ class ArgumentError(StandardError):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def makePackedApp(args):
|
def makePackedApp(args):
|
||||||
opts, args = getopt.getopt(args, 'd:m:r:s:xh')
|
opts, args = getopt.getopt(args, 'd:m:r:s:h')
|
||||||
|
|
||||||
packager = Packager.Packager()
|
packager = Packager.Packager()
|
||||||
|
|
||||||
root = Filename('.')
|
root = Filename('.')
|
||||||
main = None
|
main = None
|
||||||
requires = []
|
requires = []
|
||||||
versionIndependent = False
|
|
||||||
|
|
||||||
for option, value in opts:
|
for option, value in opts:
|
||||||
if option == '-d':
|
if option == '-d':
|
||||||
@ -79,8 +71,6 @@ def makePackedApp(args):
|
|||||||
requires.append(value)
|
requires.append(value)
|
||||||
elif option == '-s':
|
elif option == '-s':
|
||||||
packager.installSearch.appendDirectory(Filename.fromOsSpecific(value))
|
packager.installSearch.appendDirectory(Filename.fromOsSpecific(value))
|
||||||
elif option == '-x':
|
|
||||||
versionIndependent = True
|
|
||||||
elif option == '-h':
|
elif option == '-h':
|
||||||
print __doc__ % (os.path.split(sys.argv[0])[1])
|
print __doc__ % (os.path.split(sys.argv[0])[1])
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@ -96,6 +86,8 @@ def makePackedApp(args):
|
|||||||
raise ArgumentError, 'Application filename must end in ".p3d".'
|
raise ArgumentError, 'Application filename must end in ".p3d".'
|
||||||
|
|
||||||
appDir = Filename(appFilename.getDirname())
|
appDir = Filename(appFilename.getDirname())
|
||||||
|
if not appDir:
|
||||||
|
appDir = Filename('.')
|
||||||
appBase = appFilename.getBasenameWoExtension()
|
appBase = appFilename.getBasenameWoExtension()
|
||||||
|
|
||||||
if not main:
|
if not main:
|
||||||
|
@ -72,13 +72,14 @@ class AppRunner(DirectObject):
|
|||||||
# may have to be different for each instance.
|
# may have to be different for each instance.
|
||||||
self.multifileRoot = '/mf'
|
self.multifileRoot = '/mf'
|
||||||
|
|
||||||
# The attributes of this object will be exposed as attributes
|
# The "main" object will be exposed to the DOM as a property
|
||||||
# of the plugin instance in the DOM.
|
# of the plugin object; that is, document.pluginobject.main in
|
||||||
self.attributes = ScriptAttributes()
|
# JavaScript will be appRunner.main here.
|
||||||
|
self.main = ScriptAttributes()
|
||||||
|
|
||||||
# By default, we publish a stop() method so the browser can
|
# By default, we publish a stop() method so the browser can
|
||||||
# easy stop the plugin.
|
# easy stop the plugin.
|
||||||
self.attributes.stop = self.stop
|
self.main.stop = self.stop
|
||||||
|
|
||||||
# This will be the browser's toplevel window DOM object;
|
# This will be the browser's toplevel window DOM object;
|
||||||
# e.g. self.dom.document will be the document.
|
# e.g. self.dom.document will be the document.
|
||||||
@ -233,8 +234,9 @@ class AppRunner(DirectObject):
|
|||||||
""" Called by the browser to query the Panda instance's
|
""" Called by the browser to query the Panda instance's
|
||||||
toplevel scripting object, for querying properties in the
|
toplevel scripting object, for querying properties in the
|
||||||
Panda instance. The attributes on this object are mapped to
|
Panda instance. The attributes on this object are mapped to
|
||||||
the plugin instance within the DOM. """
|
document.pluginobject.main within the DOM. """
|
||||||
return self.attributes
|
|
||||||
|
return self.main
|
||||||
|
|
||||||
def setBrowserScriptObject(self, dom):
|
def setBrowserScriptObject(self, dom):
|
||||||
""" Called by the browser to supply the browser's toplevel DOM
|
""" Called by the browser to supply the browser's toplevel DOM
|
||||||
|
Loading…
x
Reference in New Issue
Block a user