Remove broken support for bundles

master
Daniel Berteaud 6 years ago
parent 4eb0369b16
commit b091ff601d
  1. 2
      WAPT/control
  2. 44
      WAPT/wapt.psproj
  3. 64
      thunderbird.cfg.j2

@ -1,5 +1,5 @@
package : fws-thunderbird-config package : fws-thunderbird-config
version : 2 version : 3
architecture : all architecture : all
section : base section : base
priority : optional priority : optional

@ -1,5 +1,5 @@
[PyScripter] [PyScripter]
Version=3.3.2.0 Version=3.4.2.0
[Project] [Project]
ClassName=TProjectRootNode ClassName=TProjectRootNode
@ -23,11 +23,11 @@ FileName=C:\Program Files (x86)\wapt\setuphelpers.py
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2] [Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2]
ClassName=TProjectFileNode ClassName=TProjectFileNode
FileName=C:\Program Files (x86)\wapt\wapt-get.ini FileName=C:\Program Files (x86)\wapt\wapt-get.py
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3] [Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3]
ClassName=TProjectFileNode ClassName=TProjectFileNode
FileName=C:\Program Files (x86)\wapt\wapt-get.py FileName=C:\Program Files (x86)\wapt\wapt-get.ini
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4] [Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4]
ClassName=TProjectFileNode ClassName=TProjectFileNode
@ -38,18 +38,30 @@ Count=5
[Project\ChildNodes\Node0\ChildNodes\Node1] [Project\ChildNodes\Node0\ChildNodes\Node1]
ClassName=TProjectFileNode ClassName=TProjectFileNode
FileName=$[Project-Path]changelog.txt FileName=C:\waptdev\wapt-thunderbird-config\autoconf.js
[Project\ChildNodes\Node0\ChildNodes\Node2] [Project\ChildNodes\Node0\ChildNodes\Node2]
ClassName=TProjectFileNode ClassName=TProjectFileNode
FileName=$[Project-Path]control FileName=$[Project-Path]changelog.txt
[Project\ChildNodes\Node0\ChildNodes\Node3] [Project\ChildNodes\Node0\ChildNodes\Node3]
ClassName=TProjectFileNode ClassName=TProjectFileNode
FileName=$[Project-Path]control
[Project\ChildNodes\Node0\ChildNodes\Node4]
ClassName=TProjectFileNode
FileName=C:\waptdev\wapt-thunderbird-config\custom-strings.txt
[Project\ChildNodes\Node0\ChildNodes\Node5]
ClassName=TProjectFileNode
FileName=$[Project-Path]..\setup.py FileName=$[Project-Path]..\setup.py
[Project\ChildNodes\Node0\ChildNodes\Node6]
ClassName=TProjectFileNode
FileName=C:\waptdev\wapt-thunderbird-config\thunderbird.cfg.j2
[Project\ChildNodes\Node0\ChildNodes] [Project\ChildNodes\Node0\ChildNodes]
Count=4 Count=7
[Project\ChildNodes\Node1] [Project\ChildNodes\Node1]
ClassName=TProjectRunConfiguationsNode ClassName=TProjectRunConfiguationsNode
@ -74,8 +86,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node1] [Project\ChildNodes\Node1\ChildNodes\Node1]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -97,8 +107,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node2] [Project\ChildNodes\Node1\ChildNodes\Node2]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -120,8 +128,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node3] [Project\ChildNodes\Node1\ChildNodes\Node3]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -143,8 +149,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node4] [Project\ChildNodes\Node1\ChildNodes\Node4]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -166,8 +170,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node5] [Project\ChildNodes\Node1\ChildNodes\Node5]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -189,8 +191,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node6] [Project\ChildNodes\Node1\ChildNodes\Node6]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -212,8 +212,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node7] [Project\ChildNodes\Node1\ChildNodes\Node7]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -235,8 +233,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[Project-Path].. WorkingDirectory=$[Project-Path]..
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node8] [Project\ChildNodes\Node1\ChildNodes\Node8]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -258,8 +254,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes\Node9] [Project\ChildNodes\Node1\ChildNodes\Node9]
ClassName=TProjectRunConfiguationNode ClassName=TProjectRunConfiguationNode
@ -281,8 +275,6 @@ Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short] ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short] Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir] WorkingDirectory=$[ActiveScript-Dir]
ShortCut=0
MessagesFormat=$[FileName] $[LineNumber]
[Project\ChildNodes\Node1\ChildNodes] [Project\ChildNodes\Node1\ChildNodes]
Count=10 Count=10

@ -3,9 +3,9 @@
if(getenv("USER") != "") { if(getenv("USER") != "") {
var user = getenv("USER"); var user = getenv("USER");
} else { } else {
var env_user = getenv("USERNAME"); var env_user = getenv("USERNAME");
} }
{% if thunderbird_config_append_domain is defined and thunderbird_config_append_domain != '' %} {% if thunderbird_config_append_domain is defined and thunderbird_config_append_domain != '' %}
@ -19,63 +19,3 @@ lockPref("autoadmin.append_emailaddr", true);
lockPref("autoadmin.global_config_url", "{{ thunderbird_config_url }}"); lockPref("autoadmin.global_config_url", "{{ thunderbird_config_url }}");
lockPref("autoadmin.failover_to_cached", true); lockPref("autoadmin.failover_to_cached", true);
lockPref("autoadmin.offline_failover", true); lockPref("autoadmin.offline_failover", true);
// Javascript to enable the distribution/bundles directory
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
var gBundlePrefFiles = [];
Cu.import("resource://gre/modules/Services.jsm");
function loadBundleDirs() {
var distributionBundleDir = Services.dirsvc.get("GreD", Ci.nsIFile);
distributionBundleDir.append("distribution");
distributionBundleDir.append("bundles");
if (!distributionBundleDir.exists() || !distributionBundleDir.isDirectory()) {
return;
}
var enumerator = distributionBundleDir.directoryEntries;
while (enumerator.hasMoreElements()) {
var file = enumerator.getNext().QueryInterface(Ci.nsIFile);
var dirName = file.leafName;
file.append("chrome.manifest");
Components.manager.QueryInterface(Ci.nsIComponentRegistrar).autoRegister(file);
file.leafName = "defaults";
file.append("preferences");
if (!file.exists() || !file.isDirectory()) {
continue;
}
var resource = Services.io.getProtocolHandler("resource")
.QueryInterface(Components.interfaces.nsIResProtocolHandler);
// We can't use a file URL to load prefs.
// Create a resource URL that maps to the prefs directory.
var prefAlias = Services.io.newFileURI(file);
resource.setSubstitution(dirName + "_prefs", prefAlias);
var prefEnumerator = file.directoryEntries;
while (prefEnumerator.hasMoreElements()) {
var prefFile = prefEnumerator.getNext().QueryInterface(Ci.nsIFile);
gBundlePrefFiles.push("resource://" + dirName + "_prefs/" + prefFile.leafName);
}
}
}
var loadPrefObserver = {
observe: function observe(subject, topic, data) {
if (gBundlePrefFiles.length > 0) {
// Create a temporary scope so the pref function works
var temp = {};
temp.pref = function(a, b) {
defaultPref(a, b);
}
gBundlePrefFiles.forEach(function(prefFile) {
Services.scriptloader.loadSubScript(prefFile, temp);
});
}
}
}
Services.obs.addObserver(loadPrefObserver, "load-extension-defaults", false);
try {
loadBundleDirs();
} catch(e) {}

Loading…
Cancel
Save