1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 00:47:59 +01:00

Include config.json in XPI. Closes issue \#670.

This commit is contained in:
Kris Maglione
2011-10-01 13:02:26 -04:00
parent 2d7c78e162
commit 8ef35fee8b
5 changed files with 20 additions and 6 deletions

View File

@@ -32,8 +32,9 @@ MAKE_JAR = sh $(BASE)/make_jar.sh
# TODO: specify source files manually? # TODO: specify source files manually?
JAR_BASES = $(TOP) $(BASE) JAR_BASES = $(TOP) $(BASE)
JAR_FILES = config.json
JAR_DIRS = content skin locale modules JAR_DIRS = content skin locale modules
JAR_TEXTS = js jsm css dtd xml xul html xhtml xsl properties JAR_TEXTS = js jsm css dtd xml xul html xhtml xsl properties json
JAR_BINS = png JAR_BINS = png
CHROME = $(MANGLE)/ CHROME = $(MANGLE)/

View File

@@ -420,7 +420,7 @@ var Mappings = Module("mappings", {
get: function get(mode, cmd) this.hives.map(function (h) h.get(mode, cmd)).compact()[0] || null, get: function get(mode, cmd) this.hives.map(function (h) h.get(mode, cmd)).compact()[0] || null,
/** /**
* Returns an array of maps with names starting with but not equal to * Returns a count of maps with names starting with but not equal to
* *prefix*. * *prefix*.
* *
* @param {Modes.Mode} mode The mode to search. * @param {Modes.Mode} mode The mode to search.
@@ -429,7 +429,7 @@ var Mappings = Module("mappings", {
*/ */
getCandidates: function (mode, prefix) getCandidates: function (mode, prefix)
this.hives.map(function (h) h.getCandidates(mode, prefix)) this.hives.map(function (h) h.getCandidates(mode, prefix))
.flatten(), .reduce(function (a, b) a + b, 0),
/** /**
* Lists all user-defined mappings matching *filter* for the specified * Lists all user-defined mappings matching *filter* for the specified

View File

@@ -15,6 +15,7 @@ var Cache = Module("Cache", XPCOM(Ci.nsIRequestObserver), {
this.queue = []; this.queue = [];
this.cache = {}; this.cache = {};
this.providers = {}; this.providers = {};
this.providing = {};
this.localProviders = {}; this.localProviders = {};
if (JSMLoader.cacheFlush) if (JSMLoader.cacheFlush)
@@ -176,8 +177,16 @@ var Cache = Module("Cache", XPCOM(Ci.nsIRequestObserver), {
} }
if (Set.has(this.providers, name)) { if (Set.has(this.providers, name)) {
let [func, self] = this.providers[name]; util.assert(!Set.add(this.providing, name),
this.cache[name] = func.call(self || this, name); "Already generating cache for " + name,
false);
try {
let [func, self] = this.providers[name];
this.cache[name] = func.call(self || this, name);
}
finally {
delete this.providing[name];
}
cache.queue.push([Date.now(), name]); cache.queue.push([Date.now(), name]);
cache.processQueue(); cache.processQueue();

View File

@@ -13,6 +13,9 @@ defineModule("help", {
var HelpBuilder = Class("HelpBuilder", { var HelpBuilder = Class("HelpBuilder", {
init: function init() { init: function init() {
try { try {
// The versions munger will need to access the tag map
// during this process and without this we'll get an
// infinite loop.
help._data = this; help._data = this;
this.files = {}; this.files = {};

View File

@@ -4,7 +4,7 @@ BEGIN {
chrome = suffix chrome = suffix
} }
{ content = $1 ~ /^(content|skin|locale|resource)$/ } { content = $1 ~ /^(content|skin|locale|resource)$/ }
content && $NF ~ /^[a-z]/ { $NF = "/" name "/" $NF } content && $NF ~ /^[a-z]|^\.\// { $NF = "/" name "/" $NF }
content { content {
sub(/^\.\./, "", $NF); sub(/^\.\./, "", $NF);
if (isjar) if (isjar)
@@ -13,6 +13,7 @@ content {
$NF = chrome $NF $NF = chrome $NF
} }
{ {
gsub(/\/\.\//, "/")
sub("^\\.\\./common/", "", $NF) sub("^\\.\\./common/", "", $NF)
print print
} }