Bug 247507 - Make Venkman on Aviary banch work in FF 1.0.

r=shaver
a=drivers
This commit is contained in:
silver%warwickcompsoc.co.uk 2004-10-20 16:26:05 +00:00
Родитель 458fe99083
Коммит 54b6ffc4b5
9 изменённых файлов: 296 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,17 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:venkman-ff"/>
</RDF:Seq>
<!-- package information -->
<RDF:Description about="urn:mozilla:package:venkman-ff"
chrome:name="venkman-ff">
</RDF:Description>
<!-- overlay information -->
</RDF:RDF>

Просмотреть файл

@ -0,0 +1,29 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:venkman-sm"/>
</RDF:Seq>
<!-- package information -->
<RDF:Description about="urn:mozilla:package:venkman-sm"
chrome:name="venkman-sm">
</RDF:Description>
<!-- overlay information -->
<RDF:Seq about="urn:mozilla:overlays">
<RDF:li resource="chrome://venkman/content/venkman.xul"/>
<RDF:li resource="chrome://venkman/content/venkman-menus.xul"/>
</RDF:Seq>
<RDF:Seq about="chrome://venkman/content/venkman.xul">
<RDF:li>chrome://communicator/content/utilityOverlay.xul</RDF:li>
</RDF:Seq>
<RDF:Seq about="chrome://venkman/content/venkman-menus.xul">
<RDF:li>chrome://communicator/content/tasksOverlay.xul</RDF:li>
</RDF:Seq>
</RDF:RDF>

Просмотреть файл

@ -0,0 +1,2 @@
venkman.jar:
content/venkman/ff/contents.rdf (../content/ff/contents.rdf)

Просмотреть файл

@ -0,0 +1,40 @@
/* ***** 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 ChatZilla.
*
* The Initial Developer of the Original Code is James Ross.
*
* Contributor(s):
* James Ross <silver@warwickcompsoc.co.uk>
*
* 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 ***** */
#tb-venkman-open {
list-style-image: url("chrome://venkman/skin/images/step-into.png");
}
toolbar[iconsize="small"] #tb-venkman-open {
list-style-image: url("chrome://venkman/skin/images/file-js-bp.png");
}

Просмотреть файл

@ -0,0 +1,2 @@
venkman.jar:
content/venkman/sm/contents.rdf (../content/sm/contents.rdf)

Просмотреть файл

@ -0,0 +1,3 @@
jar-tree
xpi-tree
venkman-*.xpi

Просмотреть файл

@ -0,0 +1,57 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
var srDest = 1;
var err = initInstall("JavaScript Debugger", "venkman",
"@REVISION@");
logComment("initInstall: " + err);
if (verifyDiskSpace(getFolder("Program"), srDest))
{
addFile("JavaScript Debugger",
"chrome/venkman.jar", // jar source folder
getFolder("Chrome"), // target folder
""); // target subdir
registerChrome(PACKAGE | DELAYED_CHROME,
getFolder("Chrome","venkman.jar"),
"content/venkman/");
registerChrome(PACKAGE | DELAYED_CHROME,
getFolder("Chrome","venkman.jar"),
"content/venkman/sm/");
registerChrome(LOCALE | DELAYED_CHROME,
getFolder("Chrome", "venkman.jar"),
"locale/en-US/venkman/");
registerChrome(SKIN | DELAYED_CHROME,
getFolder("Chrome", "venkman.jar"),
"skin/modern/venkman/");
if (err==SUCCESS)
performInstall();
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);

Просмотреть файл

@ -0,0 +1,35 @@
<?xml version="1.0"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<!-- core data -->
<em:id>{f13b157f-b174-47e7-a34d-4815ddfdfeb8}</em:id>
<em:version>@REVISION@</em:version>
<!-- target: Mozilla Firefox, version 0.9 to 1.0 -->
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>0.9</em:minVersion>
<em:maxVersion>1.0</em:maxVersion>
</Description>
</em:targetApplication>
<!-- front-end metadata -->
<em:name>JavaScript Debugger</em:name>
<em:description></em:description>
<em:creator>Robert Ginda</em:creator>
<em:contributor>Christopher Aillon</em:contributor>
<em:contributor>James Ross</em:contributor>
<em:homepageURL>http://www.hacksrus.com/~ginda/venkman/</em:homepageURL>
<!-- package files -->
<em:file>
<Description about="urn:mozilla:extension:file:venkman.jar">
<em:package>content/venkman/</em:package>
<em:package>content/venkman/ff/</em:package>
<em:locale>locale/en-US/venkman/</em:locale>
<em:skin>skin/modern/venkman/</em:skin>
</Description>
</em:file>
</Description>
</RDF>

