mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
Minor tweaks
This commit is contained in:
parent
97799e0c96
commit
cba60643f5
@ -271,7 +271,9 @@ class Installer:
|
|||||||
""" This class creates a (graphical) installer from a given .p3d file. """
|
""" This class creates a (graphical) installer from a given .p3d file. """
|
||||||
notify = directNotify.newCategory("Installer")
|
notify = directNotify.newCategory("Installer")
|
||||||
|
|
||||||
def __init__(self, shortname, fullname, p3dfile, version, tokens = {}):
|
def __init__(self, p3dfile, shortname, fullname, version, tokens = {}):
|
||||||
|
if not shortname:
|
||||||
|
shortname = p3dfile.getBasenameWoExtension()
|
||||||
self.shortname = shortname
|
self.shortname = shortname
|
||||||
self.fullname = fullname
|
self.fullname = fullname
|
||||||
self.version = str(version)
|
self.version = str(version)
|
||||||
@ -334,6 +336,14 @@ class Installer:
|
|||||||
p3dRequires.Attribute('host')))
|
p3dRequires.Attribute('host')))
|
||||||
p3dRequires = p3dRequires.NextSiblingElement('requires')
|
p3dRequires = p3dRequires.NextSiblingElement('requires')
|
||||||
|
|
||||||
|
if not self.fullname:
|
||||||
|
p3dConfig = p3dPackage.FirstChildElement('config')
|
||||||
|
if p3dConfig:
|
||||||
|
self.fullname = p3dConfig.Attribute('display_name')
|
||||||
|
|
||||||
|
if not self.fullname:
|
||||||
|
self.fullname = self.shortname
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
try:
|
try:
|
||||||
appRunner.rmtree(self.tempDir)
|
appRunner.rmtree(self.tempDir)
|
||||||
|
@ -42,9 +42,10 @@ Options:
|
|||||||
If omitted, the basename of the p3d file is used.
|
If omitted, the basename of the p3d file is used.
|
||||||
|
|
||||||
-N "Your Application"
|
-N "Your Application"
|
||||||
Full name of the application or game. This is the name that
|
Full name of the application or game. This is the
|
||||||
will be displayed to end-user.
|
name that will be displayed to the end-user.
|
||||||
If omitted, the short name is used.
|
The 'display_name' config is used by default. If it
|
||||||
|
is missing, the short name is used.
|
||||||
|
|
||||||
-v version_number
|
-v version_number
|
||||||
This should define the version number of your application
|
This should define the version number of your application
|
||||||
@ -208,9 +209,6 @@ if shortname == '':
|
|||||||
if shortname.lower() != shortname or ' ' in shortname:
|
if shortname.lower() != shortname or ' ' in shortname:
|
||||||
print '\nProvided short name should be lowercase, and may not contain spaces!\n'
|
print '\nProvided short name should be lowercase, and may not contain spaces!\n'
|
||||||
|
|
||||||
if fullname == '':
|
|
||||||
fullname = shortname
|
|
||||||
|
|
||||||
if version == '' and deploy_mode == 'installer':
|
if version == '' and deploy_mode == 'installer':
|
||||||
print '\nA version number is required in "installer" mode.\n'
|
print '\nA version number is required in "installer" mode.\n'
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@ -247,7 +245,7 @@ if deploy_mode == 'standalone':
|
|||||||
elif deploy_mode == 'installer':
|
elif deploy_mode == 'installer':
|
||||||
if includeRequires:
|
if includeRequires:
|
||||||
tokens["verify_contents"] = "never"
|
tokens["verify_contents"] = "never"
|
||||||
i = Installer(shortname, fullname, appFilename, version, tokens = tokens)
|
i = Installer(appFilename, shortname, fullname, version, tokens = tokens)
|
||||||
i.licensename = licensename
|
i.licensename = licensename
|
||||||
i.licensefile = licensefile
|
i.licensefile = licensefile
|
||||||
i.authorid = authorid
|
i.authorid = authorid
|
||||||
|
Loading…
x
Reference in New Issue
Block a user