Changes to produce proper XPI on GNU/Linux

This commit is contained in:
edburns%acm.org 2003-01-02 20:37:53 +00:00
Родитель b37eeb5e28
Коммит 2f22721b02
5 изменённых файлов: 48 добавлений и 20 удалений

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

@ -46,6 +46,7 @@
<property name="dist" value="${build.home}/.."/>
<target name="main" depends="prepare,set.debug.vars,build.webclient.javadev,build.webclient.xpi"/>
<target name="xpi.from.javadev" depends="prepare,set.debug.vars,build.webclient.xpi"/>
<target name="prepare">
@ -136,24 +137,30 @@
<copy file="README.WEBCLIENT"
todir="${package.home}"/>
<chmod perm="775" file="${package.lib}/${lib.prefix}javadomjni.${so.suffix}"/>
<chmod perm="775" file="${package.lib}/${lib.prefix}javadom.${so.suffix}"/>
<chmod perm="775" file="${package.lib}/${lib.prefix}webclient.${so.suffix}"/>
<chmod perm="775" file="${package.lib}/${lib.prefix}wc_share.${ar.suffix}"/>
<chmod perm="775" file="${package.example}/runem.pl"/>
<chmod perm="777" file="${package.lib}/${lib.prefix}javadomjni.${so.suffix}"/>
<chmod perm="777" file="${package.lib}/${lib.prefix}javadom.${so.suffix}"/>
<chmod perm="777" file="${package.lib}/${lib.prefix}webclient.${so.suffix}"/>
<chmod perm="777" file="${package.lib}/${lib.prefix}wc_share.${ar.suffix}"/>
<chmod perm="777" file="${package.example}/runem.pl"/>
</target>
<target name="build.webclient.xpi" depends="build.win32.webclient.xpi,build.unix.webclient.xpi"/>
<target name="build.win32.webclient.xpi" if="build.win32.classes">
<echo message="Building WIN32 XPI"/>
<jar jarfile="webclient_${package.version}_${short.os.name}.xpi"
basedir="${dist}" includes="install.js,javadev/**"/>
</target>
<target name="build.unix.webclient.xpi" if="build.unix.classes">
<echo message="Building UNIX XPI"/>
<copy file="${dist}/${win.bin}/bin/${lib.prefix}webclientstub.${so.suffix}"
todir="${package.lib}"/>
<jar jarfile="webclient_${package.version}_${short.os.name}.xpi"
basedir="${dist}" includes="install.js,javadev/**"/>
basedir="${dist}" includes="install.js,symlink.sh,chmodx.sh,javadev/**"/>
</target>
<target name="create.webclient.scripts" depends="create.win32.webclient.scripts,create.unix.webclient.scripts"/>
@ -164,7 +171,7 @@
set PATH=%PATH%;%JDKHOME%\jre\bin
perl .\runem.pl org.mozilla.webclient.test.EmbeddedMozillaImpl ..\.. %1%
</echo>
<chmod perm="775" file="${package.example}/runem.bat"/>
<chmod perm="777" file="${package.example}/runem.bat"/>
<copy file="install_webclient_win32.js"
tofile="${dist}/install.js"/>
@ -173,9 +180,11 @@ perl .\runem.pl org.mozilla.webclient.test.EmbeddedMozillaImpl ..\.. %1%
<target name="create.unix.webclient.scripts" if="build.unix.classes">
<echo file="${package.example}/runem">perl ./runem.pl org.mozilla.webclient.test.EmbeddedMozillaImpl ../../.. \$1 \$2 \$3 \$4 \$4 \$6
<echo file="${package.example}/runem.bat">export CLASSPATH=../lib/webclient_${package.version}_${short.os.name}.jar
export LD_LIBRARY_PATH=$MOZILLA_FIVE_HOME:$MOZILLA_FIVE_HOME/components:$PWD/../lib
perl ./runem.pl org.mozilla.webclient.test.EmbeddedMozillaImpl ../../.. $1 $2 $3 $4 $4 $6
</echo>
<chmod perm="775" file="${package.example}/runem"/>
<chmod perm="777" file="${package.example}/runem.bat"/>
<copy file="install_webclient_unix.js"
tofile="${dist}/install.js"/>
@ -200,7 +209,7 @@ perl .\runem.pl org.mozilla.webclient.test.EmbeddedMozillaImpl ..\.. %1%
</target>
<target name="create.webclient.manifest">
<echo message="Creating manifest to ${package.manifest}"/>
<echo file="${package.manifest}">Manifest-Version: 1.0
Created-By: Webclient Build System
Specification-Title: Webclient
@ -220,4 +229,11 @@ Implementation-Vendor: mozilla.org
</target>
<target name="deploy.xpi" depends="main">
<copy file="webclient_${package.version}_${short.os.name}.xpi"
todir="${xpi.dist}"/>
</target>
</project>

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

@ -8,4 +8,6 @@
#
#-------------------------------------------------------
chmod 775 $1
echo chmodding $1
chmod 777 $1

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

@ -1,3 +1,5 @@
// logComment writes to install.log
// Installation guide for Webclient.xpi
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
@ -45,7 +47,7 @@ function chmodx(tgt)
srDest = 1000;
logComment("Starting Install Process");
err = initInstall("Webclient", "Webclient", "1.2");
err = initInstall("Webclient", "Webclient", "1.3");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
@ -55,7 +57,7 @@ logComment("Starting Install Process");
{
setPackageFolder(fProgram);
err = addDirectory("",
"1.2",
"1.3",
"javadev", // dir name in jar to extract
fProgram, // Where to put this file
// (Returned from GetFolder)
@ -65,20 +67,23 @@ logComment("Starting Install Process");
var fComponents = getFolder("Components");
var fJavadev = getFolder("Program","javadev");
symlink(fComponents + "libjavadom.so",
getFolder(fJavadev, "lib/libjavadom.so"));
chmodx(getFolder(fJavadev, "example/runem.bat"));
// check return value
if(err == SUCCESS)
{
err = performInstall();
logComment("performInstall() returned: " + err);
err = chmodx(getFolder(fJavadev, "example/runem.bat"));
logComment("chmodx() returned: " + err);
err = symlink(fComponents + "libjavadom.so",
getFolder(fJavadev, "lib/libjavadom.so"));
logComment("symlink() returned: " + err);
}
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);
// end main

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

@ -8,4 +8,5 @@
#
#-------------------------------------------------------
echo linking $1 to $2
ln -s $1 $2

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

@ -118,12 +118,16 @@ if ($SEP eq "/") {
#tack on the java library path
$cmd = $cmd . " -Djava.library.path=" . $BINDIR . $CPSEP . $BINDIR . $SEP . "components";
#tack on the debug arguments
if ($IS_UNIX) {
$cmd = $cmd . " -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n";
$cmd = $cmd . $CPSEP . $ENV{"LD_LIBRARY_PATH"};
}
else {
if ($ENV{"MOZ_DEBUG"}) {
#tack on the debug arguments
if ($ENV{"MOZ_DEBUG"}) {
if ($IS_UNIX) {
$cmd = $cmd . " -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n";
}
else {
$cmd = $cmd . " -Xdebug -Xrunjdwp:transport=dt_shmem,address=jdbconn,server=y,suspend=n";
}
}