[cvs-annodex] commit (/annodex):
AnnodexFirefoxExtension/trunk/Core/chrome/afeview/content/release_notes.html
AnnodexFirefoxExtension/trunk/Installer/
AnnodexFirefoxExtension/trunk/Installer/MakeLinuxVLCPluginXPI.sh
AnnodexFirefoxExtension/trunk/Installer/install.js
+AnnodexFirefoxExtension/trunk/Installer/movePluginsFromAFEtempToMozillaPlugins.sh
andre
nobody at lists.annodex.net
Mon Apr 18 21:13:47 EST 2005
Update of /annodex (new revision 1272)
Added files:
AnnodexFirefoxExtension/trunk/Installer/movePluginsFromAFEtempToMozillaPlugins.sh
Modified files:
AnnodexFirefoxExtension/trunk/Core/chrome/afeview/content/release_notes.html
AnnodexFirefoxExtension/trunk/Installer/
AnnodexFirefoxExtension/trunk/Installer/MakeLinuxVLCPluginXPI.sh
AnnodexFirefoxExtension/trunk/Installer/install.js
Log Message:
AnnodexFirefoxExtension:
* Installation on UNIX systems should now work when the Firefox profile directory isn't in ~/.mozilla/firefox -- in particular, it should now work properly on Debian GNU/Linux systems. Closes ticket:120 (thanks to Conrad Parker and Shane Stephens for the bugreports)
Modified: AnnodexFirefoxExtension/trunk/Core/chrome/afeview/content/release_notes.html
===================================================================
--- AnnodexFirefoxExtension/trunk/Core/chrome/afeview/content/release_notes.html 2005-04-18 03:18:21 UTC (rev 1271)
+++ AnnodexFirefoxExtension/trunk/Core/chrome/afeview/content/release_notes.html 2005-04-18 11:13:45 UTC (rev 1272)
@@ -10,6 +10,17 @@
<h1>AnnodexViewer Firefox Extension: Release Notes</h1>
+<h2>Beta 5 (0.5)</h2>
+
+<ul>
+
+ <li>Installation on UNIX systems should now work when the Firefox profile
+ directory wasn't in <code>~/.mozilla/firefox/foo.bar</code>. In particular,
+ this should fix installation problems on Debian GNU/Linux systems.
+
+</ul>
+
+
<h2>Beta 4 (0.4)</h2>
<ul>
Property changes on: AnnodexFirefoxExtension/trunk/Installer
___________________________________________________________________
Name: svn:ignore
+ *.xpi
Modified: AnnodexFirefoxExtension/trunk/Installer/MakeLinuxVLCPluginXPI.sh
===================================================================
--- AnnodexFirefoxExtension/trunk/Installer/MakeLinuxVLCPluginXPI.sh 2005-04-18 03:18:21 UTC (rev 1271)
+++ AnnodexFirefoxExtension/trunk/Installer/MakeLinuxVLCPluginXPI.sh 2005-04-18 11:13:45 UTC (rev 1272)
@@ -26,7 +26,10 @@
[ -f AnnodexViewer-Linux-$buildarch.xpi ] \
&& rm AnnodexViewer-Linux-$buildarch.xpi \
|| true
-zip -9r AnnodexViewer-Linux-$buildarch.xpi bin/ install.js
+zip -9r AnnodexViewer-Linux-$buildarch.xpi \
+ bin/ \
+ install.js \
+ movePluginsFromAFEtempToMozillaPlugins.sh
# clean up
rm -rf bin/
Modified: AnnodexFirefoxExtension/trunk/Installer/install.js
===================================================================
--- AnnodexFirefoxExtension/trunk/Installer/install.js 2005-04-18 03:18:21 UTC (rev 1271)
+++ AnnodexFirefoxExtension/trunk/Installer/install.js 2005-04-18 11:13:45 UTC (rev 1272)
@@ -36,15 +36,15 @@
*
* ***** END LICENSE BLOCK ***** */
-const registeredPackageName = "/CSIRO/AnnodexViewer/VLCMediaEngine";
-const packageVersion = "0.2";
+const REGISTERED_PACKAGE_NAME = "/CSIRO/AnnodexViewer/VLCMediaEngine";
+const PACKAGE_VERSION = "0.2";
// Initialise the installer
var initError = initInstall
(
"Annodex Viewer",
- registeredPackageName,
- packageVersion
+ REGISTERED_PACKAGE_NAME,
+ PACKAGE_VERSION
);
// What platform are we on?
@@ -61,16 +61,21 @@
}
// Where are we installing to? This depends on what platform we're running on.
-var pluginsDirectory;
+var PluginsDirectory;
+var AFEtempDirectory; // For UNIX systems only: see comment below
+
if (getPlatform() == "unix")
{
- // On UNIX systems, the profile directory usually looks something like
- // "$HOME/.mozilla/firefox/default.XXX/". Plugins need to be installed to
- // "$HOME/.mozilla/plugins"; the best solution I've found right now is to
- // try to specify a path relative to the user's profile directory. This
- // is quite fragile, but, well, it should work for 99% of users ...
- pluginsDirectory = getFolder("Profile", "../../plugins");
+ // On UNIX systems, we install the plugins to a directory named "AFEtemp" in
+ // the user's profile directory: this is because I can't find out a way to
+ // install things to the $HOME/.mozilla/plugins/ directory, which is where
+ // plugins should go. We rely on a shell script that gets invoked later in
+ // the installation to move the installed plugin from the AFEtemp directory
+ // to the ~/.mozilla/plugins/ directory.
+ PluginsDirectory = getFolder("Profile", "AFEtemp");
+ AFEtempDirectory = PluginsDirectory;
+
currentUserDirectory = getFolder("Current User");
logComment("currentUserDirectory is " + currentUserDirectory);
}
@@ -79,11 +84,11 @@
// Note: this will fail if the user does not have write access to the
// Mozilla system plugins directory! (Typically
// "C:\Program Files\mozilla.org\Mozilla\Plugins")
- pluginsDirectory = getFolder("Plugins");
+ PluginsDirectory = getFolder("Plugins");
}
else if (getPlatform() == "macosx")
{
- pluginsDirectory = getFolder("Profile", "../../../../Internet Plug-Ins");
+ PluginsDirectory = getFolder("Profile", "../../../../Internet Plug-Ins");
}
else
{
@@ -94,7 +99,7 @@
+ "annodex-dev at lists.annodex.net for assistance.");
}
-logComment("Destination Plugins directory: " + pluginsDirectory);
+logComment("Destination Plugins directory: " + PluginsDirectory);
if (getPlatform() == "unix")
{
@@ -108,7 +113,7 @@
var fileToDelete, i;
for (i = 0; i < oldUnixPluginSupportFiles.length; i++)
{
- fileToDelete = getFolder(pluginsDirectory, oldUnixPluginSupportFiles[i]);
+ fileToDelete = getFolder(PluginsDirectory, oldUnixPluginSupportFiles[i]);
if (File.isFile(fileToDelete))
{
if (File.remove(fileToDelete) == SUCCESS)
@@ -118,6 +123,22 @@
// Clear any errors that may have occured trying to delete old files
resetError();
+
+ // We need to put double quotes around the name of the directory for
+ // the XPInstall API's execute() command to work properly (see the XPInstall
+ // API documentation for more details about this)
+ var afeTempDirectoryAsQuotedString = '"' + new String(AFEtempDirectory)
+ + '"';
+ // Move the plugin from the $profile/AFEtemp/ directory to ~/.mozilla/plugins
+ var executeResult = execute("movePluginsFromAFEtempToMozillaPlugins.sh",
+ afeTempDirectoryAsQuotedString,
+ true);
+
+ if (executeResult != SUCCESS)
+ {
+ logComment("movePluginsFromAFEtempToMozillaPlugins.sh returned error: "
+ + executeResult);
+ }
}
// TODO: Check disk space
@@ -125,10 +146,10 @@
// Set up the target directory
var addDirectoryResult = addDirectory
(
- registeredPackageName,
+ REGISTERED_PACKAGE_NAME,
"0.2",
"bin/plugins", // jar source folder
- pluginsDirectory, // target folder
+ PluginsDirectory, // target folder
"", // target subdirectory
true // overwrite files
);
Added: AnnodexFirefoxExtension/trunk/Installer/movePluginsFromAFEtempToMozillaPlugins.sh
===================================================================
--- AnnodexFirefoxExtension/trunk/Installer/movePluginsFromAFEtempToMozillaPlugins.sh 2005-04-18 03:18:21 UTC (rev 1271)
+++ AnnodexFirefoxExtension/trunk/Installer/movePluginsFromAFEtempToMozillaPlugins.sh 2005-04-18 11:13:45 UTC (rev 1272)
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if [ "$#" != 1 ]; then
+ echo "usage: $0 <source directory>"
+ exit 1
+fi
+
+if [ "$1" != "$HOME"/.mozilla/plugins ]; then
+ mv "$1"/*.so "$HOME"/.mozilla/plugins/
+fi
+
Property changes on: AnnodexFirefoxExtension/trunk/Installer/movePluginsFromAFEtempToMozillaPlugins.sh
___________________________________________________________________
Name: svn:executable
+ *
--
andre
More information about the cvs-annodex
mailing list