From 8d7de2987ceb1a9f3607948f2a95ddedc21e6d03 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 31 May 2011 04:35:47 +0000 Subject: [PATCH] closes #1794, Fix automatic updater on OS X Display a warning if running a Zotero frankenbuild --- chrome/content/zotero/standalone.js | 13 +++++++++++++ chrome/locale/en-US/zotero/zotero.properties | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/standalone.js b/chrome/content/zotero/standalone.js index 8eda2da740..0c9135abf6 100644 --- a/chrome/content/zotero/standalone.js +++ b/chrome/content/zotero/standalone.js @@ -36,6 +36,19 @@ var ZoteroStandalone = new function() } ZoteroPane.init(); ZoteroPane.makeVisible(); + + // Run check for corrupt installation, where the wrong Gecko runtime is being used + if(Zotero.isMac) { + var greDir = Components.classes["@mozilla.org/file/directory_service;1"] + .getService(Components.interfaces.nsIProperties) + .get("GreD", Components.interfaces.nsIFile); + if(greDir.isSymlink() || greDir.leafName !== "Current") { + var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] + .getService(Components.interfaces.nsIPromptService); + ps.alert(null, "", Zotero.getString('standalone.corruptInstallation')); + } + } + } this.onUnload = function() { diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties index 583b972cb1..046f198577 100644 --- a/chrome/locale/en-US/zotero/zotero.properties +++ b/chrome/locale/en-US/zotero/zotero.properties @@ -728,4 +728,6 @@ locate.showFile.label = Show File locate.showFile.tooltip = Open the directory in which this file resides locate.libraryLookup.label = Library Lookup locate.libraryLookup.tooltip = Look up this item using the selected OpenURL resolver -locate.manageLocateEngines = Manage Lookup Engines... \ No newline at end of file +locate.manageLocateEngines = Manage Lookup Engines... + +standalone.corruptInstallation = Your Zotero Standalone installation appears to be corrupted due to a failed auto-update. While Zotero may continue to function, to avoid potential bugs, please download the latest version of Zotero Standalone from http://zotero.org/support/standalone as soon as possible. \ No newline at end of file