Просмотреть файл

@ -0,0 +1,111 @@
#! /bin/bash
# Set up paths for finding files.
FEDIR=$PWD/../resources
XPIFILES=$PWD
XPIROOT=$PWD/xpi-tree
JARROOT=$PWD/jar-tree
if [ "$1" == "clean" ]; then
echo -n "Cleaning up files"
echo -n .
rm -rf $XPIROOT
echo -n .
rm -rf $JARROOT
echo ". done."
exit
fi
# Extract version number.
VERSION=`grep "const __vnk_version" $FEDIR/content/venkman-static.js | sed "s|.*\"\([^\"]\+\)\".*|\1|"`
echo Begining build of JavaScript Debugger $VERSION...
# Check for existing.
if [ -r "venkman-$VERSION.xpi" ]; then
echo " WARNING: output XPI will be overwritten."
fi
# Check for required directory layouts.
echo -n " Checking XPI structure"
echo -n .
if ! [ -d xpi-tree ]; then mkdir xpi-tree; fi
echo -n .
if ! [ -d xpi-tree/chrome ]; then mkdir xpi-tree/chrome; fi
echo -n .
if ! [ -d xpi-tree/components ]; then mkdir xpi-tree/components; fi
echo ". done"
echo -n " Checking JAR structure"
echo -n .
if ! [ -d jar-tree ]; then mkdir jar-tree; fi
echo ". done"
# Make Firefox updates.
echo -n " Updating Firefox Extension files"
echo -n .
sed "s|@REVISION@|$VERSION|g" < $XPIFILES/install.rdf > $XPIROOT/install.rdf
echo ". done"
# Make Mozilla Suite updates.
echo -n " Updating Mozilla Extension files"
echo -n .
mv $FEDIR/content/contents.rdf $FEDIR/content/contents.rdf.in
echo -n .
sed "s|@MOZILLA_VERSION@|vnk-$VERSION|g;s|\(chrome:displayName=\)\"[^\"]\+\"|\1\"JavaScript Debugger $VERSION\"|g" < $FEDIR/content/contents.rdf.in > $FEDIR/content/contents.rdf
echo -n .
rm $FEDIR/content/contents.rdf.in
echo -n .
mv $FEDIR/locale/en-US/contents.rdf $FEDIR/locale/en-US/contents.rdf.in
echo -n .
sed "s|@MOZILLA_VERSION@|vnk-$VERSION|g" < $FEDIR/locale/en-US/contents.rdf.in > $FEDIR/locale/en-US/contents.rdf
echo -n .
rm $FEDIR/locale/en-US/contents.rdf.in
echo ". done"
# Create JAR.
echo -n " Constructing JAR package"
echo -n .
cd $FEDIR/../../../config
echo -n .
OUT=`perl make-jars.pl -v -z zip -p preprocessor.pl -s $FEDIR -d $JARROOT < $FEDIR/jar.mn 2>&1`
if [ "$?" != "0" ]; then echo ERROR; echo $OUT; fi
echo -n .
OUT=`perl make-jars.pl -v -z zip -p preprocessor.pl -s $FEDIR/sm -d $JARROOT < $FEDIR/sm/jar.mn 2>&1`
if [ "$?" != "0" ]; then echo ERROR; echo $OUT; fi
echo -n .
OUT=`perl make-jars.pl -v -z zip -p preprocessor.pl -s $FEDIR/ff -d $JARROOT < $FEDIR/ff/jar.mn 2>&1`
if [ "$?" != "0" ]; then echo ERROR; echo $OUT; fi
echo -n .
cd $XPIFILES
echo -n .
sed "s|@REVISION@|$VERSION|g" < install.js > $XPIROOT/install.js
echo ". done"
# Make XPI.
echo -n " Constructing XPI package"
echo -n .
OUT=`cp -v $JARROOT/venkman.jar $XPIROOT/chrome/`
if [ "$?" != "0" ]; then echo ERROR; echo $OUT; fi
echo -n .
OUT=`cp -v $FEDIR/../js/venkman-service.js $XPIROOT/components/`
if [ "$?" != "0" ]; then echo ERROR; echo $OUT; fi
echo -n .
chmod 664 $XPIROOT/chrome/venkman.jar
echo -n .
chmod 664 $XPIROOT/components/venkman-service.js
echo -n .
cd $XPIROOT; OUT=`zip -vr ../venkman-$VERSION.xpi * 2>&1`; cd $XPIFILES
if [ "$?" != "0" ]; then echo ERROR; echo $OUT; fi
echo ". done"
echo "Build of JavaScript Debugger $VERSION... ALL DONE"