mirror of https://github.com/roytam1/boc-uxp.git
8961 changed files with 1470154 additions and 0 deletions
@ -0,0 +1,45 @@
|
||||
# Always ignore node_modules. |
||||
**/node_modules/**/*.* |
||||
|
||||
# lint eslint config files which are excluded by default |
||||
!**/.eslintrc.js |
||||
|
||||
# Exclude expected objdirs. |
||||
obj*/** |
||||
|
||||
# Exclude mozilla directory, this one is checked separately |
||||
mozilla/** |
||||
|
||||
# These directories don't contain any js and are not meant to |
||||
config/** |
||||
db/** |
||||
other-licenses/** |
||||
testing/** |
||||
|
||||
# We ignore all these directories by default, until we get them enabled. |
||||
# If you are enabling a directory, please add directory specific exclusions |
||||
# below. |
||||
build/** |
||||
chat/** |
||||
editor/** |
||||
im/** |
||||
ldap/** |
||||
mail/** |
||||
mailnews/** |
||||
suite/** |
||||
|
||||
# calendar/ exclusions |
||||
|
||||
# prefs files |
||||
calendar/lightning/content/lightning.js |
||||
calendar/locales/en-US/lightning-l10n.js |
||||
|
||||
# gdata-provider uses non-standard javascript for Postbox compatibility |
||||
calendar/providers/gdata/** |
||||
|
||||
# third party library |
||||
calendar/base/modules/ical.js |
||||
|
||||
# preprocessed files |
||||
calendar/base/content/dialogs/calendar-migration-dialog.js |
||||
calendar/base/content/calendar-dnd-listener.js |
@ -0,0 +1,14 @@
|
||||
"use strict"; |
||||
|
||||
module.exports = { |
||||
// When adding items to this file please check for effects on sub-directories.
|
||||
"plugins": [ |
||||
"mozilla" |
||||
], |
||||
"rules": { |
||||
"mozilla/import-globals": 1, |
||||
}, |
||||
"env": { |
||||
"es6": true |
||||
}, |
||||
}; |
@ -0,0 +1,15 @@
|
||||
# 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 imp, os, sys |
||||
|
||||
old_bytecode = sys.dont_write_bytecode |
||||
sys.dont_write_bytecode = True |
||||
|
||||
ycm_module = imp.load_source("_ycm_extra_conf", os.path.join("mozilla", ".ycm_extra_conf.py")) |
||||
|
||||
sys.dont_write_bytecode = old_bytecode |
||||
|
||||
# Expose the FlagsForFile function from mozilla/.ycm_extra_conf.py |
||||
FlagsForFile = ycm_module.FlagsForFile |
@ -0,0 +1,434 @@
|
||||
This is an (incomplete) list of people who have contributed to the |
||||
codebase which lives in this repository. If you make a contribution |
||||
here, you may add your name and, optionally, email address in the |
||||
appropriate place. |
||||
|
||||
For a full list of the people who are credited with making a |
||||
contribution to Mozilla, see http://www.mozilla.org/credits/ . |
||||
|
||||
Aaron Kaluszka <ask@swva.net> |
||||
Aaron Leventhal <aaronl@netscape.com> |
||||
Abdelrhman Ahmed <a.ahmed1026@gmail.com> |
||||
ActiveState Software Inc |
||||
Adam Becevello <abecevello@sympatico.ca> |
||||
Adam Christian <adam.christian@gmail.com> |
||||
Adam D. Moss <adam@gimp.org> |
||||
Adam Lock <adamlock@netscape.com> |
||||
Adrian Havill <havill@redhat.com> |
||||
Akihiro Misaki <spitfire.kuden@gmail.com> |
||||
Akkana Peck <akkana@netscape.com> |
||||
Alec Flett <alecf@netscape.com> |
||||
Alexey Chernyak <alexeyc@bigfoot.com> |
||||
Allan Masri <amasri@netscape.com> |
||||
alta88 <alta88@gmail.com> |
||||
<andersma@luther.edu> |
||||
Andreas Nilsson <nisses.mail@home.se> |
||||
Andrew Sutherland <asutherland@asutherland.org> |
||||
Andrew Wooldridge <andreww@netscape.com> |
||||
Andrey Terentyev <andreycpp@gmail.com> |
||||
Anirvana Mishra <anidps@gmail.com> |
||||
Annie Sullivan <annie.sullivan@gmail.com> |
||||
Archaeopteryx <archaeopteryx@coole-files.de> |
||||
ArentJan Banck <ajbanck@planet.nl> |
||||
Arlo Breault <arlolra@gmail.com> |
||||
Arthur Wiebe <artooro@gmail.com> |
||||
Asaf Romano <mano@mozilla.com> |
||||
Atul Varma <atul@mozilla.com> |
||||
ause <ause@sun.com> |
||||
Axel Zechner <axel.zechner@googlemail.com> |
||||
Baki Bon <bakibon@yahoo.com> |
||||
Ben Bucksch <mozilla@bucksch.org> |
||||
Benedikt Pfeifer <benediktp@ymail.com> |
||||
Ben Frisch <bfrisch@gmail.com> |
||||
Ben Goodger <ben@bengoodger.com> |
||||
Benjamin Smedberg <benjamin@smedbergs.us> |
||||
Benoรฎt Renard <benoit@gawab.com> |
||||
Ben Turner <mozilla@songbirdnest.com> |
||||
Berend Cornelius <berend.cornelius@sun.com> |
||||
Beth Epperson |
||||
Bhuvan Racham <racham@netscape.com> |
||||
Bill Law <law@netscape.com> |
||||
Blair McBride <bmcbride@mozilla.com> |
||||
Blake Ross <firefox@blakeross.com> |
||||
Blake Winton <bwinton@latte.ca> |
||||
Bob Lord <lord@netscape.com> |
||||
Boris Zbarsky <bzbarsky@mit.edu> |
||||
Bradley Baetz <bbaetz@student.usyd.edu.au> |
||||
Brandon Pung <brandonpung@gmail.com> |
||||
Brant Gurganus <brantgurganus2001@cherokeescouting.org> |
||||
Brett Wilson <brettw@gmail.com> |
||||
Brian Bober |
||||
Brian King |
||||
Brian Lu <brian.lu@sun.com> |
||||
Brian Nesse <bnesse@netscape.com> |
||||
Brian R. Bondy <netzen@gmail.com> |
||||
Brian Ryner <bryner@brianryner.com> |
||||
Brodie Thiesfield <brofield@jellycan.com> |
||||
Bruno Browning <browning@uwalumni.com> |
||||
Bruno Escherl <aqualon@aquachan.de> |
||||
Bryan Clark <clarkbw@gnome.org> |
||||
Caio Tiago Oliveira <asrail@gmail.com> |
||||
Cรฉdric Corazza <cedric.corazza@wanadoo.fr> |
||||
Charles Manske <cmanske@netscape.com> |
||||
Chase Phillips <chase@mozilla.org> |
||||
Chinmay Deepakbhai Patel <chinu.ptl@gmail.com> |
||||
Chip Clark <chipc@netscape.com> |
||||
Chris Allen <chris@netinflux.com> |
||||
Chris Beard <cbeard@mozilla.com> |
||||
Chris Charabaruk <ccharabaruk@meldstar.com> |
||||
Chris McAfee <mcafee@netscape.com> |
||||
Chris Nelson <chrisn@statecollege.com> |
||||
Christian Biesinger |
||||
Christian Eyrich <ch.ey@gmx.net> |
||||
Christian Jansen <christian.jansen@sun.com> |
||||
Christian Schmidt <bugzilla.mozilla.org-1@chsc.dk> |
||||
Christopher A. Aillon <christopher@aillon.com> |
||||
Christopher Blizzard <blizzard@appliedtheory.com> |
||||
Christopher Cook <tangent@intraplanar.net> |
||||
Christopher Hoess <choess@force.stwing.upenn.edu> |
||||
Christopher Seawood |
||||
Christopher Thomas <cst@yecc.com> |
||||
Chris Waterson <waterson@netscape.com> |
||||
<chuang@netscape.com> |
||||
Chuck Boatwright <cboatwri@netscape.com> |
||||
Clint Talbert <ctalbert.moz@gmail.com> |
||||
Colin Phillips <colinp@oeone.com> |
||||
Csaba Borbola <csaba.borbola@sun.com> |
||||
Curtis Bartley <cbartley@mozilla.com> |
||||
Curtis Jewell <csjewell@mail.freeshell.org> |
||||
Cyrille Moureaux <Cyrille.Moureaux@sun.com> |
||||
Dan Cannon <dc2@myrealbox.com> |
||||
Dan Haddix <dan6992@hotmail.com> |
||||
Daniel Aquino <mr.danielaquino@gmail.com> |
||||
Daniel Boelzle <mozilla@boelzle.org> |
||||
Daniel Brooks <db48x@yahoo.com> |
||||
Daniel Glazman <daniel@glazman.org> |
||||
Daniel Veditz <dveditz@mozilla.com> |
||||
Daniel Witte <dwitte@stanford.edu> |
||||
Dan Matejka <danm@netscape.com> |
||||
Dan Mills <thunder@mozilla.com> |
||||
Dan Mosedale <dmose@mozilla.org> |
||||
Dan Parent <danp@oeone.com> |
||||
Dan Veditz <dveditz@netscape.com> |
||||
Dรฃo Gottwald <dao@design-noir.de> |
||||
Darin Fisher <darin@meer.net> |
||||
Dave Townsend <dtownsend@oxymoronical.com> |
||||
David Ascher <dascher@mozilla.com> |
||||
David Baron <dbaron@mozilla.org> |
||||
David Bienvenu <bienvenu@davidbienvenu.org> |
||||
David Drinan <ddrinan@netscape.com> |
||||
David Humphrey <david.humphrey@senecac.on.ca> |
||||
David Hyatt <hyatt@mozilla.org> |
||||
David P. Drinan <ddrinan@netscape.com> |
||||
David Turley <dturley@pobox.com> |
||||
Dean Tessman <dean_tessman@hotmail.com> |
||||
<dianesun@netscape.com> |
||||
Diego Biurrun <diego@biurrun.de> |
||||
Diego Mira David <diegomd86@gmail.com> |
||||
Dietrich Ayala <autonome@gmail.com> |
||||
Dimas Perez Gago <dimassevfc@gmail.com> |
||||
Don Bragg <dbragg@netscape.com> |
||||
Don Crandall <macdoc@interx.net> |
||||
Donna Oberes <donna.oberes@gmail.com> |
||||
Doron Rosenberg <doronr@naboonline.com> |
||||
Douglas Thrift <douglas@douglasthrift.net> |
||||
Drew Willcoxon <adw@mozilla.com> |
||||
Edmund Wong <ewong@pw-wspx.org> |
||||
Eduardo Teruo Katayama <eduardo@ime.usp.br> |
||||
Edward Lee <edilee@mozilla.com> |
||||
Ehsan Akhgari <ehsan.akhgari@gmail.com> |
||||
Emre Birol <emrebirol@gmail.com> |
||||
Eric Ballet Baz |
||||
Eric Belhaire <eric.belhaire@ief.u-psud.fr> |
||||
Eric Hodel <drbrain@segment7.net> |
||||
Erik Fabert <jerfa@yahoo.com> |
||||
Ernst Herbst <hb@calen.de> |
||||
Evan Stratford <evan.stratford@gmail.com> |
||||
Fabian Guisset <hidday@geocities.com> |
||||
Fidesfit |
||||
Florian Quรจze <florian@instantbird.org> |
||||
Francisco Jose Mulero <fjmulero@gmv.com> |
||||
Frank Schรถnheit <frank.schoenheit@gmx.de> |
||||
Frank Tang ftang@netscape.com |
||||
Frank Wein <mcsmurf@mcsmurf.de> |
||||
Fred Jendrzejewski <fred.jen@web.de> |
||||
Fredrik Holmqvist <thesuckiestemail@yahoo.se> |
||||
Friedrich Beckmann <friedrich.beckmann@gmx.de> |
||||
Fritz Schneider <fritz@google.com> |
||||
Garth Smedley <garths@oeone.com> |
||||
Gary Kwong <nth10sd@gmail.com> |
||||
Gary van der Merwe <garyvdm@gmail.com> |
||||
Gavin Sharp <gavin@gavinsharp.com> |
||||
Gayatri Bhimaraju <gayatrib@netscape.com> |
||||
Gekacheka <gekacheka@yahoo.com> |
||||
Geoffrey C. Wenger <gwenger@qualcomm.com> |
||||
Gervase Markham <gerv@gerv.net> |
||||
Gianfranco Balza <bv1578@gmail.com> |
||||
Gijs Kruitbosch <gijskruitbosch@gmail.com> |
||||
Giorgio Maone <g.maone@informaction.com> |
||||
Glaucus Augustus Grecco Cardoso <glaucus@ime.usp.br> |
||||
Google Inc |
||||
Hans-Andreas Engel <engel@physics.harvard.edu> |
||||
Heather Arthur <harthur@cmu.edu> |
||||
Heikki Toivonen <heikki@netscape.com> |
||||
Henrik Gemal <mozilla@gemal.dk> |
||||
Henrik Skupin <hskupin@gmail.com> |
||||
Henri Sivonen <henris@clinet.fi> |
||||
Henry Jia <Henry.Jia@sun.com> |
||||
Henry Sobotka <sobotka@axess.com> |
||||
Hรฅkan Waara <hwaara@chello.se> |
||||
Howard Chu <hyc@symas.com> |
||||
Hubert Gajewski <hubert@hubertgajewski.com> |
||||
Ian McGreer <mcgreer@netscape.com> |
||||
Ian Neal <iann_bugzilla@blueyonder.co.uk> |
||||
IBM Corporation |
||||
Irakli Gozalishvili <rfobic@gmail.com> |
||||
James Green <jg@cyberstorm.demon.co.uk> |
||||
Jamie Zawinski <jwz@jwz.org> |
||||
Jan Horak <jhorak@redhat.com> |
||||
Jan Varga <varga@ku.sk> |
||||
<jarrod.k.gray@rose-hulman.edu> |
||||
Jason Barnabe <jason_barnabe@fastmail.fm> |
||||
Jason Eager <jce2@po.cwru.edu> |
||||
Jason Oster <parasyte@kodewerx.org> |
||||
Javier Delgadillo <javi@netscape.com> |
||||
Jean-Franรงois Ducarroz <ducarroz@netscaape.com> |
||||
Jeff Beckley <beckley@qualcomm.com> |
||||
Jeff Hammel <jhammel@mozilla.com> |
||||
Jeff Tsai <jt95070@netscape.net> |
||||
Jeff Walden <jwalden+code@mit.edu> |
||||
Jens Bannmann <jens.b@web.de> |
||||
Jens Hatlak <jh@junetz.de> |
||||
Jeremy Laine <jeremy.laine@m4x.org> |
||||
Jeremy M. Dolan <jmd@pobox.com> |
||||
Jeremy Morton <bugzilla@game-point.net> |
||||
Jesse Ruderman <jruderman@gmail.com> |
||||
Jie Zhang <jzhang918@gmail.com> |
||||
Jim Mathies <jmathies@mozilla.com> |
||||
Jim Porter <squibblyflabbetydoo@gmail.com> |
||||
J.M Betak jbetak@netscape.com |
||||
Joachim Herb <herb@leo.org> |
||||
Joe Hewitt <hewitt@netscape.com> |
||||
Joe Hughes <joe@retrovirus.com> |
||||
Joey Minta <jminta@gmail.com> |
||||
Johnathan Nightingale <johnath@mozilla.com> |
||||
John Gaunt <jgaunt@netscape.com> |
||||
John G Myers <jgmyers@netscape.com> |
||||
John Morkel <jmorkel@gmail.com> |
||||
John Ratke <jratke@owc.net> |
||||
John Resig <jresig@mozilla.com> |
||||
Jonas Joergensen <jonasj@jonasj.dk> |
||||
Jonas Sicking <sicking@bigfoot.com> |
||||
Jonathan Kamens <jik@kamens.us> |
||||
Jonathan Protzenko <jonathan.protzenko@gmail.com> |
||||
Jonathan Wilson <jonwil@tpgi.com.au> |
||||
Jon Baumgartner <jon@bergenstreetsoftware.com> |
||||
Jono X <jono@mozilla.com> |
||||
Jorge Villalobos <jorge.villalobos@gmail.com> |
||||
Josh Aas <josh@mozilla.com> |
||||
Josh Geenen <joshgeenen+tb@gmail.com> |
||||
Josh Soref <timeless@bemail.org> |
||||
Joshua Cranmer <Pidgeot18@gmail.com> |
||||
J. Paul Reed <preed@mozilla.com> |
||||
Jungshik Shin <jshin@mailaps.org> |
||||
Jussi Kukkonen <jussi.kukkonen@welho.com> |
||||
Justin Dolske <dolske@mozilla.com> |
||||
Justin Lebar <justin.lebar@gmail.com> |
||||
Justin Wood <Callek@gmail.com> |
||||
Kai Engert <kengert@redhat.com> |
||||
Karl Guertin <grayrest@grayrest.com> |
||||
Karsten Dรผsterloh <mnromyr@tprac.de> |
||||
Kathleen Brade <brade@pearlcrescent.com> |
||||
Kefu (Fisher) Zhao <kza3@sfu.ca> |
||||
Kent James <kent@caspia.com> |
||||
Kevin Gerich <kevin@kmgerich.com> |
||||
Kevin Puetz <puetzk@iastate.edu> |
||||
Kin Blas <kin@netscape.com> |
||||
Kipp Hickman <kipp@netscape.com> |
||||
Kohei Yoshino <kohei.yoshino@gmail.com> |
||||
Krishna Mohan Khandrika <kkhandrika@netscape.com> |
||||
Kuden <spitfire.kuden@gmail.com> |
||||
Kyle Huey <me@kylehuey.com> |
||||
Kyle Yuan <kyle.yuan@sun.com> |
||||
Lars Wohlfahrt <thetux.moz@googlemail.com> |
||||
Leif Hedstrom <leif@netscape.com> |
||||
Lennart Bublies <Lennart.Bublies@gmx.de> |
||||
<loadrunner@betak.net> |
||||
Lorenzo Colitti <lorenzo@colitti.com> |
||||
Ludovic Hirlimann <ludovic@hirlimann.net> |
||||
M.-A. Darche |
||||
Magnus Melin <mkmelin+mozilla@iki.fi> |
||||
Makoto Kato <m_kato@ga2.so-net.ne.jp> |
||||
Manuel Reimer <manuel.reimer@gmx.de> |
||||
Marco Bonardo <mak77@bonardo.net> |
||||
Marc Zahnlecker <m.zahnlecker@googlemail.com> |
||||
Margaret Leibovic <margaret.leibovic@gmail.com> |
||||
Mark Banner <mark@standard8.plus.com> |
||||
Mark Finkle <mfinkle@mozilla.com> |
||||
Mark Mentovai <mark@moxienet.com> |
||||
Mark "Mook" Yen <Mook.moz+Instantbird.code@gmail.com> |
||||
Mark Olson <maolson@earthlink.net> |
||||
Mark Smith <mcs@pearlcrescent.com> |
||||
Mark Swaffer <swaff@fudo.org> |
||||
Markus Adrario <mozilla@adrario.de> |
||||
Markus Hossner <markushossner@gmx.de> |
||||
Markus Stange <mstange@themasta.com> |
||||
Martin Schroeder <mschroeder@mozilla.x-home.org> |
||||
Masayuki Nakano <masayuki@d-toybox.com> |
||||
Matt Dudziak <mdudziak@qualcomm.com> |
||||
Matthew Mecca <matthew.mecca@gmail.com> |
||||
Matthew Willis <mattwillis@gmail.com> |
||||
Mauro Cicognini <mcicogni@libero.it> |
||||
Mehdi Mulani <mmmulani@uwaterloo.ca> |
||||
Merike Sell <merikes@gmail.com> |
||||
Michael Braun <michael-dev@fami-braun.de> |
||||
Michael Bรผttner <michael.buettner@sun.com> |
||||
Michael Foord <fuzzyman@voidspace.org.uk> |
||||
Michael Hein <mhein@sun.com> |
||||
Michael Johnston <special.michael@gmail.com> |
||||
Michael Kohler <michaelkohler@live.com> |
||||
Michael Kraft <morac99-firefox@yahoo.com> |
||||
Michael Lowe <michael.lowe@bigfoot.com> |
||||
Michael Ventnor <m.ventnor@gmail.com> |
||||
Michiel van Leeuwen <mvl@exedo.nl> |
||||
Mikeal Rogers <mikeal.rogers@gmail.com> |
||||
Mike Conley <mconley@mozilla.com> |
||||
Mike Connor <mconnor@steelgryphon.com> |
||||
Mike Kaganski <mikekaganski@gmail.com> |
||||
Mike Kowalski <mikejk@ameritech.net> |
||||
Mike Norton <xor@ivwnet.com> |
||||
Mike Pinkerton <pinkerton@netscape.com> |
||||
Mike Potter <mikep@oeone.com> |
||||
Mike Shaver <shaver@off.net> |
||||
Misak Khachatryan <misak.bugzilla@gmail.com> |
||||
Mitesh Shah <mitesh@netscape.com> |
||||
Mohan Bhamidipati <mohanb@netscape.com> |
||||
Mostafa Hosseini <mostafah@oeone.com> |
||||
Mozilla Foundation |
||||
Mozilla Japan |
||||
Myk Melez <myk@mozilla.org> |
||||
Navin Gupta <naving@netscape.com> |
||||
Neil Deakin <enndeakin@sympatico.ca> |
||||
Neil Rashbrook <neil@parkwaycc.co.uk> |
||||
Netscape Communications Corporation |
||||
New Dimensions Consulting, Inc |
||||
Nick Kreeger <nick.kreeger@park.edu> |
||||
Niels Provos <niels@google.com> |
||||
Nils Maier <maierman@web.de> |
||||
OEone Corporation |
||||
Olivier Parniere |
||||
Olli Pettay <Olli.Pettay@helsinki.fi> |
||||
Oracle Corporation |
||||
Oren Nachmore <nachmore@gmail.com> |
||||
Pamela Greene <pamg.bugs@gmail.com> |
||||
Patrick C. Beard <beard@netscape.com> |
||||
Patrick Cloke <clokep@gmail.com> |
||||
Patrick Thompson <sailfish@unforgettable.com> |
||||
Paul Hangas <hangas@netscape.com> |
||||
Paul O'Shannessy <paul@oshannessy.com> |
||||
Paul Sandoz <paul.sandoz@sun.com> |
||||
Paul Tomlin <paul@wavebreaks.com> |
||||
Pete Collins |
||||
Peter Annema <disttsc@bart.nl> |
||||
Peter Parente <parente@cs.unc.edu> |
||||
Peter Van der Beken <peterv@propagandism.org> |
||||
Peter Weilbacher <mozilla@weilbacher.org> |
||||
Philip Chee <philip.chee@gmail.com> |
||||
Philipp Kewisch <mozilla@kewis.ch> |
||||
Philipp von Weitershausen <philipp@weitershausen.de> |
||||
Philip Zhao <philip.zhao@sun.com> |
||||
Phil Lacy <philbaseless-firefox@yahoo.com> |
||||
Phil Ringnalda <philringnalda@gmail.com> |
||||
Pierre Chanial <chanial@noos.fr> |
||||
Pierre Phaneuf <pp@ludusdesign.com> |
||||
Prasad Sunkari <prasad@medhas.org> |
||||
Princess Marshmallow <yumminess@netscape.com> |
||||
QUALCOMM Incorporated |
||||
Quentin Castier <idechix@instantbird.org> |
||||
<racham@netscape.com> |
||||
Rajiv Dayal <rdayal@netscape.com> |
||||
Ramalingam Saravanan |
||||
Ramiro Estrugo <ramiro@netscape.com> |
||||
Raymond Lee <raymond@appcoast.com> |
||||
Ray Whitmer <rayw@netscape.com> |
||||
<riceman+bmo@mail.rit.edu> |
||||
Richard Marti <richard.marti@gmail.com> |
||||
R.J. Keller |
||||
Rob Arnold <tellrob@gmail.com> |
||||
Robert Ginda <rginda@ndcico.com> |
||||
Robert John Churchill <rjc@netscape.com> |
||||
Robert Kaiser <kairo@kairo.at> |
||||
Robert Sayre <sayrer@gmail.com> |
||||
Robert Strong <robert.bugzilla@gmail.com> |
||||
Robin Edrenius <robin.edrenius@gmail.com> |
||||
Robin Foster-Clark <robinf@netscape.com> |
||||
Rod Spears <rods@netscape.com> |
||||
Romain Bezut <romain@bezut.info> |
||||
Roman Kaeppeler <rkaeppeler@web.de> |
||||
Ryan Cassin <rcassin@supernova.org> |
||||
Ryan Flint <rflint@dslr.net> |
||||
Ryan Jones <sciguyryan@gmail.com> |
||||
Samir Gehani <sgehani@netscape.com> |
||||
Sammy Ford <sford@swbell.net> |
||||
Scott MacGregor <mscott@mozilla.org> |
||||
Scott Putterman <putterman@netscape.com> |
||||
Sean Su <ssu@netscape.com> |
||||
Sebastian Schwieger <sebo.moz@googlemail.com> |
||||
Serge Gautherie <sgautherie.bz@free.fr> |
||||
Seth Spitzer <sspitzer@mozilla.org> |
||||
Shane Caraveo <shane@caraveo.com> |
||||
Shawn Wilsher <me@shawnwilsher.com> |
||||
<shliang@netscape.com> |
||||
Siddharth Agarwal <sid1337@gmail.com> |
||||
Simdesk Technologies Inc |
||||
Simeon Morrison <smorrison@gte.com> |
||||
Simon Bรผnzli <zeniko@gmail.com> |
||||
Simon Fraser <sfraser@netscape.com> |
||||
Simon Paquet <bugzilla@babylonsounds.com> |
||||
Simon Vaillancourt <simon.at.orcl@gmail.com> |
||||
Simon Wilkinson <simon@sxw.org.uk> |
||||
slucy@objectivesw.co.uk |
||||
smorrison@gte.com |
||||
Spencer Murray <spence@netscape.com> |
||||
Srilatha Moturi <srilatha@netscape.com> |
||||
Stefan Borggraefe <borggraefe@despammed.com> |
||||
Stefan Fleiter <stefan.fleiter@web.de> |
||||
Stefan Hermes <stefanh@inbox.com> |
||||
Stefan Sitter <ssitter@gmail.com> |
||||
Steffen Wilberg <steffen.wilberg@web.de> |
||||
Stephane Saux <ssaux@netscape.com> |
||||
Stephen Clavering <mozilla@clav.me.uk> |
||||
Stephen Donner <technutz@netscape.net> |
||||
Stephen Horlander <stephen@noved.org> |
||||
Stephen Lamm <slamm@netscape.com> |
||||
Stephen Walker <walk84@yahoo.com> |
||||
Steve Dorner <sdorner@qualcomm.com> |
||||
Steve Hampton <mvgrad78@yahoo.com> |
||||
Steven Garrity <steven@silverorange.com> |
||||
Stuart Ballard <sballard@netreach.net> |
||||
Stuart Parmenter <pavlov@pavlov.net> |
||||
Sungjoon Steve Won <stevewon@gmail.com> |
||||
Sun Microsystems, Inc |
||||
Takayuki Tei <taka@netscape.com> |
||||
<tenthumbs@cybernex.net> |
||||
Terry Hayes <thayes@netscape.com> |
||||
Thomas Benisch <thomas.benisch@sun.com> |
||||
Thomas Dรผllmann <bugzilla2009@duellmann24.net> |
||||
Thomas Schmid <schmid-thomas@gmx.net> |
||||
timeless |
||||
Tim Taylor <tim@tool-man.org> |
||||
Tobias Koenig <tobias.koenig@credativ.de> |
||||
Tom Germeau <tom.germeau@epigoon.com> |
||||
Tuukka Tolvanen <tt@lament.cjb.net> |
||||
Varada Parthasarathi <varada@netscape.com> |
||||
Varuna Jayasiri <vpjayasiri@gmail.com> |
||||
Vladimir Vukicevic <vladimir@pobox.com> |
||||
Warren Harris <warren@netscape.com> |
||||
Wei Xian Woo <wei0@gmx.com> |
||||
Will Guaraldi <will.guaraldi@pculture.org> |
||||
William A. Law <law@netscape.com> |
||||
William Bonnet <wbonnet@on-x.com> |
||||
William R. Price <wrprice@alumni.rice.edu> |
||||
Wolfgang Rosenauer <wr@rosenauer.org> |
||||
Wolfgang Sourdeau <wsourdeau@inverse.ca> |
||||
ลฝiga Sancin <bisi@pikslar.com> |
@ -0,0 +1,27 @@
|
||||
dnl |
||||
dnl Local autoconf macros used with mozilla |
||||
dnl The contents of this file are under the Public Domain. |
||||
dnl |
||||
|
||||
builtin(include, mozilla/build/autoconf/toolchain.m4)dnl |
||||
builtin(include, mozilla/build/autoconf/config.status.m4)dnl |
||||
builtin(include, mozilla/build/autoconf/nspr.m4)dnl |
||||
builtin(include, mozilla/build/autoconf/nss.m4)dnl |
||||
builtin(include, mozilla/build/autoconf/pkg.m4)dnl |
||||
builtin(include, mozilla/build/autoconf/codeset.m4)dnl |
||||
builtin(include, mozilla/build/autoconf/altoptions.m4)dnl |
||||
builtin(include, mozilla/build/autoconf/mozprog.m4)dnl |
||||
builtin(include, mozilla/build/autoconf/acwinpaths.m4)dnl |
||||
builtin(include, mozilla/build/autoconf/lto.m4)dnl |
||||
builtin(include, mozilla/build/autoconf/frameptr.m4)dnl |
||||
builtin(include, mozilla/build/autoconf/compiler-opts.m4)dnl |
||||
builtin(include, mozilla/build/autoconf/zlib.m4)dnl |
||||
builtin(include, mozilla/build/autoconf/expandlibs.m4)dnl |
||||
|
||||
MOZ_PROG_CHECKMSYS() |
||||
|
||||
# Read the user's .mozconfig script. We can't do this in |
||||
# configure.in: autoconf puts the argument parsing code above anything |
||||
# expanded from configure.in, and we need to get the configure options |
||||
# from .mozconfig in place before that argument parsing code. |
||||
dnl MOZ_READ_MOZCONFIG(mozilla) |
@ -0,0 +1,2 @@
|
||||
mozconfig-find |
||||
mozconfig2client-mk |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,76 @@
|
||||
#! /bin/sh |
||||
# |
||||
# 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/. |
||||
|
||||
# mozconfigfind - Loads options from .mozconfig onto configure's |
||||
# command-line. The .mozconfig file is searched for in the |
||||
# order: |
||||
# If $MOZCONFIG is set, use that. |
||||
# If one of $TOPSRCDIR/.mozconfig or $TOPSRCDIR/mozconfig exists, use it. |
||||
# If both exist, or if various legacy locations contain a mozconfig, error. |
||||
# Otherwise, use the default build options. |
||||
# |
||||
topsrcdir=$1 |
||||
|
||||
abspath() { |
||||
if uname -s | grep -q MINGW; then |
||||
# We have no way to figure out whether we're in gmake or pymake right |
||||
# now. gmake gives us Unix-style paths while pymake gives us Windows-style |
||||
# paths, so attempt to handle both. |
||||
regexes='^\([A-Za-z]:\|\\\\\|\/\) ^\/' |
||||
else |
||||
regexes='^\/' |
||||
fi |
||||
|
||||
for regex in $regexes; do |
||||
if echo $1 | grep -q $regex; then |
||||
echo $1 |
||||
return |
||||
fi |
||||
done |
||||
|
||||
# If we're at this point, we have a relative path |
||||
echo `pwd`/$1 |
||||
} |
||||
|
||||
if [ -n "$MOZCONFIG" ] && ! [ -f "$MOZCONFIG" ]; then |
||||
echo "Specified MOZCONFIG \"$MOZCONFIG\" does not exist!" 1>&2 |
||||
exit 1 |
||||
fi |
||||
|
||||
if [ -n "$MOZ_MYCONFIG" ]; then |
||||
echo "Your environment currently has the MOZ_MYCONFIG variable set to \"$MOZ_MYCONFIG\". MOZ_MYCONFIG is no longer supported. Please use MOZCONFIG instead." 1>&2 |
||||
exit 1 |
||||
fi |
||||
|
||||
if [ -z "$MOZCONFIG" ] && [ -f "$topsrcdir/.mozconfig" ] && [ -f "$topsrcdir/mozconfig" ]; then |
||||
echo "Both \$topsrcdir/.mozconfig and \$topsrcdir/mozconfig are supported, but you must choose only one. Please remove the other." 1>&2 |
||||
exit 1 |
||||
fi |
||||
|
||||
for _config in "$MOZCONFIG" \ |
||||
"$topsrcdir/.mozconfig" \ |
||||
"$topsrcdir/mozconfig" |
||||
do |
||||
if test -f "$_config"; then |
||||
abspath $_config |
||||
exit 0 |
||||
fi |
||||
done |
||||
|
||||
# We used to support a number of other implicit .mozconfig locations. We now |
||||
# detect if we were about to use any of these locations and issue an error if we |
||||
# find any. |
||||
for _config in "$topsrcdir/mozconfig.sh" \ |
||||
"$topsrcdir/myconfig.sh" \ |
||||
"$HOME/.mozconfig" \ |
||||
"$HOME/.mozconfig.sh" \ |
||||
"$HOME/.mozmyconfig.sh" |
||||
do |
||||
if test -f "$_config"; then |
||||
echo "You currently have a mozconfig at \"$_config\". This implicit location is no longer supported. Please move it to $topsrcdir/.mozconfig or specify it explicitly via \$MOZCONFIG." 1>&2 |
||||
exit 1 |
||||
fi |
||||
done |
@ -0,0 +1,76 @@
|
||||
#! /bin/sh |
||||
# |
||||
# 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/. |
||||
|
||||
# mozconfig2client-mk - Translates .mozconfig into options for client.mk. |
||||
# Prints defines to stdout. |
||||
# |
||||
# See mozconfig2configure for more details |
||||
|
||||
print_header() { |
||||
cat <<EOF |
||||
# gmake |
||||
# This file is automatically generated for client.mk. |
||||
# Do not edit. Edit $FOUND_MOZCONFIG instead. |
||||
|
||||
EOF |
||||
} |
||||
|
||||
ac_add_options() { |
||||
for _opt |
||||
do |
||||
case "$_opt" in |
||||
--target=*) |
||||
echo $_opt | sed s/--target/CONFIG_GUESS/ |
||||
;; |
||||
*) |
||||
echo "# $_opt is used by configure (not client.mk)" |
||||
;; |
||||
esac |
||||
done |
||||
} |
||||
|
||||
ac_add_app_options() { |
||||
echo "# $* is used by configure (not client.mk)" |
||||
} |
||||
|
||||
mk_add_options() { |
||||
for _opt |
||||
do |
||||
# Escape shell characters, space, tab, dollar, quote, backslash, |
||||
# and substitute '@<word>@' with '$(<word>)'. |
||||
_opt=`echo "$_opt" | sed -e 's/\([\"\\]\)/\\\\\1/g; s/@\([^@]*\)@/\$(\1)/g;'` |
||||
echo $_opt; |
||||
done |
||||
} |
||||
|
||||
# Main |
||||
#-------------------------------------------------- |
||||
|
||||
scriptdir=`dirname $0` |
||||
topsrcdir=$1 |
||||
|
||||
# If the path changes, configure should be rerun |
||||
echo "# PATH=$PATH" |
||||
|
||||
# If FOUND_MOZCONFIG isn't set, look for it and make sure the script doesn't error out |
||||
isfoundset=${FOUND_MOZCONFIG+yes} |
||||
if [ -z $isfoundset ]; then |
||||
FOUND_MOZCONFIG=`$scriptdir/mozconfig-find $topsrcdir` |
||||
if [ $? -ne 0 ]; then |
||||
echo '$(error Fix above errors before continuing.)' |
||||
else |
||||
isfoundset=yes |
||||
fi |
||||
fi |
||||
|
||||
if [ -n $isfoundset ]; then |
||||
if [ "$FOUND_MOZCONFIG" ] |
||||
then |
||||
print_header |
||||
. "$FOUND_MOZCONFIG" |
||||
echo "FOUND_MOZCONFIG := $FOUND_MOZCONFIG" |
||||
fi |
||||
fi |
@ -0,0 +1,17 @@
|
||||
dumbmake-dependencies |
||||
mach_bootstrap.py |
||||
merge-installrdf.py |
||||
pymake |
||||
client.py-args |
||||
client.py-l10n-args |
||||
configobj.py |
||||
|
||||
# Ignore detritus left lying around by editing tools. |
||||
*~ |
||||
.#* |
||||
#*# |
||||
*.orig |
||||
*.rej |
||||
|
||||
# Ignore "compiled" python files |
||||
*.pyc |
@ -0,0 +1 @@
|
||||
--hg-options='--time' --hgtool=../tools/buildfarm/utils/hgtool.py --hgtool1=../scripts/buildfarm/utils/hgtool.py --skip-chatzilla --skip-comm --skip-inspector --tinderbox-print --mozilla-repo=https://hg.mozilla.org/releases/mozilla-esr52 --mozilla-rev=THUNDERBIRD_52_VERBRANCH |
@ -0,0 +1 @@
|
||||
--hg-options='--time' --hgtool=../tools/buildfarm/utils/hgtool.py --hgtool1=../scripts/buildfarm/utils/hgtool.py --skip-chatzilla --skip-comm --skip-inspector --tinderbox-print --mozilla-repo=https://hg.mozilla.org/releases/mozilla-esr52 --mozilla-rev=THUNDERBIRD_52_VERBRANCH |
@ -0,0 +1,6 @@
|
||||
im/app |
||||
chat |
||||
im |
||||
mozilla/extensions/purple |
||||
chat |
||||
im |
@ -0,0 +1,14 @@
|
||||
# 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 unicode_literals |
||||
|
||||
import os, sys |
||||
|
||||
def bootstrap(topsrcdir, mozilla_dir=None): |
||||
if mozilla_dir is None: |
||||
mozilla_dir = os.path.join(topsrcdir, 'mozilla') |
||||
sys.path[0:0] = [mozilla_dir] |
||||
import build.mach_bootstrap |
||||
return build.mach_bootstrap.bootstrap(topsrcdir, mozilla_dir) |
@ -0,0 +1,47 @@
|
||||
# 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/. |
||||
|
||||
MOZ_AUTOMATION_L10N_CHECK=0 |
||||
|
||||
if [ "x$IS_NIGHTLY" = "xyes" ]; then |
||||
# Some nightlies (eg: Mulet) don't want these set. |
||||
MOZ_AUTOMATION_UPDATE_PACKAGING=${MOZ_AUTOMATION_UPDATE_PACKAGING-1} |
||||
MOZ_AUTOMATION_SDK=${MOZ_AUTOMATION_SDK-1} |
||||
fi |
||||
. "$topsrcdir/build/mozconfig.common" |
||||
|
||||
# ld needs libLTO.so from llvm |
||||
mk_add_options "export LD_LIBRARY_PATH=$topsrcdir/clang/lib" |
||||
|
||||
CROSS_CCTOOLS_PATH=$topsrcdir/cctools |
||||
CROSS_SYSROOT=$topsrcdir/MacOSX10.7.sdk |
||||
CROSS_PRIVATE_FRAMEWORKS=$CROSS_SYSROOT/System/Library/PrivateFrameworks |
||||
FLAGS="-target x86_64-apple-darwin10 -mlinker-version=136 -B $CROSS_CCTOOLS_PATH/bin -isysroot $CROSS_SYSROOT" |
||||
|
||||
export CC="$topsrcdir/clang/bin/clang $FLAGS" |
||||
export CXX="$topsrcdir/clang/bin/clang++ $FLAGS" |
||||
export CPP="$topsrcdir/clang/bin/clang $FLAGS -E" |
||||
export LLVMCONFIG=$topsrcdir/clang/bin/llvm-config |
||||
export LDFLAGS="-Wl,-syslibroot,$CROSS_SYSROOT -Wl,-dead_strip" |
||||
export TOOLCHAIN_PREFIX=$CROSS_CCTOOLS_PATH/bin/x86_64-apple-darwin10- |
||||
export DSYMUTIL=$topsrcdir/clang/bin/llvm-dsymutil |
||||
export GENISOIMAGE=$topsrcdir/genisoimage/genisoimage |
||||
export DMG_TOOL=$topsrcdir/dmg/dmg |
||||
|
||||
export HOST_CC="$topsrcdir/clang/bin/clang" |
||||
export HOST_CXX="$topsrcdir/clang/bin/clang++" |
||||
export HOST_CPP="$topsrcdir/clang/bin/clang -E" |
||||
export HOST_CFLAGS="-g" |
||||
export HOST_CXXFLAGS="-g" |
||||
export HOST_LDFLAGS="-g" |
||||
|
||||
ac_add_options --target=x86_64-apple-darwin |
||||
ac_add_options --with-macos-private-frameworks=$CROSS_PRIVATE_FRAMEWORKS |
||||
|
||||
# Enable static analysis checks by default on OSX cross builds. |
||||
ac_add_options --enable-clang-plugin |
||||
|
||||
. "$topsrcdir/build/mozconfig.cache" |
||||
|
||||
export SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE=/builds/crash-stats-api.token |
@ -0,0 +1,46 @@
|
||||
# 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/. |
||||
|
||||
if [ "x$IS_NIGHTLY" = "xyes" ]; then |
||||
# Some nightlies (eg: Mulet) don't want these set. |
||||
MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-1} |
||||
MOZ_AUTOMATION_UPDATE_PACKAGING=${MOZ_AUTOMATION_UPDATE_PACKAGING-1} |
||||
MOZ_AUTOMATION_SDK=${MOZ_AUTOMATION_SDK-1} |
||||
fi |
||||
. "$topsrcdir/build/mozconfig.common" |
||||
|
||||
if [ -d "$topsrcdir/clang" ]; then |
||||
# mozilla-central based build |
||||
export CC=$topsrcdir/clang/bin/clang |
||||
export CXX=$topsrcdir/clang/bin/clang++ |
||||
export LLVMCONFIG=$topsrcdir/clang/bin/llvm-config |
||||
export DSYMUTIL=$topsrcdir/clang/bin/llvm-dsymutil |
||||
# Use an updated linker. |
||||
ldflags="-B$topsrcdir/cctools/bin" |
||||
elif [ -d "$topsrcdir/../clang" ]; then |
||||
# comm-central based build |
||||
export CC=$topsrcdir/../clang/bin/clang |
||||
export CXX=$topsrcdir/../clang/bin/clang++ |
||||
export LLVMCONFIG=$topsrcdir/../clang/bin/llvm-config |
||||
export DSYMUTIL=$topsrcdir/../clang/bin/llvm-dsymutil |
||||
# Use an updated linker. |
||||
ldflags="-B$topsrcdir/../cctools/bin" |
||||
fi |
||||
|
||||
# Ensure the updated linker doesn't generate things our older build tools |
||||
# don't understand. |
||||
ldflags="$ldflags -Wl,-no_data_in_code_info" |
||||
export LDFLAGS="$ldflags" |
||||
|
||||
# If not set use the system default clang |
||||
if [ -z "$CC" ]; then |
||||
export CC=clang |
||||
fi |
||||
|
||||
# If not set use the system default clang++ |
||||
if [ -z "$CXX" ]; then |
||||
export CXX=clang++ |
||||
fi |
||||
|
||||
export SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE=/builds/crash-stats-api.token |
@ -0,0 +1,5 @@
|
||||
if test `uname -s` = Linux; then |
||||
. $topsrcdir/build/macosx/cross-mozconfig.common |
||||
else |
||||
. $topsrcdir/build/macosx/local-mozconfig.common |
||||
fi |
@ -0,0 +1,9 @@
|
||||
flight.mk |
||||
mozconfig.common |
||||
|
||||
# Ignore detritus left lying around by editing tools. |
||||
*~ |
||||
.#* |
||||
#*# |
||||
*.orig |
||||
*.rej |
@ -0,0 +1,33 @@
|
||||
# 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/.
|
||||
|
||||
# BE CAREFUL! This makefile handles a postflight_all rule for a
|
||||
# multi-project build, so DON'T rely on anything that might differ between
|
||||
# the two OBJDIRs.
|
||||
|
||||
ifndef OBJDIR |
||||
OBJDIR_ARCH_1 = $(MOZ_OBJDIR)/$(firstword $(MOZ_BUILD_PROJECTS))
|
||||
OBJDIR_ARCH_2 = $(MOZ_OBJDIR)/$(word 2,$(MOZ_BUILD_PROJECTS))
|
||||
DIST_ARCH_1 = $(OBJDIR_ARCH_1)/dist
|
||||
DIST_ARCH_2 = $(OBJDIR_ARCH_2)/dist
|
||||
DIST_UNI = $(DIST_ARCH_1)/universal
|
||||
OBJDIR = $(OBJDIR_ARCH_1)
|
||||
endif |
||||
|
||||
topsrcdir = $(TOPSRCDIR)
|
||||
DEPTH = $(OBJDIR)
|
||||
include $(OBJDIR)/config/autoconf.mk |
||||
|
||||
core_abspath = $(if $(filter /%,$(1)),$(1),$(CURDIR)/$(1))
|
||||
|
||||
DIST = $(OBJDIR)/dist
|
||||
|
||||
postflight_all: |
||||
mkdir -p $(DIST_UNI)/$(MOZ_PKG_APPNAME)
|
||||
rm -f $(DIST_ARCH_2)/universal
|
||||
ln -s $(abspath $(DIST_UNI)) $(DIST_ARCH_2)/universal
|
||||
# Stage a package for buildsymbols to be happy. Doing so in OBJDIR_ARCH_1
|
||||
# actually does a universal staging with both OBJDIR_ARCH_1 and OBJDIR_ARCH_2.
|
||||
$(MAKE) -C $(OBJDIR_ARCH_1)/$(subst ../,,$(MOZ_BUILD_APP))/installer \
|
||||
PKG_SKIP_STRIP=1 stage-package
|
@ -0,0 +1,11 @@
|
||||
# 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/. |
||||
|
||||
# i386/x86-64 Universal Build mozconfig |
||||
|
||||
# As used here, arguments in $MOZ_BUILD_PROJECTS are suitable as arguments |
||||
# to gcc's -arch parameter. |
||||
mk_add_options MOZ_BUILD_PROJECTS="x86_64 i386" |
||||
|
||||
. $topsrcdir/build/macosx/universal/mozconfig.common |
@ -0,0 +1,54 @@
|
||||
# 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/. |
||||
|
||||
mk_add_options MOZ_UNIFY_BDATE=1 |
||||
|
||||
mk_add_options MOZ_POSTFLIGHT_ALL+=build/macosx/universal/flight.mk |
||||
|
||||
DARWIN_VERSION=`uname -r` |
||||
ac_add_app_options i386 --target=i386-apple-darwin$DARWIN_VERSION |
||||
ac_add_app_options x86_64 --target=x86_64-apple-darwin$DARWIN_VERSION |
||||
ac_add_app_options i386 --with-unify-dist=../x86_64/dist |
||||
ac_add_app_options x86_64 --with-unify-dist=../i386/dist |
||||
|
||||
ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.7.sdk |
||||
|
||||
. $topsrcdir/build/macosx/mozconfig.common |
||||
|
||||
# $MOZ_BUILD_APP is only defined when sourced by configure. That's not a |
||||
# problem, because the variables it affects only need to be set for |
||||
# configure. |
||||
if test -n "$MOZ_BUILD_APP" ; then |
||||
if test "$MOZ_BUILD_APP" = "i386" -o "$MOZ_BUILD_APP" = "x86_64"; then |
||||
TARGET_CPU=$MOZ_BUILD_APP |
||||
|
||||
# $HOST_CXX is presently unused. $HOST_CC will only be used during a cross |
||||
# compile. |
||||
HOST_CC=$CC |
||||
HOST_CXX=$CXX |
||||
|
||||
NATIVE_CPU=`$topsrcdir/build/autoconf/config.guess | cut -f1 -d-` |
||||
|
||||
# It's not strictly necessary to specify -arch during native builds, but it |
||||
# makes the merged about:buildconfig easier to follow, and it reduces |
||||
# conditionalized differences between builds. |
||||
CC="$CC -arch $TARGET_CPU" |
||||
CXX="$CXX -arch $TARGET_CPU" |
||||
|
||||
# These must be set for cross builds, and don't hurt straight builds. |
||||
RANLIB=ranlib |
||||
AR=ar |
||||
AS=$CC |
||||
LD=ld |
||||
STRIP="strip" |
||||
OTOOL="otool" |
||||
|
||||
# Each per-CPU build should be entirely oblivious to the fact that a |
||||
# universal binary will be produced. The exception is packager.mk, which |
||||
# needs to know to look for universal bits when building the .dmg. |
||||
UNIVERSAL_BINARY=1 |
||||
|
||||
export CC CXX HOST_CC HOST_CXX RANLIB AR AS LD STRIP OTOOL |
||||
fi |
||||
fi |
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/python |
||||
# 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/. |
||||
|
||||
# Get the target platform from a set of install.rdf files, and |
||||
# return the first install.rdf with the platform replaced by the list of |
||||
# platforms as parsed from all the files |
||||
# Allows to create a install.rdf for multiple platforms |
||||
|
||||
import sys |
||||
from xml.dom.minidom import parse |
||||
|
||||
elems = [] |
||||
for arg in sys.argv[2:]: |
||||
doc = parse(arg + "/install.rdf") |
||||
elem = doc.getElementsByTagName("em:targetPlatform")[0] |
||||
elems.append(elem.cloneNode(True)) |
||||
|
||||
doc = parse(sys.argv[1] + "/install.rdf") |
||||
elem = doc.getElementsByTagName("em:targetPlatform")[0] |
||||
for newelem in elems: |
||||
elem.parentNode.insertBefore(newelem, elem) |
||||
print doc.toxml() |
@ -0,0 +1,33 @@
|
||||
# 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/. |
||||
|
||||
# Common mozconfig for automation builds. |
||||
# |
||||
# We export MOZ_AUTOMATION_* variables here to trigger various steps in |
||||
# automation builds. For example, if MOZ_AUTOMATION_PACKAGE is set, then the |
||||
# package step will run. This file contains the default settings, which can be |
||||
# overridden by setting them earlier in the appropriate mozconfig. |
||||
|
||||
mk_add_options "export MOZ_AUTOMATION_BUILD_SYMBOLS=${MOZ_AUTOMATION_BUILD_SYMBOLS-1}" |
||||
mk_add_options "export MOZ_AUTOMATION_L10N_CHECK=${MOZ_AUTOMATION_L10N_CHECK-1}" |
||||
mk_add_options "export MOZ_AUTOMATION_PACKAGE=${MOZ_AUTOMATION_PACKAGE-1}" |
||||
mk_add_options "export MOZ_AUTOMATION_PACKAGE_TESTS=${MOZ_AUTOMATION_PACKAGE_TESTS-1}" |
||||
mk_add_options "export MOZ_AUTOMATION_INSTALLER=${MOZ_AUTOMATION_INSTALLER-0}" |
||||
mk_add_options "export MOZ_AUTOMATION_UPDATE_PACKAGING=${MOZ_AUTOMATION_UPDATE_PACKAGING-0}" |
||||
mk_add_options "export MOZ_AUTOMATION_UPLOAD=${MOZ_AUTOMATION_UPLOAD-1}" |
||||
mk_add_options "export MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-0}" |
||||
mk_add_options "export MOZ_AUTOMATION_SDK=${MOZ_AUTOMATION_SDK-0}" |
||||
|
||||
# If we are also building with MOZ_PKG_PRETTYNAMES, set the corresponding |
||||
# stages. |
||||
if test "$MOZ_AUTOMATION_PRETTY" = "1"; then |
||||
mk_add_options "export MOZ_AUTOMATION_PRETTY_PACKAGE=${MOZ_AUTOMATION_PACKAGE-1}" |
||||
mk_add_options "export MOZ_AUTOMATION_PRETTY_PACKAGE_TESTS=${MOZ_AUTOMATION_PACKAGE_TESTS-1}" |
||||
mk_add_options "export MOZ_AUTOMATION_PRETTY_L10N_CHECK=${MOZ_AUTOMATION_L10N_CHECK-1}" |
||||
mk_add_options "export MOZ_AUTOMATION_PRETTY_INSTALLER=${MOZ_AUTOMATION_INSTALLER-0}" |
||||
|
||||
# Note that we always build the update packaging with pretty names even if |
||||
# we don't build it without, so this is set to 1. |
||||
mk_add_options "export MOZ_AUTOMATION_PRETTY_UPDATE_PACKAGING=1" |
||||
fi |
@ -0,0 +1,135 @@
|
||||
# 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/. |
||||
|
||||
# Setup for build cache |
||||
|
||||
# Avoid duplication if the file happens to be included twice. |
||||
if test -z "$bucket" -a -z "$NO_CACHE"; then |
||||
|
||||
# buildbot (or builders that use buildprops.json): |
||||
if [ -f $topsrcdir/../buildprops.json ]; then |
||||
read branch platform master <<EOF |
||||
$(python2.7 -c 'import json; p = json.loads(open("'"$topsrcdir"'/../buildprops.json").read())["properties"]; print p["branch"], p["platform"], p["master"]' 2> /dev/null) |
||||
EOF |
||||
|
||||
bucket= |
||||
if test -z "$SCCACHE_DISABLE" -a -z "$no_sccache" -a -z "$MOZ_PGO_IS_SET" -a -z "$MOZ_PGO"; then |
||||
case "${branch}" in |
||||
try) |
||||
case "${master}" in |
||||
*scl1.mozilla.com*|*.scl3.mozilla.com*) |
||||
bucket=mozilla-releng-s3-cache-us-west-1-try |
||||
;; |
||||
*use1.mozilla.com*) |
||||
bucket=mozilla-releng-s3-cache-us-east-1-try |
||||
;; |
||||
*usw2.mozilla.com*) |
||||
bucket=mozilla-releng-s3-cache-us-west-2-try |
||||
;; |
||||
esac |
||||
;; |
||||
autoland|mozilla-inbound) |
||||
case "${master}" in |
||||
*use1.mozilla.com*) |
||||
bucket=mozilla-releng-s3-cache-us-east-1-prod |
||||
;; |
||||
*usw2.mozilla.com*) |
||||
bucket=mozilla-releng-s3-cache-us-west-2-prod |
||||
;; |
||||
esac |
||||
;; |
||||
esac |
||||
fi |
||||
|
||||
# builds without buildprops (eg: taskcluster or non-buildbot) and without ccache env config and without sccache disabled: |
||||
elif test -z "$CCACHE_DIR" -a -z "$SCCACHE_DISABLE" -a -z "$no_sccache" -a -z "$MOZ_PGO_IS_SET" -a -z "$MOZ_PGO"; then |
||||
|
||||
# prevent rerun if az is set, or wget is not available |
||||
if test -z "$availability_zone" -a -x "$(command -v wget)"; then |
||||
# timeout after 1 second, and don't retry (failure indicates instance is not in ec2 or network issue) |
||||
# availability_zone is of the form <region><letter> where region is e.g. us-west-2, and az is us-west-2a |
||||
availability_zone=$(wget -T 1 -t 1 -q -O - http://169.254.169.254/latest/meta-data/placement/availability-zone || true) |
||||
if test -z "$availability_zone" -o "$availability_zone" = "not-ec2"; then |
||||
availability_zone=not-ec2 |
||||
else |
||||
# region is az with last letter trimmed |
||||
region=${availability_zone%?} |
||||
# set S3 bucket according to tree (level) |
||||
case "${GECKO_HEAD_REPOSITORY}" in |
||||
*hg.mozilla.org/try*) |
||||
bucket=taskcluster-level-1-sccache-${region} |
||||
;; |
||||
*hg.mozilla.org/integration/autoland*|*hg.mozilla.org/integration/mozilla-inbound*) |
||||
bucket=taskcluster-level-3-sccache-${region} |
||||
;; |
||||
esac |
||||
|
||||
# set a dummy master |
||||
case "${region}" in |
||||
eu-central-1) |
||||
master=dummy.euc1.mozilla.com |
||||
;; |
||||
us-east-1) |
||||
master=dummy.use1.mozilla.com |
||||
;; |
||||
us-west-1) |
||||
master=dummy.usw1.mozilla.com |
||||
;; |
||||
us-west-2) |
||||
master=dummy.usw2.mozilla.com |
||||
;; |
||||
esac |
||||
fi |
||||
fi |
||||
fi |
||||
|
||||
# if platform hasn't been determined from buildprops, and we're on windows, |
||||
# it must be set to prevent adding ac_add_options --with-ccache below |
||||
if test -z "$platform"; then |
||||
# set platform based on the SYSTEMROOT env var |
||||
case "${SYSTEMROOT}" in |
||||
*Windows) |
||||
platform=windows |
||||
;; |
||||
esac |
||||
fi |
||||
|
||||
if test -z "$bucket"; then |
||||
case "$platform" in |
||||
win*) : ;; |
||||
*) |
||||
ac_add_options --with-ccache |
||||
esac |
||||
else |
||||
if ! test -e $topsrcdir/sccache/sccache.py; then |
||||
echo "Sccache missing in the tooltool manifest" >&2 |
||||
exit 1 |
||||
fi |
||||
mk_add_options "export SCCACHE_BUCKET=$bucket" |
||||
case "$master" in |
||||
*us[ew][12].mozilla.com*|*euc1.mozilla.com*) |
||||
mk_add_options "export SCCACHE_NAMESERVER=169.254.169.253" |
||||
;; |
||||
esac |
||||
ac_add_options "--with-compiler-wrapper=python2.7 $topsrcdir/sccache/sccache.py" |
||||
mk_add_options MOZ_PREFLIGHT_ALL+=build/sccache.mk |
||||
mk_add_options MOZ_POSTFLIGHT_ALL+=build/sccache.mk |
||||
mk_add_options "UPLOAD_EXTRA_FILES+=sccache.log.gz" |
||||
case "$platform" in |
||||
win*) |
||||
# sccache supports a special flag to create depfiles. |
||||
export _DEPEND_CFLAGS='-deps$(MDDEPDIR)/$(@F).pp' |
||||
# Windows builds have a default wrapper that needs to be overridden |
||||
mk_add_options "export CC_WRAPPER=" |
||||
mk_add_options "export CXX_WRAPPER=" |
||||
# For now, sccache doesn't support separate PDBs so force debug info to be |
||||
# in object files. |
||||
mk_add_options "export COMPILE_PDB_FLAG=" |
||||
mk_add_options "export HOST_PDB_FLAG=" |
||||
mk_add_options "export MOZ_DEBUG_FLAGS=-Z7" |
||||
;; |
||||
esac |
||||
fi |
||||
|
||||
fi |
@ -0,0 +1,26 @@
|
||||
# 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/. |
||||
|
||||
# Common mozconfig for official builds. |
||||
# |
||||
# Add options to this file that will be inherited by all in-tree mozconfigs. |
||||
# This is useful for eg try builds with nondefault options that apply to all |
||||
# architectures, though note that if you want to override options set in |
||||
# another mozconfig file, you'll need to use mozconfig.common.override instead |
||||
# of this file. |
||||
|
||||
mk_add_options AUTOCLOBBER=1 |
||||
|
||||
ac_add_options --enable-crashreporter |
||||
|
||||
ac_add_options --enable-release |
||||
|
||||
# Disable checking that add-ons are signed by the trusted root |
||||
MOZ_ADDON_SIGNING=${MOZ_ADDON_SIGNING-0} |
||||
# Disable enforcing that add-ons are signed by the trusted root |
||||
MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-0} |
||||
|
||||
ac_add_options --enable-js-shell |
||||
|
||||
. "$topsrcdir/build/mozconfig.automation" |
@ -0,0 +1,10 @@
|
||||
# Options to enable rust in automation builds. |
||||
|
||||
# Tell configure to use the tooltool rustc. |
||||
# Assume this is compiled with --enable-rpath so we don't |
||||
# have to set LD_LIBRARY_PATH. |
||||
RUSTC="$topsrcdir/rustc/bin/rustc" |
||||
CARGO="$topsrcdir/cargo/bin/cargo" |
||||
|
||||
# Enable rust in the build. |
||||
ac_add_options --enable-rust |
@ -0,0 +1,4 @@
|
||||
# Pymake needs Windows-style paths. Use cmd.exe to hack around this. |
||||
mk_export_correct_style() { |
||||
mk_add_options "export $1=$(cmd.exe //c echo %$1%)" |
||||
} |
@ -0,0 +1,16 @@
|
||||
# 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/. |
||||
|
||||
if [ "x$IS_NIGHTLY" = "xyes" ]; then |
||||
# Some nightlies (eg: Mulet) don't want these set. |
||||
MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-1} |
||||
MOZ_AUTOMATION_UPDATE_PACKAGING=${MOZ_AUTOMATION_UPDATE_PACKAGING-1} |
||||
MOZ_AUTOMATION_SDK=${MOZ_AUTOMATION_SDK-1} |
||||
fi |
||||
|
||||
# Some builds (eg: Mulet) don't want the installer, so only set this if it |
||||
# hasn't already been set. |
||||
MOZ_AUTOMATION_INSTALLER=${MOZ_AUTOMATION_INSTALLER-1} |
||||
|
||||
export SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE=c:/builds/crash-stats-api.token |
@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env python |
||||
# 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/. |
||||
|
||||
# This is a wrapper around mozilla-central's pymake. If that isn't found then |
||||
# this uses client.py to pull it in. |
||||
|
||||
import os |
||||
import sys |
||||
import subprocess |
||||
import shlex |
||||
|
||||
def getpath(relpath): |
||||
thisdir = os.path.dirname(__file__) |
||||
return os.path.abspath(os.path.join(thisdir, *relpath)) |
||||
|
||||
PYMAKE = getpath(["..", "..", "mozilla", "build", "pymake", "make.py"]) |
||||
CLIENT_PY = getpath(["..", "..", "client.py"]) |
||||
CLIENT_PY_ARGS = getpath(["..", "client.py-args"]) |
||||
|
||||
def main(args): |
||||
if 'TINDERBOX_OUTPUT' in os.environ: |
||||
# When building on mozilla build slaves, execute mozmake instead. Until bug |
||||
# 978211, this is the easiest, albeit hackish, way to do this. |
||||
mozmake = os.path.join(os.path.dirname(__file__), '..', '..', |
||||
'mozmake.exe') |
||||
if os.path.exists(mozmake): |
||||
cmd = [mozmake] |
||||
cmd.extend(sys.argv[1:]) |
||||
shell = os.environ.get('SHELL') |
||||
if shell and not shell.lower().endswith('.exe'): |
||||
cmd += ['SHELL=%s.exe' % shell] |
||||
sys.exit(subprocess.call(cmd)) |
||||
|
||||
if not os.path.exists(PYMAKE): |
||||
clientpyargs = open(CLIENT_PY_ARGS, "r").read().strip() |
||||
clientpyargs = shlex.split(clientpyargs) |
||||
subprocess.check_call([sys.executable, CLIENT_PY, "checkout"] + |
||||
clientpyargs) |
||||
|
||||
if not os.path.exists(PYMAKE): |
||||
raise Exception("Pymake not found even after client.py was run") |
||||
|
||||
subprocess.check_call([sys.executable, PYMAKE] + args) |
||||
|
||||
if __name__ == "__main__": |
||||
main(sys.argv[1:]) |
@ -0,0 +1,3 @@
|
||||
# Nothing in this directory needs to be in sync with mozilla |
||||
# The contents are used only in c-c |
||||
* |
@ -0,0 +1,128 @@
|
||||
#!/usr/bin/env python |
||||
# $URL: http://pypng.googlecode.com/svn/trunk/code/exnumpy.py $ |
||||
# $Rev: 126 $ |
||||
|
||||
# Numpy example. |
||||
# Original code created by Mel Raab, modified by David Jones. |
||||
|
||||
''' |
||||
Example code integrating RGB PNG files, PyPNG and NumPy |
||||
(abstracted from Mel Raab's functioning code) |
||||
''' |
||||
|
||||
# http://www.python.org/doc/2.4.4/lib/module-itertools.html |
||||
import itertools |
||||
|
||||
import numpy |
||||
import png |
||||
|
||||
|
||||
''' If you have a PNG file for an RGB image, |
||||
and want to create a numpy array of data from it. |
||||
''' |
||||
# Read the file "picture.png" from the current directory. The `Reader` |
||||
# class can take a filename, a file-like object, or the byte data |
||||
# directly; this suggests alternatives such as using urllib to read |
||||
# an image from the internet: |
||||
# png.Reader(file=urllib.urlopen('http://www.libpng.org/pub/png/PngSuite/basn2c16.png')) |
||||
pngReader=png.Reader(filename='picture.png') |
||||
# Tuple unpacking, using multiple assignment, is very useful for the |
||||
# result of asDirect (and other methods). |
||||
# See |
||||
# http://docs.python.org/tutorial/introduction.html#first-steps-towards-programming |
||||
row_count, column_count, pngdata, meta = pngReader.asDirect() |
||||
bitdepth=meta['bitdepth'] |
||||
plane_count=meta['planes'] |
||||
|
||||
# Make sure we're dealing with RGB files |
||||
assert plane_count == 3 |
||||
|
||||
''' Boxed row flat pixel: |
||||
list([R,G,B, R,G,B, R,G,B], |
||||
[R,G,B, R,G,B, R,G,B]) |
||||
Array dimensions for this example: (2,9) |
||||
|
||||
Create `image_2d` as a two-dimensional NumPy array by stacking a |
||||
sequence of 1-dimensional arrays (rows). |
||||
The NumPy array mimics PyPNG's (boxed row flat pixel) representation; |
||||
it will have dimensions ``(row_count,column_count*plane_count)``. |
||||
''' |
||||
# The use of ``numpy.uint16``, below, is to convert each row to a NumPy |
||||
# array with data type ``numpy.uint16``. This is a feature of NumPy, |
||||
# discussed further in |
||||
# http://docs.scipy.org/doc/numpy/user/basics.types.html . |
||||
# You can use avoid the explicit conversion with |
||||
# ``numpy.vstack(pngdata)``, but then NumPy will pick the array's data |
||||
# type; in practice it seems to pick ``numpy.int32``, which is large enough |
||||
# to hold any pixel value for any PNG image but uses 4 bytes per value when |
||||
# 1 or 2 would be enough. |
||||
# --- extract 001 start |
||||
image_2d = numpy.vstack(itertools.imap(numpy.uint16, pngdata)) |
||||
# --- extract 001 end |
||||
# Do not be tempted to use ``numpy.asarray``; when passed an iterator |
||||
# (`pngdata` is often an iterator) it will attempt to create a size 1 |
||||
# array with the iterator as its only element. |
||||
# An alternative to the above is to create the target array of the right |
||||
# shape, then populate it row by row: |
||||
if 0: |
||||
image_2d = numpy.zeros((row_count,plane_count*column_count), |
||||
dtype=numpy.uint16) |
||||
for row_index, one_boxed_row_flat_pixels in enumerate(pngdata): |
||||
image_2d[row_index,:]=one_boxed_row_flat_pixels |
||||
|
||||
del pngReader |
||||
del pngdata |
||||
|
||||
|
||||
''' Reconfigure for easier referencing, similar to |
||||
Boxed row boxed pixel: |
||||
list([ (R,G,B), (R,G,B), (R,G,B) ], |
||||
[ (R,G,B), (R,G,B), (R,G,B) ]) |
||||
Array dimensions for this example: (2,3,3) |
||||
|
||||
``image_3d`` will contain the image as a three-dimensional numpy |
||||
array, having dimensions ``(row_count,column_count,plane_count)``. |
||||
''' |
||||
# --- extract 002 start |
||||
image_3d = numpy.reshape(image_2d, |
||||
(row_count,column_count,plane_count)) |
||||
# --- extract 002 end |
||||
|
||||
|
||||
''' ============= ''' |
||||
|
||||
''' Convert NumPy image_3d array to PNG image file. |
||||
|
||||
If the data is three-dimensional, as it is above, the best thing |
||||
to do is reshape it into a two-dimensional array with a shape of |
||||
``(row_count, column_count*plane_count)``. Because a |
||||
two-dimensional numpy array is an iterator, it can be passed |
||||
directly to the ``png.Writer.write`` method. |
||||
''' |
||||
|
||||
row_count, column_count, plane_count = image_3d.shape |
||||
assert plane_count==3 |
||||
|
||||
pngfile = open('picture_out.png', 'wb') |
||||
try: |
||||
# This example assumes that you have 16-bit pixel values in the data |
||||
# array (that's what the ``bitdepth=16`` argument is for). |
||||
# If you don't, then the resulting PNG file will likely be |
||||
# very dark. Hey, it's only an example. |
||||
pngWriter = png.Writer(column_count, row_count, |
||||
greyscale=False, |
||||
alpha=False, |
||||
bitdepth=16) |
||||
# As of 2009-04-13 passing a numpy array that has an element type |
||||
# that is a numpy integer type (for example, the `image_3d` array has an |
||||
# element type of ``numpy.uint16``) generates a deprecation warning. |
||||
# This is probably a bug in numpy; it may go away in the future. |
||||
# The code still works despite the warning. |
||||
# See http://code.google.com/p/pypng/issues/detail?id=44 |
||||
# --- extract 003 start |
||||
pngWriter.write(pngfile, |
||||
numpy.reshape(image_3d, (-1, column_count*plane_count))) |
||||
# --- extract 003 end |
||||
finally: |
||||
pngfile.close() |
||||
|
@ -0,0 +1,537 @@
|
||||
#!/usr/bin/env python |
||||
# $URL: http://pypng.googlecode.com/svn/trunk/code/iccp.py $ |
||||
# $Rev: 182 $ |
||||
|
||||
# iccp |
||||
# |
||||
# International Color Consortium Profile |
||||
# |
||||
# Tools for manipulating ICC profiles. |
||||
# |
||||
# An ICC profile can be extracted from a PNG image (iCCP chunk). |
||||
# |
||||
# |
||||
# Non-standard ICCP tags. |
||||
# |
||||
# Apple use some (widespread but) non-standard tags. These can be |
||||
# displayed in Apple's ColorSync Utility. |
||||
# - 'vcgt' (Video Card Gamma Tag). Table to load into video |
||||
# card LUT to apply gamma. |
||||
# - 'ndin' Apple display native information. |
||||
# - 'dscm' Apple multi-localized description strings. |
||||
# - 'mmod' Apple display make and model information. |
||||
# |
||||
|
||||
# References |
||||
# |
||||
# [ICC 2001] ICC Specification ICC.1:2001-04 (Profile version 2.4.0) |
||||
# [ICC 2004] ICC Specification ICC.1:2004-10 (Profile version 4.2.0.0) |
||||
|
||||
import struct |
||||
|
||||
import png |
||||
|
||||
class FormatError(Exception): |
||||
pass |
||||
|
||||
class Profile: |
||||
"""An International Color Consortium Profile (ICC Profile).""" |
||||
|
||||
def __init__(self): |
||||
self.rawtagtable = None |
||||
self.rawtagdict = {} |
||||
self.d = dict() |
||||
|
||||
def fromFile(self, inp, name='<unknown>'): |
||||
|
||||
# See [ICC 2004] |
||||
profile = inp.read(128) |
||||
if len(profile) < 128: |
||||
raise FormatError("ICC Profile is too short.") |
||||
size, = struct.unpack('>L', profile[:4]) |
||||
profile += inp.read(d['size'] - len(profile)) |
||||
return self.fromString(profile, name) |
||||
|
||||
def fromString(self, profile, name='<unknown>'): |
||||
self.d = dict() |
||||
d = self.d |
||||
if len(profile) < 128: |
||||
raise FormatError("ICC Profile is too short.") |
||||
d.update( |
||||
zip(['size', 'preferredCMM', 'version', |
||||
'profileclass', 'colourspace', 'pcs'], |
||||
struct.unpack('>L4sL4s4s4s', profile[:24]))) |
||||
if len(profile) < d['size']: |
||||
warnings.warn( |
||||
'Profile size declared to be %d, but only got %d bytes' % |
||||
(d['size'], len(profile))) |
||||
d['version'] = '%08x' % d['version'] |
||||
d['created'] = readICCdatetime(profile[24:36]) |
||||
d.update( |
||||
zip(['acsp', 'platform', 'flag', 'manufacturer', 'model'], |
||||
struct.unpack('>4s4s3L', profile[36:56]))) |
||||
if d['acsp'] != 'acsp': |
||||
warnings.warn('acsp field not present (not an ICC Profile?).') |
||||
d['deviceattributes'] = profile[56:64] |
||||
d['intent'], = struct.unpack('>L', profile[64:68]) |
||||
d['pcsilluminant'] = readICCXYZNumber(profile[68:80]) |
||||
d['creator'] = profile[80:84] |
||||