12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897 |
- # HG changeset patch
- # User Ian Neal <iann_cvs@blueyonder.co.uk>
- # Date 1613311926 0
- # Parent bacc3a87f4bb904a491845d99c7765d1b9e78afe
- diff --git a/suite/extensions/irc/Makefile.in b/suite/extensions/irc/Makefile.in
- deleted file mode 100644
- --- a/suite/extensions/irc/Makefile.in
- +++ /dev/null
- @@ -1,47 +0,0 @@
- -#
- -# 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/.
- -
- -DEPTH = ../../../..
- -topsrcdir = @top_srcdir@
- -srcdir = @srcdir@
- -VPATH = @srcdir@
- -
- -include $(DEPTH)/config/autoconf.mk
- -include $(srcdir)/maxversions.mk
- -
- -PACKAGE_FILE = chatzilla.pkg
- -
- -DIST_FILES = xpi/resources/install.rdf
- -
- -CHATZILLA_VERSION=$(shell grep "const __cz_version" "$(srcdir)/xul/content/static.js" | sed "s|.*\"\([^\"]\{1,\}\)\".*|\1|")
- -
- -XPI_NAME = chatzilla
- -INSTALL_EXTENSION_ID = {59c81df5-4b7a-477b-912d-4e0fdf64e5f2}
- -XPI_PKGNAME = chatzilla-$(CHATZILLA_VERSION)
- -
- -# include config.mk before using the AB_CD var it sets in an if statement
- -include $(topsrcdir)/config/config.mk
- -
- -# always build en-US locale, add build locale if supported
- -BUILD_LOCALES = en-US
- -ifneq (,$(filter $(AB_CD),$(shell cat $(srcdir)/locales/all-locales)))
- -BUILD_LOCALES += $(AB_CD)
- -endif
- -
- -DEFINES += -DCHATZILLA_VERSION=$(CHATZILLA_VERSION) \
- - -DSEAMONKEY_MAXVERSION=$(SEAMONKEY_MAXVERSION) \
- - $(NULL)
- -
- -include $(topsrcdir)/config/rules.mk
- -
- -libs realchrome:: locales/Makefile
- - @$(EXIT_ON_ERROR) \
- - for locale in $(BUILD_LOCALES); do \
- - $(MAKE) -C locales AB_CD=$$locale; \
- - done
- -
- -export::
- - $(NSINSTALL) -D $(FINAL_TARGET)/chrome/icons/default
- - $(INSTALL) $(srcdir)/xpi/resources/chatzilla-window* $(FINAL_TARGET)/chrome/icons/default
- diff --git a/suite/extensions/irc/locale-jar.mn b/suite/extensions/irc/locale-jar.mn
- deleted file mode 100644
- --- a/suite/extensions/irc/locale-jar.mn
- +++ /dev/null
- @@ -1,13 +0,0 @@
- -# 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/.
- -
- -chatzilla-@LOCALE@.jar:
- - locale/@LOCALE@/chatzilla/chatzillaOverlay.dtd (xul/locale/@LOCALE@/chatzillaOverlay.dtd)
- - locale/@LOCALE@/chatzilla/browserOverlay.dtd (xul/locale/@LOCALE@/browserOverlay.dtd)
- - locale/@LOCALE@/chatzilla/pref-irc.dtd (xul/locale/@LOCALE@/pref-irc.dtd)
- - locale/@LOCALE@/chatzilla/chatzilla.dtd (xul/locale/@LOCALE@/chatzilla.dtd)
- - locale/@LOCALE@/chatzilla/chatzilla.properties (xul/locale/@LOCALE@/chatzilla.properties)
- - locale/@LOCALE@/chatzilla/config.dtd (xul/locale/@LOCALE@/config.dtd)
- - locale/@LOCALE@/chatzilla/channels.dtd (xul/locale/@LOCALE@/channels.dtd)
- - locale/@LOCALE@/chatzilla/ceip.dtd (xul/locale/@LOCALE@/ceip.dtd)
- diff --git a/suite/extensions/irc/locales/Makefile.in b/suite/extensions/irc/locales/Makefile.in
- --- a/suite/extensions/irc/locales/Makefile.in
- +++ b/suite/extensions/irc/locales/Makefile.in
- @@ -1,84 +1,6 @@
- -#
- # 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/.
-
- -
- -DEPTH=../../../../..
- -topsrcdir=@top_srcdir@
- -srcdir=@srcdir@
- -VPATH=@srcdir@
- -relativesrcdir = comm/suite/extensions/irc/locales
- -
- -include $(srcdir)/../maxversions.mk
- -
- -EXTERNALLY_MANAGED_MAKE_FILE := 1
- -STANDALONE_MAKEFILE := 1
- -JAR_MANIFEST := $(srcdir)/jar.mn
- -
- -CHATZILLA_VERSION=$(shell grep "const __cz_version" "$(srcdir)/../xul/content/static.js" | sed "s|.*\"\([^\"]\{1,\}\)\".*|\1|")
- -CHATZILLA_BASE_VERSION=$(shell echo "$(CHATZILLA_VERSION)" | sed "s|\([0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\).*|\1|")
- -
- -XPI_NAME = chatzilla
- -INSTALL_EXTENSION_ID = {59c81df5-4b7a-477b-912d-4e0fdf64e5f2}
- -XPI_PKGNAME = chatzilla-$(CHATZILLA_VERSION)
- -
- -# include config.mk before we override the AB_CD var it sets
- -include $(topsrcdir)/config/config.mk
- -
- -# if the wanted language is not in all-locales, fall back to en-US
- -ifeq (,$(filter $(AB_CD),$(shell cat $(srcdir)/all-locales)))
- -override AB_CD = en-US
- -endif
- -
- -ifneq (en-US,$(AB_CD))
- -XPI_NAME = chatzilla-$(AB_CD)
- -INSTALL_EXTENSION_ID = langpack-$(AB_CD)@chatzilla.mozilla.org
- -XPI_PKGNAME = chatzilla-$(CHATZILLA_VERSION).$(AB_CD)
- -relativesrcdir = extensions/irc/locales
- -endif
- -
- -DEFINES += -DAB_CD=$(AB_CD) \
- - -DSEAMONKEY_MAXVERSION=$(SEAMONKEY_MAXVERSION) \
- - -DINSTALL_EXTENSION_ID='$(INSTALL_EXTENSION_ID)' \
- - -DCHATZILLA_VERSION=$(CHATZILLA_VERSION) \
- - -DCHATZILLA_BASE_VERSION=$(CHATZILLA_BASE_VERSION) \
- - $(NULL)
- -
- -APP_DEFINES = $(firstword $(wildcard $(LOCALE_SRCDIR)/defines.inc) \
- - $(srcdir)/en-US/defines.inc)
- -
- -TK_DEFINES = $(firstword \
- - $(wildcard $(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/defines.inc) \
- - $(MOZILLA_DIR)/toolkit/locales/en-US/defines.inc)
- -
- -include $(topsrcdir)/config/rules.mk
- -
- -ifneq (en-US,$(AB_CD))
- -libs realchrome::
- - @echo "Comparing $(AB_CD) to en-US"
- - @$(PERL) $(topsrcdir)/toolkit/locales/compare-locales.pl $(srcdir)/en-US $(LOCALE_SRCDIR)
- - cp -rp $(topsrcdir)/comm/suite/extensions/irc/locales/manifest.json $(DIST)/xpi-stage/$(XPI_NAME)/manifest.json
- -endif
- -
- -libs-%: AB_CD=$*
- -libs-%:
- - # XXX: it would be nice if we could just do nothing if no langpack is being done
- - # currently, we just go and (re)build en-US if called with a non-supported locale
- - $(MAKE) libs AB_CD=$*
- -
- -repackage-zip: $(STAGEDIST)
- -ifneq (en-US,$(AB_CD))
- - $(RM) -rf $(STAGEDIST)/extensions/$(INSTALL_EXTENSION_ID)
- - mkdir $(STAGEDIST)/extensions/$(INSTALL_EXTENSION_ID)
- - if test -d "$(DIST)/xpi-stage/$(XPI_NAME)/chrome/chatzilla.jar"; then \
- - $(RM) -r $(DIST)/xpi-stage/$(XPI_NAME)/chrome/chatzilla;\
- - fi
- - # use tar for copying as cp doesn't portably preserve timestamps
- - cd $(DIST)/xpi-stage/$(XPI_NAME) && \
- - tar $(TAR_CREATE_FLAGS) - * | ( cd $(STAGEDIST)/extensions/$(INSTALL_EXTENSION_ID) && tar -xf - )
- - @echo "$(AB_CD)"
- -endif
- -
- -repackage-zip-%: $(STAGEDIST)
- - @$(MAKE) repackage-zip AB_CD=$* STAGEDIST=$(STAGEDIST)
- +LOCALE_TOPDIR=$(topsrcdir)/comm
- +LOCALE_RELATIVEDIR=suite/extensions/irc/locales
- diff --git a/suite/extensions/irc/locales/generic/install.js b/suite/extensions/irc/locales/generic/install.js
- deleted file mode 100644
- --- a/suite/extensions/irc/locales/generic/install.js
- +++ /dev/null
- @@ -1,58 +0,0 @@
- -# 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/.
- -
- -#filter substitution
- -// variables
- -var version = "@CHATZILLA_VERSION@";
- -var locale = "@AB_CD@";
- -var jarFile = "chatzilla.jar";
- -var installName = "ChatZilla " + version + " @MOZ_LANG_TITLE@ Language Pack";
- -// size of the locale jar file in kibibytes (1024 bytes per KiB)
- -// en-US files need about 110 KiB currently, estimate up to 200 KiB for others
- -var srDest = 200;
- -
- -// end variables, start real work
- -
- -// this function verifies disk space in kilobytes
- -function verifyDiskSpace(dirPath, spaceRequired)
- -{
- - var spaceAvailable;
- -
- - // Get the available disk space on the given path
- - spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
- -
- - // Convert the available disk space into kilobytes
- - spaceAvailable = parseInt(spaceAvailable / 1024);
- -
- - // do the verification
- - if(spaceAvailable < spaceRequired)
- - {
- - logComment("Insufficient disk space: " + dirPath);
- - logComment(" required : " + spaceRequired + " K");
- - logComment(" available: " + spaceAvailable + " K");
- - return(false);
- - }
- -
- - return(true);
- -}
- -
- -var err = initInstall(installName, "ChatZilla " + locale, version);
- -logComment("initInstall: " + err);
- -
- -if (verifyDiskSpace(getFolder("Program"), srDest))
- -{
- - addFile("ChatZilla " + locale,
- - "chrome/" + jarFile, // jar source folder
- - getFolder("Chrome"), // target folder
- - ""); // target subdir
- -
- - registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome", jarFile), "locale/" + locale + "/chatzilla/");
- -
- - if (err==SUCCESS)
- - performInstall();
- - else
- - cancelInstall(err);
- -}
- -else
- - cancelInstall(INSUFFICIENT_DISK_SPACE);
- diff --git a/suite/extensions/irc/locales/generic/install.rdf b/suite/extensions/irc/locales/generic/install.rdf
- deleted file mode 100644
- --- a/suite/extensions/irc/locales/generic/install.rdf
- +++ /dev/null
- @@ -1,40 +0,0 @@
- -<?xml version="1.0"?>
- -<!-- 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/. -->
- -
- -#filter substitution
- -
- -#ifndef IRC_STANDALONE_BUILD
- -#include @TK_DEFINES@
- -#include @APP_DEFINES@
- -#endif
- -
- -<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- - xmlns:em="http://www.mozilla.org/2004/em-rdf#">
- - <Description about="urn:mozilla:install-manifest"
- - em:id="@INSTALL_EXTENSION_ID@"
- - em:name="ChatZilla @MOZ_LANG_TITLE@ Language Pack"
- - em:internalName="langpack_cZ/@AB_CD@"
- - em:version="@CHATZILLA_VERSION@"
- - em:type="8"
- - em:creator="@MOZ_LANGPACK_CREATOR@"
- - em:homepageURL="@MOZ_LANGPACK_HOMEPAGE@">
- -#ifdef MOZ_LANGPACK_CONTRIBUTORS
- - @MOZ_LANGPACK_CONTRIBUTORS@
- -#endif
- -
- - <em:iconURL>chrome://chatzilla/skin/images/logo.png</em:iconURL>
- -
- - <!-- BEGIN COPY BETWEEN /xpi/resources/install.rdf AND /locales/generic/install.rdf -->
- - <em:targetApplication>
- - <Description>
- - <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
- - <em:minVersion>2.0</em:minVersion>
- - <em:maxVersion>@SEAMONKEY_MAXVERSION@</em:maxVersion>
- - </Description>
- - </em:targetApplication>
- - <!-- END COPY BETWEEN /xpi/resources/install.rdf AND /locales/generic/install.rdf -->
- - <em:unpack>true</em:unpack>
- - </Description>
- -</RDF>
- diff --git a/suite/extensions/irc/locales/generic/manifest.json.in b/suite/extensions/irc/locales/generic/manifest.json.in
- deleted file mode 100644
- --- a/suite/extensions/irc/locales/generic/manifest.json.in
- +++ /dev/null
- @@ -1,28 +0,0 @@
- -{
- - "languages": {
- - "de": {
- - "chrome_resources": {
- - "chatzilla": "chrome/chatzilla/locale/@AB_CD@/chatzilla/"
- - },
- - "version": "20200429162930"
- - }
- - },
- - "applications": {
- - "gecko": {
- - "strict_min_version": "@FIREFOX_MAXVERSION@",
- - "id": "@INSTALL_EXTENSION_ID@",
- - "strict_max_version": "@FIREFOX_MAXVERSION@"
- - }
- - },
- - "langpack_id": "de",
- - "version": "@CHATZILLA_VERSION@",
- - "name": "ChatZilla @MOZ_LANG_TITLE@ Language Pack",
- - "manifest_version": 2,
- - "sources": {
- - "browser": {
- - "base_path": "browser/"
- - }
- - },
- - "author": "Robert Kaiser",
- - "description": "ChatZilla @MOZ_LANG_TITLE@ Language Pack"
- -}
- diff --git a/suite/extensions/irc/locales/jar.mn b/suite/extensions/irc/locales/jar.mn
- --- a/suite/extensions/irc/locales/jar.mn
- +++ b/suite/extensions/irc/locales/jar.mn
- @@ -1,15 +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/.
-
- #filter substitution
-
- -chatzilla.jar:
- +@AB_CD@.jar:
- # the "% locale" line gets put into the .manifest used by toolkit-based apps
- % locale chatzilla @AB_CD@ %locale/@AB_CD@/chatzilla/
- locale/@AB_CD@/chatzilla/chatzillaOverlay.dtd (%chrome/chatzillaOverlay.dtd)
- locale/@AB_CD@/chatzilla/browserOverlay.dtd (%chrome/browserOverlay.dtd)
- locale/@AB_CD@/chatzilla/pref-irc.dtd (%chrome/pref-irc.dtd)
- locale/@AB_CD@/chatzilla/chatzilla.dtd (%chrome/chatzilla.dtd)
- locale/@AB_CD@/chatzilla/chatzilla.properties (%chrome/chatzilla.properties)
- locale/@AB_CD@/chatzilla/config.dtd (%chrome/config.dtd)
- diff --git a/suite/extensions/irc/locales/l10n.toml b/suite/extensions/irc/locales/l10n.toml
- new file mode 100644
- --- /dev/null
- +++ b/suite/extensions/irc/locales/l10n.toml
- @@ -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/.
- +
- +basepath = "../../../.."
- +
- +locales = [
- + "cs",
- + "de",
- + "en-GB",
- + "es-ES",
- + "fi",
- + "fr",
- + "it",
- + "ja",
- + "ja-JP-mac",
- + "nb-NO",
- + "pl",
- + "pt-BR",
- + "pt-PT",
- + "ru",
- + "sk",
- + "sv-SE",
- +]
- +
- +[env]
- + l = "{l10n_base}/{locale}/"
- +
- +[[paths]]
- + reference = "suite/extensions/irc/locales/en-US/**"
- + l10n = "{l}extensions/irc/**"
- +
- +# ignore MOZ_LANGPACK_CONTRIBUTORS
- +[[filters]]
- + path = "{l}extensions/irc/defines.inc"
- + key = "MOZ_LANGPACK_CONTRIBUTORS"
- + action = "ignore"
- diff --git a/suite/extensions/irc/locales/manifest.json b/suite/extensions/irc/locales/manifest.json
- deleted file mode 100644
- --- a/suite/extensions/irc/locales/manifest.json
- +++ /dev/null
- @@ -1,28 +0,0 @@
- -{
- - "languages": {
- - "de": {
- - "chrome_resources": {
- - "chatzilla": "chrome/chatzilla/locale/de/chatzilla/"
- - },
- - "version": "20200429162930"
- - }
- - },
- - "applications": {
- - "gecko": {
- - "strict_min_version": "60.9.1",
- - "id": "langpack-de@chatzilla.mozilla.org",
- - "strict_max_version": "60.9.1"
- - }
- - },
- - "langpack_id": "de",
- - "version": "60.9.1",
- - "name": "ChatZilla Deutsch (DE) Language Pack",
- - "manifest_version": 2,
- - "sources": {
- - "browser": {
- - "base_path": "browser/"
- - }
- - },
- - "author": "Robert Kaiser",
- - "description": "ChatZilla Deutsch (DE) Language Pack"
- -}
- diff --git a/suite/extensions/irc/locales/moz.build b/suite/extensions/irc/locales/moz.build
- --- a/suite/extensions/irc/locales/moz.build
- +++ b/suite/extensions/irc/locales/moz.build
- @@ -1,6 +1,6 @@
- # vim: set filetype=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/.
-
- -USE_EXTENSION_MANIFEST = True
- +JAR_MANIFESTS += ['jar.mn']
- diff --git a/suite/extensions/irc/maxversions.mk b/suite/extensions/irc/maxversions.mk
- deleted file mode 100644
- --- a/suite/extensions/irc/maxversions.mk
- +++ /dev/null
- @@ -1,9 +0,0 @@
- -# 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/.
- -
- -# For extensions we require a max version that is compatible across security releases.
- -# SEAMONKEY_MAXVERSION is our method for doing that.
- -# Alpha versions 10.0a1 and 10.0a2 aren't affected
- -# For Seamonkey, 2.17 becomes 2.17.*, 2.17.1 becomes 2.17.*
- -SEAMONKEY_MAXVERSION := 2.57.*
- diff --git a/suite/extensions/irc/moz.build b/suite/extensions/irc/moz.build
- --- a/suite/extensions/irc/moz.build
- +++ b/suite/extensions/irc/moz.build
- @@ -1,22 +1,15 @@
- # vim: set filetype=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/.
-
- -CONFIGURE_SUBST_FILES += ['locales/Makefile']
- -NO_JS_MANIFEST = True
- -USE_EXTENSION_MANIFEST = True
- -
- -XPI_NAME = 'chatzilla'
- -export('XPI_NAME')
- +DIRS += [
- + 'locales',
- +]
-
- JAR_MANIFESTS += ['jar.mn']
-
- EXTRA_COMPONENTS += [
- 'js/lib/chatzilla-service.js',
- 'js/lib/chatzilla-service.manifest',
- ]
- -
- -FINAL_TARGET_PP_FILES += [
- - 'xpi/resources/install.rdf',
- -]
- diff --git a/suite/extensions/irc/xpi/config/Expression.py b/suite/extensions/irc/xpi/config/Expression.py
- deleted file mode 100644
- --- a/suite/extensions/irc/xpi/config/Expression.py
- +++ /dev/null
- @@ -1,175 +0,0 @@
- -# 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/.
- -
- -"""
- -Parses and evaluates simple statements for Preprocessor:
- -
- -Expression currently supports the following grammar, whitespace is ignored:
- -
- -expression :
- - unary ( ( '==' | '!=' ) unary ) ? ;
- -unary :
- - '!'? value ;
- -value :
- - [0-9]+ # integer
- - | \w+ # string identifier or value;
- -"""
- -
- -import re
- -
- -class Expression:
- - def __init__(self, expression_string):
- - """
- - Create a new expression with this string.
- - The expression will already be parsed into an Abstract Syntax Tree.
- - """
- - self.content = expression_string
- - self.offset = 0
- - self.__ignore_whitespace()
- - self.e = self.__get_equality()
- - if self.content:
- - raise Expression.ParseError, self
- -
- - def __get_equality(self):
- - """
- - Production: unary ( ( '==' | '!=' ) unary ) ?
- - """
- - if not len(self.content):
- - return None
- - rv = Expression.__AST("equality")
- - # unary
- - rv.append(self.__get_unary())
- - self.__ignore_whitespace()
- - if not re.match('[=!]=', self.content):
- - # no equality needed, short cut to our prime unary
- - return rv[0]
- - # append operator
- - rv.append(Expression.__ASTLeaf('op', self.content[:2]))
- - self.__strip(2)
- - self.__ignore_whitespace()
- - rv.append(self.__get_unary())
- - self.__ignore_whitespace()
- - return rv
- -
- - def __get_unary(self):
- - """
- - Production: '!'? value
- - """
- - # eat whitespace right away, too
- - not_ws = re.match('!\s*', self.content)
- - if not not_ws:
- - return self.__get_value()
- - rv = Expression.__AST('not')
- - self.__strip(not_ws.end())
- - rv.append(self.__get_value())
- - self.__ignore_whitespace()
- - return rv
- -
- - def __get_value(self):
- - """
- - Production: ( [0-9]+ | \w+)
- - Note that the order is important, and the expression is kind-of
- - ambiguous as \w includes 0-9. One could make it unambiguous by
- - removing 0-9 from the first char of a string literal.
- - """
- - rv = None
- - word_len = re.match('[0-9]*', self.content).end()
- - if word_len:
- - rv = Expression.__ASTLeaf('int', int(self.content[:word_len]))
- - else:
- - word_len = re.match('\w*', self.content).end()
- - if word_len:
- - rv = Expression.__ASTLeaf('string', self.content[:word_len])
- - else:
- - raise Expression.ParseError, self
- - self.__strip(word_len)
- - self.__ignore_whitespace()
- - return rv
- -
- - def __ignore_whitespace(self):
- - ws_len = re.match('\s*', self.content).end()
- - self.__strip(ws_len)
- - return
- -
- - def __strip(self, length):
- - """
- - Remove a given amount of chars from the input and update
- - the offset.
- - """
- - self.content = self.content[length:]
- - self.offset += length
- -
- - def evaluate(self, context):
- - """
- - Evaluate the expression with the given context
- - """
- -
- - # Helper function to evaluate __get_equality results
- - def eval_equality(tok):
- - left = opmap[tok[0].type](tok[0])
- - right = opmap[tok[2].type](tok[2])
- - rv = left == right
- - if tok[1].value == '!=':
- - rv = not rv
- - return rv
- - # Mapping from token types to evaluator functions
- - # Apart from (non-)equality, all these can be simple lambda forms.
- - opmap = {
- - 'equality': eval_equality,
- - 'not': lambda tok: not opmap[tok[0].type](tok[0]),
- - 'string': lambda tok: context[tok.value],
- - 'int': lambda tok: tok.value}
- -
- - return opmap[self.e.type](self.e);
- -
- - class __AST(list):
- - """
- - Internal class implementing Abstract Syntax Tree nodes
- - """
- - def __init__(self, type):
- - self.type = type
- - super(self.__class__, self).__init__(self)
- -
- - class __ASTLeaf:
- - """
- - Internal class implementing Abstract Syntax Tree leafs
- - """
- - def __init__(self, type, value):
- - self.value = value
- - self.type = type
- - def __str__(self):
- - return self.value.__str__()
- - def __repr__(self):
- - return self.value.__repr__()
- -
- - class ParseError(StandardError):
- - """
- - Error raised when parsing fails.
- - It has two members, offset and content, which give the offset of the
- - error and the offending content.
- - """
- - def __init__(self, expression):
- - self.offset = expression.offset
- - self.content = expression.content[:3]
- - def __str__(self):
- - return 'Unexpected content at offset %i, "%s"'%(self.offset, self.content)
- -
- -class Context(dict):
- - """
- - This class holds variable values by subclassing dict, and while it
- - truthfully reports True and False on
- -
- - name in context
- -
- - it returns the variable name itself on
- -
- - context["name"]
- -
- - to reflect the ambiguity between string literals and preprocessor
- - variables.
- - """
- - def __getitem__(self, key):
- - if key in self:
- - return super(self.__class__, self).__getitem__(key)
- - return key
- diff --git a/suite/extensions/irc/xpi/config/JarMaker.py b/suite/extensions/irc/xpi/config/JarMaker.py
- deleted file mode 100644
- --- a/suite/extensions/irc/xpi/config/JarMaker.py
- +++ /dev/null
- @@ -1,465 +0,0 @@
- -# 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/.
- -
- -'''jarmaker.py provides a python class to package up chrome content by
- -processing jar.mn files.
- -
- -See the documentation for jar.mn on MDC for further details on the format.
- -'''
- -
- -import sys
- -import os
- -import os.path
- -import re
- -import logging
- -from time import localtime
- -from optparse import OptionParser
- -from MozZipFile import ZipFile
- -from cStringIO import StringIO
- -from datetime import datetime
- -
- -from utils import pushback_iter
- -from Preprocessor import Preprocessor
- -
- -__all__ = ['JarMaker']
- -
- -class ZipEntry:
- - '''Helper class for jar output.
- -
- - This class defines a simple file-like object for a zipfile.ZipEntry
- - so that we can consecutively write to it and then close it.
- - This methods hooks into ZipFile.writestr on close().
- - '''
- - def __init__(self, name, zipfile):
- - self._zipfile = zipfile
- - self._name = name
- - self._inner = StringIO()
- -
- - def write(self, content):
- - 'Append the given content to this zip entry'
- - self._inner.write(content)
- - return
- -
- - def close(self):
- - 'The close method writes the content back to the zip file.'
- - self._zipfile.writestr(self._name, self._inner.getvalue())
- -
- -def getModTime(aPath):
- - if not os.path.isfile(aPath):
- - return 0
- - mtime = os.stat(aPath).st_mtime
- - return localtime(mtime)
- -
- -
- -class JarMaker(object):
- - '''JarMaker reads jar.mn files and process those into jar files or
- - flat directories, along with chrome.manifest files.
- - '''
- -
- - ignore = re.compile('\s*(\#.*)?$')
- - jarline = re.compile('(?:(?P<jarfile>[\w\d.\-\_\\\/]+).jar\:)|(?:\s*(\#.*)?)\s*$')
- - regline = re.compile('\%\s+(.*)$')
- - entryre = '(?P<optPreprocess>\*)?(?P<optOverwrite>\+?)\s+'
- - entryline = re.compile(entryre + '(?P<output>[\w\d.\-\_\\\/\+]+)\s*(\((?P<locale>\%?)(?P<source>[\w\d.\-\_\\\/]+)\))?\s*$')
- -
- - def __init__(self, outputFormat = 'flat', useJarfileManifest = True,
- - useChromeManifest = False):
- - self.outputFormat = outputFormat
- - self.useJarfileManifest = useJarfileManifest
- - self.useChromeManifest = useChromeManifest
- - self.pp = Preprocessor()
- -
- - def getCommandLineParser(self):
- - '''Get a optparse.OptionParser for jarmaker.
- -
- - This OptionParser has the options for jarmaker as well as
- - the options for the inner PreProcessor.
- - '''
- - # HACK, we need to unescape the string variables we get,
- - # the perl versions didn't grok strings right
- - p = self.pp.getCommandLineParser(unescapeDefines = True)
- - p.add_option('-f', type="choice", default="jar",
- - choices=('jar', 'flat', 'symlink'),
- - help="fileformat used for output", metavar="[jar, flat, symlink]")
- - p.add_option('-v', action="store_true", dest="verbose",
- - help="verbose output")
- - p.add_option('-q', action="store_false", dest="verbose",
- - help="verbose output")
- - p.add_option('-e', action="store_true",
- - help="create chrome.manifest instead of jarfile.manifest")
- - p.add_option('--both-manifests', action="store_true",
- - dest="bothManifests",
- - help="create chrome.manifest and jarfile.manifest")
- - p.add_option('-s', type="string", action="append", default=[],
- - help="source directory")
- - p.add_option('-t', type="string",
- - help="top source directory")
- - p.add_option('-c', '--l10n-src', type="string", action="append",
- - help="localization directory")
- - p.add_option('--l10n-base', type="string", action="append", default=[],
- - help="base directory to be used for localization (multiple)")
- - p.add_option('-j', type="string",
- - help="jarfile directory")
- - # backwards compat, not needed
- - p.add_option('-a', action="store_false", default=True,
- - help="NOT SUPPORTED, turn auto-registration of chrome off (installed-chrome.txt)")
- - p.add_option('-d', type="string",
- - help="UNUSED, chrome directory")
- - p.add_option('-o', help="cross compile for auto-registration, ignored")
- - p.add_option('-l', action="store_true",
- - help="ignored (used to switch off locks)")
- - p.add_option('-x', action="store_true",
- - help="force Unix")
- - p.add_option('-z', help="backwards compat, ignored")
- - p.add_option('-p', help="backwards compat, ignored")
- - return p
- -
- - def processIncludes(self, includes):
- - '''Process given includes with the inner PreProcessor.
- -
- - Only use this for #defines, the includes shouldn't generate
- - content.
- - '''
- - self.pp.out = StringIO()
- - for inc in includes:
- - self.pp.do_include(inc)
- - includesvalue = self.pp.out.getvalue()
- - if includesvalue:
- - logging.info("WARNING: Includes produce non-empty output")
- - self.pp.out = None
- - pass
- -
- - def finalizeJar(self, jarPath, chromebasepath, register,
- - doZip=True):
- - '''Helper method to write out the chrome registration entries to
- - jarfile.manifest or chrome.manifest, or both.
- -
- - The actual file processing is done in updateManifest.
- - '''
- - # rewrite the manifest, if entries given
- - if not register:
- - return
- - if self.useJarfileManifest:
- - self.updateManifest(jarPath + '.manifest', chromebasepath % '',
- - register)
- - if self.useChromeManifest:
- - manifestPath = os.path.join(os.path.dirname(jarPath),
- - '..', 'chrome.manifest')
- - self.updateManifest(manifestPath, chromebasepath % 'chrome/',
- - register)
- -
- - def updateManifest(self, manifestPath, chromebasepath, register):
- - '''updateManifest replaces the % in the chrome registration entries
- - with the given chrome base path, and updates the given manifest file.
- - '''
- - myregister = dict.fromkeys(map(lambda s: s.replace('%', chromebasepath),
- - register.iterkeys()))
- - manifestExists = os.path.isfile(manifestPath)
- - mode = (manifestExists and 'r+b') or 'wb'
- - mf = open(manifestPath, mode)
- - if manifestExists:
- - # import previous content into hash, ignoring empty ones and comments
- - imf = re.compile('(#.*)?$')
- - for l in re.split('[\r\n]+', mf.read()):
- - if imf.match(l):
- - continue
- - myregister[l] = None
- - mf.seek(0)
- - for k in myregister.iterkeys():
- - mf.write(k + os.linesep)
- - mf.close()
- -
- - def makeJar(self, infile=None,
- - jardir='',
- - sourcedirs=[], topsourcedir='', localedirs=None):
- - '''makeJar is the main entry point to JarMaker.
- -
- - It takes the input file, the output directory, the source dirs and the
- - top source dir as argument, and optionally the l10n dirs.
- - '''
- - if isinstance(infile, basestring):
- - logging.info("processing " + infile)
- - pp = self.pp.clone()
- - pp.out = StringIO()
- - pp.do_include(infile)
- - lines = pushback_iter(pp.out.getvalue().splitlines())
- - try:
- - while True:
- - l = lines.next()
- - m = self.jarline.match(l)
- - if not m:
- - raise RuntimeError(l)
- - if m.group('jarfile') is None:
- - # comment
- - continue
- - self.processJarSection(m.group('jarfile'), lines,
- - jardir, sourcedirs, topsourcedir,
- - localedirs)
- - except StopIteration:
- - # we read the file
- - pass
- - return
- -
- - def makeJars(self, infiles, l10nbases,
- - jardir='',
- - sourcedirs=[], topsourcedir='', localedirs=None):
- - '''makeJars is the second main entry point to JarMaker.
- -
- - It takes an iterable sequence of input file names, the l10nbases,
- - the output directory, the source dirs and the
- - top source dir as argument, and optionally the l10n dirs.
- -
- - It iterates over all inputs, guesses srcdir and l10ndir from the
- - path and topsourcedir and calls into makeJar.
- -
- - The l10ndirs are created by guessing the relativesrcdir, and resolving
- - that against the l10nbases. l10nbases can either be path strings, or
- - callables. In the latter case, that will be called with the
- - relativesrcdir as argument, and is expected to return a path string.
- - This logic is disabled if the jar.mn path is not inside the topsrcdir.
- - '''
- - topsourcedir = os.path.normpath(os.path.abspath(topsourcedir))
- - def resolveL10nBase(relpath):
- - def _resolve(base):
- - if isinstance(base, basestring):
- - return os.path.join(base, relpath)
- - if callable(base):
- - return base(relpath)
- - return base
- - return _resolve
- - for infile in infiles:
- - srcdir = os.path.normpath(os.path.abspath(os.path.dirname(infile)))
- - l10ndir = srcdir
- - if os.path.basename(srcdir) == 'locales':
- - l10ndir = os.path.dirname(l10ndir)
- -
- - l10ndirs = None
- - # srcdir may not be a child of topsourcedir, in which case
- - # we assume that the caller passed in suitable sourcedirs,
- - # and just skip passing in localedirs
- - if srcdir.startswith(topsourcedir):
- - rell10ndir = l10ndir[len(topsourcedir):].lstrip(os.sep)
- -
- - l10ndirs = map(resolveL10nBase(rell10ndir), l10nbases)
- - if localedirs is not None:
- - l10ndirs += [os.path.normpath(os.path.abspath(s))
- - for s in localedirs]
- - srcdirs = [os.path.normpath(os.path.abspath(s))
- - for s in sourcedirs] + [srcdir]
- - self.makeJar(infile=infile,
- - sourcedirs=srcdirs, topsourcedir=topsourcedir,
- - localedirs=l10ndirs,
- - jardir=jardir)
- -
- -
- - def processJarSection(self, jarfile, lines,
- - jardir, sourcedirs, topsourcedir, localedirs):
- - '''Internal method called by makeJar to actually process a section
- - of a jar.mn file.
- -
- - jarfile is the basename of the jarfile or the directory name for
- - flat output, lines is a pushback_iterator of the lines of jar.mn,
- - the remaining options are carried over from makeJar.
- - '''
- -
- - # chromebasepath is used for chrome registration manifests
- - # %s is getting replaced with chrome/ for chrome.manifest, and with
- - # an empty string for jarfile.manifest
- - chromebasepath = '%s' + jarfile
- - if self.outputFormat == 'jar':
- - chromebasepath = 'jar:' + chromebasepath + '.jar!'
- - chromebasepath += '/'
- -
- - jarfile = os.path.join(jardir, jarfile)
- - jf = None
- - if self.outputFormat == 'jar':
- - #jar
- - jarfilepath = jarfile + '.jar'
- - try:
- - os.makedirs(os.path.dirname(jarfilepath))
- - except OSError:
- - pass
- - jf = ZipFile(jarfilepath, 'a', lock = True)
- - outHelper = self.OutputHelper_jar(jf)
- - else:
- - outHelper = getattr(self, 'OutputHelper_' + self.outputFormat)(jarfile)
- - register = {}
- - # This loop exits on either
- - # - the end of the jar.mn file
- - # - an line in the jar.mn file that's not part of a jar section
- - # - on an exception raised, close the jf in that case in a finally
- - try:
- - while True:
- - try:
- - l = lines.next()
- - except StopIteration:
- - # we're done with this jar.mn, and this jar section
- - self.finalizeJar(jarfile, chromebasepath, register)
- - if jf is not None:
- - jf.close()
- - # reraise the StopIteration for makeJar
- - raise
- - if self.ignore.match(l):
- - continue
- - m = self.regline.match(l)
- - if m:
- - rline = m.group(1)
- - register[rline] = 1
- - continue
- - m = self.entryline.match(l)
- - if not m:
- - # neither an entry line nor chrome reg, this jar section is done
- - self.finalizeJar(jarfile, chromebasepath, register)
- - if jf is not None:
- - jf.close()
- - lines.pushback(l)
- - return
- - self._processEntryLine(m, sourcedirs, topsourcedir, localedirs,
- - outHelper, jf)
- - finally:
- - if jf is not None:
- - jf.close()
- - return
- -
- - def _processEntryLine(self, m,
- - sourcedirs, topsourcedir, localedirs,
- - outHelper, jf):
- - out = m.group('output')
- - src = m.group('source') or os.path.basename(out)
- - # pick the right sourcedir -- l10n, topsrc or src
- - if m.group('locale'):
- - src_base = localedirs
- - elif src.startswith('/'):
- - # path/in/jar/file_name.xul (/path/in/sourcetree/file_name.xul)
- - # refers to a path relative to topsourcedir, use that as base
- - # and strip the leading '/'
- - src_base = [topsourcedir]
- - src = src[1:]
- - else:
- - # use srcdirs and the objdir (current working dir) for relative paths
- - src_base = sourcedirs + ['.']
- - # check if the source file exists
- - realsrc = None
- - for _srcdir in src_base:
- - if os.path.isfile(os.path.join(_srcdir, src)):
- - realsrc = os.path.join(_srcdir, src)
- - break
- - if realsrc is None:
- - if jf is not None:
- - jf.close()
- - raise RuntimeError('File "%s" not found in %s' % (src, ', '.join(src_base)))
- - if m.group('optPreprocess'):
- - outf = outHelper.getOutput(out)
- - inf = open(realsrc)
- - pp = self.pp.clone()
- - if src[-4:] == '.css':
- - pp.setMarker('%')
- - pp.out = outf
- - pp.do_include(inf)
- - outf.close()
- - inf.close()
- - return
- - # copy or symlink if newer or overwrite
- - if (m.group('optOverwrite')
- - or (getModTime(realsrc) >
- - outHelper.getDestModTime(m.group('output')))):
- - if self.outputFormat == 'symlink' and hasattr(os, 'symlink'):
- - outHelper.symlink(realsrc, out)
- - return
- - outf = outHelper.getOutput(out)
- - # open in binary mode, this can be images etc
- - inf = open(realsrc, 'rb')
- - outf.write(inf.read())
- - outf.close()
- - inf.close()
- -
- -
- - class OutputHelper_jar(object):
- - '''Provide getDestModTime and getOutput for a given jarfile.
- - '''
- - def __init__(self, jarfile):
- - self.jarfile = jarfile
- - def getDestModTime(self, aPath):
- - try :
- - info = self.jarfile.getinfo(aPath)
- - return info.date_time
- - except:
- - return 0
- - def getOutput(self, name):
- - return ZipEntry(name, self.jarfile)
- -
- - class OutputHelper_flat(object):
- - '''Provide getDestModTime and getOutput for a given flat
- - output directory. The helper method ensureDirFor is used by
- - the symlink subclass.
- - '''
- - def __init__(self, basepath):
- - self.basepath = basepath
- - def getDestModTime(self, aPath):
- - return getModTime(os.path.join(self.basepath, aPath))
- - def getOutput(self, name):
- - out = self.ensureDirFor(name)
- - # remove previous link or file
- - try:
- - os.remove(out)
- - except OSError, e:
- - if e.errno != 2:
- - raise
- - return open(out, 'wb')
- - def ensureDirFor(self, name):
- - out = os.path.join(self.basepath, name)
- - outdir = os.path.dirname(out)
- - if not os.path.isdir(outdir):
- - os.makedirs(outdir)
- - return out
- -
- - class OutputHelper_symlink(OutputHelper_flat):
- - '''Subclass of OutputHelper_flat that provides a helper for
- - creating a symlink including creating the parent directories.
- - '''
- - def symlink(self, src, dest):
- - out = self.ensureDirFor(dest)
- - # remove previous link or file
- - try:
- - os.remove(out)
- - except OSError, e:
- - if e.errno != 2:
- - raise
- - os.symlink(src, out)
- -
- -def main():
- - jm = JarMaker()
- - p = jm.getCommandLineParser()
- - (options, args) = p.parse_args()
- - jm.processIncludes(options.I)
- - jm.outputFormat = options.f
- - if options.e:
- - jm.useChromeManifest = True
- - jm.useJarfileManifest = False
- - if options.bothManifests:
- - jm.useChromeManifest = True
- - jm.useJarfileManifest = True
- - noise = logging.INFO
- - if options.verbose is not None:
- - noise = (options.verbose and logging.DEBUG) or logging.WARN
- - if sys.version_info[:2] > (2,3):
- - logging.basicConfig(format = "%(message)s")
- - else:
- - logging.basicConfig()
- - logging.getLogger().setLevel(noise)
- - topsrc = options.t
- - topsrc = os.path.normpath(os.path.abspath(topsrc))
- - if not args:
- - jm.makeJar(infile=sys.stdin,
- - sourcedirs=options.s, topsourcedir=topsrc,
- - localedirs=options.l10n_src,
- - jardir=options.j)
- - else:
- - jm.makeJars(args, options.l10n_base,
- - jardir=options.j,
- - sourcedirs=options.s, topsourcedir=topsrc,
- - localedirs=options.l10n_src)
- -
- -if __name__ == "__main__":
- - main()
- diff --git a/suite/extensions/irc/xpi/config/MozZipFile.py b/suite/extensions/irc/xpi/config/MozZipFile.py
- deleted file mode 100644
- --- a/suite/extensions/irc/xpi/config/MozZipFile.py
- +++ /dev/null
- @@ -1,137 +0,0 @@
- -# 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 zipfile
- -import time
- -import binascii, struct
- -import zlib
- -import os
- -from utils import lockFile
- -
- -class ZipFile(zipfile.ZipFile):
- - """ Class with methods to open, read, write, close, list zip files.
- -
- - Subclassing zipfile.ZipFile to allow for overwriting of existing
- - entries, though only for writestr, not for write.
- - """
- - def __init__(self, file, mode="r", compression=zipfile.ZIP_STORED,
- - lock = False):
- - if lock:
- - assert isinstance(file, basestring)
- - self.lockfile = lockFile(file + '.lck')
- - else:
- - self.lockfile = None
- -
- - if mode == 'a' and lock:
- - # appending to a file which doesn't exist fails, but we can't check
- - # existence util we hold the lock
- - if (not os.path.isfile(file)) or os.path.getsize(file) == 0:
- - mode = 'w'
- -
- - zipfile.ZipFile.__init__(self, file, mode, compression)
- - self._remove = []
- - self.end = self.fp.tell()
- - self.debug = 0
- -
- - def writestr(self, zinfo_or_arcname, bytes):
- - """Write contents into the archive.
- -
- - The contents is the argument 'bytes', 'zinfo_or_arcname' is either
- - a ZipInfo instance or the name of the file in the archive.
- - This method is overloaded to allow overwriting existing entries.
- - """
- - if not isinstance(zinfo_or_arcname, zipfile.ZipInfo):
- - zinfo = zipfile.ZipInfo(filename=zinfo_or_arcname,
- - date_time=time.localtime(time.time()))
- - zinfo.compress_type = self.compression
- - # Add some standard UNIX file access permissions (-rw-r--r--).
- - zinfo.external_attr = (0x81a4 & 0xFFFF) << 16L
- - else:
- - zinfo = zinfo_or_arcname
- -
- - # Now to the point why we overwrote this in the first place,
- - # remember the entry numbers if we already had this entry.
- - # Optimizations:
- - # If the entry to overwrite is the last one, just reuse that.
- - # If we store uncompressed and the new content has the same size
- - # as the old, reuse the existing entry.
- -
- - doSeek = False # store if we need to seek to the eof after overwriting
- - if self.NameToInfo.has_key(zinfo.filename):
- - # Find the last ZipInfo with our name.
- - # Last, because that's catching multiple overwrites
- - i = len(self.filelist)
- - while i > 0:
- - i -= 1
- - if self.filelist[i].filename == zinfo.filename:
- - break
- - zi = self.filelist[i]
- - if ((zinfo.compress_type == zipfile.ZIP_STORED
- - and zi.compress_size == len(bytes))
- - or (i + 1) == len(self.filelist)):
- - # make sure we're allowed to write, otherwise done by writestr below
- - self._writecheck(zi)
- - # overwrite existing entry
- - self.fp.seek(zi.header_offset)
- - if (i + 1) == len(self.filelist):
- - # this is the last item in the file, just truncate
- - self.fp.truncate()
- - else:
- - # we need to move to the end of the file afterwards again
- - doSeek = True
- - # unhook the current zipinfo, the writestr of our superclass
- - # will add a new one
- - self.filelist.pop(i)
- - self.NameToInfo.pop(zinfo.filename)
- - else:
- - # Couldn't optimize, sadly, just remember the old entry for removal
- - self._remove.append(self.filelist.pop(i))
- - zipfile.ZipFile.writestr(self, zinfo, bytes)
- - self.filelist.sort(lambda l, r: cmp(l.header_offset, r.header_offset))
- - if doSeek:
- - self.fp.seek(self.end)
- - self.end = self.fp.tell()
- -
- - def close(self):
- - """Close the file, and for mode "w" and "a" write the ending
- - records.
- -
- - Overwritten to compact overwritten entries.
- - """
- - if not self._remove:
- - # we don't have anything special to do, let's just call base
- - r = zipfile.ZipFile.close(self)
- - self.lockfile = None
- - return r
- -
- - if self.fp.mode != 'r+b':
- - # adjust file mode if we originally just wrote, now we rewrite
- - self.fp.close()
- - self.fp = open(self.filename, 'r+b')
- - all = map(lambda zi: (zi, True), self.filelist) + \
- - map(lambda zi: (zi, False), self._remove)
- - all.sort(lambda l, r: cmp(l[0].header_offset, r[0].header_offset))
- - # empty _remove for multiple closes
- - self._remove = []
- -
- - lengths = [all[i+1][0].header_offset - all[i][0].header_offset
- - for i in xrange(len(all)-1)]
- - lengths.append(self.end - all[-1][0].header_offset)
- - to_pos = 0
- - for (zi, keep), length in zip(all, lengths):
- - if not keep:
- - continue
- - oldoff = zi.header_offset
- - # python <= 2.4 has file_offset
- - if hasattr(zi, 'file_offset'):
- - zi.file_offset = zi.file_offset + to_pos - oldoff
- - zi.header_offset = to_pos
- - self.fp.seek(oldoff)
- - content = self.fp.read(length)
- - self.fp.seek(to_pos)
- - self.fp.write(content)
- - to_pos += length
- - self.fp.truncate()
- - zipfile.ZipFile.close(self)
- - self.lockfile = None
- diff --git a/suite/extensions/irc/xpi/config/Preprocessor.py b/suite/extensions/irc/xpi/config/Preprocessor.py
- deleted file mode 100644
- --- a/suite/extensions/irc/xpi/config/Preprocessor.py
- +++ /dev/null
- @@ -1,444 +0,0 @@
- -"""
- -This is a very primitive line based preprocessor, for times when using
- -a C preprocessor isn't an option.
- -"""
- -
- -# 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 sys
- -import os
- -import os.path
- -import re
- -from optparse import OptionParser
- -
- -# hack around win32 mangling our line endings
- -# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65443
- -if sys.platform == "win32":
- - import msvcrt
- - msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
- - os.linesep = '\n'
- -
- -import Expression
- -
- -__all__ = ['Preprocessor', 'preprocess']
- -
- -
- -class Preprocessor:
- - """
- - Class for preprocessing text files.
- - """
- - class Error(RuntimeError):
- - def __init__(self, cpp, MSG, context):
- - self.file = cpp.context['FILE']
- - self.line = cpp.context['LINE']
- - self.key = MSG
- - RuntimeError.__init__(self, (self.file, self.line, self.key, context))
- - def __init__(self):
- - self.context = Expression.Context()
- - for k,v in {'FILE': '',
- - 'LINE': 0,
- - 'DIRECTORY': os.path.abspath('.')}.iteritems():
- - self.context[k] = v
- - self.disableLevel = 0
- - # ifStates can be
- - # 0: hadTrue
- - # 1: wantsTrue
- - # 2: #else found
- - self.ifStates = []
- - self.checkLineNumbers = False
- - self.writtenLines = 0
- - self.filters = []
- - self.cmds = {}
- - for cmd, level in {'define': 0,
- - 'undef': 0,
- - 'if': sys.maxint,
- - 'ifdef': sys.maxint,
- - 'ifndef': sys.maxint,
- - 'else': 1,
- - 'elif': 1,
- - 'elifdef': 1,
- - 'elifndef': 1,
- - 'endif': sys.maxint,
- - 'expand': 0,
- - 'literal': 0,
- - 'filter': 0,
- - 'unfilter': 0,
- - 'include': 0,
- - 'includesubst': 0,
- - 'error': 0}.iteritems():
- - self.cmds[cmd] = (level, getattr(self, 'do_' + cmd))
- - self.out = sys.stdout
- - self.setMarker('#')
- - self.LE = '\n'
- - self.varsubst = re.compile('@(?P<VAR>\w+)@', re.U)
- -
- - def setLineEndings(self, aLE):
- - """
- - Set the line endings to be used for output.
- - """
- - self.LE = {'cr': '\x0D', 'lf': '\x0A', 'crlf': '\x0D\x0A'}[aLE]
- -
- - def setMarker(self, aMarker):
- - """
- - Set the marker to be used for processing directives.
- - Used for handling CSS files, with pp.setMarker('%'), for example.
- - """
- - self.marker = aMarker
- - self.instruction = re.compile('%s(?P<cmd>[a-z]+)(?:\s(?P<args>.*))?$'%aMarker, re.U)
- - self.comment = re.compile(aMarker, re.U)
- -
- - def clone(self):
- - """
- - Create a clone of the current processor, including line ending
- - settings, marker, variable definitions, output stream.
- - """
- - rv = Preprocessor()
- - rv.context.update(self.context)
- - rv.setMarker(self.marker)
- - rv.LE = self.LE
- - rv.out = self.out
- - return rv
- -
- - def write(self, aLine):
- - """
- - Internal method for handling output.
- - """
- - if self.checkLineNumbers:
- - self.writtenLines += 1
- - ln = self.context['LINE']
- - if self.writtenLines != ln:
- - self.out.write('//@line %(line)d "%(file)s"%(le)s'%{'line': ln,
- - 'file': self.context['FILE'],
- - 'le': self.LE})
- - self.writtenLines = ln
- - for f in self.filters:
- - aLine = f[1](aLine)
- - # ensure our line ending. Only need to handle \n, as we're reading
- - # with universal line ending support, at least for files.
- - aLine = re.sub('\n', self.LE, aLine)
- - self.out.write(aLine)
- -
- - def handleCommandLine(self, args, defaultToStdin = False):
- - """
- - Parse a commandline into this parser.
- - Uses OptionParser internally, no args mean sys.argv[1:].
- - """
- - p = self.getCommandLineParser()
- - (options, args) = p.parse_args(args=args)
- - includes = options.I
- - if defaultToStdin and len(args) == 0:
- - args = [sys.stdin]
- - includes.extend(args)
- - for f in includes:
- - self.do_include(f)
- - pass
- -
- - def getCommandLineParser(self, unescapeDefines = False):
- - escapedValue = re.compile('".*"$')
- - def handleE(option, opt, value, parser):
- - for k,v in os.environ.iteritems():
- - self.context[k] = v
- - def handleD(option, opt, value, parser):
- - vals = value.split('=', 1)
- - if len(vals) == 1:
- - vals.append(1)
- - elif unescapeDefines and escapedValue.match(vals[1]):
- - # strip escaped string values
- - vals[1] = vals[1][1:-1]
- - self.context[vals[0]] = vals[1]
- - def handleU(option, opt, value, parser):
- - del self.context[value]
- - def handleF(option, opt, value, parser):
- - self.do_filter(value)
- - def handleLE(option, opt, value, parser):
- - self.setLineEndings(value)
- - def handleMarker(option, opt, value, parser):
- - self.setMarker(value)
- - p = OptionParser()
- - p.add_option('-I', action='append', type="string", default = [],
- - metavar="FILENAME", help='Include file')
- - p.add_option('-E', action='callback', callback=handleE,
- - help='Import the environment into the defined variables')
- - p.add_option('-D', action='callback', callback=handleD, type="string",
- - metavar="VAR[=VAL]", help='Define a variable')
- - p.add_option('-U', action='callback', callback=handleU, type="string",
- - metavar="VAR", help='Undefine a variable')
- - p.add_option('-F', action='callback', callback=handleF, type="string",
- - metavar="FILTER", help='Enable the specified filter')
- - p.add_option('--line-endings', action='callback', callback=handleLE,
- - type="string", metavar="[cr|lr|crlf]",
- - help='Use the specified line endings [Default: OS dependent]')
- - p.add_option('--marker', action='callback', callback=handleMarker,
- - type="string",
- - help='Use the specified marker instead of #')
- - return p
- -
- - def handleLine(self, aLine):
- - """
- - Handle a single line of input (internal).
- - """
- - m = self.instruction.match(aLine)
- - if m:
- - args = None
- - cmd = m.group('cmd')
- - try:
- - args = m.group('args')
- - except IndexError:
- - pass
- - if cmd not in self.cmds:
- - raise Preprocessor.Error(self, 'INVALID_CMD', aLine)
- - level, cmd = self.cmds[cmd]
- - if (level >= self.disableLevel):
- - cmd(args)
- - elif self.disableLevel == 0 and not self.comment.match(aLine):
- - self.write(aLine)
- - pass
- -
- - # Instruction handlers
- - # These are named do_'instruction name' and take one argument
- -
- - # Variables
- - def do_define(self, args):
- - m = re.match('(?P<name>\w+)(?:\s(?P<value>.*))?', args, re.U)
- - if not m:
- - raise Preprocessor.Error(self, 'SYNTAX_DEF', args)
- - val = 1
- - if m.group('value'):
- - val = m.group('value')
- - try:
- - if val[0] == '0':
- - val = int(val, 8)
- - else:
- - val = int(val)
- - except:
- - pass
- - self.context[m.group('name')] = val
- - def do_undef(self, args):
- - m = re.match('(?P<name>\w+)$', args, re.U)
- - if not m:
- - raise Preprocessor.Error(self, 'SYNTAX_DEF', args)
- - if args in self.context:
- - del self.context[args]
- - # Logic
- - def ensure_not_else(self):
- - if len(self.ifStates) == 0 or self.ifStates[-1] == 2:
- - sys.stderr.write('WARNING: bad nesting of #else\n')
- - def do_if(self, args, replace=False):
- - if self.disableLevel and not replace:
- - self.disableLevel += 1
- - return
- - val = None
- - try:
- - e = Expression.Expression(args)
- - val = e.evaluate(self.context)
- - except Exception:
- - # XXX do real error reporting
- - raise Preprocessor.Error(self, 'SYNTAX_ERR', args)
- - if type(val) == str:
- - # we're looking for a number value, strings are false
- - val = False
- - if not val:
- - self.disableLevel = 1
- - if replace:
- - if val:
- - self.disableLevel = 0
- - self.ifStates[-1] = self.disableLevel
- - else:
- - self.ifStates.append(self.disableLevel)
- - pass
- - def do_ifdef(self, args, replace=False):
- - if self.disableLevel and not replace:
- - self.disableLevel += 1
- - return
- - if re.match('\W', args, re.U):
- - raise Preprocessor.Error(self, 'INVALID_VAR', args)
- - if args not in self.context:
- - self.disableLevel = 1
- - if replace:
- - if args in self.context:
- - self.disableLevel = 0
- - self.ifStates[-1] = self.disableLevel
- - else:
- - self.ifStates.append(self.disableLevel)
- - pass
- - def do_ifndef(self, args, replace=False):
- - if self.disableLevel and not replace:
- - self.disableLevel += 1
- - return
- - if re.match('\W', args, re.U):
- - raise Preprocessor.Error(self, 'INVALID_VAR', args)
- - if args in self.context:
- - self.disableLevel = 1
- - if replace:
- - if args not in self.context:
- - self.disableLevel = 0
- - self.ifStates[-1] = self.disableLevel
- - else:
- - self.ifStates.append(self.disableLevel)
- - pass
- - def do_else(self, args, ifState = 2):
- - self.ensure_not_else()
- - hadTrue = self.ifStates[-1] == 0
- - self.ifStates[-1] = ifState # in-else
- - if hadTrue:
- - self.disableLevel = 1
- - return
- - self.disableLevel = 0
- - def do_elif(self, args):
- - if self.disableLevel == 1:
- - if self.ifStates[-1] == 1:
- - self.do_if(args, replace=True)
- - else:
- - self.do_else(None, self.ifStates[-1])
- - def do_elifdef(self, args):
- - if self.disableLevel == 1:
- - if self.ifStates[-1] == 1:
- - self.do_ifdef(args, replace=True)
- - else:
- - self.do_else(None, self.ifStates[-1])
- - def do_elifndef(self, args):
- - if self.disableLevel == 1:
- - if self.ifStates[-1] == 1:
- - self.do_ifndef(args, replace=True)
- - else:
- - self.do_else(None, self.ifStates[-1])
- - def do_endif(self, args):
- - if self.disableLevel > 0:
- - self.disableLevel -= 1
- - if self.disableLevel == 0:
- - self.ifStates.pop()
- - # output processing
- - def do_expand(self, args):
- - lst = re.split('__(\w+)__', args, re.U)
- - do_replace = False
- - def vsubst(v):
- - if v in self.context:
- - return str(self.context[v])
- - return ''
- - for i in range(1, len(lst), 2):
- - lst[i] = vsubst(lst[i])
- - lst.append('\n') # add back the newline
- - self.write(reduce(lambda x, y: x+y, lst, ''))
- - def do_literal(self, args):
- - self.write(args + self.LE)
- - def do_filter(self, args):
- - filters = [f for f in args.split(' ') if hasattr(self, 'filter_' + f)]
- - if len(filters) == 0:
- - return
- - current = dict(self.filters)
- - for f in filters:
- - current[f] = getattr(self, 'filter_' + f)
- - filterNames = current.keys()
- - filterNames.sort()
- - self.filters = [(fn, current[fn]) for fn in filterNames]
- - return
- - def do_unfilter(self, args):
- - filters = args.split(' ')
- - current = dict(self.filters)
- - for f in filters:
- - if f in current:
- - del current[f]
- - filterNames = current.keys()
- - filterNames.sort()
- - self.filters = [(fn, current[fn]) for fn in filterNames]
- - return
- - # Filters
- - #
- - # emptyLines
- - # Strips blank lines from the output.
- - def filter_emptyLines(self, aLine):
- - if aLine == '\n':
- - return ''
- - return aLine
- - # slashslash
- - # Strips everything after //
- - def filter_slashslash(self, aLine):
- - [aLine, rest] = aLine.split('//', 1)
- - if rest:
- - aLine += '\n'
- - return aLine
- - # spaces
- - # Collapses sequences of spaces into a single space
- - def filter_spaces(self, aLine):
- - return re.sub(' +', ' ', aLine).strip(' ')
- - # substition
- - # helper to be used by both substition and attemptSubstitution
- - def filter_substitution(self, aLine, fatal=True):
- - def repl(matchobj):
- - varname = matchobj.group('VAR')
- - if varname in self.context:
- - return str(self.context[varname])
- - if fatal:
- - raise Preprocessor.Error(self, 'UNDEFINED_VAR', varname)
- - return ''
- - return self.varsubst.sub(repl, aLine)
- - def filter_attemptSubstitution(self, aLine):
- - return self.filter_substitution(aLine, fatal=False)
- - # File ops
- - def do_include(self, args):
- - """
- - Preprocess a given file.
- - args can either be a file name, or a file-like object.
- - Files should be opened, and will be closed after processing.
- - """
- - isName = type(args) == str or type(args) == unicode
- - oldWrittenLines = self.writtenLines
- - oldCheckLineNumbers = self.checkLineNumbers
- - self.checkLineNumbers = False
- - if isName:
- - try:
- - args = str(args)
- - if not os.path.isabs(args):
- - args = os.path.join(self.context['DIRECTORY'], args)
- - args = open(args, 'rU')
- - except:
- - raise Preprocessor.Error(self, 'FILE_NOT_FOUND', str(args))
- - self.checkLineNumbers = bool(re.search('\.js(?:\.in)?$', args.name))
- - oldFile = self.context['FILE']
- - oldLine = self.context['LINE']
- - oldDir = self.context['DIRECTORY']
- - if args.isatty():
- - # we're stdin, use '-' and '' for file and dir
- - self.context['FILE'] = '-'
- - self.context['DIRECTORY'] = ''
- - else:
- - abspath = os.path.abspath(args.name)
- - self.context['FILE'] = abspath
- - self.context['DIRECTORY'] = os.path.dirname(abspath)
- - self.context['LINE'] = 0
- - self.writtenLines = 0
- - for l in args:
- - self.context['LINE'] += 1
- - self.handleLine(l)
- - args.close()
- - self.context['FILE'] = oldFile
- - self.checkLineNumbers = oldCheckLineNumbers
- - self.writtenLines = oldWrittenLines
- - self.context['LINE'] = oldLine
- - self.context['DIRECTORY'] = oldDir
- - def do_includesubst(self, args):
- - args = self.filter_substitution(args)
- - self.do_include(args)
- - def do_error(self, args):
- - raise Preprocessor.Error(self, 'Error: ', str(args))
- -
- -def main():
- - pp = Preprocessor()
- - pp.handleCommandLine(None, True)
- - return
- -
- -def preprocess(includes=[sys.stdin], defines={},
- - output = sys.stdout,
- - line_endings='\n', marker='#'):
- - pp = Preprocessor()
- - pp.context.update(defines)
- - pp.setLineEndings(line_endings)
- - pp.setMarker(marker)
- - pp.out = output
- - for f in includes:
- - pp.do_include(f)
- -
- -if __name__ == "__main__":
- - main()
- diff --git a/suite/extensions/irc/xpi/config/utils.py b/suite/extensions/irc/xpi/config/utils.py
- deleted file mode 100644
- --- a/suite/extensions/irc/xpi/config/utils.py
- +++ /dev/null
- @@ -1,121 +0,0 @@
- -# 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/.
- -
- -'''Utility methods to be used by python build infrastructure.
- -'''
- -
- -import os
- -import errno
- -import sys
- -import time
- -import stat
- -
- -class LockFile(object):
- - '''LockFile is used by the lockFile method to hold the lock.
- -
- - This object should not be used directly, but only through
- - the lockFile method below.
- - '''
- - def __init__(self, lockfile):
- - self.lockfile = lockfile
- - def __del__(self):
- - while True:
- - try:
- - os.remove(self.lockfile)
- - break
- - except OSError, e:
- - if e.errno == errno.EACCES:
- - # another process probably has the file open, we'll retry.
- - # just a short sleep since we want to drop the lock ASAP
- - # (but we need to let some other process close the file first)
- - time.sleep(0.1)
- - else:
- - # re-raise unknown errors
- - raise
- -
- -def lockFile(lockfile, max_wait = 600):
- - '''Create and hold a lockfile of the given name, with the given timeout.
- -
- - To release the lock, delete the returned object.
- - '''
- - while True:
- - try:
- - fd = os.open(lockfile, os.O_EXCL | os.O_RDWR | os.O_CREAT)
- - # we created the lockfile, so we're the owner
- - break
- - except OSError, e:
- - if e.errno == errno.EEXIST or \
- - (sys.platform == "win32" and e.errno == errno.EACCES):
- - pass
- - else:
- - # should not occur
- - raise
- -
- - try:
- - # the lock file exists, try to stat it to get its age
- - # and read its contents to report the owner PID
- - f = open(lockfile, "r")
- - s = os.stat(lockfile)
- - except EnvironmentError, e:
- - if e.errno == errno.ENOENT or \
- - (sys.platform == "win32" and e.errno == errno.EACCES):
- - # we didn't create the lockfile, so it did exist, but it's
- - # gone now. Just try again
- - continue
- - sys.exit("%s exists but stat() failed: %s" %
- - (lockfile, e.strerror))
- -
- - # we didn't create the lockfile and it's still there, check
- - # its age
- - now = int(time.time())
- - if now - s[stat.ST_MTIME] > max_wait:
- - pid = f.readline().rstrip()
- - sys.exit("%s has been locked for more than " \
- - "%d seconds (PID %s)" % (lockfile, max_wait,
- - pid))
- -
- - # it's not been locked too long, wait a while and retry
- - f.close()
- - time.sleep(1)
- -
- - # if we get here. we have the lockfile. Convert the os.open file
- - # descriptor into a Python file object and record our PID in it
- -
- - f = os.fdopen(fd, "w")
- - f.write("%d\n" % os.getpid())
- - f.close()
- - return LockFile(lockfile)
- -
- -class pushback_iter(object):
- - '''Utility iterator that can deal with pushed back elements.
- -
- - This behaves like a regular iterable, just that you can call
- - iter.pushback(item)
- - to get the givem item as next item in the iteration.
- - '''
- - def __init__(self, iterable):
- - self.it = iter(iterable)
- - self.pushed_back = []
- -
- - def __iter__(self):
- - return self
- -
- - def __nonzero__(self):
- - if self.pushed_back:
- - return True
- -
- - try:
- - self.pushed_back.insert(0, self.it.next())
- - except StopIteration:
- - return False
- - else:
- - return True
- -
- - def next(self):
- - if self.pushed_back:
- - return self.pushed_back.pop()
- - return self.it.next()
- -
- - def pushback(self, item):
- - self.pushed_back.append(item)
- diff --git a/suite/extensions/irc/xpi/makexpi.py b/suite/extensions/irc/xpi/makexpi.py
- deleted file mode 100755
- --- a/suite/extensions/irc/xpi/makexpi.py
- +++ /dev/null
- @@ -1,418 +0,0 @@
- -#!/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/.
- -
- -"""
- -Rewrite of ChatZilla's makexpi.sh into python
- -
- -This code isnt especially pythonic, as I have
- -tried to follow the code and control flow from
- -the original shell script
- -"""
- -
- -import os
- -import os.path
- -import sys
- -import shutil
- -import re
- -import zipfile
- -from os.path import join as joinpath
- -
- -# Set up settings and paths for finding files.
- -pwd = os.path.dirname(__file__)
- -
- -ffversion = '56.*'
- -smversion = '2.57.*'
- -
- -if pwd == '':
- - pwd = os.getcwd()
- -else:
- - os.chdir(pwd)
- -
- -def getenv(var, default, dir=False, check=False):
- - """
- - Grab an environment variable, or a default
- - """
- - try:
- - value = os.environ[var]
- - except KeyError:
- - value = default
- - if dir:
- - if not os.path.isabs(value):
- - value = os.path.normpath(joinpath(pwd, value))
- - else:
- - value = os.path.normpath(value)
- - if check and not os.path.isdir(value):
- - print 'ERROR: Directory %s not found.' % value
- - sys.exit(1)
- -
- - return value
- -
- -
- -debug = int(getenv('DEBUG', 0))
- -configdir = getenv('CONFIGDIR', joinpath(pwd, 'config'), dir=True, check=True)
- -
- -# Display all the settings and paths if we're in debug mode.
- -if debug > 0:
- - print 'DEBUG = %s' % debug
- - print 'CONFIGDIR = %s' % configdir
- -
- -# append the config dir to path before importing the utils
- -sys.path.append(configdir)
- -
- -from Preprocessor import preprocess
- -from JarMaker import JarMaker
- -
- -## define functions to replace the OS calls from makexpi.sh
- -
- -def echo(str):
- - """
- - print a string without a newline or trailing space
- -
- - generally used in place of "echo -n" from the original code
- - """
- - sys.stdout.write(str)
- -
- -def rm(path):
- - """
- - remove file or directory, recurses on directory
- -
- - This will fail silently if the file is not found
- - but any other exceptions will be raised
- - """
- - try:
- - if os.path.isdir(path):
- - shutil.rmtree(path)
- - else:
- - os.remove(path)
- - except WindowsError, ex:
- - if ex.errno != 2:
- - raise
- -def mkdir(dir):
- - """
- - acts like mkdir -p
- - """
- - try:
- - os.makedirs(dir)
- - except os.error:
- - pass # dont error out if there dir already exists
- -
- -def copy(src, dst):
- - """
- - copy file
- - """
- - shutil.copy(src, dst)
- -
- -def move(src, dst):
- - """
- - move file
- - """
- - shutil.move(src, dst)
- -
- -def sed((pattern, replacement), input, output):
- - """
- - similar functionality to unix command 'sed'
- - """
- - regex = re.compile(pattern)
- - for line in input:
- - line = regex.sub(replacement, line)
- - output.write(line)
- -
- -def zip(filename, source_dir, include=None, exclude=None):
- - """
- - create a zip file of a directory's contents
- -
- - include and exclude are filtering functions, they will
- - be passed the basename of each file in the directory
- - and should either return true or false if the file
- - should be included or excluded respectively
- - """
- - z = zipfile.ZipFile(filename, 'w', zipfile.ZIP_DEFLATED)
- - for dirpath, dirnames, filenames in os.walk(source_dir):
- - for filename in filenames:
- - if include is not None and not include(filename) \
- - or exclude is not None and exclude(filename):
- - continue
- - full_filename = joinpath(dirpath, filename)
- - offset = len(os.path.commonprefix([source_dir,full_filename])) + 1
- - archive_filename = full_filename[offset:]
- - z.write(full_filename, archive_filename)
- - z.close()
- -
- -## Begin real program ##
- -
- -def clean():
- - """
- - check arguments for cleanup flag
- - """
- - for arg in sys.argv:
- - if arg == 'clean':
- - return True
- - return False
- -
- -def locale():
- - """
- - check arguments for locale or return None
- - """
- - locale_pattern = re.compile(r'^[a-z]{1,3}(?:-[A-Z]{1,3}(?:-[a-z]{1,3})?)?$')
- - for arg in sys.argv:
- - locale_match = locale_pattern.match(arg)
- - if locale_match is not None:
- - return arg
- - return None
- -
- -def version(fedir):
- - """
- - get version number from source files
- - """
- - version_pattern = re.compile(r'const __cz_version\s+=\s*\"([^\"]+)\"')
- - for line in open(joinpath(fedir, 'xul', 'content', 'static.js'), 'r'):
- - match = version_pattern.match(line)
- - if match is None:
- - continue
- - return match.group(1)
- - print 'ERROR: Unable to get version number.'
- - sys.exit(1)
- -
- -fedir = getenv('FEDIR', joinpath(pwd, '..'), dir=True, check=True)
- -xpifiles = getenv('XPIFILES', joinpath(pwd, 'resources'), dir=True, check=True)
- -xpiroot = getenv('XPIROOT', joinpath(pwd, 'xpi-tree'), dir=True)
- -jarroot = getenv('JARROOT', joinpath(pwd, 'jar-tree'), dir=True)
- -localedir = getenv('LOCALEDIR', joinpath(fedir, 'locales'), dir=True, check=True)
- -locale = locale()
- -if locale is None:
- - locale = getenv('LOCALE', None)
- -else:
- - xpiroot = '%s-%s' % (xpiroot, locale)
- - jarroot = '%s-%s' % (jarroot, locale)
- -
- -version = version(fedir)
- -xpiname = None
- -
- -if debug > 0:
- - print 'FEDIR = %s' % fedir
- - print 'XPIFILES = %s' % xpifiles
- - print 'XPIROOT = %s' % xpiroot
- - print 'JARROOT = %s' % jarroot
- - print 'LOCALEDIR = %s' % localedir
- - print 'LOCALE = %s' % locale
- -
- -
- -def check_xpiname(name):
- - if debug > 1:
- - print ' XPI name: %s' % name
- - if os.path.exists(joinpath(pwd, name)):
- - print ' WARNING: Output XPI will be overwritten.'
- - return name
- -
- -def progress_chmod(file, mode):
- - if debug > 1:
- - print ' chmod 0%o %s' % (mode, file)
- - else:
- - echo('.')
- - os.chmod(file, mode)
- -
- -def progress_copy(infile, outfile):
- - if debug > 1:
- - print ' copy %s %s' % (infile, outfile)
- - else:
- - echo('.')
- - copy(infile, outfile)
- -
- -def progress_echo(message):
- - if debug > 1:
- - print message
- - else:
- - echo(message)
- -
- -def progress_jarmaker():
- - if debug > 1:
- - print ' JarMaker()'
- - else:
- - echo('.')
- - jm = JarMaker()
- - jm.outputFormat = 'jar'
- - jm.useChromeManifest = True
- - jm.useJarfileManifest = False
- - return jm
- -
- -def progress_jarmaker_make(jm, infile, indir, localedirs=None):
- - if debug > 1:
- - print ' makeJar %s %s %s' % (infile, indir, localedirs)
- - else:
- - echo('.')
- - jm.makeJar(
- - infile = open(infile, 'r'),
- - jardir = jarroot,
- - sourcedirs = [indir],
- - localedirs = localedirs,
- - )
- -
- -def progress_mkdir(dir):
- - if debug > 1:
- - print ' mkdir %s' % dir
- - else:
- - echo('.')
- - if not os.path.isdir(dir):
- - mkdir(dir)
- -
- -def progress_move(infile, outfile):
- - if debug > 1:
- - print ' move %s %s' % (infile, outfile)
- - else:
- - echo('.')
- - move(infile, outfile)
- -
- -def progress_preprocess(infile, outfile, defines):
- - if debug > 1:
- - print ' preprocess %s %s %s' % (defines, infile, outfile)
- - else:
- - echo('.')
- - if not isinstance(infile, (list)):
- - infile = [infile]
- - preprocess_outfile = open(outfile, 'w')
- - preprocess(
- - includes = infile,
- - defines = defines,
- - output = preprocess_outfile,
- - line_endings = 'lf',
- - )
- - preprocess_outfile.close()
- -
- -def progress_rm(file):
- - if debug > 1:
- - print ' rm %s' % file
- - else:
- - echo('.')
- - rm(file)
- -
- -def progress_sed(infile, outfile, patterns):
- - if debug > 1:
- - print ' sed %s %s %s' % (patterns, infile, outfile)
- - else:
- - echo('.')
- - sed_infile = open(infile, 'r')
- - sed_outfile = open(outfile, 'w')
- - sed(
- - patterns,
- - input = sed_infile,
- - output = sed_outfile,
- - )
- - sed_infile.close()
- - sed_outfile.close()
- -
- -def progress_zip(indir, outfile):
- - if debug > 1:
- - print ' zip %s %s' % (indir, outfile)
- - else:
- - echo('.')
- - zip(
- - filename = os.path.normpath(outfile),
- - source_dir = indir,
- - include = lambda fn: True,
- - exclude = lambda fn: fn.startswith('log')
- - )
- -
- -
- -def do_clean():
- - echo('Cleaning up files')
- - echo('.')
- - rm(xpiroot)
- - echo('.')
- - rm(jarroot)
- - print('. done.')
- -
- -def do_build_base():
- - print 'Beginning build of ChatZilla %s...' % version
- - xpiname = check_xpiname('chatzilla-%s.xpi' % version)
- -
- - progress_echo(' Checking XPI structure')
- - progress_mkdir(xpiroot)
- - progress_mkdir(joinpath(xpiroot, 'chrome'))
- - progress_mkdir(joinpath(xpiroot, 'chrome', 'icons'))
- - progress_mkdir(joinpath(xpiroot, 'chrome', 'icons', 'default'))
- - progress_mkdir(joinpath(xpiroot, 'components'))
- - print ' done'
- -
- - progress_echo(' Checking JAR structure')
- - progress_mkdir(jarroot)
- - print ' done'
- -
- - progress_echo(' Updating extension files')
- - progress_preprocess(joinpath(xpifiles, 'install.rdf'), joinpath(xpiroot, 'install.rdf'), {'CHATZILLA_VERSION': version, 'SEAMONKEY_MAXVERSION': smversion})
- - progress_copy(joinpath(xpifiles, 'chatzilla-window.ico'), joinpath(xpiroot, 'chrome', 'icons', 'default', 'chatzilla-window.ico'))
- - progress_copy(joinpath(xpifiles, 'chatzilla-window.xpm'), joinpath(xpiroot, 'chrome', 'icons', 'default', 'chatzilla-window.xpm'))
- - progress_copy(joinpath(xpifiles, 'chatzilla-window16.xpm'), joinpath(xpiroot, 'chrome', 'icons', 'default', 'chatzilla-window16.xpm'))
- - print ' done'
- -
- - progress_echo(' Constructing JAR package')
- - jm = progress_jarmaker()
- - progress_jarmaker_make(jm, joinpath(fedir, 'jar.mn'), fedir)
- - progress_jarmaker_make(jm, joinpath(fedir, 'sm', 'jar.mn'), joinpath(fedir, 'sm'))
- - progress_jarmaker_make(jm, joinpath(fedir, 'ff', 'jar.mn'), joinpath(fedir, 'ff'))
- - progress_preprocess(joinpath(localedir, 'jar.mn'), joinpath(localedir, 'jar.mn.pp'), {'AB_CD': 'en-US'})
- - # Define a preprocessor var for the next call to makeJar
- - jm.pp.context['AB_CD'] = 'en-US'
- - progress_jarmaker_make(jm, joinpath(localedir, 'jar.mn.pp'), localedir, [joinpath(localedir, 'en-US')])
- - progress_rm(joinpath(localedir, 'jar.mn.pp'))
- - print ' done'
- -
- - progress_echo(' Constructing XPI package')
- - progress_copy(joinpath(jarroot, 'chatzilla.jar'), joinpath(xpiroot, 'chrome'))
- - progress_copy(joinpath(fedir, 'js', 'lib', 'chatzilla-service.js'), joinpath(xpiroot, 'components'))
- - progress_move(joinpath(jarroot, '..', 'chrome.manifest'), joinpath(xpiroot, 'chrome.manifest'))
- - progress_chmod(joinpath(xpiroot, 'chrome', 'chatzilla.jar'), 0664)
- - progress_chmod(joinpath(xpiroot, 'components', 'chatzilla-service.js'), 0664)
- - progress_zip(xpiroot, joinpath(pwd, xpiname))
- - print ' done'
- -
- - print 'Build of ChatZilla %s... ALL DONE' % version
- -
- -
- -def do_build_locale():
- - print 'Beginning build of %s locale for ChatZilla %s...' % (locale, version)
- - xpiname = check_xpiname('chatzilla-%s.%s.xpi' % (version, locale))
- -
- - progress_echo(' Checking XPI structure')
- - progress_mkdir(xpiroot)
- - progress_mkdir(joinpath(xpiroot, 'chrome'))
- - print ' done'
- -
- - progress_echo(' Checking JAR structure')
- - progress_mkdir(jarroot)
- - print ' done'
- -
- - progress_echo(' Updating extension files')
- - progress_preprocess([joinpath(localedir, locale, 'defines.inc'), joinpath(localedir, 'generic', 'install.rdf')], joinpath(xpiroot, 'install.rdf.pp'),
- - {'IRC_STANDALONE_BUILD': '1', 'CHATZILLA_VERSION': version, 'CHATZILLA_BASE_VERSION': version, 'AB_CD': locale, 'INSTALL_EXTENSION_ID': 'langpack-%s@chatzilla.mozilla.org' % locale, 'MOZ_LANG_TITLE': locale, 'SEAMONKEY_MAXVERSION': smversion})
- - progress_sed(joinpath(xpiroot, 'install.rdf.pp'), joinpath(xpiroot, 'install.rdf'), ('chatzilla.jar', 'chatzilla-%s.jar' % locale))
- - progress_rm(joinpath(xpiroot, 'install.rdf.pp'))
- - print ' done'
- -
- - progress_echo(' Constructing JAR package')
- - jm = progress_jarmaker()
- - progress_preprocess(joinpath(localedir, 'jar.mn'), joinpath(localedir, 'jar.mn.pp'), {'AB_CD': locale})
- - jm.pp.context['AB_CD'] = locale
- - progress_jarmaker_make(jm, joinpath(localedir, 'jar.mn.pp'), localedir, [joinpath(localedir, locale)])
- - progress_rm(joinpath(localedir, 'jar.mn.pp'))
- - progress_move(joinpath(jarroot, 'chatzilla.jar'), joinpath(jarroot, 'chatzilla-%s.jar' % locale))
- - print ' done'
- -
- - progress_echo(' Constructing XPI package')
- - progress_copy(joinpath(jarroot, 'chatzilla-%s.jar' % locale), joinpath(xpiroot, 'chrome'))
- - progress_sed(joinpath(jarroot, '..', 'chrome.manifest'), joinpath(xpiroot, 'chrome.manifest'), ('chatzilla.jar', 'chatzilla-%s.jar' % locale))
- - progress_rm(joinpath(jarroot, '..', 'chrome.manifest'))
- - progress_chmod(joinpath(xpiroot, 'chrome', 'chatzilla-%s.jar' % locale), 0664)
- - progress_zip(xpiroot, joinpath(pwd, xpiname))
- - print ' done'
- -
- - print 'Build of %s locale for ChatZilla %s... ALL DONE' % (locale, version)
- -
- -
- -if clean():
- - do_clean()
- -elif locale is None:
- - do_build_base()
- -else:
- - do_build_locale()
- diff --git a/suite/extensions/irc/xpi/resources/chatzilla-window.ico b/suite/extensions/irc/xpi/resources/chatzilla-window.ico
- deleted file mode 100644
- index c3beee23a57bf542b5bce221d999f68130265e7d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
- GIT binary patch
- literal 0
- Hc$@<O00001
- diff --git a/suite/extensions/irc/xpi/resources/chatzilla-window.xpm b/suite/extensions/irc/xpi/resources/chatzilla-window.xpm
- deleted file mode 100644
- --- a/suite/extensions/irc/xpi/resources/chatzilla-window.xpm
- +++ /dev/null
- @@ -1,102 +0,0 @@
- -/* XPM */
- -/* 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/. */
- -
- -static char *cz_logo_32[] = {
- -/* columns rows colors chars-per-pixel */
- -"32 32 60 1",
- -" c #374552",
- -". c #384653",
- -"X c #3b4956",
- -"o c #3e4b58",
- -"O c #414e5b",
- -"+ c #43505d",
- -"@ c #4a5762",
- -"# c #4d5965",
- -"$ c #515d68",
- -"% c #55616c",
- -"& c #58646e",
- -"* c #5a6671",
- -"= c #5d6873",
- -"- c #616c77",
- -"; c #636e78",
- -": c #66707a",
- -"> c #6a747e",
- -", c #6c7780",
- -"< c #6e7881",
- -"1 c #717b84",
- -"2 c #767f88",
- -"3 c #7a838c",
- -"4 c #7e8790",
- -"5 c #828b93",
- -"6 c #8b939a",
- -"7 c #90979f",
- -"8 c #949ca3",
- -"9 c #9ca3aa",
- -"0 c #a0a7ad",
- -"q c #a2a8ae",
- -"w c #a5abb1",
- -"e c #a9afb4",
- -"r c #abb1b6",
- -"t c #adb2b8",
- -"y c #b0b5ba",
- -"u c #b3b8bd",
- -"i c #b7bcc1",
- -"p c #b8bdc2",
- -"a c #bbc0c4",
- -"s c #bfc4c8",
- -"d c #c2c6ca",
- -"f c #c5c9cc",
- -"g c #caced1",
- -"h c #cdd1d4",
- -"j c #d0d3d6",
- -"k c #d4d7da",
- -"l c #d6d9dc",
- -"z c #d9dcde",
- -"x c #dbdde0",
- -"c c #dde0e2",
- -"v c #e1e3e5",
- -"b c #e5e7e9",
- -"n c #e7e8ea",
- -"m c #eaebed",
- -"M c #eff0f1",
- -"N c #f4f5f5",
- -"B c #f6f7f8",
- -"V c #f7f8f8",
- -"C c #fefefe",
- -"Z c None",
- -/* pixels */
- -"ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ",
- -"ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ",
- -"ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ",
- -"ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ",
- -"ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ",
- -"ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ",
- -"ZZZZZZZZZZZZZZZZZZVVNBNBNNNNNVCZ",
- -"ZZZZZZZZZZZZZZZZMu<&&=**&==&==6v",
- -"ZZZZZZZZZZZZZZZC8O155555555553O>",
- -"ZZZZZZZZZZZZZZZc@9VCCCCCCCCCCC9o",
- -"ZZZZVca856ygmZV6@cCCVcxxcVCCCC9#",
- -"ZZCh<+o+&$Oo&ugO0CCN6OOO2MCCCg@3",
- -"ZCt@$9gvNmlp3O%&mCC8X2$$kCCCv&$k",
- -"ZpO5cCCCCCCCN3 9CCrO56+aCCCN3+fZ",
- -"m=*mCCCCCCVnCv;5k0+6u+9CCCC8oeCZ",
- -"eOfCCCCnfmCCCC9.++6f$3BCCCuO6VZZ",
- -"1;NCCB8$ <xCBv;;yjv>;vCCCk$<NVCZ",
- -"#6CCCdO4w&$4;$+pZV5#hCCCn>&hu<6v",
- -"OyCCC5@bZk&. .6CCr+uCCCV5#y<O;O,",
- -"#8CCC9OfVa+$5:+0d@6VCCC9O9>OrB6X",
- -">,VCCc%@>#>xCN2+@1NCCCf+55OrCC6#",
- -"8@zCCCv9&=hCCCpX&vCCCz%.#OrCCx#6",
- -"c#1NCCCCmMCCCC9@fCCCCu555uCCC8#c",
- -"CqowNCCCCCCCCg#9CCCCCCCCCCCCl#6C",
- -"ZN6O,smNCCVbi$X<uuuuuuuuuuuu1#cZ",
- -"ZZBr#o$=35;@O1t=OOOOOOOOOOOO#0CZ",
- -"ZZZCbd63=&18hNZNxxxzxxxzxxzxbCZZ",
- -"ZZZZZZZCNNCZZZZZZZZZZZZZZZZZZZZZ",
- -"ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ",
- -"ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ",
- -"ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ",
- -"ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
- -};
- diff --git a/suite/extensions/irc/xpi/resources/chatzilla-window16.xpm b/suite/extensions/irc/xpi/resources/chatzilla-window16.xpm
- deleted file mode 100644
- --- a/suite/extensions/irc/xpi/resources/chatzilla-window16.xpm
- +++ /dev/null
- @@ -1,84 +0,0 @@
- -/* XPM */
- -/* 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/. */
- -
- -static char *cz_logo_16[] = {
- -/* columns rows colors chars-per-pixel */
- -"16 16 58 1",
- -" c #374552",
- -". c #384653",
- -"X c #3c4956",
- -"o c #3d4b58",
- -"O c #414e5b",
- -"+ c #44515e",
- -"@ c #475460",
- -"# c #4a5762",
- -"$ c #4c5965",
- -"% c #54606b",
- -"& c #59646f",
- -"* c #5b6671",
- -"= c #5d6873",
- -"- c #626d77",
- -"; c #636e78",
- -": c #66717b",
- -"> c #69747d",
- -", c #6c7780",
- -"< c #6e7881",
- -"1 c #717b84",
- -"2 c #757f88",
- -"3 c #7a838c",
- -"4 c #7f8890",
- -"5 c #838c94",
- -"6 c #8d959c",
- -"7 c #90979f",
- -"8 c #90989f",
- -"9 c #949ca3",
- -"0 c #9aa1a7",
- -"q c #9ca3a9",
- -"w c #a6acb2",
- -"e c #a9afb4",
- -"r c #abb1b6",
- -"t c #adb2b8",
- -"y c #b0b6bb",
- -"u c #b3b8bd",
- -"i c #b7bcc1",
- -"p c #b8bdc2",
- -"a c #bdc1c6",
- -"s c #c3c7cb",
- -"d c #c5c9cd",
- -"f c #caced1",
- -"g c #cdd0d4",
- -"h c #d0d3d6",
- -"j c #d3d6d9",
- -"k c #d5d8da",
- -"l c #d8dbdd",
- -"z c #dbdde0",
- -"x c #e1e3e5",
- -"c c #e4e6e8",
- -"v c #e6e8e9",
- -"b c #eaeced",
- -"n c #eff0f1",
- -"m c #f3f4f5",
- -"M c #f6f7f8",
- -"N c #f7f8f8",
- -"B c #fefefe",
- -"V c None",
- -/* pixels */
- -"VVVVVVVVVVVVVVVV",
- -"VVVVVVVVVVVVVVVV",
- -"VVVVVVVVVNmmMmmB",
- -"VVVVVVVmw;=*=*=8",
- -"VVmfisx6#355553O",
- -"Ba>o+o#+iBmzbBm:",
- -"6@2tls9>mz>%jBeX",
- -"O8BBnBMqw%XeBd+>",
- -"+jBq-ij> .5Nx*.4",
- -"&mb$ .O .>bm1.=O",
- -"+lN0$5t:%lB6.1b1",
- -"+6BBvNN5aBc66cg+",
- -"8#2tgu6=tuuuuy:&",
- -"Na>OoX$#OOOOOO+r",
- -"VVmjugcvlzzzzzxN",
- -"VVVVVVVVVVVVVVVV"
- -};
- diff --git a/suite/extensions/irc/xpi/resources/install.rdf b/suite/extensions/irc/xpi/resources/install.rdf
- deleted file mode 100644
- --- a/suite/extensions/irc/xpi/resources/install.rdf
- +++ /dev/null
- @@ -1,45 +0,0 @@
- -<?xml version="1.0"?>
- -<!-- 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/. -->
- -
- -#filter substitution
- -
- -<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- - xmlns:em="http://www.mozilla.org/2004/em-rdf#">
- - <Description about="urn:mozilla:install-manifest">
- - <!-- core data -->
- - <em:id>{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}</em:id>
- - <em:version>@CHATZILLA_VERSION@</em:version>
- - <em:type>2</em:type>
- -
- - <!-- BEGIN COPY BETWEEN /xpi/resources/install.rdf AND /locales/generic/install.rdf -->
- - <em:targetApplication>
- - <Description>
- - <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
- - <em:minVersion>2.0</em:minVersion>
- - <em:maxVersion>@SEAMONKEY_MAXVERSION@</em:maxVersion>
- - </Description>
- - </em:targetApplication>
- - <!-- END COPY BETWEEN /xpi/resources/install.rdf AND /locales/generic/install.rdf -->
- -
- - <!-- front-end metadata -->
- - <em:name>ChatZilla</em:name>
- - <em:description>A clean, easy to use and highly extensible Internet Relay Chat (IRC) client.</em:description>
- - <em:creator>The ChatZilla Team</em:creator>
- - <em:contributor>Lim Chee Aun (graphics)</em:contributor>
- - <em:contributor>Robert Ginda</em:contributor>
- - <em:contributor>Gijs Kruitbosch</em:contributor>
- - <em:contributor>James Ross</em:contributor>
- - <em:contributor>Samuel Sieb</em:contributor>
- - <em:iconURL>chrome://chatzilla/skin/images/logo.png</em:iconURL>
- - <em:homepageURL>http://chatzilla.hacksrus.com/</em:homepageURL>
- - <em:aboutURL>chrome://chatzilla/content/about/about.xul</em:aboutURL>
- - <em:optionsURL>chrome://chatzilla/content/config.xul</em:optionsURL>
- - <em:multiprocessCompatible>true</em:multiprocessCompatible>
- -
- - <!-- Force unpack the xpi, otherwise window icons do not work
- - on Gecko 2.0 and higher. -->
- - <em:unpack>true</em:unpack>
- - </Description>
- -</RDF>
- diff --git a/suite/installer/package-manifest.in b/suite/installer/package-manifest.in
- --- a/suite/installer/package-manifest.in
- +++ b/suite/installer/package-manifest.in
- @@ -670,20 +670,18 @@ man/*
- #endif
-
- #ifdef MOZ_CLANG_RT_ASAN_LIB
- @BINPATH@/@MOZ_CLANG_RT_ASAN_LIB@
- #endif
-
- [chatzilla]
- #ifdef MOZ_IRC
- -@RESPATH@/extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi
- -#ifdef LOCALE_BUILD
- -@RESPATH@/extensions/langpack-@AB_CD@@chatzilla.mozilla.org.xpi
- -#endif
- +@RESPATH@/chrome/chatzilla@JAREXT@
- +@RESPATH@/chrome/chatzilla.manifest
- #endif
-
- [debugqa]
- #ifdef MOZ_PACKAGE_DEBUGQA
- @RESPATH@/extensions/debugQA@mozilla.org.xpi
- #endif
-
- #ifdef MOZ_CALENDAR
- diff --git a/suite/installer/windows/nsis/custom.nsi b/suite/installer/windows/nsis/custom.nsi
- --- a/suite/installer/windows/nsis/custom.nsi
- +++ b/suite/installer/windows/nsis/custom.nsi
- @@ -1,16 +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/.
-
- !macro checkSuiteComponents
- ; If no extensions are available skip the components page
- - ${Unless} ${FileExists} "$EXEDIR\optional\extensions\{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi"
- - ${AndUnless} ${FileExists} "$EXEDIR\optional\extensions\debugQA@mozilla.org.xpi"
- + ${Unless} ${FileExists} "$EXEDIR\optional\extensions\debugQA@mozilla.org.xpi"
- ${AndUnless} ${FileExists} "$EXEDIR\optional\extensions\{f13b157f-b174-47e7-a34d-4815ddfdfeb8}.xpi"
- Abort
- ${EndUnless}
- !macroend
-
- !macro createSuiteComponentsIni
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Type "label"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Text "$(OPTIONAL_COMPONENTS_LABEL)"
- @@ -22,39 +21,16 @@
- StrCpy $R1 2
- ; Top of checkbox
- StrCpy $R2 15
- ; Bottom of checkbox
- StrCpy $R3 25
- ; Seperation between titles/text
- StrCpy $R4 25
-
- - ${If} ${FileExists} "$EXEDIR\optional\extensions\{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi"
- - WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Type "checkbox"
- - WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Text "$(CHATZILLA_TITLE)"
- - WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Left "15"
- - WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Right "-1"
- - WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Top "$R2"
- - WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Bottom "$R3"
- - WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" State "1"
- - WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Flags "GROUP"
- - ${GetSize} "$EXEDIR\optional\extensions\{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi" "/S=0K" $0 $8 $9
- - ${If} ${FileExists} "$EXEDIR\optional\extensions\langpack-${AB_CD}@chatzilla.mozilla.org.xpi"
- - ${GetSize} "$EXEDIR\optional\extensions\langpack-${AB_CD}@chatzilla.mozilla.org.xpi" "/S=0K" $1 $8 $9
- - IntOp $0 $0 + $1
- - ${EndIf}
- - SectionSetSize ${CZ_IDX} $0
- - IntOp $R1 $R1 + 1
- - IntOp $R2 $R2 + $R4
- - IntOp $R3 $R3 + $R4
- - ${Else}
- - ; Hide ChatZilla in the components page if it isn't available.
- - SectionSetText ${CZ_IDX} ""
- - ${EndIf}
- -
- ${If} ${FileExists} "$EXEDIR\optional\extensions\debugQA@mozilla.org.xpi"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Type "checkbox"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Text "$(DEBUGQA_TITLE)"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Left "15"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Right "-1"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Top "$R2"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Bottom "$R3"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" State "1"
- @@ -70,28 +46,16 @@
- ${EndIf}
-
- ; Set new values for the top and bottom of labels
- ; Top of label box
- StrCpy $R2 27
- ; Bottom of label box
- StrCpy $R3 47
-
- - ${If} ${FileExists} "$EXEDIR\optional\extensions\{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi"
- - WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Type "label"
- - WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Text "$(CHATZILLA_TEXT)"
- - WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Left "30"
- - WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Right "-1"
- - WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Top "$R2"
- - WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Bottom "$R3"
- - IntOp $R1 $R1 + 1
- - IntOp $R2 $R2 + $R4
- - IntOp $R3 $R3 + $R4
- - ${EndIf}
- -
- ${If} ${FileExists} "$EXEDIR\optional\extensions\debugQA@mozilla.org.xpi"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Type "label"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Text "$(DEBUGQA_TEXT)"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Left "30"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Right "-1"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Top "$R2"
- WriteINIStr "$PLUGINSDIR\components.ini" "Field $R1" Bottom "$R3"
- IntOp $R1 $R1 + 1
- diff --git a/suite/installer/windows/nsis/installer.nsi b/suite/installer/windows/nsis/installer.nsi
- --- a/suite/installer/windows/nsis/installer.nsi
- +++ b/suite/installer/windows/nsis/installer.nsi
- @@ -196,32 +196,16 @@ Section "-InstallStartCleanup"
- ; can rename the file and then delete is when the system is restarted.
- Sleep 5000
- ${DeleteFile} "$INSTDIR\${FileMainEXE}"
- ClearErrors
- ${EndIf}
-
- ${If} $InstallType == ${INSTALLTYPE_CUSTOM}
- ; Custom installs.
- - ; If ChatZilla is installed and this install includes ChatZilla remove it
- - ; from the installation directory. This will remove it if the user
- - ; deselected ChatZilla on the components page.
- - ${If} ${FileExists} "$EXEDIR\optional\extensions\{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi"
- - ${DeleteFile} "$INSTDIR\extensions\{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi"
- - ${If} ${FileExists} "$INSTDIR\extensions\{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}"
- - RmDir /r "$INSTDIR\extensions\{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}"
- - ${EndIf}
- - ${EndIf}
- - ${If} ${FileExists} "$EXEDIR\optional\extensions\langpack-${AB_CD}@chatzilla.mozilla.org.xpi"
- - ${DeleteFile} "$INSTDIR\extensions\langpack-${AB_CD}@chatzilla.mozilla.org.xpi"
- - ${If} ${FileExists} "$INSTDIR\extensions\langpack-${AB_CD}@chatzilla.mozilla.org"
- - RmDir /r "$INSTDIR\extensions\langpack-${AB_CD}@chatzilla.mozilla.org"
- - ${EndIf}
- - ${EndIf}
- -
- ; If DebugQA is installed and this install includes DebugQA remove it
- ; from the installation directory. This will remove it if the user
- ; deselected DebugQA on the components page.
- ${If} ${FileExists} "$EXEDIR\optional\extensions\debugQA@mozilla.org.xpi"
- ${DeleteFile} "$INSTDIR\extensions\debugQA@mozilla.org.xpi"
- ${If} ${FileExists} "$INSTDIR\extensions\debugQA@mozilla.org"
- RmDir /r "$INSTDIR\extensions\debugQA@mozilla.org"
- ${EndIf}
- @@ -474,39 +458,16 @@ Section "-Application" APP_IDX
- ApplicationID::Set "$DESKTOP\${BrandFullName}.lnk" "$AppUserModelID"
- ${EndIf}
- ${LogMsg} "Added Shortcut: $DESKTOP\${BrandFullName}.lnk"
- ${EndIf}
-
- !insertmacro MUI_STARTMENU_WRITE_END
- SectionEnd
-
- -Section /o "IRC Client" CZ_IDX
- - ${If} ${FileExists} "$EXEDIR\optional\extensions\{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi"
- - SetDetailsPrint both
- - DetailPrint $(STATUS_INSTALL_OPTIONAL)
- - SetDetailsPrint none
- -
- - ${RemoveDir} "$INSTDIR\extensions\{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}"
- - ${RemoveDir} "$INSTDIR\extensions\langpack-${AB_CD}@chatzilla.mozilla.org"
- - ${DeleteFile} "$INSTDIR\extensions\{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi"
- - ${DeleteFile} "$INSTDIR\extensions\langpack-${AB_CD}@chatzilla.mozilla.org.xpi"
- - ${DeleteFile} "$INSTDIR\distribution\extensions\{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi"
- - ${DeleteFile} "$INSTDIR\distribution\extensions\langpack-${AB_CD}@chatzilla.mozilla.org.xpi"
- - ClearErrors
- - ${LogHeader} "Installing IRC Client"
- - CopyFiles /SILENT "$EXEDIR\optional\extensions\{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi" \
- - "$INSTDIR\extensions\"
- - ${If} ${FileExists} "$EXEDIR\optional\extensions\langpack-${AB_CD}@chatzilla.mozilla.org.xpi"
- - CopyFiles /SILENT "$EXEDIR\optional\extensions\langpack-${AB_CD}@chatzilla.mozilla.org.xpi" \
- - "$INSTDIR\extensions\"
- - ${EndIf}
- - ${EndIf}
- -SectionEnd
- -
- Section /o "Debug and QA Tools" DEBUG_IDX
- ${If} ${FileExists} "$EXEDIR\optional\extensions\debugQA@mozilla.org.xpi"
- SetDetailsPrint both
- DetailPrint $(STATUS_INSTALL_OPTIONAL)
- SetDetailsPrint none
-
- ${RemoveDir} "$INSTDIR\extensions\debugQA@mozilla.org"
- ${DeleteFile} "$INSTDIR\extensions\debugQA@mozilla.org.xpi"
- @@ -672,30 +633,19 @@ FunctionEnd
- Function preComponents
- ${CheckCustomCommon}
- !insertmacro checkSuiteComponents
- !insertmacro MUI_HEADER_TEXT "$(OPTIONAL_COMPONENTS_TITLE)" "$(OPTIONAL_COMPONENTS_SUBTITLE)"
- !insertmacro MUI_INSTALLOPTIONS_DISPLAY "components.ini"
- FunctionEnd
-
- Function leaveComponents
- - ; If ChatZilla exists then it will be Field 2.
- - ; If ChatZilla doesn't exist then debugQA will be Field 2).
- + ; If debugQA exists then it will be Field 2.
- StrCpy $R1 2
-
- - ${If} ${FileExists} "$EXEDIR\optional\extensions\{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi"
- - ${MUI_INSTALLOPTIONS_READ} $R0 "components.ini" "Field $R1" "State"
- - ; State will be 1 for checked and 0 for unchecked so we can use that to set
- - ; the section flags for installation.
- - SectionSetFlags ${CZ_IDX} $R0
- - IntOp $R1 $R1 + 1
- - ${Else}
- - SectionSetFlags ${CZ_IDX} 0 ; Disable install for chatzilla
- - ${EndIf}
- -
- ${If} ${FileExists} "$EXEDIR\optional\extensions\debugQA@mozilla.org.xpi"
- ${MUI_INSTALLOPTIONS_READ} $R0 "components.ini" "Field $R1" "State"
- ; State will be 1 for checked and 0 for unchecked so we can use that to set
- ; the section flags for installation.
- SectionSetFlags ${DEBUG_IDX} $R0
- IntOp $R1 $R1 + 1
- ${Else}
- SectionSetFlags ${DEBUG_IDX} 0 ; Disable install for debugQA
- @@ -823,20 +773,16 @@ Function preSummary
- GetDlgItem $0 $HWNDPARENT 1
- System::Call "user32::SetFocus(i r0, i 0x0007, i,i)i"
- ${MUI_INSTALLOPTIONS_READ} $1 "summary.ini" "Field 2" "HWND"
- SendMessage $1 ${WM_SETTEXT} 0 "STR:$INSTDIR"
- !insertmacro MUI_INSTALLOPTIONS_SHOW
- FunctionEnd
-
- Function leaveSummary
- - ${If} $InstallType != ${INSTALLTYPE_CUSTOM}
- - ; Set ChatZilla to be installed
- - SectionSetFlags ${CZ_IDX} 1
- - ${EndIf}
- ; Try to delete the app executable and if we can't delete it try to find the
- ; app's message window and prompt the user to close the app. This allows
- ; running an instance that is located in another directory. If for whatever
- ; reason there is no message window we will just rename the app's files and
- ; then remove them on restart.
- ClearErrors
- ${DeleteFile} "$INSTDIR\${FileMainEXE}"
- ${If} ${Errors}
- diff --git a/suite/locales/Makefile.in b/suite/locales/Makefile.in
- --- a/suite/locales/Makefile.in
- +++ b/suite/locales/Makefile.in
- @@ -108,64 +108,52 @@ PANELS_XTRA_FILE = $(call MERGE_FILE,pro
- profile/panels.rdf.in -o $@)
-
- libs:: $(FINAL_TARGET)/defaults/profile/bookmarks.html ;
- libs:: $(FINAL_TARGET)/defaults/profile/panels.rdf ;
-
- libs:: $(call MERGE_FILES,$(addprefix profile/chrome/,$(PROFILE_CHROME)))
- $(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile/chrome
-
- -# Extend l10n.mk clobber-% target for our localised extensions
- -ifdef MOZ_IRC
- -clobber-extensions-%:
- - $(RM) -rf $(DIST)/xpi-stage/chatzilla-$* $(DIST)/xpi-stage/chatzilla-*.$*.xpi
- -endif
- -
- libs-%: AB_CD=$*
- libs-%:
- # merge if we're not en-US. Conditional function because
- # we need the current value of AB_CD.
- $(if $(filter en-US,$(AB_CD)),, @$(MAKE) merge-$*)
- $(NSINSTALL) -D $(DIST)/install
- @$(MAKE) -C $(DEPTH)/toolkit/locales libs-$*
- # @$(MAKE) -C $(DEPTH)/services/sync/locales AB_CD=$* XPI_NAME=locale-$*
- @$(MAKE) -C ../../calendar/locales AB_CD=$* XPI_NAME=locale-$*
- ifdef MOZ_IRC
- - @$(MAKE) -C ../extensions/irc/locales libs-$*
- + @$(MAKE) -C ../extensions/irc/locales AB_CD=$* XPI_NAME=locale-$*
- endif
- ifdef MOZ_DEBUGQA
- @$(MAKE) -C ../extensions/debugQA/locales AB_CD=$* XPI_NAME=locale-$*
- endif
- @$(MAKE) -C $(DEPTH)/extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
- @$(MAKE) -B searchplugins AB_CD=$* XPI_NAME=locale-$*
- @$(MAKE) -C $(DEPTH)/devtools/client/locales AB_CD=$* XPI_NAME=locale-$*
- @$(MAKE) -C $(DEPTH)/devtools/shim/locales AB_CD=$* XPI_NAME=locale-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
- @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref
- @$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$*
-
- package-win32-installer: $(SUBMAKEFILES)
- $(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen ZIP_IN='$(ZIP_OUT)' installer
-
- repackage-extensions: $(STAGEDIST)
- -ifdef MOZ_IRC
- - $(MAKE) -C ../extensions/irc/locales repackage-zip-$(AB_CD) STAGEDIST=$(STAGEDIST)
- -endif
- $(MAKE) -C ../app pack-ext AB_CD=$(AB_CD) STAGEDIST=$(STAGEDIST)/extensions;
-
- langpack: langpack-$(AB_CD)
-
- # This is a generic target that will make a langpack, repack ZIP (+tarball)
- # builds, and repack and installer if applicable. It is called from the
- # tinderbox scripts. Alter it with caution.
- installers-%: IS_LANGUAGE_REPACK=1
- installers-%:
- @$(MAKE) clobber-$*
- -ifdef MOZ_IRC
- - @$(MAKE) clobber-extensions-%*
- -endif
- @$(MAKE) libs-$*
- @$(MAKE) package-langpack-$*
- @$(MAKE) repackage-zip-$*
- @$(MAKE) repackage-extensions AB_CD=$*
- ifeq (WINNT,$(OS_ARCH))
- @$(MAKE) package-win32-installer AB_CD=$*
- endif
- @echo 'repackaging done'
- @@ -191,20 +179,16 @@ ident:
- '$(STAGEDIST)/application.ini' App SourceStamp
- @printf 'moz_revision '
- @$(PYTHON) $(topsrcdir)/config/printconfigsetting.py \
- '$(STAGEDIST)/platform.ini' Build SourceStamp
- @printf 'buildid '
- @$(PYTHON) $(topsrcdir)/config/printconfigsetting.py \
- '$(STAGEDIST)/application.ini' App BuildID
-
- -ifdef MOZ_IRC
- -MOZ_PKG_EXTRAL10N += extensions/langpack-$(AB_CD)@chatzilla.mozilla.org=$(DIST)/xpi-stage/chatzilla-$(AB_CD)
- -endif
- -
- distribution:
- $(MAKE) -C $(DEPTH)/tools/update-packaging complete-patch PKG_INST_PATH=
- $(foreach locale,$(SHIPPED_LOCALES),$(MAKE) -C $(DEPTH)/comm/suite/locales/ installers-$(locale) MOZ_MAKE_COMPLETE_MAR=1 ;)
-
- SHIPPED_LOCALES_FILE = $(commtopsrcdir)/suite/locales/shipped-locales
- ifeq ($(OS_ARCH), WINNT)
- SHIPPED_FILTER = -e linux -e osx
- else ifeq ($(OS_ARCH), Darwin)
- diff --git a/suite/locales/en-US/installer/windows/custom.properties b/suite/locales/en-US/installer/windows/custom.properties
- --- a/suite/locales/en-US/installer/windows/custom.properties
- +++ b/suite/locales/en-US/installer/windows/custom.properties
- @@ -19,18 +19,16 @@
- # from en-US contains a \n.
-
- REG_APP_DESC=$BrandShortName delivers safe, easy web browsing. A familiar user interface, enhanced security features including protection from online identity theft, and integrated search let you get the most out of the web.
- OPTIONAL_COMPONENTS_TITLE=Choose Optional Components
- OPTIONAL_COMPONENTS_SUBTITLE=Choose which features of $BrandFullNameDA you want to install.
- OPTIONAL_COMPONENTS_LABEL=Optional Components:
- DEBUGQA_TITLE=Debug and QA UI
- DEBUGQA_TEXT=Provides additional debug and QA UI for $BrandShortName development.
- -CHATZILLA_TITLE=ChatZilla
- -CHATZILLA_TEXT=A clean, easy to use and highly extensible IRC client.
- CONTEXT_OPTIONS=$BrandShortName &Options
- CONTEXT_SAFE_MODE=$BrandShortName &Safe Mode
- SAFE_MODE=Safe Mode
- # MAILNEWS_TEXT appears in Windows (All) Programs menu as "SeaMonkey $(MAILNEWS_TEXT)"
- MAILNEWS_TEXT=Mail
- PROFILE_TEXT=Profile Manager
- OPTIONS_PAGE_TITLE=Setup Type
- OPTIONS_PAGE_SUBTITLE=Choose setup options
- diff --git a/suite/locales/l10n.ini b/suite/locales/l10n.ini
- --- a/suite/locales/l10n.ini
- +++ b/suite/locales/l10n.ini
- @@ -6,14 +6,15 @@
- depth = ../..
- all = suite/locales/all-locales
-
- [compare]
- dirs = suite
- suite/branding/seamonkey
-
- [includes]
- +chatzilla = suite/extensions/irc/locales/l10n.ini
- # include toolkit and services/sync from mozilla.
- # Don't specify which, use l10n-central.ini and friends if you're
- # not working on a local check-out
- toolkit = mozilla/toolkit/locales/l10n.ini
- services_sync = mozilla/services/sync/locales/l10n.ini
- devtools_client = mozilla/devtools/client/locales/l10n.ini
- diff --git a/suite/locales/l10n.toml b/suite/locales/l10n.toml
- --- a/suite/locales/l10n.toml
- +++ b/suite/locales/l10n.toml
- @@ -42,16 +42,19 @@ locales = [
- reference = "suite/branding/seamonkey/locales/en-US/**"
- l10n = "{l}suite/branding/seamonkey/**"
-
- [[paths]]
- reference = "{mozilla}/services/sync/locales/en-US/**"
- l10n = "{l}services/sync/**"
-
- [[includes]]
- + path = "suite/extensions/irc/locales/l10n.toml"
- +
- +[[includes]]
- path = "{mozilla}/toolkit/locales/l10n.toml"
-
- [[includes]]
- path = "calendar/locales/l10n.toml"
-
- [[includes]]
- path = "{mozilla}/devtools/client/locales/l10n.toml"
-
|