├── .gitignore
├── .gitmodules
├── .ycm_extra_conf.py
├── LICENSE
├── README.md
├── aclocal.m4
├── ambassador
├── Makefile.in
├── app.mozbuild
├── app
│ ├── Makefile.in
│ ├── ambassador.exe.manifest
│ ├── application.ini
│ ├── macbuild
│ │ └── Contents
│ │ │ ├── Info.plist.in
│ │ │ ├── MacOS-files.in
│ │ │ └── Resources
│ │ │ └── English.lproj
│ │ │ └── InfoPlist.strings.in
│ ├── macversion.py
│ ├── module.ver
│ ├── moz.build
│ ├── nsChatApp.cpp
│ ├── profile
│ │ ├── ambassador.js
│ │ ├── channel-prefs.js
│ │ ├── extensions
│ │ │ ├── moz.build
│ │ │ └── {972ce4c6-7e08-4474-a285-3208198ce6fd}
│ │ │ │ ├── Makefile.in
│ │ │ │ ├── icon.png
│ │ │ │ ├── install.rdf.in
│ │ │ │ └── moz.build
│ │ ├── pagethemes.rdf
│ │ └── prefs.js
│ └── splash.rc
├── branding
│ ├── VisualElements_150.png
│ ├── VisualElements_70.png
│ ├── ambassador-branding.js
│ ├── ambassador-window.ico
│ ├── ambassador-window16.png
│ ├── ambassador-window32.png
│ ├── ambassador-window48.png
│ ├── ambassador.VisualElementsManifest.xml
│ ├── ambassador.desktop
│ ├── ambassador.icns
│ ├── appname.bmp
│ ├── background.png
│ ├── branding.nsi
│ ├── configure.sh
│ ├── disk.icns
│ ├── document.icns
│ ├── dsstore
│ ├── firefox.icns
│ ├── jar.mn
│ ├── locales
│ │ ├── en-US
│ │ │ ├── brand.dtd
│ │ │ └── brand.properties
│ │ ├── jar.mn
│ │ └── moz.build
│ ├── logo-256.png
│ ├── logo-512.png
│ ├── logo-64.png
│ ├── moz.build
│ ├── mozicon128.png
│ ├── wizHeader.bmp
│ ├── wizHeaderRTL.bmp
│ └── wizWatermark.bmp
├── build.mk
├── components
│ ├── AddonComponents.manifest
│ ├── AppComponents.manifest
│ ├── ambassador-service.js
│ ├── devtools
│ │ ├── devtools-loader.js
│ │ ├── devtools-loader.manifest
│ │ ├── irc-root-actor.js
│ │ ├── jar.mn
│ │ ├── moz.build
│ │ ├── webconsole-overlay.js
│ │ └── webconsole-overlay.xul
│ └── moz.build
├── config
│ └── version.txt
├── confvars.sh
├── installer
│ ├── Makefile.in
│ ├── package-manifest.in
│ ├── removed-files.in
│ └── windows
│ │ ├── Makefile.in
│ │ ├── app.tag
│ │ ├── moz.build
│ │ └── nsis
│ │ ├── defines.nsi.in
│ │ ├── installer.nsi
│ │ ├── shared.nsh
│ │ ├── uninstaller.nsi
│ │ └── updater_append.ini
├── jar.mn
├── js
│ ├── lib
│ │ ├── command-manager.js
│ │ ├── connection-xpcom.js
│ │ ├── dcc.js
│ │ ├── events.js
│ │ ├── file-utils.js
│ │ ├── http.js
│ │ ├── ident.js
│ │ ├── irc-debug.js
│ │ ├── irc.js
│ │ ├── json-serializer.js
│ │ ├── menu-manager.js
│ │ ├── message-manager.js
│ │ ├── pref-manager.js
│ │ ├── sts.js
│ │ ├── text-logger.js
│ │ ├── text-serializer.js
│ │ └── utils.js
│ └── tests
│ │ ├── DP.js
│ │ ├── ircbot.js
│ │ ├── mingus.js
│ │ ├── mybot.js
│ │ ├── test_matchobject.js
│ │ └── toys.js
├── locales
│ ├── Makefile.in
│ ├── all-locales
│ ├── en-US
│ │ ├── ambassador-l10n.js
│ │ ├── chrome
│ │ │ ├── about.dtd
│ │ │ ├── ambassador.dtd
│ │ │ ├── ambassador.properties
│ │ │ ├── ambassadorOverlay.dtd
│ │ │ ├── browserOverlay.dtd
│ │ │ ├── channels.dtd
│ │ │ ├── config.dtd
│ │ │ ├── extensionsOverlay.properties
│ │ │ ├── install-plugin.dtd
│ │ │ ├── messengerOverlay.dtd
│ │ │ ├── networks-list.dtd
│ │ │ ├── pref-irc.dtd
│ │ │ └── security-info.dtd
│ │ ├── defines.inc
│ │ └── installer
│ │ │ ├── custom.properties
│ │ │ ├── mui.properties
│ │ │ └── override.properties
│ ├── generic
│ │ └── install.rdf
│ ├── jar.mn
│ ├── l10n.ini
│ └── moz.build
├── maxversions.mk
├── moz.build
├── moz.configure
├── xpi
│ ├── Makefile.in
│ ├── install.rdf
│ └── moz.build
└── xul
│ ├── content
│ ├── about
│ │ ├── about.js
│ │ └── about.xul
│ ├── ambassador.xul
│ ├── ambassadorOverlay.js
│ ├── ambassadorOverlay.xul
│ ├── bk
│ │ └── overlay.xul
│ ├── browserOverlay.xul
│ ├── channels.js
│ ├── channels.xul
│ ├── commands.js
│ ├── config-add.js
│ ├── config-add.xul
│ ├── config.css
│ ├── config.js
│ ├── config.xul
│ ├── devtools.js
│ ├── dynamic.css
│ ├── extensions
│ │ ├── extensionsOverlay.js
│ │ └── extensionsOverlay.xul
│ ├── handlers.js
│ ├── il
│ │ └── overlay.xul
│ ├── install-plugin
│ │ ├── install-plugin.js
│ │ └── install-plugin.xul
│ ├── menus.js
│ ├── menus.xul
│ ├── messages.js
│ ├── messengerOverlay.xul
│ ├── mungers.js
│ ├── networks-list.css
│ ├── networks-list.js
│ ├── networks-list.xul
│ ├── networks.js
│ ├── output-base.css
│ ├── output-window.html
│ ├── output-window.js
│ ├── pm
│ │ └── overlay.xul
│ ├── popups.xul
│ ├── pref-irc-toolkit.xul
│ ├── pref-irc.xul
│ ├── prefs.js
│ ├── prefsOverlay.xul
│ ├── scripts.xul
│ ├── security-info.js
│ ├── security-info.xul
│ └── static.js
│ ├── lib
│ ├── listbox.js
│ ├── munger.js
│ └── tree-utils.js
│ └── skin
│ ├── about.css
│ ├── ambassador.css
│ ├── ambassadorOverlay.css
│ ├── browserOverlay.css
│ ├── channels.css
│ ├── extensionsOverlay.css
│ ├── images
│ ├── admin-graphic.png
│ ├── admin-symbol.png
│ ├── arrow-down.png
│ ├── drop-indicator-bottom.png
│ ├── face-alien.png
│ ├── face-angry.png
│ ├── face-arrow.png
│ ├── face-confused.png
│ ├── face-cool.png
│ ├── face-cry.png
│ ├── face-dizzy-back.png
│ ├── face-dizzy.png
│ ├── face-eek.png
│ ├── face-evil.png
│ ├── face-exclaim.png
│ ├── face-idea.png
│ ├── face-laugh.png
│ ├── face-lol.png
│ ├── face-mrgreen.png
│ ├── face-normal.png
│ ├── face-question.png
│ ├── face-razz.png
│ ├── face-red.png
│ ├── face-rofl.png
│ ├── face-rolleyes.png
│ ├── face-sad.png
│ ├── face-smile.png
│ ├── face-surprised.png
│ ├── face-tongue.png
│ ├── face-wink.png
│ ├── founder-graphic.png
│ ├── founder-symbol.png
│ ├── halfop-graphic.png
│ ├── halfop-symbol.png
│ ├── input-send.png
│ ├── logging-off.png
│ ├── logging-on.png
│ ├── multiline-contract.png
│ ├── multiline-expand.png
│ ├── no-graphic.png
│ ├── no-symbol.png
│ ├── offline.png
│ ├── online.png
│ ├── op-graphic.png
│ ├── op-symbol.png
│ ├── secure-broken.png
│ ├── secure-low.png
│ ├── secure.png
│ ├── source_png
│ │ ├── spbubble-off.png
│ │ └── spbubble-on.png
│ ├── source_svg
│ │ ├── logging.svg
│ │ └── userlist_icons.svg
│ ├── spbubble-off.png
│ ├── spbubble-on.png
│ ├── voice-graphic.png
│ └── voice-symbol.png
│ ├── install-plugin.css
│ ├── messengerOverlay.css
│ ├── output-dark.css
│ ├── output-default.css
│ ├── output-light.css
│ └── security-info.css
├── build
├── autoconf
│ ├── config.guess
│ ├── mozconfig-find
│ └── mozconfig2client-mk
├── dumbmake-dependencies
├── mach_bootstrap.py
├── pymake
│ └── make.py
└── pypng
│ ├── check-sync-exceptions
│ ├── exnumpy.py
│ ├── iccp.py
│ ├── mkiccp.py
│ ├── pdsimgtopng
│ ├── pipasgrey
│ ├── pipcat
│ ├── pipcolours
│ ├── pipcomposite
│ ├── pipdither
│ ├── piprgb
│ ├── pipscalez
│ ├── pipstack
│ ├── pipwindow
│ ├── plan9topng.py
│ ├── pngchunk
│ ├── pnghist
│ ├── pnglsch
│ └── texttopng
├── client.mk
├── config
├── baseconfig.mk
├── config.mk
├── configobj.py
├── makefiles
│ ├── autotargets.mk
│ └── makeutils.mk
├── printconfigsetting.py
├── recurse.mk
└── rules.mk
├── configure.in
├── configure.py
├── mach
├── moz.build
└── moz.configure
/.gitignore:
--------------------------------------------------------------------------------
1 | # .gitignore - List of filenames git should ignore
2 |
3 | # Filenames that should be ignored wherever they appear
4 | *~
5 | *.rej
6 | *.orig
7 | *.pyc
8 | *.pyo
9 | TAGS
10 | tags
11 | ID
12 | .DS_Store*
13 |
14 | # Vim swap files.
15 | .*.sw[a-z]
16 |
17 | # User files that may appear at the root
18 | /.mozconfig*
19 | /mozconfig
20 | /configure
21 | /config.cache
22 | /config.log
23 | /.clang_complete
24 | /mach.ini
25 |
26 | # Ignore the files and directory that Eclipse IDE creates
27 | .project
28 | .cproject
29 | .settings/
30 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "platform"]
2 | path = platform
3 | url = https://github.com/MoonchildProductions/UXP
4 |
--------------------------------------------------------------------------------
/.ycm_extra_conf.py:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | import imp, os, sys
6 |
7 | old_bytecode = sys.dont_write_bytecode
8 | sys.dont_write_bytecode = True
9 |
10 | ycm_module = imp.load_source("_ycm_extra_conf", os.path.join("mozilla", ".ycm_extra_conf.py"))
11 |
12 | sys.dont_write_bytecode = old_bytecode
13 |
14 | # Expose the FlagsForFile function from mozilla/.ycm_extra_conf.py
15 | FlagsForFile = ycm_module.FlagsForFile
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Ambassador
2 |
3 | Ambassador is a fork of the ChatZilla IRC client built upon the [Unified XUL Platform](https://github.com/moonchildproductions/uxp). It features a simple, straighforward interface with a number of options for customization and extensibility. It is available as an add-on compatible with other applications built upon UXP, and as a stand-alone package that can be installed and run independently of a browser.
4 |
5 | ## Platform Support
6 |
7 | The add-on is compatible with the following UXP-based applications:
8 | - [Pale Moon](http://www.palemoon.org/)
9 | - [Basilisk](http://basilisk-browser.org/)
10 | - [Interlink](http://binaryoutcast.com/projects/interlink/)
11 |
12 | The stand-alone version can be downloaded in the following formats:
13 | - Windows 64-bit installer
14 | - Windows 64-bit ZIP archive
15 | - Windows 32-bit installer
16 | - Windows 32-bit ZIP archive
17 | - Mac OS X 64-bit DMG file
18 | - Linux 64-bit tarball
19 |
20 | ## Features
21 |
22 | Ambassador includes most of the features found in ChatZilla, along with some unique features of its own.
23 | - IRCv3 support
24 | - Password management
25 | - A window for viewing secure connection details
26 | - An editor for the built-in networks list
27 | - CTCP request notifications
28 | - Several new commands
29 | - Emoji support
30 | - Removed CEIP
31 |
32 | Please see the [release notes](https://github.com/Ascrod/ambassador/releases/) for further details on these new features.
33 |
--------------------------------------------------------------------------------
/aclocal.m4:
--------------------------------------------------------------------------------
1 | dnl
2 | dnl Local autoconf macros used with UXP
3 | dnl The contents of this file are under the Public Domain.
4 | dnl
5 |
6 | builtin(include, platform/build/autoconf/toolchain.m4)dnl
7 | builtin(include, platform/build/autoconf/config.status.m4)dnl
8 | builtin(include, platform/build/autoconf/nspr.m4)dnl
9 | builtin(include, platform/build/autoconf/nss.m4)dnl
10 | builtin(include, platform/build/autoconf/pkg.m4)dnl
11 | builtin(include, platform/build/autoconf/codeset.m4)dnl
12 | builtin(include, platform/build/autoconf/altoptions.m4)dnl
13 | builtin(include, platform/build/autoconf/mozprog.m4)dnl
14 | builtin(include, platform/build/autoconf/acwinpaths.m4)dnl
15 | builtin(include, platform/build/autoconf/lto.m4)dnl
16 | builtin(include, platform/build/autoconf/frameptr.m4)dnl
17 | builtin(include, platform/build/autoconf/compiler-opts.m4)dnl
18 | builtin(include, platform/build/autoconf/zlib.m4)dnl
19 | builtin(include, platform/build/autoconf/expandlibs.m4)dnl
20 |
21 | MOZ_PROG_CHECKMSYS()
22 |
23 | # Read the user's .mozconfig script. We can't do this in
24 | # configure.in: autoconf puts the argument parsing code above anything
25 | # expanded from configure.in, and we need to get the configure options
26 | # from .mozconfig in place before that argument parsing code.
27 | dnl MOZ_READ_MOZCONFIG(platform)
28 |
--------------------------------------------------------------------------------
/ambassador/Makefile.in:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | include $(topsrcdir)/config/rules.mk
6 |
7 | ifdef MAKENSISU
8 |
9 | # For Windows build the uninstaller during the application build since the
10 | # uninstaller is included with the application for mar file generation.
11 | libs::
12 | $(MAKE) -C installer/windows uninstaller
13 | endif
14 |
--------------------------------------------------------------------------------
/ambassador/app.mozbuild:
--------------------------------------------------------------------------------
1 | # vim: set filetype=python:
2 | # This Source Code Form is subject to the terms of the Mozilla Public
3 | # License, v. 2.0. If a copy of the MPL was not distributed with this
4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 |
6 | include('/platform/toolkit/toolkit.mozbuild')
7 |
8 | if CONFIG['MOZ_EXTENSIONS']:
9 | DIRS += ['/extensions']
10 |
11 | DIRS += [
12 | '/%s' % CONFIG['MOZ_BRANDING_DIRECTORY'],
13 | '/ambassador',
14 | ]
15 |
--------------------------------------------------------------------------------
/ambassador/app/Makefile.in:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | dist_dest = $(DIST)/$(MOZ_MACBUNDLE_NAME)
6 |
7 | # hardcode en-US for the moment
8 | AB_CD = en-US
9 |
10 | DEFINES += \
11 | -DAB_CD=$(AB_CD) \
12 | -DAPP_VERSION="$(MOZ_APP_VERSION)" \
13 | -DAMBASSADOR_ICO=\"$(DIST)/branding/ambassador-window.ico\" \
14 | $(NULL)
15 |
16 | # Build a binary bootstrapping with XRE_main
17 |
18 | ifndef MOZ_WINCONSOLE
19 | ifdef MOZ_DEBUG
20 | MOZ_WINCONSOLE = 1
21 | else
22 | MOZ_WINCONSOLE = 0
23 | endif
24 | endif
25 |
26 | # This switches $(INSTALL) to copy mode, like $(SYSINSTALL), so things that
27 | # shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall.
28 | NSDISTMODE = copy
29 |
30 | include $(topsrcdir)/config/config.mk
31 |
32 | include $(topsrcdir)/config/rules.mk
33 |
34 | ifeq ($(OS_ARCH),WINNT)
35 | # Rebuild firefox.exe if the manifest changes - it's included by splash.rc.
36 | # (this dependency should really be just for firefox.exe, not other targets)
37 | EXTRA_DEPS += $(PROGRAM).manifest
38 | endif
39 |
40 | PROGRAMS_DEST = $(DIST)/bin
41 |
42 | ifneq (,$(filter-out WINNT,$(OS_ARCH)))
43 |
44 | ifdef COMPILE_ENVIRONMENT
45 | libs::
46 | cp -p $(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
47 | endif
48 |
49 | GARBAGE += $(addprefix $(FINAL_TARGET)/defaults/pref/, ambassador.js)
50 |
51 | endif
52 |
53 | ifndef LIBXUL_SDK
54 | # channel-prefs.js is handled separate from other prefs due to bug 756325
55 | libs:: $(srcdir)/profile/channel-prefs.js
56 | $(NSINSTALL) -D $(DIST)/bin/defaults/pref
57 | $(call py_action,preprocessor,-Fsubstitution $(PREF_PPFLAGS) $(ACDEFINES) $^ -o $(DIST)/bin/defaults/pref/channel-prefs.js)
58 | endif
59 |
60 | ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
61 |
62 | MAC_APP_NAME = $(MOZ_APP_DISPLAYNAME)
63 |
64 | ifdef MOZ_DEBUG
65 | MAC_APP_NAME := $(MAC_APP_NAME)Debug
66 | endif
67 |
68 | AB_CD = $(MOZ_UI_LOCALE)
69 |
70 | AB := $(firstword $(subst -, ,$(AB_CD)))
71 |
72 | clean clobber repackage::
73 | $(RM) -r $(dist_dest)
74 |
75 | MAC_BUNDLE_VERSION = $(shell $(PYTHON) $(srcdir)/macversion.py --version=$(MOZ_APP_VERSION) --buildid=$(DEPTH)/buildid.h)
76 |
77 | .PHONY: repackage
78 | tools repackage:: $(PROGRAM)
79 | $(MKDIR) -p $(dist_dest)/Contents/MacOS
80 | $(MKDIR) -p $(dist_dest)/Contents/Resources/$(AB).lproj
81 | rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents $(dist_dest) --exclude English.lproj
82 | rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(dist_dest)/Contents/Resources/$(AB).lproj
83 | sed -e 's/%APP_VERSION%/$(MOZ_APP_VERSION)/' -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' -e 's/%MOZ_MACBUNDLE_ID%/$(MOZ_MACBUNDLE_ID)/' -e 's/%MAC_BUNDLE_VERSION%/$(MAC_BUNDLE_VERSION)/' $(srcdir)/macbuild/Contents/Info.plist.in > $(dist_dest)/Contents/Info.plist
84 | sed -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(dist_dest)/Contents/Resources/$(AB).lproj/InfoPlist.strings
85 | rsync -a --exclude-from='$(srcdir)/macbuild/Contents/MacOS-files.in' $(DIST)/bin/ $(dist_dest)/Contents/Resources
86 | rsync -a --include-from='$(srcdir)/macbuild/Contents/MacOS-files.in' --exclude '*' $(DIST)/bin/ $(dist_dest)/Contents/MacOS
87 | $(RM) $(dist_dest)/Contents/MacOS/$(PROGRAM)
88 | rsync -aL $(PROGRAM) $(dist_dest)/Contents/MacOS
89 | cp -RL $(DIST)/branding/firefox.icns $(dist_dest)/Contents/Resources/firefox.icns
90 | cp -RL $(DIST)/branding/document.icns $(dist_dest)/Contents/Resources/document.icns
91 | printf APPLMOZB > $(dist_dest)/Contents/PkgInfo
92 | endif
93 |
94 |
95 |
--------------------------------------------------------------------------------
/ambassador/app/ambassador.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 | Ambassador
10 |
11 |
12 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | true/PM
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/ambassador/app/application.ini:
--------------------------------------------------------------------------------
1 | #if MOZ_APP_STATIC_INI
2 | #ifdef MOZ_BUILD_APP_IS_BROWSER
3 | ; This file is not used. If you modify it and want the application to use
4 | ; your modifications, move it under the browser/ subdirectory and start with
5 | ; the "-app /path/to/browser/application.ini" argument.
6 | #else
7 | ; This file is not used. If you modify it and want the application to use
8 | ; your modifications, start with the "-app /path/to/application.ini"
9 | ; argument.
10 | #endif
11 | #endif
12 | #if 0
13 | ; This Source Code Form is subject to the terms of the Mozilla Public
14 | ; License, v. 2.0. If a copy of the MPL was not distributed with this
15 | ; file, You can obtain one at http://mozilla.org/MPL/2.0/.
16 | #endif
17 | #filter substitution
18 | #include @TOPOBJDIR@/buildid.h
19 | #include @TOPOBJDIR@/source-repo.h
20 |
21 | [App]
22 | # Vendor=@MOZ_APP_VENDOR@
23 | Vendor=Ascrod
24 | # Name=@MOZ_APP_BASENAME@
25 | Name=Ambassador
26 | RemotingName=@MOZ_APP_REMOTINGNAME@
27 | #ifdef MOZ_APP_DISPLAYNAME
28 | CodeName=@MOZ_APP_DISPLAYNAME@
29 | #endif
30 | Version=@MOZ_APP_VERSION@
31 | #ifdef MOZ_APP_PROFILE
32 | Profile=@MOZ_APP_PROFILE
33 | #endif
34 | BuildID=@MOZ_BUILDID@
35 | #ifdef MOZ_SOURCE_STAMP
36 | SourceStamp=@MOZ_SOURCE_STAMP@
37 | #endif
38 | ID=@MOZ_APP_ID@
39 |
40 | [Gecko]
41 | MinVersion=@GRE_MILESTONE@
42 | MaxVersion=@GRE_MILESTONE@
43 |
44 | [XRE]
45 | EnableExtensionManager=Truly, yes.
46 |
--------------------------------------------------------------------------------
/ambassador/app/macbuild/Contents/Info.plist.in:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleInfoDictionaryVersion6.0
6 | CFBundleIdentifiercom.ascrod.ambassador
7 | CFBundlePackageTypeAPPL
8 | CFBundleExecutableambassador
9 | CFBundleIconFileambassador.icns
10 | NSAppleScriptEnabled
11 | CFBundleNameAmbassador
12 | CFBundleDisplayNameAmbassador
13 | CFBundleGetInfoStringAmbassador @REVISION@
14 | CFBundleShortVersionString@REVISION@
15 | CFBundleVersion@REVISION@.@BUILDID@
16 |
17 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/ambassador/app/macbuild/Contents/MacOS-files.in:
--------------------------------------------------------------------------------
1 | /*.app/***
2 | /*.dylib
3 | /certutil
4 | ambassador-bin
5 | /gtest/***
6 | /pk12util
7 | /ssltunnel
8 | /xpcshell
9 | /XUL
10 |
--------------------------------------------------------------------------------
/ambassador/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | CFBundleName = "%MAC_APP_NAME%";
6 |
--------------------------------------------------------------------------------
/ambassador/app/macversion.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # This Source Code Form is subject to the terms of the Mozilla Public
3 | # License, v. 2.0. If a copy of the MPL was not distributed with this
4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 |
6 |
7 | from optparse import OptionParser
8 | import sys
9 | import re
10 |
11 | o = OptionParser()
12 | o.add_option("--buildid", dest="buildid")
13 | o.add_option("--version", dest="version")
14 |
15 | (options, args) = o.parse_args()
16 |
17 | if not options.buildid:
18 | print >>sys.stderr, "--buildid is required"
19 | sys.exit(1)
20 |
21 | if not options.version:
22 | print >>sys.stderr, "--version is required"
23 | sys.exit(1)
24 |
25 | # We want to build a version number that matches the format allowed for
26 | # CFBundleVersion (nnnnn[.nn[.nn]]). We'll incorporate both the version
27 | # number as well as the date, so that it changes at least daily (for nightly
28 | # builds), but also so that newly-built older versions (e.g. beta build) aren't
29 | # considered "newer" than previously-built newer versions (e.g. a trunk nightly)
30 |
31 | define, MOZ_BUILDID, buildid = open(options.buildid, 'r').read().split()
32 |
33 | # extract only the major version (i.e. "14" from "14.0b1")
34 | majorVersion = re.match(r'^(\d+)[^\d].*', options.version).group(1)
35 | # last two digits of the year
36 | twodigityear = buildid[2:4]
37 | month = buildid[4:6]
38 | if month[0] == '0':
39 | month = month[1]
40 | day = buildid[6:8]
41 | if day[0] == '0':
42 | day = day[1]
43 |
44 | print '%s.%s.%s' % (majorVersion + twodigityear, month, day)
45 |
--------------------------------------------------------------------------------
/ambassador/app/module.ver:
--------------------------------------------------------------------------------
1 | WIN32_MODULE_COMPANYNAME=Ascrod
2 | WIN32_MODULE_COPYRIGHT=Available under the MPL 2.0.
3 | WIN32_MODULE_PRODUCTVERSION=@MOZ_APP_WINVERSION@
4 | WIN32_MODULE_PRODUCTVERSION_STRING=@MOZ_APP_VERSION@
5 | WIN32_MODULE_TRADEMARKS=
6 | WIN32_MODULE_DESCRIPTION=@MOZ_APP_DISPLAYNAME@
7 | WIN32_MODULE_PRODUCTNAME=@MOZ_APP_DISPLAYNAME@
8 | WIN32_MODULE_NAME=@MOZ_APP_DISPLAYNAME@
9 |
--------------------------------------------------------------------------------
/ambassador/app/moz.build:
--------------------------------------------------------------------------------
1 | # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
2 | # vim: set filetype=python:
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | DIRS += ['profile/extensions']
8 |
9 |
10 | GeckoProgram(CONFIG['MOZ_APP_NAME'])
11 |
12 | JS_PREFERENCE_PP_FILES += [
13 | 'profile/ambassador.js',
14 | ]
15 |
16 | if CONFIG['LIBXUL_SDK']:
17 | PREF_JS_EXPORTS += [
18 | 'profile/channel-prefs.js',
19 | ]
20 |
21 | SOURCES += [
22 | 'nsChatApp.cpp',
23 | ]
24 |
25 | FINAL_TARGET_FILES.defaults.profile += ['profile/prefs.js']
26 |
27 | DEFINES['APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
28 |
29 | LOCAL_INCLUDES += [
30 | '!/build',
31 | ]
32 |
33 | LOCAL_INCLUDES += [
34 | '/platform/toolkit/xre',
35 | '/platform/xpcom/base',
36 | '/platform/xpcom/build',
37 | ]
38 |
39 | USE_LIBS += [
40 | 'mozglue',
41 | ]
42 |
43 | if CONFIG['_MSC_VER']:
44 | # Always enter a Windows program through wmain, whether or not we're
45 | # a console application.
46 | WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
47 |
48 | if CONFIG['OS_ARCH'] == 'WINNT':
49 | RCINCLUDE = 'splash.rc'
50 | DEFINES['MOZ_PHOENIX'] = True
51 |
52 | # Control the default heap size.
53 | # This is the heap returned by GetProcessHeap().
54 | # As we use the CRT heap, the default size is too large and wastes VM.
55 | #
56 | # The default heap size is 1MB on Win32.
57 | # The heap will grow if need be.
58 | #
59 | # Set it to 256k. See bug 127069.
60 | if CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['GNU_CC']:
61 | LDFLAGS += ['/HEAP:0x40000']
62 |
63 | DISABLE_STL_WRAPPING = True
64 |
65 | if CONFIG['MOZ_LINKER']:
66 | OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
67 |
68 | if CONFIG['HAVE_CLOCK_MONOTONIC']:
69 | OS_LIBS += CONFIG['REALTIME_LIBS']
70 |
--------------------------------------------------------------------------------
/ambassador/app/profile/ambassador.js:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | // This is needed to start Ambassador.
6 | pref("toolkit.defaultChromeURI", "chrome://ambassador/content/ambassador.xul");
7 |
8 | // Enable the extension manager.
9 | pref("xpinstall.dialog.confirm", "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul");
10 | pref("xpinstall.dialog.progress.skin", "chrome://mozapps/content/extensions/extensions.xul?type=themes");
11 | pref("xpinstall.dialog.progress.chrome", "chrome://mozapps/content/extensions/extensions.xul?type=extensions");
12 | pref("xpinstall.dialog.progress.type.skin", "Extension:Manager-themes");
13 | pref("xpinstall.dialog.progress.type.chrome", "Extension:Manager-extensions");
14 | pref("extensions.update.enabled", true);
15 | pref("extensions.update.interval", 86400);
16 | pref("extensions.dss.enabled", false);
17 | pref("extensions.dss.switchPending", false);
18 | pref("extensions.ignoreMTimeChanges", false);
19 | pref("extensions.logging.enabled", false);
20 | pref("general.skins.selectedSkin", "classic/1.0");
21 | pref("extensions.getAddons.cache.enabled", true);
22 |
23 | // This means nothing because APO doesn't host Ambassador extensions,
24 | // but I have to put something or the extension manager pukes.
25 | pref("extensions.update.url", "https://addons.palemoon.org/");
26 |
27 | pref("extensions.getAddons.showPane", false);
28 | pref("extensions.logging.enabled", false);
29 | pref("extensions.strictCompatibility", true);
30 | pref("extensions.minCompatibleAppVersion", "1.0");
31 |
32 | // Make the external protocol service happy
33 | pref("network.protocol-handler.expose-all", false);
34 | pref("network.protocol-handler.expose.irc", true);
35 | pref("network.protocol-handler.expose.ircs", true);
36 | pref("security.dialog_enable_delay", 0);
37 |
38 | // Update prefs
39 |
40 | // Always prompt by default.
41 | pref("app.update.enabled", true);
42 | pref("app.update.auto", false);
43 | pref("app.update.silent", false);
44 | pref("app.update.mode", 0);
45 | pref("app.update.incompatible.mode", 0);
46 |
47 | pref("app.update.url", "http://chatzilla.rdmsoft.com/xulrunner/update/2/%CHANNEL%?v=%VERSION%&b=%BUILD_ID%&o=%BUILD_TARGET%&ov=%OS_VERSION%&pv=%PLATFORM_VERSION%&");
48 | pref("app.update.url.manual", "https://github.com/ascrod/ambassador/");
49 | pref("app.update.url.details", "https://github.com/ascrod/ambassador/");
50 |
51 | // Check every day, if download or install is deferred ask again each day.
52 | pref("app.update.interval", 86400);
53 | pref("app.update.nagTimer.download", 86400);
54 | pref("app.update.nagTimer.restart", 86400);
55 | pref("app.update.timer", 600000);
56 |
57 | // Seems to be broken, and nothing else uses it.
58 | pref("app.update.showInstalledUI", false);
59 |
60 | // Disable SSL session tickets and cache.
61 | // Most servers don't handle them properly, making reconnects a pain, and
62 | // long-term connections don't benefit much from the performance gains.
63 | pref("security.ssl.disable_session_identifiers", true);
64 |
--------------------------------------------------------------------------------
/ambassador/app/profile/channel-prefs.js:
--------------------------------------------------------------------------------
1 | #filter substitution
2 | /* This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 |
6 | pref("app.update.channel", "@MOZ_UPDATE_CHANNEL@");
7 |
--------------------------------------------------------------------------------
/ambassador/app/profile/extensions/moz.build:
--------------------------------------------------------------------------------
1 | # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
2 | # vim: set filetype=python:
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | DIRS += ['{972ce4c6-7e08-4474-a285-3208198ce6fd}']
8 |
--------------------------------------------------------------------------------
/ambassador/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/Makefile.in:
--------------------------------------------------------------------------------
1 | #
2 | # This Source Code Form is subject to the terms of the Mozilla Public
3 | # License, v. 2.0. If a copy of the MPL was not distributed with this
4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 |
6 | FILES := \
7 | install.rdf.in \
8 | $(NULL)
9 | FILES_PATH = $(FINAL_TARGET)/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
10 | PP_TARGETS := FILES
11 |
12 | ICON_FILES := icon.png
13 | ICON_DEST = $(FINAL_TARGET)/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
14 | INSTALL_TARGETS += ICON
15 |
--------------------------------------------------------------------------------
/ambassador/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png
--------------------------------------------------------------------------------
/ambassador/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf.in:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | #filter substitution
8 |
9 |
11 |
12 |
13 | {972ce4c6-7e08-4474-a285-3208198ce6fd}
14 | @MOZ_APP_VERSION@
15 |
16 |
18 |
19 |
20 | @MOZ_APP_ID@
21 | @MOZ_APP_VERSION@
22 | @MOZ_APP_VERSION@
23 |
24 |
25 |
26 |
27 | Default
28 | The default theme.
29 |
30 |
31 | Ascrod
32 | classic/1.0
33 | true
34 | true
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ambassador/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/moz.build:
--------------------------------------------------------------------------------
1 | # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
2 | # vim: set filetype=python:
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
8 | DEFINES['MOZ_APP_ID'] = CONFIG['MOZ_APP_ID']
--------------------------------------------------------------------------------
/ambassador/app/profile/pagethemes.rdf:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ambassador/app/profile/prefs.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | # Mozilla User Preferences
6 |
7 | /* Do not edit this file.
8 | *
9 | * If you make changes to this file while the browser is running,
10 | * the changes will be overwritten when the browser exits.
11 | *
12 | * To make a manual change to preferences, you can visit the URL about:config
13 | */
14 |
--------------------------------------------------------------------------------
/ambassador/app/splash.rc:
--------------------------------------------------------------------------------
1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 | /* This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 |
6 | #include
7 | #include "nsNativeAppSupportWin.h"
8 |
9 | 1 24 "ambassador.exe.manifest"
10 |
11 | IDI_APPICON ICON AMBASSADOR_ICO
12 | IDI_APPLICATION ICON AMBASSADOR_ICO
13 |
14 | STRINGTABLE DISCARDABLE
15 | BEGIN
16 | IDS_STARTMENU_APPNAME, "@MOZ_APP_DISPLAYNAME@"
17 | END
18 |
--------------------------------------------------------------------------------
/ambassador/branding/VisualElements_150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/VisualElements_150.png
--------------------------------------------------------------------------------
/ambassador/branding/VisualElements_70.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/VisualElements_70.png
--------------------------------------------------------------------------------
/ambassador/branding/ambassador-branding.js:
--------------------------------------------------------------------------------
1 | #filter substitution
2 | #filter emptyLines
3 |
4 | pref("startup.homepage_override_url","https://www.github.com/ascrod/ambassador/");
5 | pref("app.releaseNotesURL", "https://www.github.com/ascrod/ambassador/releases/latest/");
6 |
7 | // Updates disabled
8 | pref("app.update.enabled", false);
9 | pref("app.update.url", "");
10 |
11 | // Number of usages of the web console or scratchpad.
12 | // If this is less than 5, then pasting code into the web console or scratchpad is disabled
13 | pref("devtools.selfxss.count", 100);
14 |
--------------------------------------------------------------------------------
/ambassador/branding/ambassador-window.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/ambassador-window.ico
--------------------------------------------------------------------------------
/ambassador/branding/ambassador-window16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/ambassador-window16.png
--------------------------------------------------------------------------------
/ambassador/branding/ambassador-window32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/ambassador-window32.png
--------------------------------------------------------------------------------
/ambassador/branding/ambassador-window48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/ambassador-window48.png
--------------------------------------------------------------------------------
/ambassador/branding/ambassador.VisualElementsManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
--------------------------------------------------------------------------------
/ambassador/branding/ambassador.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Name=Ambassador
3 | GenericName=IRC Client
4 | Comment=A simple, straightforward IRC client.
5 | Keywords=IM;Chat;
6 | Exec=ambassador %u
7 | Terminal=false
8 | Type=Application
9 | Icon=ambassador
10 | Categories=Network;IRCClient
11 | MimeType=x-scheme-handler/irc;x-scheme-handler/ircs;
12 | StartupNotify=True
13 |
--------------------------------------------------------------------------------
/ambassador/branding/ambassador.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/ambassador.icns
--------------------------------------------------------------------------------
/ambassador/branding/appname.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/appname.bmp
--------------------------------------------------------------------------------
/ambassador/branding/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/background.png
--------------------------------------------------------------------------------
/ambassador/branding/branding.nsi:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | # NSIS branding defines for release builds.
6 |
7 | # BrandFullNameInternal is used for some registry and file system values
8 | # instead of BrandFullName and typically should not be modified.
9 | !define BrandFullNameInternal "Ambassador"
10 | !define CompanyName "Ascrod"
11 | !define URLInfoAbout "https://www.github.com/ascrod/ambassador/"
12 | !define URLUpdateInfo "https://www.github.com/ascrod/ambassador/releases/latest/"
13 | !define HelpLink "https://www.github.com/ascrod/ambassador/"
14 | !define URLSystemRequirements "https://www.github.com/ascrod/ambassador/"
15 |
--------------------------------------------------------------------------------
/ambassador/branding/configure.sh:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | MOZ_APP_DISPLAYNAME=Ambassador
6 |
--------------------------------------------------------------------------------
/ambassador/branding/disk.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/disk.icns
--------------------------------------------------------------------------------
/ambassador/branding/document.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/document.icns
--------------------------------------------------------------------------------
/ambassador/branding/dsstore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/dsstore
--------------------------------------------------------------------------------
/ambassador/branding/firefox.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/firefox.icns
--------------------------------------------------------------------------------
/ambassador/branding/jar.mn:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | ambassador.jar:
6 | % content branding %content/branding/ contentaccessible=yes
7 | content/branding/icon16.png (ambassador-window16.png)
8 | content/branding/icon32.png (ambassador-window32.png)
9 | content/branding/icon48.png (ambassador-window48.png)
10 | content/branding/icon64.png (logo-64.png)
11 |
--------------------------------------------------------------------------------
/ambassador/branding/locales/en-US/brand.dtd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ambassador/branding/locales/en-US/brand.properties:
--------------------------------------------------------------------------------
1 | brandShortName=Ambassador
2 | brandFullName=Ambassador
3 | vendorShortName=Ascrod
4 |
--------------------------------------------------------------------------------
/ambassador/branding/locales/jar.mn:
--------------------------------------------------------------------------------
1 | #filter substitution
2 | # This Source Code Form is subject to the terms of the Mozilla Public
3 | # License, v. 2.0. If a copy of the MPL was not distributed with this
4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 |
6 |
7 | @AB_CD@.jar:
8 | % locale branding @AB_CD@ %locale/branding/
9 | locale/branding/brand.dtd (%brand.dtd)
10 | locale/branding/brand.properties (%brand.properties)
11 |
--------------------------------------------------------------------------------
/ambassador/branding/locales/moz.build:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | JAR_MANIFESTS += ['jar.mn']
6 |
--------------------------------------------------------------------------------
/ambassador/branding/logo-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/logo-256.png
--------------------------------------------------------------------------------
/ambassador/branding/logo-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/logo-512.png
--------------------------------------------------------------------------------
/ambassador/branding/logo-64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/logo-64.png
--------------------------------------------------------------------------------
/ambassador/branding/moz.build:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | DIRS += ['locales']
6 |
7 | JAR_MANIFESTS += ['jar.mn']
8 |
9 | if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
10 | FINAL_TARGET_FILES += [
11 | 'ambassador.VisualElementsManifest.xml',
12 | ]
13 | FINAL_TARGET_FILES.VisualElements += [
14 | 'VisualElements_150.png',
15 | 'VisualElements_70.png',
16 | ]
17 | BRANDING_FILES += [
18 | 'ambassador-window.ico',
19 | 'appname.bmp',
20 | 'branding.nsi',
21 | 'wizHeader.bmp',
22 | 'wizHeaderRTL.bmp',
23 | 'wizWatermark.bmp',
24 | ]
25 | FINAL_TARGET_FILES.chrome.icons.default += [
26 | 'ambassador-window.ico',
27 | ]
28 | elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
29 | BRANDING_FILES += [
30 | 'background.png',
31 | 'disk.icns',
32 | 'document.icns',
33 | 'dsstore',
34 | 'firefox.icns',
35 | ]
36 | elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
37 | BRANDING_FILES += [
38 | 'ambassador-window16.png',
39 | 'ambassador-window32.png',
40 | 'ambassador-window48.png',
41 | 'mozicon128.png',
42 | ]
43 | FINAL_TARGET_FILES.icon += ['mozicon128.png']
44 | FINAL_TARGET_FILES.chrome.icons.default += [
45 | 'ambassador-window16.png',
46 | 'ambassador-window32.png',
47 | 'ambassador-window48.png',
48 | ]
49 |
50 | JS_PREFERENCE_PP_FILES += [
51 | 'ambassador-branding.js'
52 | ]
53 |
--------------------------------------------------------------------------------
/ambassador/branding/mozicon128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/mozicon128.png
--------------------------------------------------------------------------------
/ambassador/branding/wizHeader.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/wizHeader.bmp
--------------------------------------------------------------------------------
/ambassador/branding/wizHeaderRTL.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/wizHeaderRTL.bmp
--------------------------------------------------------------------------------
/ambassador/branding/wizWatermark.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/branding/wizWatermark.bmp
--------------------------------------------------------------------------------
/ambassador/build.mk:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | installer:
6 | @$(MAKE) -C ambassador/installer installer
7 |
8 | package:
9 | @$(MAKE) -C ambassador/installer make-archive
10 |
11 | l10n-package:
12 | @$(MAKE) -C ambassador/installer make-langpack
13 |
14 | mozpackage:
15 | @$(MAKE) -C ambassador/installer
16 |
17 | package-compare:
18 | @$(MAKE) -C ambassador/installer package-compare
19 |
20 | stage-package:
21 | @$(MAKE) -C ambassador/installer stage-package make-buildinfo-file
22 |
23 | sdk:
24 | @$(MAKE) -C ambassador/installer make-sdk
25 |
26 | install::
27 | @$(MAKE) -C ambassador/installer install
28 |
29 | clean::
30 | @$(MAKE) -C ambassador/installer clean
31 |
32 | distclean::
33 | @$(MAKE) -C ambassador/installer distclean
34 |
35 | source-package::
36 | @$(MAKE) -C ambassador/installer source-package
37 |
38 | upload::
39 | @$(MAKE) -C ambassador/installer upload
40 |
41 | source-upload::
42 | @$(MAKE) -C ambassador/installer source-upload
43 |
44 | hg-bundle::
45 | @$(MAKE) -C ambassador/installer hg-bundle
46 |
47 | l10n-check::
48 | @$(MAKE) -C ambassador/locales l10n-check
49 |
50 |
--------------------------------------------------------------------------------
/ambassador/components/AddonComponents.manifest:
--------------------------------------------------------------------------------
1 | component {38a95514-1dd2-11b2-97e7-9da958640f2c} ambassador-service.js
2 | component {f21c35f4-1dd1-11b2-a503-9bf8a539ea39} ambassador-service.js
3 | component {f21c35f4-1dd1-11b2-a503-9bf8a539ea3a} ambassador-service.js
4 | contract @mozilla.org/commandlinehandler/general-startup;1?type=chat-addon {38a95514-1dd2-11b2-97e7-9da958640f2c}
5 | category command-line-handler m-irc @mozilla.org/commandlinehandler/general-startup;1?type=chat-addon
6 | contract @mozilla.org/network/protocol;1?name=irc {f21c35f4-1dd1-11b2-a503-9bf8a539ea39}
7 | contract @mozilla.org/network/protocol;1?name=ircs {f21c35f4-1dd1-11b2-a503-9bf8a539ea3a}
8 |
--------------------------------------------------------------------------------
/ambassador/components/AppComponents.manifest:
--------------------------------------------------------------------------------
1 | component {ae6ad015-433b-42ab-9afc-1636af5a7fc4} ambassador-service.js
2 | component {f21c35f4-1dd1-11b2-a503-9bf8a539ea39} ambassador-service.js
3 | component {f21c35f4-1dd1-11b2-a503-9bf8a539ea3a} ambassador-service.js
4 | contract @mozilla.org/commandlinehandler/general-startup;1?type=chat-app {ae6ad015-433b-42ab-9afc-1636af5a7fc4}
5 | category command-line-handler m-irc @mozilla.org/commandlinehandler/general-startup;1?type=chat-app
6 | contract @mozilla.org/network/protocol;1?name=irc {f21c35f4-1dd1-11b2-a503-9bf8a539ea39}
7 | contract @mozilla.org/network/protocol;1?name=ircs {f21c35f4-1dd1-11b2-a503-9bf8a539ea3a}
8 |
--------------------------------------------------------------------------------
/ambassador/components/devtools/devtools-loader.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | "use strict";
6 |
7 | const { interfaces: Ci, utils: Cu } = Components;
8 | Cu.import("resource://gre/modules/XPCOMUtils.jsm");
9 | XPCOMUtils.defineLazyModuleGetter(this, "Services", "resource://gre/modules/Services.jsm");
10 |
11 | function DevToolsStartup() {}
12 |
13 | DevToolsStartup.prototype = {
14 | QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
15 | classID: Components.ID("{089694e9-106a-4704-abf7-62a88545e194}"),
16 |
17 | helpInfo: "",
18 | handle: function (cmdLine) {
19 | this.initialize();
20 |
21 | // We want to overwrite the -devtools flag and open the toolbox instead
22 | let devtoolsFlag = cmdLine.handleFlag("devtools", false);
23 | if (devtoolsFlag) {
24 | this.handleDevToolsFlag(cmdLine);
25 | }
26 | },
27 |
28 | handleDevToolsFlag: function (cmdLine) {
29 | Cu.import("resource://devtools/client/framework/ToolboxProcess.jsm");
30 | BrowserToolboxProcess.init();
31 |
32 | if (cmdLine.state == Ci.nsICommandLine.STATE_REMOTE_AUTO) {
33 | cmdLine.preventDefault = true;
34 | }
35 | },
36 |
37 | initialize: function() {
38 | var { devtools, require, DevToolsLoader } = Cu.import("resource://devtools/shared/Loader.jsm", {});
39 | var { DebuggerServer } = require("devtools/server/main");
40 | var { gDevTools } = require("devtools/client/framework/devtools");
41 | var HUDService = require("devtools/client/webconsole/hudservice");
42 |
43 | if (DebuggerServer.chromeWindowType != "irc:ambassador") {
44 | // Set up the server chrome window type, make sure it can't be set
45 | Object.defineProperty(DebuggerServer, "chromeWindowType", {
46 | get: () => "irc:ambassador",
47 | set: () => {},
48 | configurable: true
49 | });
50 | }
51 |
52 | if (gDevTools.chromeWindowType != "irc:ambassador") {
53 | // Set up the client chrome window type, make sure it can't be set
54 | Object.defineProperty(gDevTools, "chromeWindowType", {
55 | get: () => "irc:ambassador",
56 | set: () => {},
57 | configurable: true
58 | });
59 | }
60 |
61 | // Make the loader visible to the debugger by default and for the already
62 | // loaded instance. Ambassador now also provides the Browser Toolbox for
63 | // chrome debugging, which uses its own separate loader instance.
64 | DevToolsLoader.prototype.invisibleToDebugger = false;
65 | devtools.invisibleToDebugger = false;
66 |
67 | if (!DebuggerServer.initialized) {
68 | // Initialize and load the toolkit/browser actors
69 | DebuggerServer.init();
70 | DebuggerServer.addBrowserActors("irc:ambassador");
71 | }
72 |
73 | if (!DebuggerServer.createRootActor.isIrcRootActor) {
74 | // Register the Ambassador root actor
75 | DebuggerServer.registerModule("resource:///modules/irc-root-actor.js");
76 | }
77 | }
78 | };
79 |
80 | this.NSGetFactory = XPCOMUtils.generateNSGetFactory([DevToolsStartup]);
81 |
--------------------------------------------------------------------------------
/ambassador/components/devtools/devtools-loader.manifest:
--------------------------------------------------------------------------------
1 | component {089694e9-106a-4704-abf7-62a88545e194} devtools-loader.js
2 | contract @mozilla.org/commandlinehandler/devtools-startup;1 {089694e9-106a-4704-abf7-62a88545e194}
3 | # This command line handler needs to be initialized before the devtools command line
4 | # handler, which currently uses "m-devtools". See details in nsICommandLineHandler.idl.
5 | category command-line-handler m-aaa-irc-devtools @mozilla.org/commandlinehandler/devtools-startup;1
6 |
--------------------------------------------------------------------------------
/ambassador/components/devtools/jar.mn:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | ambassador.jar:
6 | % overlay chrome://devtools/content/webconsole/webconsole.xul chrome://ambassador/content/devtools/webconsole-overlay.xul
7 | content/ambassador/devtools/webconsole-overlay.xul (webconsole-overlay.xul)
8 | content/ambassador/devtools/webconsole-overlay.js (webconsole-overlay.js)
9 |
--------------------------------------------------------------------------------
/ambassador/components/devtools/moz.build:
--------------------------------------------------------------------------------
1 | # vim: set filetype=python:
2 | # This Source Code Form is subject to the terms of the Mozilla Public
3 | # License, v. 2.0. If a copy of the MPL was not distributed with this
4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 |
6 | EXTRA_JS_MODULES += [
7 | "irc-root-actor.js",
8 | ]
9 |
10 | JAR_MANIFESTS += ['jar.mn']
11 |
12 | EXTRA_COMPONENTS += [
13 | "devtools-loader.js",
14 | "devtools-loader.manifest",
15 | ]
16 |
--------------------------------------------------------------------------------
/ambassador/components/devtools/webconsole-overlay.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | "use strict"
6 |
7 | const {classes: Cc, interfaces: Ci} = Components;
8 |
9 | function openUILinkIn(url) {
10 | var ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
11 | Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
12 | .getService(Ci.nsIExternalProtocolService)
13 | .loadURI(ios.newURI(url, null, null), window);
14 | }
15 |
--------------------------------------------------------------------------------
/ambassador/components/devtools/webconsole-overlay.xul:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/ambassador/components/moz.build:
--------------------------------------------------------------------------------
1 | # vim: set filetype=python:
2 | # This Source Code Form is subject to the terms of the Mozilla Public
3 | # License, v. 2.0. If a copy of the MPL was not distributed with this
4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | if CONFIG['MOZ_DEVTOOLS']:
6 | DIRS += [
7 | 'devtools',
8 | ]
9 |
10 | EXTRA_COMPONENTS += [
11 | 'ambassador-service.js',
12 | 'AppComponents.manifest',
13 | ]
14 |
--------------------------------------------------------------------------------
/ambassador/config/version.txt:
--------------------------------------------------------------------------------
1 | 1.3.0
2 |
--------------------------------------------------------------------------------
/ambassador/confvars.sh:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | # This Source Code Form is subject to the terms of the Mozilla Public
3 | # License, v. 2.0. If a copy of the MPL was not distributed with this
4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 |
6 | # Application Basename and Vendor
7 | # MOZ_APP_BASENAME and MOZ_APP_VENDOR must not have spaces.
8 | MOZ_APP_NAME=ambassador
9 | MOZ_APP_BASENAME=$MOZ_APP_NAME
10 | MOZ_APP_VERSION=`cat ${_topsrcdir}/$MOZ_BUILD_APP/config/version.txt`
11 | MOZ_APP_VERSION_DISPLAY=$MOZ_APP_VERSION
12 |
13 | # Application ID
14 | # This is a unique identifier used for the application
15 | # Most frequently the AppID is used for targetApplication
16 | # in extensions and for chrome manifests
17 | MOZ_APP_ID={4523665a-317f-4a66-9376-3763d1ad1978}
18 |
19 | # Use static Application INI File
20 | MOZ_APP_STATIC_INI=1
21 |
22 | # Application Branding
23 | MOZ_BRANDING_DIRECTORY=ambassador/branding
24 |
25 | # Set the chrome packing format
26 | # Possible values are omni, jar, and flat
27 | # Currently, only omni and flat are supported
28 | MOZ_CHROME_FILE_FORMAT=omni
29 |
30 | # Set the default top-level extensions
31 | MOZ_EXTENSIONS_DEFAULT=" gio"
32 |
33 | # Include bundled fonts
34 | if test "$OS_ARCH" = "WINNT" -o \
35 | "$OS_ARCH" = "Linux"; then
36 | MOZ_BUNDLED_FONTS=1
37 | fi
38 |
39 | MOZ_UPDATER=1
40 |
41 | # Enable any conditional code in the platform for Ambassador
42 | ASCROD_IRC=1
43 |
44 | # Other features
45 | MOZ_DEVTOOLS=1
46 | MOZ_JSDOWNLOADS=1
47 | MOZ_ADDON_SIGNING=0
48 | MOZ_REQUIRE_SIGNING=0
49 | MOZ_DISABLE_PARENTAL_CONTROLS=1
50 | MOZ_SERVICES_HEALTHREPORT=
51 | MOZ_SERVICES_SYNC=
52 | MOZ_MAINTENANCE_SERVICE=
53 | MOZ_WEBRTC=
54 | MOZ_EME=
55 | ACCESSIBILITY=
56 |
--------------------------------------------------------------------------------
/ambassador/installer/removed-files.in:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | # The removed-files.in file specifies files and directories to be removed during
6 | # an application update that are not automatically removed by the application
7 | # update process. The application update process handles the vast majority of
8 | # file and directory removals automatically so this file should not be used in
9 | # the vast majority of cases.
10 |
11 | # If you are not sure whether a file or directory should be removed using the
12 | # removed-files.in file please contact one of the developers that work on
13 | # application update.
14 |
15 | # To specify a file to be removed add the path to the file.
16 | # * If the file doesn't exist the update will succeed.
17 | # * If the file exists and can't be removed (e.g. the file is locked) the
18 | # update will fail.
19 | #
20 | # Example: path/to/file
21 |
22 | # To specify a directory to be removed only if it is empty add the path to the
23 | # directory with a trailing forward slash.
24 | # * If the directory doesn't exist the update will succeed.
25 | # * If the directory can't be removed (e.g. the directory is locked, contains
26 | # files, etc.) the update will succeed.
27 | #
28 | # Example: path/to/dir/
29 |
30 | # To specify a directory that should be recursively removed add the path to the
31 | # directory with a trailing forward slash and "*".
32 | # * If the directory doesn't exist the update will succeed.
33 | # * If all of the files the directory contains can be removed but the directory
34 | # or a subdirectory can't be removed (e.g. the directory is locked) the update
35 | # will succeed.
36 | # * If a file within the directory can't be removed the update will fail.
37 | #
38 | # Example: path/to/dir/*
39 |
40 | # Due to Apple Mac OS X packaging requirements files that are in the same
41 | # directory on other platforms must be located in different directories on
42 | # Mac OS X. The following defines allow specifying the Mac OS X bundle
43 | # location which also work on other platforms.
44 | #
45 | # @DIR_MACOS@
46 | # Equals Contents/MacOS/ on Mac OS X and is an empty string on other platforms.
47 | #
48 | # @DIR_RESOURCES@
49 | # Equals Contents/Resources/ on Mac OS X and is an empty string on other
50 | # platforms.
51 |
--------------------------------------------------------------------------------
/ambassador/installer/windows/Makefile.in:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/package-name.mk
6 |
7 | CONFIG_DIR = instgen
8 | SFX_MODULE = $(MOZILLA_SRCDIR)/other-licenses/7zstub/uxp/7zSD.sfx
9 |
10 | INSTALLER_FILES = \
11 | app.tag \
12 | nsis/installer.nsi \
13 | nsis/uninstaller.nsi \
14 | nsis/shared.nsh \
15 | $(NULL)
16 |
17 | BRANDING_FILES = \
18 | branding.nsi \
19 | appname.bmp \
20 | wizHeader.bmp \
21 | wizHeaderRTL.bmp \
22 | wizWatermark.bmp \
23 | $(NULL)
24 |
25 | include $(topsrcdir)/config/config.mk
26 |
27 | ifdef LOCALE_MERGEDIR
28 | PPL_LOCALE_ARGS = \
29 | --l10n-dir=$(LOCALE_MERGEDIR)/ambassador/installer \
30 | --l10n-dir=$(call EXPAND_LOCALE_SRCDIR,ambassador/locales)/installer \
31 | --l10n-dir=$(topsrcdir)/ambassador/locales/en-US/installer \
32 | $(NULL)
33 | else
34 | PPL_LOCALE_ARGS=$(call EXPAND_LOCALE_SRCDIR,ambassador/locales)/installer
35 | endif
36 |
37 | OVERRIDE_DEFAULT_GOAL := installer
38 | installer::
39 | $(MAKE) -C .. installer-stage
40 | $(MAKE) $(CONFIG_DIR)/setup.exe
41 |
42 | # For building the uninstaller during the application build so it can be
43 | # included for mar file generation.
44 | uninstaller::
45 | $(RM) -r $(CONFIG_DIR)
46 | $(MKDIR) $(CONFIG_DIR)
47 | $(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
48 | $(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR)
49 | $(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
50 | $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi)
51 | $(PYTHON) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
52 | --preprocess-locale $(MOZILLA_SRCDIR) \
53 | $(PPL_LOCALE_ARGS) $(AB_CD) $(CONFIG_DIR)
54 |
55 | $(CONFIG_DIR)/setup.exe::
56 | $(RM) -r $(CONFIG_DIR)
57 | $(MKDIR) $(CONFIG_DIR)
58 | $(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
59 | $(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR)
60 | $(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
61 | $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi)
62 | $(PYTHON) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
63 | --preprocess-locale $(MOZILLA_SRCDIR) \
64 | $(PPL_LOCALE_ARGS) $(AB_CD) $(CONFIG_DIR)
65 |
66 | GARBARGE_DIRS += instgen
67 |
68 | include $(topsrcdir)/config/rules.mk
69 | include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/makensis.mk
70 |
--------------------------------------------------------------------------------
/ambassador/installer/windows/app.tag:
--------------------------------------------------------------------------------
1 | ;!@Install@!UTF-8!
2 | Title="Ambassador"
3 | RunProgram="setup.exe"
4 | ;!@InstallEnd@!
5 |
--------------------------------------------------------------------------------
/ambassador/installer/windows/moz.build:
--------------------------------------------------------------------------------
1 | # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 | # vim: set filetype=python:
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | DEFINES['MOZ_APP_NAME'] = CONFIG['MOZ_APP_NAME']
8 | DEFINES['APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
9 | DEFINES['MOZILLA_VERSION'] = CONFIG['MOZILLA_VERSION']
10 | DEFINES['MOZ_APP_DISPLAYNAME'] = CONFIG['MOZ_APP_DISPLAYNAME']
11 |
12 |
--------------------------------------------------------------------------------
/ambassador/installer/windows/nsis/defines.nsi.in:
--------------------------------------------------------------------------------
1 | #filter substitution
2 | # This Source Code Form is subject to the terms of the Mozilla Public
3 | # License, v. 2.0. If a copy of the MPL was not distributed with this
4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 |
6 | # These defines should match application.ini settings
7 | !define AppName "Ambassador"
8 | !define AppVersion "@APP_VERSION@"
9 | !define GREVersion @MOZILLA_VERSION@
10 | !define AB_CD "@AB_CD@"
11 |
12 | !define FileMainEXE "@MOZ_APP_NAME@.exe"
13 | !define WindowClass "AmbassadorMessageWindow"
14 | !define DDEApplication "Ambassador"
15 | !define AppRegName "Ambassador"
16 |
17 | !ifndef DEV_EDITION
18 | !define BrandShortName "@MOZ_APP_DISPLAYNAME@"
19 | !endif
20 | !define BrandFullName "${BrandFullNameInternal}"
21 |
22 | # LSP_CATEGORIES is the permitted LSP categories for the application. Each LSP
23 | # category value is ANDed together to set multiple permitted categories.
24 | # See http://msdn.microsoft.com/en-us/library/ms742253%28VS.85%29.aspx
25 | # The value below removes all LSP categories previously set.
26 | !define LSP_CATEGORIES "0x00000000"
27 |
28 | !if "@MOZ_UPDATE_CHANNEL@" == ""
29 | !define UpdateChannel "Unknown"
30 | !else
31 | !define UpdateChannel "@MOZ_UPDATE_CHANNEL@"
32 | !endif
33 |
34 | # ARCH is used when it is necessary to differentiate the x64 registry keys from
35 | # the x86 registry keys (e.g. the uninstall registry key).
36 | #ifdef HAVE_64BIT_BUILD
37 | !define HAVE_64BIT_BUILD
38 | !define ARCH "x64"
39 | !define MinSupportedVer "Microsoft Windows 7 x64"
40 | #else
41 | !define ARCH "x86"
42 | !define MinSupportedVer "Microsoft Windows 7"
43 | #endif
44 |
45 | !define MinSupportedCPU "SSE2"
46 |
47 | # File details shared by both the installer and uninstaller
48 | VIProductVersion "1.0.0.0"
49 | VIAddVersionKey "ProductName" "${BrandShortName}"
50 | VIAddVersionKey "CompanyName" "${CompanyName}"
51 | VIAddVersionKey "LegalCopyright" "${CompanyName}"
52 | VIAddVersionKey "FileVersion" "${AppVersion}"
53 | VIAddVersionKey "ProductVersion" "${AppVersion}"
54 | # Comments is not used but left below commented out for future reference
55 | # VIAddVersionKey "Comments" "Comments"
56 |
--------------------------------------------------------------------------------
/ambassador/installer/windows/nsis/updater_append.ini:
--------------------------------------------------------------------------------
1 |
2 | ; IMPORTANT: This file should always start with a newline in case a locale
3 | ; provided updater.ini does not end with a newline.
4 | ; Application to launch after an update has been successfully applied. This
5 | ; must be in the same directory or a sub-directory of the directory of the
6 | ; application executable that initiated the software update.
7 | [PostUpdateWin]
8 | ; ExeRelPath is the path to the PostUpdateWin executable relative to the
9 | ; application executable.
10 | ExeRelPath=uninstall\helper.exe
11 | ; ExeArg is the argument to pass to the PostUpdateWin exe
12 | ExeArg=/PostUpdate
13 |
--------------------------------------------------------------------------------
/ambassador/js/lib/irc-debug.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | /*
6 | * Hook used to trace events.
7 | */
8 | function event_tracer (e)
9 | {
10 | var name = "";
11 | var data = ("debug" in e) ? e.debug : "";
12 |
13 | switch (e.set)
14 | {
15 | case "server":
16 | name = e.destObject.connection.host;
17 | if (e.type == "rawdata")
18 | data = "'" + e.data + "'";
19 | if (e.type == "senddata")
20 | {
21 | var nextLine =
22 | e.destObject.sendQueue[e.destObject.sendQueue.length - 1];
23 | if ("logged" in nextLine)
24 | return true; /* don't print again */
25 |
26 | if (nextLine) {
27 | data = "'" + nextLine.replace ("\n", "\\n") + "'";
28 | nextLine.logged = true;
29 | }
30 | else
31 | data = "!!! Nothing to send !!!";
32 | }
33 | break;
34 |
35 | case "network":
36 | case "channel":
37 | case "user":
38 | name = e.destObject.unicodeName;
39 | break;
40 |
41 | case "httpdoc":
42 | name = e.destObject.server + e.destObject.path;
43 | if (e.destObject.state != "complete")
44 | data = "state: '" + e.destObject.state + "', received " +
45 | e.destObject.data.length;
46 | else
47 | dd ("document done:\n" + dumpObjectTree (this));
48 | break;
49 |
50 | case "dcc-chat":
51 | case "dcc-file":
52 | name = e.destObject.localIP + ":" + e.destObject.port;
53 | if (e.type == "rawdata")
54 | data = "'" + e.data + "'";
55 | break;
56 |
57 | case "client":
58 | if (e.type == "do-connect")
59 | data = "attempt: " + e.attempt + "/" +
60 | e.destObject.MAX_CONNECT_ATTEMPTS;
61 | break;
62 |
63 | default:
64 | break;
65 | }
66 |
67 | if (name)
68 | name = "[" + name + "]";
69 |
70 | if (e.type == "info")
71 | data = "'" + e.msg + "'";
72 |
73 | var str = "Level " + e.level + ": '" + e.type + "', " +
74 | e.set + name + "." + e.destMethod;
75 | if (data)
76 | str += "\ndata : " + data;
77 |
78 | dd (str);
79 |
80 | return true;
81 |
82 | }
83 |
--------------------------------------------------------------------------------
/ambassador/js/lib/json-serializer.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | /* This is a simple set of functions for serializing and parsing JS objects
6 | * to and from files.
7 | */
8 |
9 | function JsonSerializer(file)
10 | {
11 | this._initialized = false;
12 | if (typeof file == "string")
13 | this._file = new nsLocalFile(file);
14 | else
15 | this._file = file;
16 | this._open = false;
17 | this._buffer = "";
18 | this._lines = [];
19 | this.lineEnd = "\n";
20 | this._initialized = true;
21 | }
22 |
23 | /*
24 | * Opens the serializer on the file specified when created, in either the read
25 | * ("<") or write (">") directions. When the file is open, only the appropriate
26 | * direction of serialization/deserialization may be performed.
27 | *
28 | * Note: serialize and deserialize automatically open the file if it is not
29 | * open.
30 | *
31 | * @param dir The string representing the direction of serialization.
32 | * @returns Value indicating whether the file was opened successfully.
33 | */
34 | JsonSerializer.prototype.open = function(dir)
35 | {
36 | if (!ASSERT((dir == ">") || (dir == "<"), "Bad serialization direction!"))
37 | return false;
38 | if (this._open)
39 | return false;
40 |
41 | this._fileStream = new LocalFile(this._file, dir);
42 | if ((typeof this._fileStream == "object") && this._fileStream)
43 | this._open = true;
44 |
45 | return this._open;
46 | }
47 |
48 | /*
49 | * Closes the file stream and ends reading or writing.
50 | *
51 | * @returns Value indicating whether the file was closed successfully.
52 | */
53 | JsonSerializer.prototype.close = function()
54 | {
55 | if (this._open)
56 | {
57 | this._fileStream.close();
58 | delete this._fileStream;
59 | this._open = false;
60 | }
61 | return true;
62 | }
63 |
64 | /*
65 | * Serializes a single object into the file stream. All properties of the object
66 | * are stored in the stream, including properties that contain other objects.
67 | *
68 | * @param obj JS object to serialize to the file.
69 | */
70 | JsonSerializer.prototype.serialize = function(obj)
71 | {
72 | if (!this._open)
73 | this.open(">");
74 | if (!ASSERT(this._open, "Unable to open the file for writing!"))
75 | return;
76 |
77 | this._fileStream.write(JSON.stringify(obj, null, 4));
78 | }
79 |
80 | /*
81 | * Reads in enough of the file to deserialize (realize) a single object. The
82 | * object deserialized is returned; all sub-properties of the object are
83 | * deserialized with it.
84 | *
85 | * @returns JS object parsed from the file.
86 | */
87 | JsonSerializer.prototype.deserialize = function()
88 | {
89 | if (!this._open)
90 | this.open("<");
91 | if (!ASSERT(this._open, "Unable to open the file for reading!"))
92 | return false;
93 |
94 | var rv = null;
95 |
96 | try
97 | {
98 | rv = JSON.parse(this._fileStream.read());
99 | }
100 | catch (ex)
101 | {
102 | dd("Syntax error while deserializing file!");
103 | dd(ex.message);
104 | dd(ex.stack);
105 | }
106 |
107 | return rv;
108 | }
109 |
--------------------------------------------------------------------------------
/ambassador/js/tests/mybot.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | if (typeof escape == "undefined")
6 | escape = unescape = function (s) {return s;}
7 |
8 |
9 | function runMyBot()
10 | {
11 | load ("ircbot.js");
12 | go();
13 | }
14 |
15 | function initPersonality()
16 | {
17 | load ("mingus.js");
18 | initMingus();
19 | }
20 |
--------------------------------------------------------------------------------
/ambassador/js/tests/test_matchobject.js:
--------------------------------------------------------------------------------
1 |
2 | function test_matchObject()
3 | {
4 | var f = true;
5 |
6 | obj1 = {foo:"hey", bar:"ho"}
7 | obj2 = {a:"1", b:"2"}
8 |
9 | p1 = {foo:"hey"}
10 | p2 = {bar:"ho"}
11 | p3 = {a:"1"}
12 | p4 = {b:"2"}
13 |
14 | /* true, single pattern, and it matches */
15 | f &= matchObject (obj1, p1);
16 | /* false, single pattern matches, negated */
17 | f &= !matchObject (obj1, p1, true);
18 |
19 | /* false, single pattern doesn't match */
20 | f &= !matchObject (obj1, p3);
21 | /* true, single pattern doesn't match, negated */
22 | f &= matchObject (obj1, p3, true);
23 |
24 | /* true, p1 matches */
25 | f &= matchObject (obj1, [p1, p3]);
26 | /* false, p1 matches, negated */
27 | f &= !matchObject (obj1, [p1, p3], true);
28 |
29 | /* true, both paterns match */
30 | f &= matchObject (obj2, [p3, p4]);
31 | /* false, both patterns match, negated */
32 | f &= !matchObject (obj2, [p3, p4], true);
33 |
34 | /* false, neither pattern matches */
35 | f &= !matchObject (obj1, [p3, p4]);
36 | /* true, neither pattern matches, negated */
37 | f &= matchObject (obj1, [p3, p4], true);
38 |
39 | return Boolean(f); /* you've got to find any problems by hand :) */
40 |
41 | }
--------------------------------------------------------------------------------
/ambassador/js/tests/toys.js:
--------------------------------------------------------------------------------
1 |
2 | function rainbow(str)
3 | {
4 | str = String(str);
5 | var c = str.length;
6 | var rv = "";
7 |
8 | for (var i = 0; i < c; i++)
9 | {
10 | var color = randomRange (2, 6);
11 | rv += unescape ("%03" + color + str[i]);
12 | }
13 |
14 | return rv;
15 |
16 | }
17 |
18 | function fade(str)
19 | {
20 | var colors = new Array(1, 14, 10, 15, 0);
21 | var cIndex = 0;
22 | var msg = "";
23 | for (var i = 0; i < str.length; i++)
24 | {
25 | msg += "%03" + colors[cIndex] + str[i];
26 | if ((++cIndex) == 5)
27 | {
28 | cIndex = 0;
29 | }
30 | }
31 |
32 | return unescape(msg);
33 |
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/ambassador/locales/all-locales:
--------------------------------------------------------------------------------
1 | ca
2 | cs
3 | de
4 | en-GB
5 | es-ES
6 | nb-NO
7 | fi
8 | fr
9 | it
10 | ja
11 | ja-JP-mac
12 | pl
13 | pt-BR
14 | pt-PT
15 | ru
16 | si
17 | sk
18 | sv-SE
19 |
--------------------------------------------------------------------------------
/ambassador/locales/en-US/ambassador-l10n.js:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | #filter substitution
6 |
7 | pref("general.useragent.locale", "@AB_CD@");
8 |
--------------------------------------------------------------------------------
/ambassador/locales/en-US/chrome/about.dtd:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/ambassador/locales/en-US/chrome/ambassador.dtd:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/ambassador/locales/en-US/chrome/ambassadorOverlay.dtd:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ambassador/locales/en-US/chrome/browserOverlay.dtd:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ambassador/locales/en-US/chrome/channels.dtd:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/ambassador/locales/en-US/chrome/config.dtd:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/ambassador/locales/en-US/chrome/extensionsOverlay.properties:
--------------------------------------------------------------------------------
1 | # LOCALIZATION NOTE (xpinstallPromptWarning):
2 | # %1$S is replaced by brandShortName, %2$S is replaced by the host name of the
3 | # site.
4 | xpinstallPromptWarning=%1$S prevented the site (%2$S) from asking you to install software on your computer.
5 | xpinstallPromptAllowButton=Allow
6 | # LOCALIZATION NOTE (xpinstallPromptAllowButton.accesskey):
7 | # Accessibility Note:
8 | # Be sure you do not choose an accesskey that is used elsewhere in the active
9 | # context (e.g. main menu bar, submenu of the warning popup button).
10 | # See http://www.mozilla.org/access/keyboard/accesskey for details
11 | xpinstallPromptAllowButton.accesskey=A
12 |
13 | xpinstallDisabledMessageLocked=Software installation has been disabled by your system administrator.
14 | xpinstallDisabledMessage=Software installation is currently disabled. Click Enable and try again.
15 | xpinstallDisabledButton=Enable
16 | xpinstallDisabledButton.accesskey=n
17 |
18 | # LOCALIZATION NOTE (addonsInstalled, addonsInstalledNeedsRestart):
19 | # Semi-colon list of plural forms. See:
20 | # http://developer.mozilla.org/en/docs/Localization_and_Plurals
21 | # #1 first add-on's name, #2 number of add-ons, #3 application name
22 | addonsInstalled=#1 has been installed successfully.;#2 add-ons have been installed successfully.
23 | addonsInstalledNeedsRestart=#1 will be installed after you restart #3.;#2 add-ons will be installed after you restart #3.
24 | addonInstallRestartButton=Restart Now
25 | addonInstallRestartButton.accesskey=R
26 | addonInstallManage=Open Add-ons Manager
27 | addonInstallManage.accesskey=O
28 |
29 | # LOCALIZATION NOTE (addonError-1, addonError-2, addonError-3, addonError-4):
30 | # #1 is the add-on name, #2 is the host name, #3 is the application name
31 | # #4 is the application version
32 | addonError-1=The add-on could not be downloaded because of a connection failure on #2.
33 | addonError-2=The add-on from #2 could not be installed because it does not match the add-on #3 expected.
34 | addonError-3=The add-on downloaded from #2 could not be installed because it appears to be corrupt.
35 | addonError-4=#1 could not be installed because #3 cannot modify the needed file.
36 | addonError-8=The add-on downloaded from #2 could not be installed because #3 does not support Jetpack (SDK) extensions.
37 | addonError-9=The add-on downloaded from #2 could not be installed because #3 does not support WebExtensions.
38 |
39 | # LOCALIZATION NOTE (addonLocalError-1, addonLocalError-2, addonLocalError-3, addonLocalError-4, addonErrorIncompatible, addonErrorBlocklisted):
40 | # #1 is the add-on name, #3 is the application name, #4 is the application version
41 | addonLocalError-1=This add-on could not be installed because of a filesystem error.
42 | addonLocalError-2=This add-on could not be installed because it does not match the add-on #3 expected.
43 | addonLocalError-3=This add-on could not be installed because it appears to be corrupt.
44 | addonLocalError-4=#1 could not be installed because #3 cannot modify the needed file.
45 | addonLocalError-8=This add-on could not be installed because #3 does not support Jetpack (SDK) extensions.
46 | addonLocalError-9=This add-on could not be installed because #3 does not support WebExtensions.
47 |
48 | addonErrorIncompatible=#1 could not be installed because it is not compatible with #3 #4.
49 | addonErrorBlocklisted=#1 could not be installed because it has a high risk of causing stability or security problems.
--------------------------------------------------------------------------------
/ambassador/locales/en-US/chrome/install-plugin.dtd:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/ambassador/locales/en-US/chrome/messengerOverlay.dtd:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ambassador/locales/en-US/chrome/networks-list.dtd:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/ambassador/locales/en-US/chrome/pref-irc.dtd:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/ambassador/locales/en-US/chrome/security-info.dtd:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/ambassador/locales/en-US/defines.inc:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #filter emptyLines
5 |
6 | #define MOZ_LANGPACK_CREATOR Ascrod
7 |
8 | #define MOZ_LANGPACK_HOMEPAGE https://github.com/Ascrod/ambassador/
9 |
10 | # If non-English locales wish to credit multiple contributors, uncomment this
11 | # variable definition and use the format specified.
12 | # #define MOZ_LANGPACK_CONTRIBUTORS Joe Solon Suzy Solon
13 |
14 | #unfilter emptyLines
15 |
--------------------------------------------------------------------------------
/ambassador/locales/en-US/installer/mui.properties:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | # To make the l10n tinderboxen see changes to this file you can change a value
6 | # name by adding - to the end of the name followed by chars (e.g. Branding-2).
7 |
8 | # LOCALIZATION NOTE:
9 |
10 | # This file must be saved as UTF8
11 |
12 | # Accesskeys are defined by prefixing the letter that is to be used for the
13 | # accesskey with an ampersand (e.g. &).
14 |
15 | # Do not replace $BrandShortName, $BrandFullName, or $BrandFullNameDA with a
16 | # custom string and always use the same one as used by the en-US files.
17 | # $BrandFullNameDA allows the string to contain an ampersand (e.g. DA stands
18 | # for double ampersand) and prevents the letter following the ampersand from
19 | # being used as an accesskey.
20 |
21 | # You can use \n to create a newline in the string but only when the string
22 | # from en-US contains a \n.
23 |
24 | MUI_TEXT_WELCOME_INFO_TITLE=Welcome to the $BrandFullNameDA Setup Wizard
25 | MUI_TEXT_WELCOME_INFO_TEXT=This wizard will guide you through the installation of $BrandFullNameDA.\n\nIt is recommended that you close all other applications before starting Setup. This will make it possible to update relevant system files without having to reboot your computer.\n\n$_CLICK
26 | MUI_TEXT_COMPONENTS_TITLE=Choose Components
27 | MUI_TEXT_COMPONENTS_SUBTITLE=Choose which features of $BrandFullNameDA you want to install.
28 | MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE=Description
29 | MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO=Position your mouse over a component to see its description.
30 | MUI_TEXT_DIRECTORY_TITLE=Choose Install Location
31 | MUI_TEXT_DIRECTORY_SUBTITLE=Choose the folder in which to install $BrandFullNameDA.
32 | MUI_TEXT_INSTALLING_TITLE=Installing
33 | MUI_TEXT_INSTALLING_SUBTITLE=Please wait while $BrandFullNameDA is being installed.
34 | MUI_TEXT_FINISH_TITLE=Installation Complete
35 | MUI_TEXT_FINISH_SUBTITLE=Setup was completed successfully.
36 | MUI_TEXT_ABORT_TITLE=Installation Aborted
37 | MUI_TEXT_ABORT_SUBTITLE=Setup was not completed successfully.
38 | MUI_BUTTONTEXT_FINISH=&Finish
39 | MUI_TEXT_FINISH_INFO_TITLE=Completing the $BrandFullNameDA Setup Wizard
40 | MUI_TEXT_FINISH_INFO_TEXT=$BrandFullNameDA has been installed on your computer.\n\nClick Finish to close this wizard.
41 | MUI_TEXT_FINISH_INFO_REBOOT=Your computer must be restarted in order to complete the installation of $BrandFullNameDA. Do you want to reboot now?
42 | MUI_TEXT_FINISH_REBOOTNOW=Reboot now
43 | MUI_TEXT_FINISH_REBOOTLATER=I want to manually reboot later
44 | MUI_TEXT_STARTMENU_TITLE=Choose Start Menu Folder
45 | MUI_TEXT_STARTMENU_SUBTITLE=Choose a Start Menu folder for the $BrandFullNameDA shortcuts.
46 | MUI_INNERTEXT_STARTMENU_TOP=Select the Start Menu folder in which you would like to create the program's shortcuts. You can also enter a name to create a new folder.
47 | MUI_TEXT_ABORTWARNING=Are you sure you want to quit $BrandFullName Setup?
48 | MUI_UNTEXT_WELCOME_INFO_TITLE=Welcome to the $BrandFullNameDA Uninstall Wizard
49 | MUI_UNTEXT_WELCOME_INFO_TEXT=This wizard will guide you through the uninstallation of $BrandFullNameDA.\n\nBefore starting the uninstallation, make sure $BrandFullNameDA is not running.\n\n$_CLICK
50 | MUI_UNTEXT_CONFIRM_TITLE=Uninstall $BrandFullNameDA
51 | MUI_UNTEXT_CONFIRM_SUBTITLE=Remove $BrandFullNameDA from your computer.
52 | MUI_UNTEXT_UNINSTALLING_TITLE=Uninstalling
53 | MUI_UNTEXT_UNINSTALLING_SUBTITLE=Please wait while $BrandFullNameDA is being uninstalled.
54 | MUI_UNTEXT_FINISH_TITLE=Uninstallation Complete
55 | MUI_UNTEXT_FINISH_SUBTITLE=Uninstall was completed successfully.
56 | MUI_UNTEXT_ABORT_TITLE=Uninstallation Aborted
57 | MUI_UNTEXT_ABORT_SUBTITLE=Uninstall was not completed successfully.
58 | MUI_UNTEXT_FINISH_INFO_TITLE=Completing the $BrandFullNameDA Uninstall Wizard
59 | MUI_UNTEXT_FINISH_INFO_TEXT=$BrandFullNameDA has been uninstalled from your computer.\n\nClick Finish to close this wizard.
60 | MUI_UNTEXT_FINISH_INFO_REBOOT=Your computer must be restarted in order to complete the uninstallation of $BrandFullNameDA. Do you want to reboot now?
61 | MUI_UNTEXT_ABORTWARNING=Are you sure you want to quit $BrandFullName Uninstall?
62 |
--------------------------------------------------------------------------------
/ambassador/locales/en-US/installer/override.properties:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | # LOCALIZATION NOTE:
6 |
7 | # This file must be saved as UTF8
8 |
9 | # Accesskeys are defined by prefixing the letter that is to be used for the
10 | # accesskey with an ampersand (e.g. &).
11 |
12 | # Do not replace $BrandShortName, $BrandFullName, or $BrandFullNameDA with a
13 | # custom string and always use the same one as used by the en-US files.
14 | # $BrandFullNameDA allows the string to contain an ampersand (e.g. DA stands
15 | # for double ampersand) and prevents the letter following the ampersand from
16 | # being used as an accesskey.
17 |
18 | # You can use \n to create a newline in the string but only when the string
19 | # from en-US contains a \n.
20 |
21 | # Strings that require a space at the end should be enclosed with double
22 | # quotes and the double quotes will be removed. To add quotes to the beginning
23 | # and end of a strong enclose the add and additional double quote to the
24 | # beginning and end of the string (e.g. ""This will include quotes"").
25 |
26 | SetupCaption=$BrandFullName Setup
27 | UninstallCaption=$BrandFullName Uninstall
28 | BackBtn=< &Back
29 | NextBtn=&Next >
30 | AcceptBtn=I &accept the terms in the License Agreement
31 | DontAcceptBtn=I &do not accept the terms in the License Agreement
32 | InstallBtn=&Install
33 | UninstallBtn=&Uninstall
34 | CancelBtn=Cancel
35 | CloseBtn=&Close
36 | BrowseBtn=B&rowse…
37 | ShowDetailsBtn=Show &details
38 | ClickNext=Click Next to continue.
39 | ClickInstall=Click Install to start the installation.
40 | ClickUninstall=Click Uninstall to start the uninstallation.
41 | Completed=Completed
42 | LicenseTextRB=Please review the license agreement before installing $BrandFullNameDA. If you accept all terms of the agreement, select the first option below. $_CLICK
43 | ComponentsText=Check the components you want to install and uncheck the components you don't want to install. $_CLICK
44 | ComponentsSubText2_NoInstTypes=Select components to install:
45 | DirText=Setup will install $BrandFullNameDA in the following folder. To install in a different folder, click Browse and select another folder. $_CLICK
46 | DirSubText=Destination Folder
47 | DirBrowseText=Select the folder to install $BrandFullNameDA in:
48 | SpaceAvailable="Space available: "
49 | SpaceRequired="Space required: "
50 | UninstallingText=$BrandFullNameDA will be uninstalled from the following folder. $_CLICK
51 | UninstallingSubText=Uninstalling from:
52 | FileError=Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Abort to stop the installation,\r\nRetry to try again, or\r\nIgnore to skip this file.
53 | FileError_NoIgnore=Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Retry to try again, or\r\nCancel to stop the installation.
54 | CantWrite="Can't write: "
55 | CopyFailed=Copy failed
56 | CopyTo="Copy to "
57 | Registering="Registering: "
58 | Unregistering="Unregistering: "
59 | SymbolNotFound="Could not find symbol: "
60 | CouldNotLoad="Could not load: "
61 | CreateFolder="Create folder: "
62 | CreateShortcut="Create shortcut: "
63 | CreatedUninstaller="Created uninstaller: "
64 | Delete="Delete file: "
65 | DeleteOnReboot="Delete on reboot: "
66 | ErrorCreatingShortcut="Error creating shortcut: "
67 | ErrorCreating="Error creating: "
68 | ErrorDecompressing=Error decompressing data! Corrupted installer?
69 | ErrorRegistering=Error registering DLL
70 | ExecShell="ExecShell: "
71 | Exec="Execute: "
72 | Extract="Extract: "
73 | ErrorWriting="Extract: error writing to file "
74 | InvalidOpcode=Installer corrupted: invalid opcode
75 | NoOLE="No OLE for: "
76 | OutputFolder="Output folder: "
77 | RemoveFolder="Remove folder: "
78 | RenameOnReboot="Rename on reboot: "
79 | Rename="Rename: "
80 | Skipped="Skipped: "
81 | CopyDetails=Copy Details To Clipboard
82 | LogInstall=Log install process
83 | Byte=B
84 | Kilo=K
85 | Mega=M
86 | Giga=G
87 |
--------------------------------------------------------------------------------
/ambassador/locales/generic/install.rdf:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | #filter substitution
7 |
8 | #ifndef IRC_STANDALONE_BUILD
9 | #include @TK_DEFINES@
10 | #include @APP_DEFINES@
11 | #endif
12 |
13 |
15 |
22 | #ifdef MOZ_LANGPACK_CONTRIBUTORS
23 | @MOZ_LANGPACK_CONTRIBUTORS@
24 | #endif
25 |
26 | chrome://ambassador/skin/images/icon64.png
27 |
28 |
31 |
32 |
35 |
36 |
37 | {8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}
38 | 27.7
39 | @PALEMOON_MAXVERSION@
40 |
41 |
42 |
43 |
44 |
45 |
46 | {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
47 | 3.5
48 | @BASILISK_MAXVERSION@
49 | true
50 |
51 |
52 | true
53 |
54 |
55 |
--------------------------------------------------------------------------------
/ambassador/locales/jar.mn:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | #filter substitution
6 |
7 | @AB_CD@.jar:
8 | # the "% locale" line gets put into the .manifest used by toolkit-based apps
9 | % locale ambassador @AB_CD@ %locale/@AB_CD@/ambassador/
10 | locale/@AB_CD@/ambassador/ambassadorOverlay.dtd (%chrome/ambassadorOverlay.dtd)
11 | locale/@AB_CD@/ambassador/browserOverlay.dtd (%chrome/browserOverlay.dtd)
12 | locale/@AB_CD@/ambassador/messengerOverlay.dtd (%chrome/messengerOverlay.dtd)
13 | locale/@AB_CD@/ambassador/pref-irc.dtd (%chrome/pref-irc.dtd)
14 | locale/@AB_CD@/ambassador/ambassador.dtd (%chrome/ambassador.dtd)
15 | locale/@AB_CD@/ambassador/ambassador.properties (%chrome/ambassador.properties)
16 | locale/@AB_CD@/ambassador/config.dtd (%chrome/config.dtd)
17 | locale/@AB_CD@/ambassador/channels.dtd (%chrome/channels.dtd)
18 | locale/@AB_CD@/ambassador/security-info.dtd (%chrome/security-info.dtd)
19 | locale/@AB_CD@/ambassador/networks-list.dtd (%chrome/networks-list.dtd)
20 | locale/@AB_CD@/ambassador/extensionsOverlay.properties (%chrome/extensionsOverlay.properties)
21 | locale/@AB_CD@/ambassador/about.dtd (%chrome/about.dtd)
22 | locale/@AB_CD@/ambassador/install-plugin.dtd (%chrome/install-plugin.dtd)
23 |
--------------------------------------------------------------------------------
/ambassador/locales/l10n.ini:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | [general]
6 | depth = ../../platform
7 | all = ambassador/locales/all-locales
8 |
9 | [compare]
10 | dirs = ambassador
11 | ambassador/branding
12 |
13 | [includes]
14 | toolkit = toolkit/locales/l10n.ini
15 | devtools_client = devtools/client/locales/l10n.ini
16 |
17 | [extras]
18 | dirs = extensions/spellcheck
19 |
--------------------------------------------------------------------------------
/ambassador/locales/moz.build:
--------------------------------------------------------------------------------
1 | # vim: set filetype=python:
2 | # This Source Code Form is subject to the terms of the Mozilla Public
3 | # License, v. 2.0. If a copy of the MPL was not distributed with this
4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 |
6 | JAR_MANIFESTS += ['jar.mn']
7 |
--------------------------------------------------------------------------------
/ambassador/maxversions.mk:
--------------------------------------------------------------------------------
1 | #
2 | # This Source Code Form is subject to the terms of the Mozilla Public
3 | # License, v. 2.0. If a copy of the MPL was not distributed with this
4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 |
6 |
7 | PALEMOON_VERSION := $(shell cat $(topsrcdir)/../palemoon/palemoon/config/version.txt)
8 | BASILISK_VERSION := $(shell cat $(topsrcdir)/../basilisk/basilisk/config/version.txt)
9 |
10 | # For extensions we require a max version that is compatible across major releases.
11 | # BASILISK_MAXVERSION and PALEMOON_MAXVERSION is our method for doing that.
12 | PALEMOON_MAXVERSION := $(shell echo $(PALEMOON_VERSION) | sed 's|\(^[0-9]*\).*|\1|' ).*
13 |
14 | BASILISK_MAXVERSION := $(shell echo $(BASILISK_VERSION) | sed 's|\(^[0-9]*\).*|\1|' ).*
15 |
16 |
--------------------------------------------------------------------------------
/ambassador/moz.build:
--------------------------------------------------------------------------------
1 | # vim: set filetype=python:
2 | # This Source Code Form is subject to the terms of the Mozilla Public
3 | # License, v. 2.0. If a copy of the MPL was not distributed with this
4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 |
6 | CONFIGURE_SUBST_FILES += ['installer/Makefile']
7 |
8 | DIRS += [
9 | 'components',
10 | 'locales',
11 | 'app',
12 | 'xpi',
13 | ]
14 |
15 | if CONFIG['MAKENSISU']:
16 | DIRS += ['installer/windows']
17 |
18 | JAR_MANIFESTS += ['jar.mn']
19 |
20 | DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
21 | DEFINES['MOZ_APP_ID'] = CONFIG['MOZ_APP_ID']
22 |
--------------------------------------------------------------------------------
/ambassador/moz.configure:
--------------------------------------------------------------------------------
1 | # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 | # vim: set filetype=python:
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | include('../platform/toolkit/moz.configure')
8 |
--------------------------------------------------------------------------------
/ambassador/xpi/Makefile.in:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | include $(topsrcdir)/config/config.mk
6 |
7 | include $(srcdir)/../maxversions.mk
8 |
9 | PACKAGE_FILE = ambassador.pkg
10 |
11 | DIST_FILES = install.rdf
12 |
13 | XPI_NAME = $(MOZ_APP_NAME)
14 | INSTALL_EXTENSION_ID = $(MOZ_APP_ID)
15 | XPI_PKGNAME = $(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
16 |
17 | DEFINES += -DAPP_VERSION=$(MOZ_APP_VERSION) \
18 | -DAPP_ID=$(MOZ_APP_ID) \
19 | -DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
20 | -DMOZ_APP_ID=$(MOZ_APP_ID) \
21 | -DPALEMOON_MAXVERSION=$(PALEMOON_MAXVERSION) \
22 | -DBASILISK_MAXVERSION=$(BASILISK_MAXVERSION) \
23 | $(NULL)
24 |
25 | include $(topsrcdir)/config/rules.mk
26 |
27 | libs realchrome:: $(FINAL_TARGET)/chrome
28 | $(call py_action,jar_maker, \
29 | $(QUIET) -d $(FINAL_TARGET) \
30 | $(MAKE_JARS_FLAGS) \
31 | $(srcdir)/../jar.mn )
32 | $(call py_action,preprocessor \
33 | $(DEFINES) $(ACDEFINES) \
34 | $(srcdir)/../xul/content/static.js \
35 | -o $(DIST)/xpi-stage/$(XPI_NAME)/chrome/ambassador/content/ambassador/static.js)
36 | $(call py_action,preprocessor \
37 | $(DEFINES) $(ACDEFINES) \
38 | $(srcdir)/../locales/jar.mn \
39 | -o $(DIST)/xpi-stage/$(XPI_NAME)/jar.mn.pp)
40 | $(call py_action,jar_maker, \
41 | $(QUIET) -d $(FINAL_TARGET) \
42 | $(MAKE_JARS_FLAGS) \
43 | -s $(srcdir)/../locales \
44 | -c $(srcdir)/../locales/en-US \
45 | $(DIST)/xpi-stage/$(XPI_NAME)/jar.mn.pp)
46 | $(RM) $(DIST)/xpi-stage/$(XPI_NAME)/jar.mn.pp
47 |
48 |
49 | export::
50 | $(NSINSTALL) -D $(FINAL_TARGET)/chrome/icons/default
51 | $(INSTALL) $(srcdir)/../branding/ambassador-window* $(FINAL_TARGET)/chrome/icons/default
52 |
--------------------------------------------------------------------------------
/ambassador/xpi/install.rdf:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | #filter substitution
7 |
8 |
10 |
11 |
12 | @APP_ID@
13 | @APP_VERSION@
14 | 2
15 |
16 |
19 |
20 |
23 |
24 |
25 | {8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}
26 | 28.0
27 | @PALEMOON_MAXVERSION@
28 |
29 |
30 |
31 |
32 |
33 |
34 | {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
35 | 52.9
36 | @BASILISK_MAXVERSION@
37 | true
38 |
39 |
40 |
41 |
42 |
43 |
44 | {3550f703-e582-4d05-9a08-453d09bdfdc6}
45 | 52.9
46 | 52.*
47 |
48 |
49 |
50 |
51 |
52 |
53 | {3aa07e56-beb0-47a0-b0cb-c735edd25419}
54 | 52.9
55 | 52.*
56 |
57 |
58 |
59 |
60 | Ambassador
61 | A clean, easy to use and highly extensible Internet Relay Chat (IRC) client.
62 | Ascrod
63 | chrome://ambassador/skin/images/icon64.png
64 | https://github.com/ascrod/ambassador/
65 | chrome://ambassador/content/about/about.xul
66 | chrome://ambassador/content/config.xul
67 | true
68 |
69 |
71 | true
72 |
73 |
74 |
--------------------------------------------------------------------------------
/ambassador/xpi/moz.build:
--------------------------------------------------------------------------------
1 | # vim: set filetype=python:
2 | # This Source Code Form is subject to the terms of the Mozilla Public
3 | # License, v. 2.0. If a copy of the MPL was not distributed with this
4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 |
6 | NO_JS_MANIFEST = True
7 | USE_EXTENSION_MANIFEST = True
8 |
9 | EXTRA_COMPONENTS += [
10 | '../components/AddonComponents.manifest',
11 | '../components/ambassador-service.js',
12 | ]
13 |
14 | XPI_NAME = CONFIG['MOZ_APP_NAME']
15 | export('XPI_NAME')
16 |
17 | FINAL_TARGET_PP_FILES += [
18 | 'install.rdf',
19 | ]
20 |
--------------------------------------------------------------------------------
/ambassador/xul/content/about/about.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | var ownerClient = null;
6 |
7 | // To be able to load static.js, we need a few things defined first:
8 | function CIRCNetwork() {}
9 | function CIRCServer() {}
10 | function CIRCChannel() {}
11 | function CIRCUser() {}
12 | function CIRCChanUser() {}
13 | function CIRCDCCUser() {}
14 | function CIRCDCCChat() {}
15 | function CIRCDCCFile() {}
16 | function CIRCDCCFileTransfer() {}
17 | function CIRCSTS() {}
18 |
19 | // Our friend from messages.js:
20 | function getMsg(msgName, params, deflt)
21 | {
22 | return client.messageManager.getMsg(msgName, params, deflt);
23 | }
24 |
25 | function onLoad()
26 | {
27 | const propsPath = "chrome://ambassador/locale/ambassador.properties";
28 |
29 | // Find our owner, if we have one.
30 | ownerClient = window.arguments ? window.arguments[0].client : null;
31 | if (ownerClient)
32 | ownerClient.aboutDialog = window;
33 |
34 | client.entities = new Object();
35 | client.messageManager = new MessageManager(client.entities);
36 | client.messageManager.loadBrands();
37 | client.defaultBundle = client.messageManager.addBundle(propsPath);
38 |
39 | var version = getVersionInfo();
40 | client.userAgent = getMsg(MSG_VERSION_REPLY, [version.cz, version.ua]);
41 |
42 | var verLabel = document.getElementById("version");
43 | var verString = verLabel.getAttribute("format").replace("%S", version.cz);
44 | verLabel.setAttribute("value", verString);
45 | verLabel.setAttribute("condition", __cz_condition);
46 |
47 | var localizers = document.getElementById("localizers");
48 | var localizerNames = getMsg("locale.authors", null, "");
49 | if (localizerNames && (localizerNames.substr(0, 11) != "XXX REPLACE"))
50 | {
51 | localizerNames = localizerNames.split(/\s*;\s*/);
52 |
53 | for (var i = 0; i < localizerNames.length; i++) {
54 | var loc = document.createElement("label");
55 | loc.setAttribute("value", localizerNames[i]);
56 | localizers.appendChild(loc);
57 | }
58 | }
59 | else
60 | {
61 | var localizersHeader = document.getElementById("localizers-header");
62 | localizersHeader.style.display = "none";
63 | localizers.style.display = "none";
64 | }
65 |
66 | if (window.opener)
67 | {
68 | // Force the window to be the right size now, not later.
69 | window.sizeToContent();
70 |
71 | // Position it centered over, but never up or left of parent.
72 | var opener = window.opener;
73 | var sx = Math.max((opener.outerWidth - window.outerWidth ) / 2, 0);
74 | var sy = Math.max((opener.outerHeight - window.outerHeight) / 2, 0);
75 | window.moveTo(opener.screenX + sx, opener.screenY + sy);
76 | }
77 |
78 | /* Find and focus the dialog's default button (OK), otherwise the focus
79 | * lands on the first focusable content - the homepage link. Links in XUL
80 | * look horrible when focused.
81 | */
82 | var binding = document.documentElement;
83 | var defaultButton = binding.getButton(binding.defaultButton);
84 | if (defaultButton)
85 | setTimeout(function() { defaultButton.focus() }, 0);
86 | }
87 |
88 | function onUnload()
89 | {
90 | if (ownerClient)
91 | delete ownerClient.aboutDialog;
92 | }
93 |
94 | function copyVersion()
95 | {
96 | const cbID = Components.interfaces.nsIClipboard.kGlobalClipboard;
97 | var cb = getService("@mozilla.org/widget/clipboard;1", "nsIClipboard");
98 | var tr = newObject("@mozilla.org/widget/transferable;1", "nsITransferable");
99 | var str = newObject("@mozilla.org/supports-string;1", "nsISupportsString");
100 |
101 | str.data = client.userAgent;
102 | tr.setTransferData("text/unicode", str, str.data.length * 2);
103 | cb.setData(tr, null, cbID);
104 | }
105 |
106 | function openHomepage()
107 | {
108 | if (ownerClient)
109 | ownerClient.dispatch("goto-url", {url: MSG_SOURCE_REPLY});
110 | else
111 | window.opener.open(MSG_SOURCE_REPLY, "_blank");
112 | }
113 |
--------------------------------------------------------------------------------
/ambassador/xul/content/about/about.xul:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
63 |
--------------------------------------------------------------------------------
/ambassador/xul/content/ambassadorOverlay.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | function toIRC()
6 | {
7 | toOpenWindowByType("irc:ambassador", "chrome://ambassador/content/ambassador.xul");
8 | }
9 |
--------------------------------------------------------------------------------
/ambassador/xul/content/ambassadorOverlay.xul:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
43 |
--------------------------------------------------------------------------------
/ambassador/xul/content/bk/overlay.xul:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/ambassador/xul/content/browserOverlay.xul:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
15 |
16 |
17 |
18 |
19 |
22 |
23 |
24 |
30 |
31 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ambassador/xul/content/config-add.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | var rv, rad, box1, box2;
6 |
7 | function changeType()
8 | {
9 | box2.disabled = (rad.value == "net");
10 | }
11 |
12 | function onOK()
13 | {
14 | rv.ok = true;
15 |
16 | rv.type = rad.value;
17 | rv.net = box1.value;
18 | rv.chan = box2.value;
19 |
20 | return true;
21 | }
22 |
23 | function onCancel()
24 | {
25 | rv.ok = false;
26 |
27 | return true;
28 | }
29 |
30 | function onLoad()
31 | {
32 | rad = document.getElementById("prefType");
33 | box1 = document.getElementById("prefName1");
34 | box2 = document.getElementById("prefName2");
35 |
36 | rv = window.arguments[0];
37 |
38 | if (!("type" in rv))
39 | rv.type = "";
40 | if (!("net" in rv))
41 | rv.net = "";
42 | if (!("chan" in rv))
43 | rv.chan = "";
44 | rv.ok = false;
45 |
46 | if (rv.type == "net")
47 | rad.selectedIndex = 0;
48 | if (rv.type == "chan")
49 | rad.selectedIndex = 1;
50 | if (rv.type == "user")
51 | rad.selectedIndex = 2;
52 |
53 | box1.value = rv.net || "";
54 | box2.value = rv.chan || "";
55 | }
56 |
--------------------------------------------------------------------------------
/ambassador/xul/content/config-add.xul:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
56 |
--------------------------------------------------------------------------------
/ambassador/xul/content/config.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
6 |
7 | /* OSX uses lotsa padding on tabs. Need to allow window to expand. */
8 |
9 | /* Instead of setting on dialog, we're going to set it on the two main
10 | * components of the window, so that large changes in the size of bits of the
11 | * dialog don't upset things.
12 | */
13 |
14 | /* Set min-width on the left-side tree. */
15 | #pref-objects {
16 | min-width: 25ex;
17 | }
18 |
19 | /* Set min-width and min-height on tabs container. */
20 | #pref-object-deck {
21 | min-width: 80ex;
22 | min-height: 32em;
23 | width: 80ex;
24 | height: 32em;
25 | }
26 |
27 | scroller {
28 | overflow: auto;
29 | }
30 |
31 | listbox {
32 | min-height: 7em;
33 | }
34 |
--------------------------------------------------------------------------------
/ambassador/xul/content/config.xul:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
83 |
--------------------------------------------------------------------------------
/ambassador/xul/content/devtools.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
6 | Cu.import("resource://gre/modules/XPCOMUtils.jsm");
7 |
8 | function initDevtools()
9 | {
10 | XPCOMUtils.defineLazyModuleGetter(this, "ScratchpadManager","resource://devtools/client/scratchpad/scratchpad-manager.jsm");
11 | XPCOMUtils.defineLazyModuleGetter(this, "BrowserToolboxProcess", "resource://devtools/client/framework/ToolboxProcess.jsm");
12 | Object.defineProperty(this, "HUDService", {
13 | get: function HUDService_getter() {
14 | let devtools = Components.utils.import("resource://devtools/shared/Loader.jsm", {}).devtools;
15 | return devtools.require("devtools/client/webconsole/hudservice");
16 | },
17 | configurable: true,
18 | enumerable: true
19 | });
20 | }
21 |
--------------------------------------------------------------------------------
/ambassador/xul/content/dynamic.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | /* empty css file. rules are appended to this dynamically */
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ambassador/xul/content/extensions/extensionsOverlay.xul:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/ambassador/xul/content/il/overlay.xul:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/ambassador/xul/content/install-plugin/install-plugin.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | var client;
6 | var plugin;
7 |
8 | function onLoad()
9 | {
10 | client = window.arguments[0];
11 | client.installPluginDialog = window;
12 | window.getMsg = client.messageManager.getMsg;
13 | window.MSG_ALERT = client.mainWindow.MSG_ALERT;
14 |
15 | hookEvent("chk-name-auto", "command", changeAutoName);
16 | hookEvent("txt-source", "input", sourceChange);
17 | hookEvent("btn-browse", "command", browseForSource);
18 |
19 | // Center on CZ:
20 | var ow = client.mainWindow;
21 | window.sizeToContent();
22 | window.moveTo(ow.screenX + Math.max((ow.outerWidth - window.outerWidth ) / 2, 0),
23 | ow.screenY + Math.max((ow.outerHeight - window.outerHeight) / 2, 0));
24 | }
25 |
26 | function changeAutoName(event)
27 | {
28 | var useAutoName = document.getElementById("chk-name-auto");
29 | var pluginName = document.getElementById("txt-name");
30 | if (useAutoName.checked)
31 | {
32 | pluginName.setAttribute("disabled", "true");
33 | sourceChange(null);
34 | }
35 | else
36 | {
37 | pluginName.removeAttribute("disabled");
38 | }
39 | }
40 |
41 | function sourceChange(event)
42 | {
43 | var useAutoName = document.getElementById("chk-name-auto");
44 | var pluginName = document.getElementById("txt-name");
45 | var sourceLoc = document.getElementById("txt-source");
46 |
47 | if (useAutoName.checked)
48 | {
49 | var ary = sourceLoc.value.match(/([^\/]+?)(\..{0,3}){0,2}$/);
50 | pluginName.value = (ary ? ary[1] : sourceLoc.value);
51 | }
52 | }
53 |
54 | function browseForSource(event)
55 | {
56 | var rv = pickOpen(client.mainWindow.MSG_INSTALL_PLUGIN_SELECT_SOURCE,
57 | "*.js;*.zip;*.jar");
58 |
59 | if (("file" in rv) && rv.file)
60 | {
61 | rv.path = rv.file.path;
62 | rv.spec = rv.picker.fileURL.spec;
63 | }
64 |
65 | if (rv.reason == 0)
66 | {
67 | var sourceLoc = document.getElementById("txt-source");
68 | sourceLoc.value = rv.spec;
69 | sourceChange(null);
70 | }
71 | }
72 |
73 | function doOK()
74 | {
75 | var pluginName = document.getElementById("txt-name");
76 | var pluginSource = document.getElementById("txt-source");
77 | if (!pluginName.value)
78 | {
79 | alert(client.mainWindow.MSG_INSTALL_PLUGIN_ERR_SPEC_NAME);
80 | return false;
81 | }
82 |
83 | client.dispatch("install-plugin", {name: pluginName.value,
84 | url: pluginSource.value});
85 | delete client.installPluginDialog;
86 | }
87 |
88 | function doCancel()
89 | {
90 | delete client.installPluginDialog;
91 | }
92 |
93 | function hookEvent(id, event, handler)
94 | {
95 | var item = document.getElementById(id);
96 | item.addEventListener(event, handler, false);
97 | }
98 |
--------------------------------------------------------------------------------
/ambassador/xul/content/install-plugin/install-plugin.xul:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
44 |
--------------------------------------------------------------------------------
/ambassador/xul/content/messengerOverlay.xul:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
15 |
16 |
17 |
18 |
19 |
22 |
23 |
24 |
30 |
31 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ambassador/xul/content/networks-list.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
6 |
7 | /* Set min-width on the left-side tree. */
8 | #network-objects {
9 | min-width: 30ex;
10 | }
11 |
12 | /* Set min-width and min-height on main container. */
13 | #network-editor-box, #server-editor-box {
14 | min-width: 65ex;
15 | min-height: 32em;
16 | width: 65ex;
17 | height: 32em;
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/ambassador/xul/content/pm/overlay.xul:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/ambassador/xul/content/pref-irc-toolkit.xul:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
13 |
14 |
15 |
16 |
17 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ambassador/xul/content/pref-irc.xul:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
13 |
14 |
19 |
20 |
21 |
22 |
23 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/ambassador/xul/content/prefsOverlay.xul:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
11 |
12 |
13 |
14 |
15 |
17 |
18 |
19 |
20 |
21 |
22 |
27 |
28 |
29 |
30 |
38 |
39 |
40 |
43 |
44 |
45 |
46 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/ambassador/xul/content/scripts.xul:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/ambassador/xul/content/security-info.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | var client;
6 | var server;
7 | var certificate;
8 |
9 | const STATE_IS_BROKEN = 1;
10 | const STATE_IS_SECURE = 2;
11 | const STATE_IS_INSECURE = 3;
12 |
13 | const STATE_SECURE_LOW = 1;
14 | const STATE_SECURE_HIGH = 2;
15 |
16 | function onLoad()
17 | {
18 | client = window.arguments[0].client;
19 | window.dd = client.mainWindow.dd;
20 | window.getMsg = client.mainWindow.getMsg;
21 |
22 | var opener = window.arguments[0].opener;
23 | if (opener)
24 | {
25 | // Force the window to be the right size now, not later.
26 | window.sizeToContent();
27 |
28 | // Position it centered over, but never up or left of parent.
29 | var sx = Math.max((opener.outerWidth - window.outerWidth ) / 2, 0);
30 | var sy = Math.max((opener.outerHeight - window.outerHeight) / 2, 0);
31 | window.moveTo(opener.screenX + sx, opener.screenY + sy);
32 | }
33 |
34 | server = window.arguments[0].server;
35 | certificate = server.connection.getCertificate();
36 | var info = server.connection.getSecurityInfo();
37 |
38 | setText("security-hostname-value", server.hostname);
39 | setText("security-cipher-value", info.cipherSuite);
40 | setText("security-keysize-value", info.keyLength);
41 | setText("security-protocol-value", info.protocolVersion);
42 |
43 | var stateText = null;
44 | switch (info.state[0])
45 | {
46 | case STATE_IS_BROKEN:
47 | stateText = client.mainWindow.MSG_SECURITY_BROKEN;
48 | break;
49 | case STATE_IS_INSECURE:
50 | stateText = client.mainWindow.MSG_SECURITY_INSECURE;
51 | break;
52 | case STATE_IS_SECURE:
53 | if (info.state[1] == STATE_SECURE_HIGH)
54 | stateText = client.mainWindow.MSG_SECURITY_STRONG;
55 | else
56 | stateText = client.mainWindow.MSG_SECURITY_WEAK;
57 | break;
58 | }
59 |
60 | setText("security-status-value", stateText);
61 |
62 | var ctStatus =
63 | document.getElementById("security-certificate-transparency");
64 | if (info.certificateTransparency) {
65 | ctStatus.hidden = false;
66 | ctStatus.value = client.mainWindow["MSG_TRANSPARENCY_" +
67 | info.certificateTransparency.toUpper()];
68 | } else {
69 | ctStatus.hidden = true;
70 | }
71 | }
72 |
73 | function setText(id, value)
74 | {
75 | var element = document.getElementById(id);
76 | if (!element)
77 | return;
78 | if (element.localName == "textbox" || element.localName == "label")
79 | element.value = value;
80 | else {
81 | if (element.hasChildNodes())
82 | element.removeChild(element.firstChild);
83 | var textNode = document.createTextNode(value);
84 | element.appendChild(textNode);
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/ambassador/xul/content/security-info.xul:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
93 |
--------------------------------------------------------------------------------
/ambassador/xul/skin/about.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | dialog {
6 | padding-top: 0px;
7 | padding-left: 0px;
8 | padding-right: 0px;
9 | width: 30em;
10 | }
11 |
12 | .box-padded {
13 | background-color: Window;
14 | color: WindowText;
15 | }
16 |
17 | .large-text {
18 | font-size: large;
19 | }
20 |
21 | #logo {
22 | background: url(chrome://ambassador/skin/images/icon32.png);
23 | background-repeat: no-repeat;
24 | width: 32px;
25 | height: 32px;
26 | }
27 |
28 | #version {
29 | color: GrayText;
30 | }
31 |
32 | .contributors-label {
33 | margin-top: 0.5em;
34 | margin-bottom: 0.5em;
35 | }
36 |
37 | .contributors label {
38 | margin-top: 0px;
39 | margin-bottom: 0px;
40 | }
41 |
42 | #groove {
43 | margin-top: 0px;
44 | }
45 |
--------------------------------------------------------------------------------
/ambassador/xul/skin/ambassadorOverlay.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | #mini-irc {
6 | list-style-image: url("chrome://ambassador/skin/images/icon16.png");
7 | }
8 |
9 | #tasksMenuIRC {
10 | list-style-image: url("chrome://ambassador/skin/images/icon16.png");
11 | }
12 |
--------------------------------------------------------------------------------
/ambassador/xul/skin/browserOverlay.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | #tb-ambassador-open,
6 | #tb-ambassador-menu {
7 | list-style-image: url("chrome://ambassador/skin/images/icon16.png");
8 | }
9 |
--------------------------------------------------------------------------------
/ambassador/xul/skin/channels.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | #rightPanel {
6 | width: 12em;
7 | }
8 |
9 | #bottomPanel {
10 | width: 50em;
11 | height: 20em;
12 | }
13 |
14 | .platform-Mac #rightPanel {
15 | width: 18em;
16 | }
17 |
18 | #loadContainer {
19 | margin: 0;
20 | }
21 |
22 | #loadBar {
23 | -moz-appearance: none;
24 | }
25 |
--------------------------------------------------------------------------------
/ambassador/xul/skin/extensionsOverlay.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | License, v. 2.0. If a copy of the MPL was not distributed with this
3 | file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
6 | @namespace html url("http://www.w3.org/1999/xhtml");
7 |
8 | #addons-page {
9 | padding: 0px;
10 | }
11 |
12 | #header, #main {
13 | padding-left: 18px;
14 | padding-right: 18px;
15 | }
16 |
17 | #header {
18 | padding-top: 18px;
19 | }
20 |
21 | #main {
22 | padding-bottom: 18px;
23 | }
24 |
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/admin-graphic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/admin-graphic.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/admin-symbol.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/admin-symbol.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/arrow-down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/arrow-down.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/drop-indicator-bottom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/drop-indicator-bottom.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-alien.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-alien.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-angry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-angry.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-arrow.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-confused.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-confused.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-cool.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-cool.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-cry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-cry.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-dizzy-back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-dizzy-back.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-dizzy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-dizzy.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-eek.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-eek.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-evil.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-evil.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-exclaim.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-exclaim.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-idea.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-idea.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-laugh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-laugh.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-lol.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-lol.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-mrgreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-mrgreen.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-normal.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-question.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-question.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-razz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-razz.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-red.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-rofl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-rofl.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-rolleyes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-rolleyes.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-sad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-sad.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-smile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-smile.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-surprised.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-surprised.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-tongue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-tongue.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/face-wink.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/face-wink.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/founder-graphic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/founder-graphic.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/founder-symbol.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/founder-symbol.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/halfop-graphic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/halfop-graphic.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/halfop-symbol.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/halfop-symbol.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/input-send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/input-send.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/logging-off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/logging-off.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/logging-on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/logging-on.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/multiline-contract.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/multiline-contract.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/multiline-expand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/multiline-expand.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/no-graphic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/no-graphic.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/no-symbol.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/no-symbol.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/offline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/offline.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/online.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/online.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/op-graphic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/op-graphic.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/op-symbol.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/op-symbol.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/secure-broken.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/secure-broken.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/secure-low.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/secure-low.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/secure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/secure.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/source_png/spbubble-off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/source_png/spbubble-off.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/source_png/spbubble-on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/source_png/spbubble-on.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/source_svg/logging.svg:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
62 |
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/spbubble-off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/spbubble-off.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/spbubble-on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/spbubble-on.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/voice-graphic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/voice-graphic.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/images/voice-symbol.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/ambassador/xul/skin/images/voice-symbol.png
--------------------------------------------------------------------------------
/ambassador/xul/skin/install-plugin.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | window {
6 | width: 35em;
7 | padding: 0.5em;
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/ambassador/xul/skin/messengerOverlay.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | #tb-ambassador-open,
6 | #tb-ambassador-menu {
7 | list-style-image: url("chrome://ambassador/skin/images/icon16.png");
8 | }
9 |
--------------------------------------------------------------------------------
/ambassador/xul/skin/output-default.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | /*
6 | * a version of the output window that uses only your default foreground and
7 | * backgrond colors. Message types are distinguished by font changes.
8 | * see output-base.css for details.
9 | */
10 |
11 | @import url(chrome://ambassador/content/output-base.css);
12 |
13 | .header-outer {
14 | background-color: white;
15 | }
16 |
17 | .progress-fg {
18 | background-color: grey;
19 | }
20 |
21 | .msg[msg-type="ACTION"] .msg-data {
22 | font-style: italic;
23 | }
24 |
25 | .msg[msg-type="JOIN"] .msg-type,
26 | .msg[msg-type="PART"] .msg-type,
27 | .msg[msg-type="QUIT"] .msg-type {
28 | font-weight: bold;
29 | }
30 |
31 | .msg[msg-type="QUIT"] .msg-data {
32 | font-variant: small-caps;
33 | font-weight: bold;
34 | }
35 |
36 | .msg[msg-type="JOIN"] .msg-data,
37 | .msg[msg-type="PART"] .msg-data {
38 | font-variant: small-caps;
39 | }
40 |
41 | .msg[msg-type="HELLO"] .msg-data,
42 | .msg[msg-type="NICK"] .msg-type,
43 | .msg[msg-type="NOTICE"] .msg-data {
44 | font-weight: bold;
45 | }
46 |
47 | .msg[msg-type="NICK"] .msg-data {
48 | font-family: monospace;
49 | }
50 |
51 | /* :before and :after pseudoclasses form the decorations around nicknames. */
52 | .msg-user:before,
53 | .msg-user:after {
54 | font-size: 100%;
55 | font-family: monospace;
56 | font-weight: bolder;
57 | }
58 |
59 | .msg[dest-type="IRCUser"] .msg-user,
60 | .msg[dest-type="IRCUser"][msg-dest$="ME!"] .msg-user {
61 | font-style: italic;
62 | }
63 |
64 | .msg[msg-user$="ME!"] .msg-user {
65 | font-weight: bold;
66 | }
67 |
--------------------------------------------------------------------------------
/ambassador/xul/skin/security-info.css:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | dialog {
6 | height: 200px;
7 | width: 400px;
8 | }
9 |
10 | textbox {
11 | background: transparent !important;
12 | border: none;
13 | padding: 0px;
14 | margin-top: 1px;
15 | -moz-appearance: none;
16 | }
17 |
18 | #securityPanel .caption-icon {
19 | display: none;
20 | }
21 |
22 | #securityPanel .header {
23 | font-size: 120%;
24 | }
25 |
26 | #securityPanel .fieldLabel {
27 | margin: 2px 10px 3px 10px;
28 | }
29 |
30 | #securityPanel .fieldValue {
31 | font-weight: bold;
32 | margin: 2px 10px 0px 10px;
33 | }
34 |
35 | #securityPanel row {
36 | -moz-box-align: center;
37 | }
38 |
--------------------------------------------------------------------------------
/build/autoconf/mozconfig-find:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | #
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | # mozconfigfind - Loads options from .mozconfig onto configure's
8 | # command-line. The .mozconfig file is searched for in the
9 | # order:
10 | # If $MOZCONFIG is set, use that.
11 | # If one of $TOPSRCDIR/.mozconfig or $TOPSRCDIR/mozconfig exists, use it.
12 | # If both exist, or if various legacy locations contain a mozconfig, error.
13 | # Otherwise, use the default build options.
14 | #
15 | topsrcdir=$1
16 |
17 | abspath() {
18 | if uname -s | grep -q MINGW; then
19 | # We have no way to figure out whether we're in gmake or pymake right
20 | # now. gmake gives us Unix-style paths while pymake gives us Windows-style
21 | # paths, so attempt to handle both.
22 | regexes='^\([A-Za-z]:\|\\\\\|\/\) ^\/'
23 | else
24 | regexes='^\/'
25 | fi
26 |
27 | for regex in $regexes; do
28 | if echo $1 | grep -q $regex; then
29 | echo $1
30 | return
31 | fi
32 | done
33 |
34 | # If we're at this point, we have a relative path
35 | echo `pwd`/$1
36 | }
37 |
38 | if [ -n "$MOZCONFIG" ] && ! [ -f "$MOZCONFIG" ]; then
39 | echo "Specified MOZCONFIG \"$MOZCONFIG\" does not exist!" 1>&2
40 | exit 1
41 | fi
42 |
43 | if [ -n "$MOZ_MYCONFIG" ]; then
44 | echo "Your environment currently has the MOZ_MYCONFIG variable set to \"$MOZ_MYCONFIG\". MOZ_MYCONFIG is no longer supported. Please use MOZCONFIG instead." 1>&2
45 | exit 1
46 | fi
47 |
48 | if [ -z "$MOZCONFIG" ] && [ -f "$topsrcdir/.mozconfig" ] && [ -f "$topsrcdir/mozconfig" ]; then
49 | echo "Both \$topsrcdir/.mozconfig and \$topsrcdir/mozconfig are supported, but you must choose only one. Please remove the other." 1>&2
50 | exit 1
51 | fi
52 |
53 | for _config in "$MOZCONFIG" \
54 | "$topsrcdir/.mozconfig" \
55 | "$topsrcdir/mozconfig"
56 | do
57 | if test -f "$_config"; then
58 | abspath $_config
59 | exit 0
60 | fi
61 | done
62 |
63 | # We used to support a number of other implicit .mozconfig locations. We now
64 | # detect if we were about to use any of these locations and issue an error if we
65 | # find any.
66 | for _config in "$topsrcdir/mozconfig.sh" \
67 | "$topsrcdir/myconfig.sh" \
68 | "$HOME/.mozconfig" \
69 | "$HOME/.mozconfig.sh" \
70 | "$HOME/.mozmyconfig.sh"
71 | do
72 | if test -f "$_config"; then
73 | echo "You currently have a mozconfig at \"$_config\". This implicit location is no longer supported. Please move it to $topsrcdir/.mozconfig or specify it explicitly via \$MOZCONFIG." 1>&2
74 | exit 1
75 | fi
76 | done
77 |
--------------------------------------------------------------------------------
/build/autoconf/mozconfig2client-mk:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | #
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | # mozconfig2client-mk - Translates .mozconfig into options for client.mk.
8 | # Prints defines to stdout.
9 | #
10 | # See mozconfig2configure for more details
11 |
12 | print_header() {
13 | cat <@' with '$()'.
44 | _opt=`echo "$_opt" | sed -e 's/\([\"\\]\)/\\\\\1/g; s/@\([^@]*\)@/\$(\1)/g;'`
45 | echo $_opt;
46 | done
47 | }
48 |
49 | # Main
50 | #--------------------------------------------------
51 |
52 | scriptdir=`dirname $0`
53 | topsrcdir=$1
54 |
55 | # If the path changes, configure should be rerun
56 | echo "# PATH=$PATH"
57 |
58 | # If FOUND_MOZCONFIG isn't set, look for it and make sure the script doesn't error out
59 | isfoundset=${FOUND_MOZCONFIG+yes}
60 | if [ -z $isfoundset ]; then
61 | FOUND_MOZCONFIG=`$scriptdir/mozconfig-find $topsrcdir`
62 | if [ $? -ne 0 ]; then
63 | echo '$(error Fix above errors before continuing.)'
64 | else
65 | isfoundset=yes
66 | fi
67 | fi
68 |
69 | if [ -n $isfoundset ]; then
70 | if [ "$FOUND_MOZCONFIG" ]
71 | then
72 | print_header
73 | . "$FOUND_MOZCONFIG"
74 | echo "FOUND_MOZCONFIG := $FOUND_MOZCONFIG"
75 | fi
76 | fi
77 |
--------------------------------------------------------------------------------
/build/dumbmake-dependencies:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ascrod/ambassador/7d2b260f1a069e2d11718c576d694f9343c096be/build/dumbmake-dependencies
--------------------------------------------------------------------------------
/build/mach_bootstrap.py:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | from __future__ import unicode_literals
6 |
7 | import os, sys
8 |
9 | def bootstrap(topsrcdir, mozilla_dir=None):
10 | if mozilla_dir is None:
11 | mozilla_dir = os.path.join(topsrcdir, 'platform')
12 | sys.path[0:0] = [mozilla_dir]
13 | import build.mach_bootstrap
14 | return build.mach_bootstrap.bootstrap(topsrcdir, mozilla_dir)
15 |
--------------------------------------------------------------------------------
/build/pymake/make.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # This Source Code Form is subject to the terms of the Mozilla Public
3 | # License, v. 2.0. If a copy of the MPL was not distributed with this
4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 |
6 | # This is a wrapper around mozilla-central's pymake. If that isn't found then
7 | # this uses client.py to pull it in.
8 |
9 | import os
10 | import sys
11 | import subprocess
12 | import shlex
13 |
14 | def getpath(relpath):
15 | thisdir = os.path.dirname(__file__)
16 | return os.path.abspath(os.path.join(thisdir, *relpath))
17 |
18 | PYMAKE = getpath(["..", "..", "platform", "build", "pymake", "make.py"])
19 |
20 | def main(args):
21 | if 'TINDERBOX_OUTPUT' in os.environ:
22 | # When building on mozilla build slaves, execute mozmake instead. Until bug
23 | # 978211, this is the easiest, albeit hackish, way to do this.
24 | mozmake = os.path.join(os.path.dirname(__file__), '..', '..',
25 | 'mozmake.exe')
26 | if os.path.exists(mozmake):
27 | cmd = [mozmake]
28 | cmd.extend(sys.argv[1:])
29 | shell = os.environ.get('SHELL')
30 | if shell and not shell.lower().endswith('.exe'):
31 | cmd += ['SHELL=%s.exe' % shell]
32 | sys.exit(subprocess.call(cmd))
33 |
34 | if not os.path.exists(PYMAKE):
35 | raise Exception("Pymake not found")
36 |
37 | subprocess.check_call([sys.executable, PYMAKE] + args)
38 |
39 | if __name__ == "__main__":
40 | main(sys.argv[1:])
41 |
--------------------------------------------------------------------------------
/build/pypng/check-sync-exceptions:
--------------------------------------------------------------------------------
1 | # Nothing in this directory needs to be in sync with mozilla
2 | # The contents are used only in c-c
3 | *
--------------------------------------------------------------------------------
/build/pypng/mkiccp.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # $URL: http://pypng.googlecode.com/svn/trunk/code/mkiccp.py $
3 | # $Rev: 182 $
4 | # Make ICC Profile
5 |
6 | # References
7 | #
8 | # [ICC 2001] ICC Specification ICC.1:2001-04 (Profile version 2.4.0)
9 | # [ICC 2004] ICC Specification ICC.1:2004-10 (Profile version 4.2.0.0)
10 |
11 | import struct
12 |
13 | # Local module.
14 | import iccp
15 |
16 | def black(m):
17 | """Return a function that maps all values from [0.0,m] to 0, and maps
18 | the range [m,1.0] into [0.0, 1.0] linearly.
19 | """
20 |
21 | m = float(m)
22 |
23 | def f(x):
24 | if x <= m:
25 | return 0.0
26 | return (x-m)/(1.0-m)
27 | return f
28 |
29 | # For monochrome input the required tags are (See [ICC 2001] 6.3.1.1):
30 | # profileDescription [ICC 2001] 6.4.32
31 | # grayTRC [ICC 2001] 6.4.19
32 | # mediaWhitePoint [ICC 2001] 6.4.25
33 | # copyright [ICC 2001] 6.4.13
34 |
35 | def agreyprofile(out):
36 | it = iccp.Profile().greyInput()
37 | it.addTags(kTRC=black(0.07))
38 | it.write(out)
39 |
40 | def main():
41 | import sys
42 | agreyprofile(sys.stdout)
43 |
44 | if __name__ == '__main__':
45 | main()
46 |
--------------------------------------------------------------------------------
/build/pypng/pdsimgtopng:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # $URL: http://pypng.googlecode.com/svn/trunk/code/pdsimgtopng $
3 | # $Rev: 154 $
4 | # PDS Image to PNG
5 |
6 | import re
7 | import struct
8 |
9 | import png
10 |
11 | class FormatError(Exception):
12 | pass
13 |
14 | def pdskey(s, k):
15 | """Lookup key `k` in string `s`. Returns value (as a string), or
16 | raises exception if not found.
17 | """
18 |
19 | assert re.match(r' *\^?[:\w]+$', k)
20 | safere = '^' + re.escape(k) +r' *= *(\w+)'
21 | m = re.search(safere, s, re.MULTILINE)
22 | if not m:
23 | raise FormatError("Can't find %s." % k)
24 | return m.group(1)
25 |
26 | def img(inp):
27 | """Open the PDS IMG file `inp` and return (*pixels*, *info*).
28 | *pixels* is an iterator over the rows, *info* is the information
29 | dictionary.
30 | """
31 |
32 | err = __import__('sys').stderr
33 |
34 | consumed = 1024
35 |
36 | s = inp.read(consumed)
37 | record_type = pdskey(s, 'RECORD_TYPE')
38 | if record_type != 'FIXED_LENGTH':
39 | raise FormatError(
40 | "Can only deal with FIXED_LENGTH record type (found %s)" %
41 | record_type)
42 | record_bytes = int(pdskey(s,'RECORD_BYTES'))
43 | file_records = int(pdskey(s, 'FILE_RECORDS'))
44 | label_records = int(pdskey(s, 'LABEL_RECORDS'))
45 | remaining = label_records * record_bytes - consumed
46 | s += inp.read(remaining)
47 | consumed += remaining
48 |
49 | image_pointer = int(pdskey(s, '^IMAGE'))
50 | # "^IMAGE" locates a record. Records are numbered starting from 1.
51 | image_index = image_pointer - 1
52 | image_offset = image_index * record_bytes
53 | gap = image_offset - consumed
54 | assert gap >= 0
55 | if gap:
56 | inp.read(gap)
57 | # This assumes there is only one OBJECT in the file, and it is the
58 | # IMAGE.
59 | height = int(pdskey(s, ' LINES'))
60 | width = int(pdskey(s, ' LINE_SAMPLES'))
61 | sample_type = pdskey(s, ' SAMPLE_TYPE')
62 | sample_bits = int(pdskey(s, ' SAMPLE_BITS'))
63 | # For Messenger MDIS, SAMPLE_BITS is reported as 16, but only values
64 | # from 0 ot 4095 are used.
65 | bitdepth = 12
66 | if sample_type == 'MSB_UNSIGNED_INTEGER':
67 | fmt = '>H'
68 | else:
69 | raise 'Unknown sample type: %s.' % sample_type
70 | sample_bytes = (1,2)[bitdepth > 8]
71 | row_bytes = sample_bytes * width
72 | fmt = fmt[:1] + str(width) + fmt[1:]
73 | def rowiter():
74 | for y in range(height):
75 | yield struct.unpack(fmt, inp.read(row_bytes))
76 | info = dict(greyscale=True, alpha=False, bitdepth=bitdepth,
77 | size=(width,height), gamma=1.0)
78 | return rowiter(), info
79 |
80 |
81 | def main(argv=None):
82 | import sys
83 |
84 | if argv is None:
85 | argv = sys.argv
86 | argv = argv[1:]
87 | arg = argv
88 | if len(arg) >= 1:
89 | f = open(arg[0], 'rb')
90 | else:
91 | f = sys.stdin
92 | pixels,info = img(f)
93 | w = png.Writer(**info)
94 | w.write(sys.stdout, pixels)
95 |
96 | if __name__ == '__main__':
97 | main()
98 |
99 |
100 |
--------------------------------------------------------------------------------
/build/pypng/pipasgrey:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # $URL: http://pypng.googlecode.com/svn/trunk/code/pipasgrey $
3 | # $Rev: 187 $
4 |
5 | # pipasgrey
6 |
7 | # Convert image to grey (L, or LA), but only if that involves no colour
8 | # change.
9 |
10 | def asgrey(out, inp, quiet=False):
11 | """Convert image to greyscale, but only when no colour change. This
12 | works by using the input G channel (green) as the output L channel
13 | (luminance) and checking that every pixel is grey as we go. A non-grey
14 | pixel will raise an error, but if `quiet` is true then the grey pixel
15 | check is suppressed.
16 | """
17 |
18 | from array import array
19 |
20 | import png
21 |
22 | r = png.Reader(file=inp)
23 | _,_,pixels,info = r.asDirect()
24 | if info['greyscale']:
25 | w = png.Writer(**info)
26 | return w.write(out, pixels)
27 | planes = info['planes']
28 | targetplanes = planes - 2
29 | alpha = info['alpha']
30 | width = info['size'][0]
31 | typecode = 'BH'[info['bitdepth'] > 8]
32 | # Values per target row
33 | vpr = width * (targetplanes)
34 | def iterasgrey():
35 | for i,row in enumerate(pixels):
36 | row = array(typecode, row)
37 | targetrow = array(typecode, [0]*vpr)
38 | # Copy G (and possibly A) channel.
39 | green = row[0::planes]
40 | if alpha:
41 | targetrow[0::2] = green
42 | targetrow[1::2] = row[3::4]
43 | else:
44 | targetrow = green
45 | # Check R and B channel match.
46 | if not quiet and (
47 | green != row[0::planes] or green != row[2::planes]):
48 | raise ValueError('Row %i contains non-grey pixel.' % i)
49 | yield targetrow
50 | info['greyscale'] = True
51 | del info['planes']
52 | w = png.Writer(**info)
53 | w.write(out, iterasgrey())
54 |
55 | def main(argv=None):
56 | from getopt import getopt
57 | import sys
58 | if argv is None:
59 | argv = sys.argv
60 | argv = argv[1:]
61 | opt,argv = getopt(argv, 'q')
62 | quiet = False
63 | for o,v in opt:
64 | if o == '-q':
65 | quiet = True
66 | if len(argv) > 0:
67 | f = open(argv[0], 'rb')
68 | else:
69 | f = sys.stdin
70 | return asgrey(sys.stdout, f, quiet)
71 |
72 | if __name__ == '__main__':
73 | main()
74 |
--------------------------------------------------------------------------------
/build/pypng/pipcat:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # $URL: http://pypng.googlecode.com/svn/trunk/code/pipcat $
3 | # $Rev: 77 $
4 |
5 | # http://www.python.org/doc/2.4.4/lib/module-itertools.html
6 | import itertools
7 | import sys
8 |
9 | import png
10 |
11 | def cat(out, l):
12 | """Concatenate the list of images. All input images must be same
13 | height and have the same number of channels. They are concatenated
14 | left-to-right. `out` is the (open file) destination for the
15 | output image. `l` should be a list of open files (the input
16 | image files).
17 | """
18 |
19 | l = map(lambda f: png.Reader(file=f), l)
20 | # Ewgh, side effects.
21 | map(lambda r: r.preamble(), l)
22 | # The reference height; from the first image.
23 | height = l[0].height
24 | # The total target width
25 | width = 0
26 | for i,r in enumerate(l):
27 | if r.height != height:
28 | raise Error('Image %d, height %d, does not match %d.' %
29 | (i, r.height, height))
30 | width += r.width
31 | pixel,info = zip(*map(lambda r: r.asDirect()[2:4], l))
32 | tinfo = dict(info[0])
33 | del tinfo['size']
34 | w = png.Writer(width, height, **tinfo)
35 | def itercat():
36 | for row in itertools.izip(*pixel):
37 | yield itertools.chain(*row)
38 | w.write(out, itercat())
39 |
40 | def main(argv):
41 | return cat(sys.stdout, map(lambda n: open(n, 'rb'), argv[1:]))
42 |
43 | if __name__ == '__main__':
44 | main(sys.argv)
45 |
--------------------------------------------------------------------------------
/build/pypng/pipcolours:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # $URL: http://pypng.googlecode.com/svn/trunk/code/pipcolours $
3 | # $Rev: 96 $
4 |
5 | # pipcolours - extract all colours present in source image.
6 |
7 | def colours(out, inp):
8 | import itertools
9 | import png
10 |
11 | r = png.Reader(file=inp)
12 | _,_,pixels,info = r.asDirect()
13 | planes = info['planes']
14 | col = set()
15 | for row in pixels:
16 | # Ewgh, side effects on col
17 | map(col.add, png.group(row, planes))
18 | col,planes = channel_reduce(col, planes)
19 | col = list(col)
20 | col.sort()
21 | col = list(itertools.chain(*col))
22 | width = len(col)//planes
23 | greyscale = planes in (1,2)
24 | alpha = planes in (2,4)
25 | bitdepth = info['bitdepth']
26 | w = png.Writer(width, 1,
27 | bitdepth=bitdepth, greyscale=greyscale, alpha=alpha)
28 | w.write(out, [col])
29 |
30 | def channel_reduce(col, planes):
31 | """Attempt to reduce the number of channels in the set of
32 | colours."""
33 | if planes >= 3:
34 | def isgrey(c):
35 | return c[0] == c[1] == c[2]
36 | if min(map(isgrey, col)) == True:
37 | # Every colour is grey.
38 | col = set(map(lambda x: x[0::3], col))
39 | planes -= 2
40 | return col,planes
41 |
42 | def main(argv=None):
43 | import sys
44 |
45 | if argv is None:
46 | argv = sys.argv
47 |
48 | argv = argv[1:]
49 | if len(argv) > 0:
50 | f = open(argv[0], 'rb')
51 | else:
52 | f = sys.stdin
53 | return colours(sys.stdout, f)
54 |
55 | if __name__ == '__main__':
56 | main()
57 |
--------------------------------------------------------------------------------
/build/pypng/pipcomposite:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # $URL: http://pypng.googlecode.com/svn/trunk/code/pipcomposite $
3 | # $Rev: 208 $
4 | # pipcomposite
5 | # Image alpha compositing.
6 |
7 | """
8 | pipcomposite [--background #rrggbb] file.png
9 |
10 | Composite an image onto a background and output the result. The
11 | background colour is specified with an HTML-style triple (3, 6, or 12
12 | hex digits), and defaults to black (#000).
13 |
14 | The output PNG has no alpha channel.
15 |
16 | It is valid for the input to have no alpha channel, but it doesn't
17 | make much sense: the output will equal the input.
18 | """
19 |
20 | import sys
21 |
22 | def composite(out, inp, background):
23 | import png
24 |
25 | p = png.Reader(file=inp)
26 | w,h,pixel,info = p.asRGBA()
27 |
28 | outinfo = dict(info)
29 | outinfo['alpha'] = False
30 | outinfo['planes'] -= 1
31 | outinfo['interlace'] = 0
32 |
33 | # Convert to tuple and normalise to same range as source.
34 | background = rgbhex(background)
35 | maxval = float(2**info['bitdepth'] - 1)
36 | background = map(lambda x: int(0.5 + x*maxval/65535.0),
37 | background)
38 | # Repeat background so that it's a whole row of sample values.
39 | background *= w
40 |
41 | def iterrow():
42 | for row in pixel:
43 | # Remove alpha from row, then create a list with one alpha
44 | # entry _per channel value_.
45 | # Squirrel the alpha channel away (and normalise it).
46 | t = map(lambda x: x/maxval, row[3::4])
47 | row = list(row)
48 | del row[3::4]
49 | alpha = row[:]
50 | for i in range(3):
51 | alpha[i::3] = t
52 | assert len(alpha) == len(row) == len(background)
53 | yield map(lambda a,v,b: int(0.5 + a*v + (1.0-a)*b),
54 | alpha, row, background)
55 |
56 | w = png.Writer(**outinfo)
57 | w.write(out, iterrow())
58 |
59 | def rgbhex(s):
60 | """Take an HTML style string of the form "#rrggbb" and return a
61 | colour (R,G,B) triple. Following the initial '#' there can be 3, 6,
62 | or 12 digits (for 4-, 8- or 16- bits per channel). In all cases the
63 | values are expanded to a full 16-bit range, so the returned values
64 | are all in range(65536).
65 | """
66 |
67 | assert s[0] == '#'
68 | s = s[1:]
69 | assert len(s) in (3,6,12)
70 |
71 | # Create a target list of length 12, and expand the string s to make
72 | # it length 12.
73 | l = ['z']*12
74 | if len(s) == 3:
75 | for i in range(4):
76 | l[i::4] = s
77 | if len(s) == 6:
78 | for i in range(2):
79 | l[i::4] = s[i::2]
80 | l[i+2::4] = s[i::2]
81 | if len(s) == 12:
82 | l[:] = s
83 | s = ''.join(l)
84 | return map(lambda x: int(x, 16), (s[:4], s[4:8], s[8:]))
85 |
86 | class Usage(Exception):
87 | pass
88 |
89 | def main(argv=None):
90 | import getopt
91 | import sys
92 |
93 | if argv is None:
94 | argv = sys.argv
95 |
96 | argv = argv[1:]
97 |
98 | try:
99 | try:
100 | opt,arg = getopt.getopt(argv, '',
101 | ['background='])
102 | except getopt.error, msg:
103 | raise Usage(msg)
104 | background = '#000'
105 | for o,v in opt:
106 | if o in ['--background']:
107 | background = v
108 | except Usage, err:
109 | print >>sys.stderr, __doc__
110 | print >>sys.stderr, str(err)
111 | return 2
112 |
113 | if len(arg) > 0:
114 | f = open(arg[0], 'rb')
115 | else:
116 | f = sys.stdin
117 | return composite(sys.stdout, f, background)
118 |
119 |
120 | if __name__ == '__main__':
121 | main()
122 |
--------------------------------------------------------------------------------
/build/pypng/piprgb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # $URL: http://pypng.googlecode.com/svn/trunk/code/piprgb $
3 | # $Rev: 131 $
4 | # piprgb
5 | #
6 | # Convert input image to RGB or RGBA format. Output will be colour type
7 | # 2 or 6, and will not have a tRNS chunk.
8 |
9 | import png
10 |
11 | def rgb(out, inp):
12 | """Convert to RGB/RGBA."""
13 |
14 | r = png.Reader(file=inp)
15 | r.preamble()
16 | if r.alpha or r.trns:
17 | get = r.asRGBA
18 | else:
19 | get = r.asRGB
20 | pixels,info = get()[2:4]
21 | w = png.Writer(**info)
22 | w.write(out, pixels)
23 |
24 | def main(argv=None):
25 | import sys
26 |
27 | if argv is None:
28 | argv = sys.argv
29 | if len(argv) > 1:
30 | f = open(argv[1], 'rb')
31 | else:
32 | f = sys.stdin
33 | return rgb(sys.stdout, f)
34 |
35 | if __name__ == '__main__':
36 | main()
37 |
--------------------------------------------------------------------------------
/build/pypng/pipscalez:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # $URL: http://pypng.googlecode.com/svn/trunk/code/pipscalez $
3 | # $Rev: 131 $
4 |
5 | # pipscalez
6 | # Enlarge an image by an integer factor horizontally and vertically.
7 |
8 | def rescale(inp, out, xf, yf):
9 | from array import array
10 | import png
11 |
12 | r = png.Reader(file=inp)
13 | _,_,pixels,meta = r.asDirect()
14 | typecode = 'BH'[meta['bitdepth'] > 8]
15 | planes = meta['planes']
16 | # We are going to use meta in the call to Writer, so expand the
17 | # size.
18 | x,y = meta['size']
19 | x *= xf
20 | y *= yf
21 | meta['size'] = (x,y)
22 | del x
23 | del y
24 | # Values per row, target row.
25 | vpr = meta['size'][0] * planes
26 | def iterscale():
27 | for row in pixels:
28 | bigrow = array(typecode, [0]*vpr)
29 | row = array(typecode, row)
30 | for c in range(planes):
31 | channel = row[c::planes]
32 | for i in range(xf):
33 | bigrow[i*planes+c::xf*planes] = channel
34 | for _ in range(yf):
35 | yield bigrow
36 | w = png.Writer(**meta)
37 | w.write(out, iterscale())
38 |
39 |
40 | def main(argv=None):
41 | import sys
42 |
43 | if argv is None:
44 | argv = sys.argv
45 | xf = int(argv[1])
46 | if len(argv) > 2:
47 | yf = int(argv[2])
48 | else:
49 | yf = xf
50 | return rescale(sys.stdin, sys.stdout, xf, yf)
51 |
52 | if __name__ == '__main__':
53 | main()
54 |
--------------------------------------------------------------------------------
/build/pypng/pipwindow:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # $URL: http://pypng.googlecode.com/svn/trunk/code/pipwindow $
3 | # $Rev: 173 $
4 |
5 | # pipwindow
6 | # Tool to crop/expand an image to a rectangular window. Come the
7 | # revolution this tool will allow the image and the window to be placed
8 | # arbitrarily (in particular the window can be bigger than the picture
9 | # and/or overlap it only partially) and the image can be OpenGL style
10 | # border/repeat effects (repeat, mirrored repeat, clamp, fixed
11 | # background colour, background colour from source file). For now it
12 | # only acts as crop. The window must be no greater than the image in
13 | # both x and y.
14 |
15 | def window(tl, br, inp, out):
16 | """Place a window onto the image and cut-out the resulting
17 | rectangle. The window is an axis aligned rectangle opposite corners
18 | at *tl* and *br* (each being an (x,y) pair). *inp* specifies the
19 | input file which should be a PNG image.
20 | """
21 |
22 | import png
23 |
24 | r = png.Reader(file=inp)
25 | x,y,pixels,meta = r.asDirect()
26 | if not (0 <= tl[0] < br[0] <= x):
27 | raise NotImplementedError()
28 | if not (0 <= tl[1] < br[1] <= y):
29 | raise NotImplementedError()
30 | # Compute left and right bounds for each row
31 | l = tl[0] * meta['planes']
32 | r = br[0] * meta['planes']
33 | def itercrop():
34 | """An iterator to perform the crop."""
35 |
36 | for i,row in enumerate(pixels):
37 | if i < tl[1]:
38 | continue
39 | if i >= br[1]:
40 | # Same as "raise StopIteration"
41 | return
42 | yield row[l:r]
43 | meta['size'] = (br[0]-tl[0], br[1]-tl[1])
44 | w = png.Writer(**meta)
45 | w.write(out, itercrop())
46 |
47 | def main(argv=None):
48 | import sys
49 |
50 | if argv is None:
51 | argv = sys.argv
52 | argv = argv[1:]
53 |
54 | tl = (0,0)
55 | br = tuple(map(int, argv[:2]))
56 | if len(argv) >= 4:
57 | tl = br
58 | br = tuple(map(int, argv[2:4]))
59 | if len(argv) in (2, 4):
60 | f = sys.stdin
61 | else:
62 | f = open(argv[-1], 'rb')
63 |
64 | return window(tl, br, f, sys.stdout)
65 |
66 | if __name__ == '__main__':
67 | main()
68 |
--------------------------------------------------------------------------------
/build/pypng/pnghist:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # $URL: http://pypng.googlecode.com/svn/trunk/code/pnghist $
3 | # $Rev: 153 $
4 | # PNG Histogram
5 | # Only really works on grayscale images.
6 |
7 | from array import array
8 | import getopt
9 |
10 | import png
11 |
12 | def decidemax(level):
13 | """Given an array of levels, decide the maximum value to use for the
14 | histogram. This is normally chosen to be a bit bigger than the 99th
15 | percentile, but if the 100th percentile is not much more (within a
16 | factor of 2) then the 100th percentile is chosen.
17 | """
18 |
19 | truemax = max(level)
20 | sl = level[:]
21 | sl.sort(reverse=True)
22 | i99 = int(round(len(level)*0.01))
23 | if truemax <= 2*sl[i99]:
24 | return truemax
25 | return 1.05*sl[i99]
26 |
27 | def hist(out, inp, verbose=None):
28 | """Open the PNG file `inp` and generate a histogram."""
29 |
30 | r = png.Reader(file=inp)
31 | x,y,pixels,info = r.asDirect()
32 | bitdepth = info['bitdepth']
33 | level = [0]*2**bitdepth
34 | for row in pixels:
35 | for v in row:
36 | level[v] += 1
37 | maxlevel = decidemax(level)
38 |
39 | h = 100
40 | outbitdepth = 8
41 | outmaxval = 2**outbitdepth - 1
42 | def genrow():
43 | for y in range(h):
44 | y = h-y-1
45 | # :todo: vary typecode according to outbitdepth
46 | row = array('B', [0]*len(level))
47 | fl = y*maxlevel/float(h)
48 | ce = (y+1)*maxlevel/float(h)
49 | for x in range(len(row)):
50 | if level[x] <= fl:
51 | # Relies on row being initialised to all 0
52 | continue
53 | if level[x] >= ce:
54 | row[x] = outmaxval
55 | continue
56 | frac = (level[x] - fl)/(ce - fl)
57 | row[x] = int(round(outmaxval*frac))
58 | yield row
59 | w = png.Writer(len(level), h, gamma=1.0,
60 | greyscale=True, alpha=False, bitdepth=outbitdepth)
61 | w.write(out, genrow())
62 | if verbose: print >>verbose, level
63 |
64 | def main(argv=None):
65 | import sys
66 |
67 | if argv is None:
68 | argv = sys.argv
69 | argv = argv[1:]
70 | opt,arg = getopt.getopt(argv, '')
71 |
72 | if len(arg) < 1:
73 | f = sys.stdin
74 | else:
75 | f = open(arg[0])
76 | hist(sys.stdout, f)
77 |
78 | if __name__ == '__main__':
79 | main()
80 |
--------------------------------------------------------------------------------
/build/pypng/pnglsch:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # $URL: http://pypng.googlecode.com/svn/trunk/code/pnglsch $
3 | # $Rev: 107 $
4 | # pnglsch
5 | # PNG List Chunks
6 |
7 | import png
8 |
9 | def list(out, inp):
10 | r = png.Reader(file=inp)
11 | for t,v in r.chunks():
12 | add = ''
13 | if len(v) <= 28:
14 | add = ' ' + v.encode('hex')
15 | print >>out, "%s %10d%s" % (t, len(v), add)
16 |
17 | def main(argv=None):
18 | import sys
19 |
20 | if argv is None:
21 | argv = sys.argv
22 | arg = argv[1:]
23 |
24 | if len(arg) > 0:
25 | f = open(arg[0], 'rb')
26 | else:
27 | f = sys.stdin
28 | return list(sys.stdout, f)
29 |
30 | if __name__ == '__main__':
31 | main()
32 |
--------------------------------------------------------------------------------
/config/baseconfig.mk:
--------------------------------------------------------------------------------
1 | # This file is normally included by autoconf.mk, but it is also used
2 | # directly in python/mozbuild/mozbuild/base.py for gmake validation.
3 | # We thus use INCLUDED_AUTOCONF_MK to enable/disable some parts depending
4 | # whether a normal build is happening or whether the check is running.
5 |
6 | # When mach wants to know if we're to use mozmake, it runs:
7 | # make -f topsrcdir/config/baseconfig.mk
8 | # The first word of MAKEFILE_LIST is the main file we're running. Grabbing the
9 | # parent of that directory therefore gets us the topsrcdir of comm-central,
10 | # whence we get the mozilla directory to run the "real" baseconfig.mk logic.
11 | ifndef INCLUDED_AUTOCONF_MK
12 | topsrcdir := $(dir $(firstword $(MAKEFILE_LIST)))..
13 | endif
14 |
15 | MOZILLA_SRCDIR = $(topsrcdir)/platform
16 | include $(MOZILLA_SRCDIR)/config/baseconfig.mk
17 |
--------------------------------------------------------------------------------
/config/config.mk:
--------------------------------------------------------------------------------
1 | #
2 | # This Source Code Form is subject to the terms of the Mozilla Public
3 | # License, v. 2.0. If a copy of the MPL was not distributed with this
4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 |
6 | # Just use mozilla-central's copy of config.mk now.
7 | include $(MOZILLA_DIR)/config/config.mk
8 |
--------------------------------------------------------------------------------
/config/makefiles/autotargets.mk:
--------------------------------------------------------------------------------
1 | # -*- makefile -*-
2 | # vim:set ts=8 sw=8 sts=8 noet:
3 | #
4 | # This Source Code Form is subject to the terms of the Mozilla Public
5 | # License, v. 2.0. If a copy of the MPL was not distributed with this file,
6 | # You can obtain one at http://mozilla.org/MPL/2.0/.
7 | #
8 |
9 | ifndef INCLUDED_AUTOTARGETS_MK #{
10 |
11 | # Conditional does not wrap the entire file so multiple
12 | # includes will be able to accumulate dependencies.
13 |
14 | ###########################################################################
15 | # AUTO_DEPS - A list of deps/targets drived from other macros.
16 | ###########################################################################
17 |
18 | MKDIR ?= mkdir -p
19 | TOUCH ?= touch
20 |
21 | # declare for local use, rules.mk may not have been loaded
22 | space = $(NULL) $(NULL)
23 |
24 | # Deps will be considered intermediate when used as a pre-requisite for
25 | # wildcard targets. Inhibit their removal, mkdir -p is a standalone op.
26 | .PRECIOUS: %/.mkdir.done
27 |
28 | #########################
29 | ##---] FUNCTIONS [---##
30 | #########################
31 |
32 | # Squeeze can be overzealous, restore root for abspath
33 | getPathPrefix =$(if $(filter /%,$(1)),/)
34 |
35 | # Squeeze '//' from the path, easily created by string functions
36 | _slashSqueeze =$(foreach val,$(getargv),$(call getPathPrefix,$(val))$(subst $(space),/,$(strip $(subst /,$(space),$(val)))))
37 |
38 | # Squeeze extraneous directory slashes from the path
39 | # o protect embedded spaces within the path
40 | # o replace //+ sequences with /
41 | slash_strip = \
42 | $(strip \
43 | $(subst <--[**]-->,$(space),\
44 | $(call _slashSqueeze,\
45 | $(subst $(space),<--[**]-->,$(1))\
46 | )))
47 |
48 | # Extract directory path from a dependency file.
49 | mkdir_stem =$(foreach val,$(getargv),$(subst /.mkdir.done,$(NULL),$(val)))
50 |
51 | ## Generate timestamp file for threadsafe directory creation
52 | mkdir_deps =$(foreach dir,$(getargv),$(call slash_strip,$(dir)/.mkdir.done))
53 |
54 | #######################
55 | ##---] TARGETS [---##
56 | #######################
57 |
58 | %/.mkdir.done: # mkdir -p -p => mkdir -p
59 | $(subst $(space)-p,$(null),$(MKDIR)) -p '$(dir $@)'
60 | # Make the timestamp old enough for not being a problem with symbolic links
61 | # targets depending on it. Use Jan 3, 1980 to accomodate any timezone where
62 | # 198001010000 would translate to something older than FAT epoch.
63 | @$(TOUCH) -t 198001030000 '$@'
64 |
65 | # A handful of makefiles are attempting "mkdir dot".
66 | # tbpl/valgrind builds are using this target
67 | # https://bugzilla.mozilla.org/show_bug.cgi?id=837754
68 | .mkdir.done:
69 | @echo 'WARNING: $(MKDIR) -dot- requested by $(MAKE) -C $(CURDIR) $(MAKECMDGOALS)'
70 | @$(TOUCH) -t 198001030000 '$@'
71 |
72 | INCLUDED_AUTOTARGETS_MK = 1
73 | endif #}
74 |
75 |
76 | ## Accumulate deps and cleanup
77 | ifneq (,$(GENERATED_DIRS))
78 | GENERATED_DIRS := $(strip $(sort $(GENERATED_DIRS)))
79 | tmpauto :=$(call mkdir_deps,GENERATED_DIRS)
80 | GENERATED_DIRS_DEPS +=$(tmpauto)
81 | GARBAGE_DIRS +=$(GENERATED_DIRS)
82 | endif
83 |
84 | #################################################################
85 | # One ring/dep to rule them all:
86 | # config/rules.mk::all target is available by default
87 | # Add $(AUTO_DEPS) as an explicit target dependency when needed.
88 | #################################################################
89 |
90 | AUTO_DEPS +=$(GENERATED_DIRS_DEPS)
91 | AUTO_DEPS := $(strip $(sort $(AUTO_DEPS)))
92 |
93 | # Complain loudly if deps have not loaded so getargv != $(NULL)
94 | $(call requiredfunction,getargv)
95 |
--------------------------------------------------------------------------------
/config/printconfigsetting.py:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | import configobj, sys
6 |
7 | try:
8 | (file, section, key) = sys.argv[1:]
9 | except ValueError:
10 | print "Usage: printconfigsetting.py "
11 | sys.exit(1)
12 |
13 | c = configobj.ConfigObj(file)
14 |
15 | try:
16 | s = c[section]
17 | except KeyError:
18 | print >>sys.stderr, "Section [%s] not found." % section
19 | sys.exit(1)
20 |
21 | try:
22 | print s[key]
23 | except KeyError:
24 | print >>sys.stderr, "Key %s not found." % key
25 | sys.exit(1)
26 |
--------------------------------------------------------------------------------
/config/recurse.mk:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 | # You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | ifndef INCLUDED_RULES_MK
6 | include $(topsrcdir)/config/rules.mk
7 | endif
8 |
9 | include $(MOZILLA_DIR)/config/recurse.mk
10 |
--------------------------------------------------------------------------------
/config/rules.mk:
--------------------------------------------------------------------------------
1 | # vim:set ts=8 sw=8 sts=8 noet:
2 | #
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 | # You can obtain one at http://mozilla.org/MPL/2.0/.
6 | #
7 |
8 | ifndef topsrcdir
9 | $(error topsrcdir was not set))
10 | endif
11 |
12 | # Use mozilla-central's copy of rules.mk.
13 | include $(topsrcdir)/platform/config/rules.mk
14 |
--------------------------------------------------------------------------------
/configure.in:
--------------------------------------------------------------------------------
1 | dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; -*-
2 | dnl vi: set tabstop=4 shiftwidth=4 expandtab:
3 | dnl This Source Code Form is subject to the terms of the Mozilla Public
4 | dnl License, v. 2.0. If a copy of the MPL was not distributed with this
5 | dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 | dnl
7 | dnl This is a not-really-autoconf script (which is to say, it's a shell script
8 | dnl that is piped through m4 first) that executes the mozilla-central python
9 | dnl configure, first doing a little bit of processing to handle mozconfig and
10 | dnl the --with-external-source-dir rules.
11 | dnl ========================================================
12 | divert(0)dnl
13 | #!/bin/sh
14 | SRCDIR=$(dirname $0)
15 | TOPSRCDIR="$SRCDIR"
16 | MOZILLA_SRCDIR="${SRCDIR}/platform"
17 | export OLD_CONFIGURE="${MOZILLA_SRCDIR}"/old-configure
18 |
19 | # Ensure the comm-* values are used.
20 | export MOZ_SOURCE_CHANGESET=$(hg -R "$TOPSRCDIR" parent --template="{node}" 2>/dev/null)
21 | export MOZ_SOURCE_REPO=$(hg -R "$TOPSRCDIR" showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/https:/")
22 |
23 | # If MOZCONFIG isn't set, use the .mozconfig from the current directory. This
24 | # overrides the lookup in mozilla-central's configure, which looks in the wrong
25 | # directory for this file.
26 | if test -z "$MOZCONFIG" -a -f "$SRCDIR"/.mozconfig; then
27 | export MOZCONFIG="$SRCDIR"/.mozconfig
28 | elif test -z "$MOZCONFIG" -a -f "$SRCDIR"/mozconfig; then
29 | export MOZCONFIG="$SRCDIR"/mozconfig
30 | fi
31 |
32 | # Execute the mozilla configure script in the current directory, adding the
33 | # parameter we need to run comm-central. Since the configure script is really
34 | # just a wrapper around invoking a python variant, execute the underlying python
35 | # directly. We use a copy of the underlying configure script to get paths
36 | # correct.
37 | set -- "$@" --with-external-source-dir="$TOPSRCDIR"
38 | which python2.7 > /dev/null && exec python2.7 "$TOPSRCDIR/configure.py" "$@" || exec python "$TOPSRCDIR/configure.py" "$@"
39 |
--------------------------------------------------------------------------------
/configure.py:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | from __future__ import print_function, unicode_literals
6 |
7 | import imp
8 | import os
9 | import sys
10 |
11 |
12 | base_dir = os.path.abspath(os.path.dirname(__file__))
13 | sys.path.append(os.path.join(base_dir, 'platform', 'python', 'mozbuild'))
14 | from mozbuild.configure import ConfigureSandbox
15 |
16 | # We can't just import config_status since configure is shadowed by this file!
17 | f, pathname, desc = imp.find_module('configure',
18 | [os.path.join(base_dir, 'platform')])
19 | config_status = imp.load_module('configure', f, pathname, desc).config_status
20 |
21 | def main(argv):
22 | config = {}
23 | sandbox = ConfigureSandbox(config, os.environ, argv)
24 | sandbox.run(os.path.join(os.path.dirname(__file__), 'moz.configure'))
25 |
26 | if sandbox._help:
27 | return 0
28 |
29 | return config_status(config)
30 |
31 | if __name__ == '__main__':
32 | sys.exit(main(sys.argv))
33 |
--------------------------------------------------------------------------------
/mach:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | MACH_CMD=./platform/mach
4 | $MACH_CMD $@
5 |
--------------------------------------------------------------------------------
/moz.build:
--------------------------------------------------------------------------------
1 | # vim: set filetype=python:
2 | # This Source Code Form is subject to the terms of the Mozilla Public
3 | # License, v. 2.0. If a copy of the MPL was not distributed with this
4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 |
6 | # This file needs to stay here even if empty so that mach will work,
7 | # specifically commands like mach file-info.
8 |
--------------------------------------------------------------------------------
/moz.configure:
--------------------------------------------------------------------------------
1 | # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
2 | # vim: set filetype=python:
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 |
7 | include('platform/moz.configure')
8 |
--------------------------------------------------------------------------------