mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
minor fixes
This commit is contained in:
parent
ab98281c44
commit
b469a507a1
@ -820,8 +820,6 @@ class PackageInfo:
|
|||||||
vfs = VirtualFileSystem.getGlobalPtr()
|
vfs = VirtualFileSystem.getGlobalPtr()
|
||||||
vfs.mount(mf, root, vfs.MFReadOnly)
|
vfs.mount(mf, root, vfs.MFReadOnly)
|
||||||
|
|
||||||
appRunner.loadMultifilePrcFiles(mf, root)
|
|
||||||
|
|
||||||
# Add this to the Python search path, if it's not already
|
# Add this to the Python search path, if it's not already
|
||||||
# there. We have to take a bit of care to check if it's
|
# there. We have to take a bit of care to check if it's
|
||||||
# already there, since there can be some ambiguity in
|
# already there, since there can be some ambiguity in
|
||||||
@ -851,6 +849,10 @@ class PackageInfo:
|
|||||||
envvar = '%s_ROOT' % (self.packageName.upper())
|
envvar = '%s_ROOT' % (self.packageName.upper())
|
||||||
ExecutionEnvironment.setEnvironmentVariable(envvar, self.packageDir.toOsSpecific())
|
ExecutionEnvironment.setEnvironmentVariable(envvar, self.packageDir.toOsSpecific())
|
||||||
|
|
||||||
|
# Now that the environment variable is set, read all of the
|
||||||
|
# prc files in the package.
|
||||||
|
appRunner.loadMultifilePrcFiles(mf, root)
|
||||||
|
|
||||||
# Also, find any toplevel Python packages, and add these as
|
# Also, find any toplevel Python packages, and add these as
|
||||||
# shared packages. This will allow different packages
|
# shared packages. This will allow different packages
|
||||||
# installed in different directories to share Python files as
|
# installed in different directories to share Python files as
|
||||||
|
@ -352,7 +352,8 @@ class Packager:
|
|||||||
self.compressionLevel = 6
|
self.compressionLevel = 6
|
||||||
|
|
||||||
# Every p3dapp requires panda3d.
|
# Every p3dapp requires panda3d.
|
||||||
self.packager.do_require('panda3d')
|
if 'panda3d' not in map(lambda p: p.packageName, self.requires):
|
||||||
|
self.packager.do_require('panda3d')
|
||||||
|
|
||||||
# If this flag is set, enable allow_python_dev.
|
# If this flag is set, enable allow_python_dev.
|
||||||
if self.packager.allowPythonDev:
|
if self.packager.allowPythonDev:
|
||||||
|
@ -44,7 +44,7 @@ Options:
|
|||||||
Sets the indicated config flag in the application. This option
|
Sets the indicated config flag in the application. This option
|
||||||
may be repeated as necessary.
|
may be repeated as necessary.
|
||||||
|
|
||||||
-r package
|
-r package[,version[,hostURL]]
|
||||||
Names an additional package that this application requires at
|
Names an additional package that this application requires at
|
||||||
startup time. The default package is 'panda3d'; you may repeat
|
startup time. The default package is 'panda3d'; you may repeat
|
||||||
this option to indicate dependencies on additional packages.
|
this option to indicate dependencies on additional packages.
|
||||||
@ -106,7 +106,11 @@ def makePackedApp(args):
|
|||||||
elif option == '-c':
|
elif option == '-c':
|
||||||
configFlags.append(value.split('=', 1))
|
configFlags.append(value.split('=', 1))
|
||||||
elif option == '-r':
|
elif option == '-r':
|
||||||
requires.append(value)
|
tokens = value.split(',')
|
||||||
|
while len(tokens) < 3:
|
||||||
|
tokens.append('')
|
||||||
|
name, version, host = tokens[:3]
|
||||||
|
requires.append((name, version, host))
|
||||||
elif option == '-s':
|
elif option == '-s':
|
||||||
packager.installSearch.appendDirectory(Filename.fromOsSpecific(value))
|
packager.installSearch.appendDirectory(Filename.fromOsSpecific(value))
|
||||||
elif option == '-D':
|
elif option == '-D':
|
||||||
@ -159,11 +163,7 @@ def makePackedApp(args):
|
|||||||
try:
|
try:
|
||||||
packager.setup()
|
packager.setup()
|
||||||
packager.beginPackage(appBase, p3dApplication = True)
|
packager.beginPackage(appBase, p3dApplication = True)
|
||||||
for requireName in requires:
|
for name, version, host in requires:
|
||||||
tokens = requireName.split(',')
|
|
||||||
while len(tokens) < 3:
|
|
||||||
tokens.append(None)
|
|
||||||
name, version, host = tokens
|
|
||||||
packager.do_require(name, version = version, host = host)
|
packager.do_require(name, version = version, host = host)
|
||||||
|
|
||||||
if configFlags:
|
if configFlags:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user