Merge remote-tracking branch 'origin/release/1.9.x'

This commit is contained in:
rdb 2015-08-06 17:23:25 +02:00
commit 1e4a39d68e
6 changed files with 25 additions and 12 deletions

View File

@ -472,7 +472,7 @@ class AppRunner(DirectObject):
file.unlink()
return False
if not fileSpec.fullVerify(pathname = localPathname):
if not fileSpec.fullVerify(pathname = localPathname, notify = self.notify):
# No good after download.
self.notify.info("%s is still no good after downloading." % (url))
return False

View File

@ -73,7 +73,7 @@ class Standalone:
self.tempDir = Filename.temporary("", self.basename, "") + "/"
self.tempDir.makeDir()
self.host = HostInfo(PandaSystem.getPackageHostUrl(), appRunner = appRunner, hostDir = self.tempDir, asMirror = False)
self.host = HostInfo(PandaSystem.getPackageHostUrl(), appRunner = appRunner, hostDir = self.tempDir, asMirror = False, perPlatform = True)
self.http = HTTPClient.getGlobalPtr()
if not self.host.hasContentsFile:
@ -233,7 +233,7 @@ class PackageTree:
if hostUrl in self.hosts:
return self.hosts[hostUrl]
host = HostInfo(hostUrl, appRunner = appRunner, hostDir = self.hostDir, asMirror = False)
host = HostInfo(hostUrl, appRunner = appRunner, hostDir = self.hostDir, asMirror = False, perPlatform = True)
if not host.hasContentsFile:
if not host.readContentsFile():
if not host.downloadContentsFile(self.http):

View File

@ -3008,10 +3008,10 @@ class Packager:
# environment.
return None
# Make sure we have a fresh version of the contents file.
host = appRunner.getHost(hostUrl)
if not host.readContentsFile():
if not host.downloadContentsFile(appRunner.http):
return None
if not host.downloadContentsFile(appRunner.http):
return None
packageInfos = []
packageInfo = host.getPackage(packageName, version, platform = platform)

View File

@ -170,19 +170,20 @@ def makePackedApp(args):
appDir = Filename('.')
appBase = appFilename.getBasenameWoExtension()
if not main:
if main:
main = Filename.fromOsSpecific(main)
main.makeAbsolute(root)
else:
main = Filename(root, 'main.py')
if main.exists():
main = 'main.py'
else:
if not main.exists():
main = glob.glob(os.path.join(root.toOsSpecific(), '*.py'))
if len(main) == 0:
raise ArgumentError, 'No Python files in root directory.'
elif len(main) > 1:
raise ArgumentError, 'Multiple Python files in root directory; specify the main application with -m "main".'
main = os.path.split(main[0])[1]
main = Filename.fromOsSpecific(main)
main = Filename.fromOsSpecific(os.path.split(main[0])[1])
main.makeAbsolute(root)
packager.installDir = appDir
packager.allowPythonDev = allowPythonDev

View File

@ -68,6 +68,7 @@ FreetypeFont(const FreetypeFont &copy) :
_requested_scale_factor(copy._requested_scale_factor),
_scale_factor(copy._scale_factor),
_native_antialias(copy._native_antialias),
_font_pixels_per_unit(copy._font_pixels_per_unit),
_line_height(copy._line_height),
_space_advance(copy._space_advance),
_face(copy._face),

View File

@ -284,6 +284,17 @@ set_properties_now(WindowProperties &properties) {
properties.clear_title();
}
if (properties.has_icon_filename()) {
HICON icon = get_icon(properties.get_icon_filename());
if (icon != 0) {
::SendMessage(_hWnd, WM_SETICON, ICON_SMALL, (LPARAM)icon);
::SendMessage(_hWnd, WM_SETICON, ICON_BIG, (LPARAM)icon);
_properties.set_icon_filename(properties.get_icon_filename());
properties.clear_icon_filename();
}
}
if (properties.has_cursor_hidden()) {
bool hide_cursor = properties.get_cursor_hidden();
_properties.set_cursor_hidden(hide_cursor);