[Cvs-annodex] commit (annodex):
AnnodexFirefoxExtension/trunk/Docs/DevDoc_MediaEngineAddendum.html
+AnnodexFirefoxExtension/trunk/Docs/Modified-MacOS/install.js
+AnnodexFirefoxExtension/trunk/Docs/Modified-MacOS/moveMacPlugins.sh
cchiu
nobody at lists.annodex.net
Fri Jun 2 01:41:32 UTC 2006
Update of /var/local/lib/svn/annodex (new revision 2318)
Added files:
AnnodexFirefoxExtension/trunk/Docs/Modified-MacOS/install.js
AnnodexFirefoxExtension/trunk/Docs/Modified-MacOS/moveMacPlugins.sh
Modified files:
AnnodexFirefoxExtension/trunk/Docs/DevDoc_MediaEngineAddendum.html
Log Message:
Updated documentation for MacOS XPI install process.
Modified: AnnodexFirefoxExtension/trunk/Docs/DevDoc_MediaEngineAddendum.html
===================================================================
--- AnnodexFirefoxExtension/trunk/Docs/DevDoc_MediaEngineAddendum.html 2006-06-01 15:00:55 UTC (rev 2317)
+++ AnnodexFirefoxExtension/trunk/Docs/DevDoc_MediaEngineAddendum.html 2006-06-02 01:41:32 UTC (rev 2318)
@@ -122,10 +122,10 @@
<a href="http://download.videolan.org/pub/testing/win32/contrib-20060428-win32-bin-gcc-3.4.5-only.tar.bz2">
http://download.videolan.org/pub/testing/win32/</a><br> </li>
<li>In the <font face="Courier New">/MediaEngines/VLC</font> directory run the script: <font face="Courier New">./Patch<br>
- </font><li>Copy the file <font face="Courier New">./Modified-Cygwin/Build</font>
+ </font><li>Copy the file <font face="Courier New">/Docs/Modified-Cygwin/Build</font>
into the source directory <font face="Courier New">/MediaEngines/VLC/src/</font><br>
</li>
- <li>Copy the file <font face="Courier New">./Modified-Cygwin/Configure.cygwin</font>
+ <li>Copy the file <font face="Courier New">/Docs/Modified-Cygwin/Configure.cygwin</font>
into the source directory <font face="Courier New">/MediaEngines/VLC/src/</font><br>
<br>
The developer is required to changes these lines to make it the <i>absolute</i>
@@ -138,17 +138,17 @@
</font>Line 73: <font face="Courier New">--enable-mozilla --with-mozilla-sdk-path=/cygdrive/c/Cygwin/MediaEngines/GeckoSDK/gecko-sdk-win32
\<br>
</font></li>
- <li>Copy the file <font face="Courier New">./Modified-Cygwin/Configure.ac</font>
+ <li>Copy the file <font face="Courier New">/Docs/Modified-Cygwin/Configure.ac</font>
into the source directory <font face="Courier New">/MediaEngines/VLC/src/</font><br>
</li>
- <li>Copy the file <font face="Courier New">./Modified-Cygwin/Makefile.am</font>
+ <li>Copy the file <font face="Courier New">/Docs/Modified-Cygwin/Makefile.am</font>
into the Mozilla source directory <font face="Courier New">/MediaEngines/VLC/src/mozilla/<br>
<br>
</font>Modify the line to make it the absolute path of <font face="Courier New">
vlcintf.idl:<br>
</font>Line 10: <font face="Courier New">VLCIDL_FILE = "c:\Cygwin/MediaEngines/VLC/src/mozilla/vlcintf.idl"<br>
</font></li>
- <li>Copy the file <font face="Courier New">./Modified-Cygwin/nsISupportsUtils.h</font>
+ <li>Copy the file <font face="Courier New">/Docs/Modified-Cygwin/nsISupportsUtils.h</font>
into the Contribution dependency directory <font face="Courier New">/usr/win32/gecko-sdk/include/<br>
</font></li>
<li>In the <font face="Courier New">/MediaEngines/VLC/src</font> directory run
@@ -172,15 +172,15 @@
dependencies that can be downloaded, they will need to be compiled from source
at the following location in the source directory:<br>
<font face="Courier New"><br>
- \MediaEngines\VLC\src\extras\contrib\<br>
+ /MediaEngines/VLC/src/extras/contrib/<br>
</font>Enter the command <font face="Courier New">./bootstrap</font> and
<font face="Courier New">./make src</font><br>
</li>
<li>In the <font face="Courier New">/MediaEngines/VLC</font> directory run the script: <font face="Courier New">./Patch<br>
- </font><li>Copy the file <font face="Courier New">./Modified-MacOS/Build</font>
+ </font><li>Copy the file <font face="Courier New">/Docs/Modified-MacOS/Build</font>
into the source directory <font face="Courier New">/MediaEngines/VLC/src/</font><br>
</li>
- <li>Copy the file <font face="Courier New">./Modified-MacOS/Configure.darwin</font>
+ <li>Copy the file <font face="Courier New">/Docs/Modified-MacOS/Configure.darwin</font>
into the source directory <font face="Courier New">/MediaEngines/VLC/src/</font><br>
<br>
The developer is required to changes these lines to make it the <i>absolute</i>
@@ -196,11 +196,11 @@
</font>Line 74: <font face="Courier New">--enable-mozilla --with-mozilla-sdk-path=/Users/root/VLC/gecko-sdk
\<br>
</font></li>
- <li>Copy the file <font face="Courier New">./Modified-Linux/Makefile.src.am</font>
+ <li>Copy the file <font face="Courier New">/Docs/Modified-MacOS/Makefile.src.am</font>
into the source directory <font face="Courier New">/MediaEngines/VLC/src/</font>
and rename to <font face="Courier New">Makefile.am</font><br>
</li>
- <li>Copy the file <font face="Courier New">./Modified-Linux/Makefile.moz.am</font>
+ <li>Copy the file <font face="Courier New">/Docs/Modified-MacOS/Makefile.moz.am</font>
into the Mozilla source directory <font face="Courier New">/MediaEngines/VLC/src/mozilla/</font>
and rename to <font face="Courier New">Makefile.am<br>
<br>
@@ -211,6 +211,38 @@
</font></li>
<li>In the <font face="Courier New">/MediaEngines/VLC/src</font> directory run
the following script <font face="Courier New">./Build</font></li></ol>
+<h3>MacOS XPI Packaging Configuration Changes:</h3>
+<p>In addition to compilation, to package a plug-in for MacOS systems, there is
+an additional requirement due to the nature of the MacOS HFS file system. More
+specifically, the resource forks need to be serialised after the archive is
+decompressed using a specific decompression utility. Using Mozilla's XPI
+installer functions will fail to serialise the resource fork, and thus the
+metadata will not be included to recognise the plug-in within Mozilla Firefox.
+Follow the instructions below to make the XPI package for MacOS:</p>
+<ol>
+ <li>Create a temporary directory to create the XPI file (in this instruction,
+ the temporary directory will be called <font face="Courier New">/Users/root/tmp</font>)<br>
+ </li>
+ <li>Archive the <font face="Courier New">/MediaEngines/VLC/src/mozilla/VLC
+ Plugin.plugin</font> into a zip file, and rename the zip file back to <font face="Courier New">
+ VLC Plugin.plugin</font>.<br>
+ Note: This is to allow Mozilla to install the plug-in file into a temporary
+ directory to extract the file using a separate utility.<br>
+ </li>
+ <li>Create a new directory in the temporary directory called
+ <font face="Courier New">src</font> (i.e. <font face="Courier New">
+ /Users/root/tmp/src/</font>). Copy <font face="Courier New">VLC Plugin.plugin</font>
+ into the <font face="Courier New">src</font> subdirectory.<br>
+ </li>
+ <li>Copy <font face="Courier New">/Docs/Modified-MacOS/install.js</font> and <font face="Courier New">
+ /Docs/Modified-MacOS/moveMacPlugins.sh</font> into the temporary directory
+ (i.e. <font face="Courier New">/Users/root/tmp/</font>).<br>
+ </li>
+ <li>Archive the items of the temporary directory, <i>not</i> the temporary
+ directory itself (i.e. archive <font face="Courier New">install.js</font>,
+ <font face="Courier New">moveMacPlugins.sh</font> and the
+ <font face="Courier New">src</font> directory together.) Rename the archive to
+ the <font face="Courier New">AnnodexViewer-MacOS.xpi</font></li></ol>
<h2><a name="3.0_Linux">3.0 Installation of the Annodex Firefox Extension in
GNU/Linux</a></h2>
@@ -241,10 +273,11 @@
It is recommended to extract the file within the same relative path of the
source directory (<font face="Courier New">/MediaEngines/VLC/</font>).<br> </li>
<li>In the <font face="Courier New">/MediaEngines/VLC</font> directory run the script: <font face="Courier New">./Patch<br>
- </font><li>Copy the file <font face="Courier New">./Modified-Linux/Build</font>
+ </font><li>Copy the file <font face="Courier New">
+ /Docs/Modified-Linux/Build</font>
into the source directory <font face="Courier New">/MediaEngines/VLC/src/</font><br>
</li>
- <li>Copy the file <font face="Courier New">./Modified-Linux/Configure.linux</font>
+ <li>Copy the file <font face="Courier New">/Docs/Modified-Linux/Configure.linux</font>
into the source directory <font face="Courier New">/MediaEngines/VLC/src/</font><br>
<br>
The developer is required to changes these lines to make it the <i>absolute</i>
@@ -257,7 +290,7 @@
</font>Line 81: <font face="Courier New">--enable-mozilla --with-mozilla-sdk-path=/home/root/MediaEngines/gecko-sdk
\<br>
</font></li>
- <li>Copy the file <font face="Courier New">./Modified-Linux/Makefile.am</font>
+ <li>Copy the file <font face="Courier New">/Docs/Modified-Linux/Makefile.am</font>
into the Mozilla source directory <font face="Courier New">/MediaEngines/VLC/src/mozilla/<br>
</font></li>
<li>In the <font face="Courier New">/MediaEngines/VLC/src</font> directory run
Added: AnnodexFirefoxExtension/trunk/Docs/Modified-MacOS/install.js
===================================================================
--- AnnodexFirefoxExtension/trunk/Docs/Modified-MacOS/install.js 2006-06-01 15:00:55 UTC (rev 2317)
+++ AnnodexFirefoxExtension/trunk/Docs/Modified-MacOS/install.js 2006-06-02 01:41:32 UTC (rev 2318)
@@ -0,0 +1,131 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Annodex Firefox Extension.
+ *
+ * The Initial Developer of the Original Code is
+ * Commonwealth Scientific and Industrial Research Organisation (CSIRO)
+ * Australia.
+ * Portions created by the Initial Developer are Copyright (C) 2004-2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Chris Chiu <chris.chiu at csiro.au>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+const REGISTERED_PACKAGE_NAME = "/CSIRO/AnnodexViewer/VLCMediaEngine";
+const PACKAGE_VERSION = "0.6.5";
+
+// Initialise the installer
+var initError = initInstall
+(
+ "Annodex Viewer",
+ REGISTERED_PACKAGE_NAME,
+ PACKAGE_VERSION
+);
+
+// What platform are we on?
+function getPlatform ()
+{
+ var platformString = new String(Install.platform);
+
+ if (!platformString.search(/^Macintosh/))
+ return "macosx";
+}
+
+// Where are we installing to? This depends on what platform we're running on.
+var PluginsDirectory;
+var AFEtempDirectory;
+
+if (getPlatform() == "macosx")
+{
+ PluginsDirectory = getFolder("Profile", "AFEtemp");
+ AFEtempDirectory = PluginsDirectory;
+
+ currentUserDirectory = getFolder("Current User");
+ logComment("currentUserDirectory is " + currentUserDirectory);
+}
+else
+{
+ // In the rather unlikely event we're not being installed on a Mac,
+ // Windows, or UNIX system ...
+ alert( "You are attempting to install the Annodex Firefox extension on "
+ + "an unsupported platform. Please email "
+ + "annodex-dev at lists.annodex.net for assistance.");
+}
+
+logComment("Destination Plugins directory: " + PluginsDirectory);
+
+// To handle Annodex Firefox Plugin the resource fork has to be serialised
+// properly. The workaround to create a secondary archive containing the
+// actual plugin, but with the .plugin attribute to allow Mozilla Firefox
+// to extract the archive to the Plug-Ins directory.
+// Then we run the script to use BOMArchiveHandler to unzip the file correctly.
+// Note: BOMArchiveHandler is only available on MacOS 10.3 and above.
+// Previous Operating Systems used StuffIt Expander.
+
+if (getPlatform() == "macosx")
+{
+ var afeTempDirectoryAsQuotedString = '"' + new String(AFEtempDirectory) + '"';
+ // Move the plugin from the $profile/AFEtemp/ directory to Internet Plugins
+ var executeResult = execute("moveMacPlugins.sh",
+ afeTempDirectoryAsQuotedString,
+ true);
+
+ if (executeResult != SUCCESS)
+ {
+ logComment("moveMacPlugins.sh returned error: " + executeResult);
+ }
+}
+
+// TODO: Check disk space
+
+// Set up the target directory
+var addDirectoryResult = addDirectory
+(
+ REGISTERED_PACKAGE_NAME,
+ "0.6.5",
+ "src", // jar source folder
+ PluginsDirectory, // target folder
+ "", // target subdirectory
+ true // overwrite files
+);
+
+// Perform the install
+if (addDirectoryResult == SUCCESS)
+{
+ var performInstallResult = performInstall();
+
+ if (performInstallResult != SUCCESS)
+ logComment("performInstall() returned: " + performInstallResult);
+
+ refreshPlugins();
+}
+else
+{
+ cancelInstall(addDirectoryResult);
+ logComment("addDirectory() failed: " + addDirectoryResult);
+}
Added: AnnodexFirefoxExtension/trunk/Docs/Modified-MacOS/moveMacPlugins.sh
===================================================================
--- AnnodexFirefoxExtension/trunk/Docs/Modified-MacOS/moveMacPlugins.sh 2006-06-01 15:00:55 UTC (rev 2317)
+++ AnnodexFirefoxExtension/trunk/Docs/Modified-MacOS/moveMacPlugins.sh 2006-06-02 01:41:32 UTC (rev 2318)
@@ -0,0 +1,16 @@
+#!/bin/sh
+ArchiveHandler=/System/Library/CoreServices/BOMArchiveHelper.app/Contents/MacOS/BOMArchiveHelper
+
+mkdir "$HOME"/Library/Internet\ Plug-Ins
+
+if [ "$#" != 1 ]; then
+ echo "usage: $0 <source directory>"
+ exit 1
+fi
+
+if [ "$1" != "$HOME"/Library/Internet\ Plug-Ins ]; then
+ mv "$1"/VLC\ Plugin.plugin "$HOME"/Library/Internet\ Plug-Ins/
+ mv "$HOME"/Library/Internet\ Plug-Ins/VLC\ Plugin.plugin "$HOME"/Library/Internet\ Plug-Ins/VLC\ Plugin.zip
+ "$ArchiveHandler" "$HOME"/Library/Internet\ Plug-Ins/VLC\ Plugin.zip
+ rm -f "$HOME"/Library/Internet\ Plug-Ins/VLC\ Plugin.zip
+fi
\ No newline at end of file
--
cchiu
More information about the cvs-annodex
mailing list