mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1171796: Add sandbox rule for child process NSPR log file on Windows. r=bbondy (1393c5eed4) - Bug 1171994: Separate RIL I/O interfaces, r=htsai (eb62c398f9) - Bug 1171994: Store an instance of |RilWorker| for each RIL connection, r=htsai (6f85151cfe) - Bug 1171464 - Check that socket isn't already closed before closing it, r=kmachulis (05a6ecd79c) - Bug 1156352: Remove |UnixSocketRawData| from RIL interfaces, r=htsai (4c2c066809) - Bug 1171994: Use |RilSocket| to handle RIL messages on the RIL worker, r=htsai (cdbc7a3868) - Bug 1171994: Cleanup JSAPI code of |RilConsumer|, r=htsai (eaf9623f2c) - Bug 1207539 - Remove !JS_IsRunning(aCx) assertion from RilConsumer::ConnectWorkerToRIL; r=mrbkap (f5d20f6d75) - missing bit of Bug 1138293 - Use malloc/free/realloc/calloc (3cdb9ee5d6) - Bug 1140261 - Fix compiler error comparison of unsigned expression >= 0 is always true. r=hchang (f808fc5f09) - Bug 1158896 - prevent dead code from being generated in lower.py; r=bent (8ebbd3109d) - Bug 1169382 - Don't generate commented out NS_INTERFACE_CLASS or NS_ABSTRACT_CLASS in IPDL. r=billm (20fc4894c0) - Bug 1219537 - Simplify a couple of PresContext() gets on nsIFrame/nsStyleContext. r=dholbert (cff7f8aa43) - Bug 1223258 - Fix -Wunreachable-code warnings in widget. r=masayuki (8682636334) - bit of Add an nsIGfxInfo function to query monitors. (bug 1175005 partart 1) (36bb03dfb2) - Bug 1210086 - Fix warnings caused by toolbar buttons in gtk2. r=karl (0e7f0aaba2) - Bug 1176109 - Don't attach menu popups to menubars on GTK3. r=karlt (1cbdd6798f) - Bug 1188138 - Prevent default buttons from being drawn twice on GTK3. r=karlt (24d3b48643) - Bug 1189028 - Draw a toplevel popup behind popup menus on GTK3. r=karlt (6dcb65f4af) - Bug 1160154 - Decrease padding between icons in the personal toolbar with Gtk3 by using "image-button" css style class. r=karlt (50254fd1ce) - Bug 1073117 - Fixed Theme issues with GTK 3.14 - GtkButtons - use border style (cde1375eec) - Bug 1168578 - Use widget state in GTK3 toggles' style context. r=karlt (2889392859) - Bug 1198613 - Use GTK style padding for dropdown boxes in HTML. r=karlt (5e97b42105) - Bug 1216582 - [gtk3] Scrollbar buttons not drawn correctly. r=karlt (4a7ca51f14) - Bug 1174248 - Workaround unico theme engine resizer bug on GTK3. r=karlt (ca55b44a4a) - Bug 1173907 - Don't use gtk_render_activity for drawing progress chunks on GTK versions above 3.13.7. r=karlt (57e97d2d55) - Bug 1218008 - Fix progress bar rendering on the Ambiance GTK3 theme. r=karlt (5dcfff5ab5) - Bug 1171011 - Use only document padding for MOZ_GTK_ENTRY in XUL. r=karlt (3d164c219e) - Bug 1187385 - Use GTK style padding for entry widgets. r=karlt (f44fffb148) - Bug 1176929 - Disable Ctrl-K in GtkEntry unless custom key bindings are (46c9b03899) - Bug 1120490 - Take the 'GetRotateForLandscape' gfxASurface configuration into account when creating printing surfaces. r=jwatt (b259f7006a) - Bug 1228216 - Event::GetScreenCoords incorrectly converts the coords to a CSSPoint when the widget is null r=tnikkel (9e58f9f640) - Bug 1226872 - Stop keeping a copy of the resolution in the root scrollframe. r=roc (c168509f4d) - Bug 1224015 - Part 1: nsLayoutUtils functions do not account for nsPresShell resolution r=tnikkel (c6a1cca145) - Bug 1224015 - Part 2: Have nsDisplayResolution items adjust event coordinates for hit testing and dispatching to content r=tnikkel (09fad089ce) - Bug 1224015 - Part 3: ifdef changes to C++APZ so that they only apply to single process APZ. r=tnikkel (340b30205d) - Bug 1228597 - Remove the MOZ_SINGLE_PROCESS_APZ define. r=tn (6733cf7b4b) - Bug 1177406, don't rely on owner to be set only on main thread, r=khuey (a31d3ee5fe) - Bug 1221822 - Finish the WebGL texture refactor. r=kamidphish,mattwoodrow,bz (9df451d68f) - bug 1214953 set GDK_VERSION_MIN_REQUIRED/MAX_ALLOWED to specify the GTK/GDK API and suppress irrelevant deprecated warnings r=glandium (e9161dc6f4) - Bug 1160666 - Allow per-product b2g branding. r=fabrice (8d95dfa1ea) - Fix due to backport (900ffc0c50) - Bug 1224490 - Don't set NSS_LIBS in the non-native NSS case. r=mshal We never use the variable in that case. Bug 1224490 - Kill LIBXUL_DIST. r=mshal (bf53e3e930) - Bug 1175555 - Build flag to exclude hyphenation dictionaries from Android builds. r=nalexander (eb94fae1dd) - Bug 1141534 - fix mulet nightly mozconfigs; r=bhearsum We don't want uploadsymbols or update-packaging for nightly mulet builds, but these were being set by the underlying browser mozconfigs. (1a9e4cb294) - Bug 1137000 - Enable SDK building on nightlies; r=glandium (c28e4f9cae) - Bug 1181040 - Include mozconfig.cache after mozconfig.common.override. r=mshal (610364f8ae) - bug 1182519 - Put mozconfigs for cross-mac builds in tree. r=mshal (0c3768b90a) - bug 935237 - add genisoimage+dmg binaries to tooltool manifest, use them in cross-mac mozconfig. r=gps (d0252cb263) - bug 1203689 - Use tooltool gcc as host compiler for cross-mac builds. r=dustin (2597df48cd) - Bug 1204068 - Update the clang used for OSX cross compiles to the latest that we use on Linux64; r=ted (0323202013) - Bug 1204763 - Enable cross compiling the clang plugin for OS X on Linux; r=glandium (2813897f8b) - Bug 1208787 - Enable static analysis checks by default on OSX cross builds; r=ted (9aa48ddb43) - bug 543111 - enable Breakpad for cross-mac builds. r=glandium (1a2be876d8) - bug 1190522 - Rewrite pkg-dmg as a Python script. r=gps (796e8ef8e1) - bug 935237 - use libdmg-hfsplus to create DMG files during packaging on Linux. r=gps (d676c7eb8f) - bug 543111 - add support for alternate dsymutil paths to configure, add to cross-mozconfig. r=glandium (401ec2b3a4)
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
from mozbuild.base import MozbuildObject
|
||||
from mozpack import dmg
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def make_dmg(source_directory, output_dmg):
|
||||
build = MozbuildObject.from_environment()
|
||||
extra_files = [
|
||||
(os.path.join(build.distdir, 'branding', 'dsstore'), '.DS_Store'),
|
||||
(os.path.join(build.distdir, 'branding', 'background.png'),
|
||||
'.background/background.png'),
|
||||
(os.path.join(build.distdir, 'branding', 'disk.icns'),
|
||||
'.VolumeIcon.icns'),
|
||||
]
|
||||
volume_name = build.substs['MOZ_APP_DISPLAYNAME']
|
||||
dmg.create_dmg(source_directory, output_dmg, volume_name, extra_files)
|
||||
|
||||
|
||||
def main(args):
|
||||
if len(args) != 2:
|
||||
print('Usage: make_dmg.py <source directory> <output dmg>',
|
||||
file=sys.stderr)
|
||||
return 1
|
||||
make_dmg(args[0], args[1])
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv[1:]))
|
||||
@@ -0,0 +1,121 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import errno
|
||||
import mozfile
|
||||
import os
|
||||
import platform
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
is_linux = platform.system() == 'Linux'
|
||||
|
||||
def mkdir(dir):
|
||||
if not os.path.isdir(dir):
|
||||
try:
|
||||
os.makedirs(dir)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
|
||||
|
||||
def chmod(dir):
|
||||
'Set permissions of DMG contents correctly'
|
||||
subprocess.check_call(['chmod', '-R', 'a+rX,a-st,u+w,go-w', dir])
|
||||
|
||||
|
||||
def rsync(source, dest):
|
||||
'rsync the contents of directory source into directory dest'
|
||||
# Ensure a trailing slash so rsync copies the *contents* of source.
|
||||
if not source.endswith('/'):
|
||||
source += '/'
|
||||
subprocess.check_call(['rsync', '-a', '--copy-unsafe-links',
|
||||
source, dest])
|
||||
|
||||
|
||||
def set_folder_icon(dir):
|
||||
'Set HFS attributes of dir to use a custom icon'
|
||||
if not is_linux:
|
||||
#TODO: bug 1197325 - figure out how to support this on Linux
|
||||
subprocess.check_call(['SetFile', '-a', 'C', dir])
|
||||
|
||||
|
||||
def create_dmg_from_staged(stagedir, output_dmg, tmpdir, volume_name):
|
||||
'Given a prepared directory stagedir, produce a DMG at output_dmg.'
|
||||
if not is_linux:
|
||||
# Running on OS X
|
||||
hybrid = os.path.join(tmpdir, 'hybrid.dmg')
|
||||
subprocess.check_call(['hdiutil', 'makehybrid', '-hfs',
|
||||
'-hfs-volume-name', volume_name,
|
||||
'-hfs-openfolder', stagedir,
|
||||
'-ov', stagedir,
|
||||
'-o', hybrid])
|
||||
subprocess.check_call(['hdiutil', 'convert', '-format', 'UDBZ',
|
||||
'-imagekey', 'bzip2-level=9',
|
||||
'-ov', hybrid, '-o', output_dmg])
|
||||
else:
|
||||
import buildconfig
|
||||
uncompressed = os.path.join(tmpdir, 'uncompressed.dmg')
|
||||
subprocess.check_call([
|
||||
buildconfig.substs['GENISOIMAGE'],
|
||||
'-V', volume_name,
|
||||
'-D', '-R', '-apple', '-no-pad',
|
||||
'-o', uncompressed,
|
||||
stagedir
|
||||
])
|
||||
subprocess.check_call([
|
||||
buildconfig.substs['DMG_TOOL'],
|
||||
'dmg',
|
||||
uncompressed,
|
||||
output_dmg
|
||||
],
|
||||
# dmg is seriously chatty
|
||||
stdout=open(os.devnull, 'wb'))
|
||||
|
||||
def check_tools(*tools):
|
||||
'''
|
||||
Check that each tool named in tools exists in SUBSTS and is executable.
|
||||
'''
|
||||
import buildconfig
|
||||
for tool in tools:
|
||||
path = buildconfig.substs[tool]
|
||||
if not path:
|
||||
raise Exception('Required tool "%s" not found' % tool)
|
||||
if not os.path.isfile(path):
|
||||
raise Exception('Required tool "%s" not found at path "%s"' % (tool, path))
|
||||
if not os.access(path, os.X_OK):
|
||||
raise Exception('Required tool "%s" at path "%s" is not executable' % (tool, path))
|
||||
|
||||
|
||||
def create_dmg(source_directory, output_dmg, volume_name, extra_files):
|
||||
'''
|
||||
Create a DMG disk image at the path output_dmg from source_directory.
|
||||
|
||||
Use volume_name as the disk image volume name, and
|
||||
use extra_files as a list of tuples of (filename, relative path) to copy
|
||||
into the disk image.
|
||||
'''
|
||||
if platform.system() not in ('Darwin', 'Linux'):
|
||||
raise Exception("Don't know how to build a DMG on '%s'" % platform.system())
|
||||
|
||||
if is_linux:
|
||||
check_tools('DMG_TOOL', 'GENISOIMAGE')
|
||||
with mozfile.TemporaryDirectory() as tmpdir:
|
||||
stagedir = os.path.join(tmpdir, 'stage')
|
||||
os.mkdir(stagedir)
|
||||
# Copy the app bundle over using rsync
|
||||
rsync(source_directory, stagedir)
|
||||
# Copy extra files
|
||||
for source, target in extra_files:
|
||||
full_target = os.path.join(stagedir, target)
|
||||
mkdir(os.path.dirname(full_target))
|
||||
shutil.copyfile(source, full_target)
|
||||
# Make a symlink to /Applications. The symlink name is a space
|
||||
# so we don't have to localize it. The Applications folder icon
|
||||
# will be shown in Finder, which should be clear enough for users.
|
||||
os.symlink('/Applications', os.path.join(stagedir, ' '))
|
||||
# Set the folder attributes to use a custom icon
|
||||
set_folder_icon(stagedir)
|
||||
chmod(stagedir)
|
||||
create_dmg_from_staged(stagedir, output_dmg, tmpdir, volume_name)
|
||||
Reference in New Issue
Block a user