зеркало из https://github.com/mozilla/pjs.git
Fix Javaconnect build bustage on Win32. r=tor, a=mkaply. Not part of default build.
This commit is contained in:
Родитель
87a6415a5e
Коммит
c1bd049ee1
25
configure.in
25
configure.in
|
@ -4519,18 +4519,23 @@ if test `echo "$MOZ_EXTENSIONS" | grep -c java` -ne 0; then
|
|||
|
||||
if test -n "${JAVA_BIN_PATH}"; then
|
||||
dnl Look for javac and jar in the specified path.
|
||||
AC_PATH_PROG(JAVAC, javac, :, $JAVA_BIN_PATH)
|
||||
AC_PATH_PROG(JAR, jar, :, $JAVA_BIN_PATH)
|
||||
if test -z "$JAVAC" || test "$JAVAC" = ":" || test -z "$JAR" || test "$JAR" = ":"; then
|
||||
AC_MSG_ERROR([The programs javac and jar were not found in given path $JAVA_BIN_PATH.])
|
||||
fi
|
||||
_JAVA_PATH=$JAVA_BIN_PATH
|
||||
else
|
||||
dnl No path specified, so look for javac and jar are in $JAVA_HOME & $PATH.
|
||||
AC_PATH_PROG(JAVAC, javac, :, [$JAVA_HOME/bin:$PATH])
|
||||
AC_PATH_PROG(JAR, jar, :, [$JAVA_HOME/bin:$PATH])
|
||||
if test -z "$JAVAC" || test "$JAVAC" = ":" || test -z "$JAR" || test "$JAR" = ":"; then
|
||||
AC_MSG_ERROR([The programs javac and jar were not found. Set \$JAVA_HOME or use --with-java-bin-path={java-bin-dir}.])
|
||||
fi
|
||||
_JAVA_PATH=$JAVA_HOME/bin:$PATH
|
||||
fi
|
||||
case "$host_os" in
|
||||
mingw*|cygwin*|msvc*|mks*)
|
||||
JAVA_PATH=`cygpath -u $_JAVA_PATH`
|
||||
;;
|
||||
*)
|
||||
JAVA_PATH=$_JAVA_PATH
|
||||
;;
|
||||
esac
|
||||
AC_PATH_PROG(JAVAC, javac, :, $JAVA_PATH)
|
||||
AC_PATH_PROG(JAR, jar, :, $JAVA_PATH)
|
||||
if test -z "$JAVAC" || test "$JAVAC" = ":" || test -z "$JAR" || test "$JAR" = ":"; then
|
||||
AC_MSG_ERROR([The programs javac and jar were not found. Set \$JAVA_HOME or use --with-java-bin-path={java-bin-dir}.])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,99 +0,0 @@
|
|||
# ***** 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 Java XPCOM Bindings.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# IBM Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2004
|
||||
# IBM Corporation. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Javier Pedemonte (jhpedemonte@gmail.com)
|
||||
#
|
||||
# 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 *****
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
JARFILE = mozjava.jar
|
||||
JARFILE_SRC = $(patsubst %.jar,%-src.jar,$(JARFILE))
|
||||
|
||||
GARBAGE += $(JARFILE) $(JARFILE_SRC)
|
||||
GARBAGE_DIRS += _javagen org
|
||||
|
||||
JAVA_SRCS = \
|
||||
XPCOM.java \
|
||||
XPCOMJavaProxy.java \
|
||||
XPCOMJavaProxyBase.java \
|
||||
XPCOMException.java \
|
||||
GeckoEmbed.java \
|
||||
AppFileLocProvider.java \
|
||||
$(NULL)
|
||||
|
||||
GEN_JAVA_SRCS = \
|
||||
XPCOMError.java \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifdef MOZ_DEBUG
|
||||
JAVAC_FLAGS = -g
|
||||
endif
|
||||
|
||||
_javagen/org/mozilla/xpcom/.iface_done:
|
||||
@if test ! -d _javagen/org/mozilla/xpcom; then \
|
||||
touch .done; \
|
||||
$(INSTALL) -m 644 .done _javagen/org/mozilla/xpcom; \
|
||||
fi
|
||||
@echo Copying Java source files
|
||||
@$(INSTALL) -m 644 $(addprefix $(srcdir)/../,$(JAVA_SRCS)) \
|
||||
_javagen/org/mozilla/xpcom
|
||||
@$(INSTALL) -m 644 $(addprefix ../,$(GEN_JAVA_SRCS)) \
|
||||
_javagen/org/mozilla/xpcom
|
||||
@echo Generating Java interface files
|
||||
$(DIST)/bin/run-mozilla.sh $(DIST)/bin/GenerateJavaInterfaces$(BIN_SUFFIX) \
|
||||
-d $(CURDIR)/_javagen/org/mozilla/xpcom
|
||||
@touch $@
|
||||
|
||||
org/mozilla/xpcom/.class_done: _javagen/org/mozilla/xpcom/.iface_done
|
||||
@echo Compiling Java interface classes
|
||||
@$(JAVAC) $(JAVAC_FLAGS) -classpath . -d . _javagen/org/mozilla/xpcom/*.java
|
||||
@touch $@
|
||||
|
||||
$(JARFILE): org/mozilla/xpcom/.class_done Makefile
|
||||
$(JAR) cf $@ org
|
||||
|
||||
$(JARFILE_SRC): $(JARFILE)
|
||||
$(JAR) cf $@ -C _javagen org
|
||||
|
||||
libs:: $(JARFILE) $(JARFILE_SRC)
|
||||
$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin
|
||||
|
|
@ -186,7 +186,7 @@ nsJavaXPTCStub::ReleaseWeakRef()
|
|||
{
|
||||
// if this is a child
|
||||
if (mMaster)
|
||||
return mMaster->ReleaseWeakRef();
|
||||
mMaster->ReleaseWeakRef();
|
||||
|
||||
--mWeakRefCnt;
|
||||
|
||||
|
|
|
@ -228,11 +228,12 @@ TestParams::TestSimpleTypeArrayInOut(PRUint32 aCount, PRInt16** aArray)
|
|||
printf("-> TestSimpleTypeArrayInOut()\n");
|
||||
|
||||
printf("in:\n");
|
||||
for (PRUint32 i = 0; i < aCount; i++) {
|
||||
PRUint32 i;
|
||||
for (i = 0; i < aCount; i++) {
|
||||
printf("[%d] %d\n", i, aArray[0][i]);
|
||||
}
|
||||
|
||||
for (PRUint32 i = 0; i < aCount/2; i++) {
|
||||
for (i = 0; i < aCount/2; i++) {
|
||||
PRUint32 index = aCount - 1 - i;
|
||||
PRUint16 temp = aArray[0][index];
|
||||
aArray[0][index] = aArray[0][i];
|
||||
|
@ -248,11 +249,12 @@ TestParams::TestCharStrTypeArrayInOut(PRUint32 aCount, char*** aArray)
|
|||
printf("-> TestCharStrTypeArrayInOut()\n");
|
||||
|
||||
printf("in:\n");
|
||||
for (PRUint32 i = 0; i < aCount; i++) {
|
||||
PRUint32 i;
|
||||
for (i = 0; i < aCount; i++) {
|
||||
printf("[%d] %s\n", i, aArray[0][i]);
|
||||
}
|
||||
|
||||
for (PRUint32 i = 0; i < aCount/2; i++) {
|
||||
for (i = 0; i < aCount/2; i++) {
|
||||
PRUint32 index = aCount - 1 - i;
|
||||
char* temp = aArray[0][index];
|
||||
aArray[0][index] = aArray[0][i];
|
||||
|
@ -268,12 +270,13 @@ TestParams::TestWCharStrTypeArrayInOut(PRUint32 aCount, PRUnichar*** aArray)
|
|||
printf("-> TestWCharStrTypeArrayInOut()\n");
|
||||
|
||||
printf("in:\n");
|
||||
for (PRUint32 i = 0; i < aCount; i++) {
|
||||
PRUint32 i;
|
||||
for (i = 0; i < aCount; i++) {
|
||||
nsAutoString tmp(aArray[0][i]);
|
||||
printf("[%d] %s\n", i, NS_LossyConvertUCS2toASCII(tmp).get());
|
||||
}
|
||||
|
||||
for (PRUint32 i = 0; i < aCount/2; i++) {
|
||||
for (i = 0; i < aCount/2; i++) {
|
||||
PRUint32 index = aCount - 1 - i;
|
||||
PRUnichar* temp = aArray[0][index];
|
||||
aArray[0][index] = aArray[0][i];
|
||||
|
@ -289,13 +292,14 @@ TestParams::TestIIDTypeArrayInOut(PRUint32 aCount, nsIID*** aArray)
|
|||
printf("-> TestIIDTypeArrayInOut()\n");
|
||||
|
||||
printf("in:\n");
|
||||
for (PRUint32 i = 0; i < aCount; i++) {
|
||||
PRUint32 i;
|
||||
for (i = 0; i < aCount; i++) {
|
||||
char* iid = aArray[0][i]->ToString();
|
||||
printf("[%d] %s\n", i, iid);
|
||||
PR_Free(iid);
|
||||
}
|
||||
|
||||
for (PRUint32 i = 0; i < aCount/2; i++) {
|
||||
for (i = 0; i < aCount/2; i++) {
|
||||
PRUint32 index = aCount - 1 - i;
|
||||
nsID* temp = aArray[0][index];
|
||||
aArray[0][index] = aArray[0][i];
|
||||
|
@ -311,13 +315,14 @@ TestParams::TestIfaceTypeArrayInOut(PRUint32 aCount, nsILocalFile*** aArray)
|
|||
printf("-> TestIfaceTypeArrayInOut()\n");
|
||||
|
||||
printf("in:\n");
|
||||
for (PRUint32 i = 0; i < aCount; i++) {
|
||||
PRUint32 i;
|
||||
for (i = 0; i < aCount; i++) {
|
||||
nsAutoString path;
|
||||
aArray[0][i]->GetPath(path);
|
||||
printf("[%d] %s\n", i, NS_LossyConvertUCS2toASCII(path).get());
|
||||
}
|
||||
|
||||
for (PRUint32 i = 0; i < aCount/2; i++) {
|
||||
for (i = 0; i < aCount/2; i++) {
|
||||
PRUint32 index = aCount - 1 - i;
|
||||
nsILocalFile* temp = aArray[0][index];
|
||||
aArray[0][index] = aArray[0][i];
|
||||
|
|
|
@ -48,6 +48,10 @@
|
|||
#include "nsIWeakReference.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#define WRITE_NOSCRIPT_METHODS
|
||||
|
||||
|
||||
|
@ -191,8 +195,8 @@ public:
|
|||
#ifdef WRITE_NOSCRIPT_METHODS
|
||||
size = NS_ARRAY_LENGTH(kNoscriptMethodIfaces);
|
||||
mNoscriptMethodsTable.Init(size);
|
||||
for (PRUint32 i = 0; i < size; i++) {
|
||||
mNoscriptMethodsTable.Put(nsDependentCString(kNoscriptMethodIfaces[i]));
|
||||
for (PRUint32 j = 0; j < size; j++) {
|
||||
mNoscriptMethodsTable.Put(nsDependentCString(kNoscriptMethodIfaces[j]));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -640,17 +644,17 @@ public:
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// write parameters
|
||||
for (PRUint8 i = 0; i < paramCount; i++) {
|
||||
const nsXPTParamInfo ¶mInfo = aMethodInfo->GetParam(i);
|
||||
for (PRUint8 j = 0; j < paramCount; j++) {
|
||||
const nsXPTParamInfo ¶mInfo = aMethodInfo->GetParam(j);
|
||||
if (paramInfo.IsRetval())
|
||||
continue;
|
||||
|
||||
if (i != 0) {
|
||||
if (j != 0) {
|
||||
rv = out->Write(kParamSeparator, sizeof(kParamSeparator) - 1, &count);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
rv = WriteParam(out, aIInfo, aMethodIndex, ¶mInfo, i + 1);
|
||||
rv = WriteParam(out, aIInfo, aMethodIndex, ¶mInfo, j + 1);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
|
@ -826,8 +830,8 @@ int main(int argc, char** argv)
|
|||
}
|
||||
|
||||
// see if given path exists
|
||||
output_dir = new nsLocalFile();
|
||||
rv = output_dir->InitWithNativePath(nsDependentCString(argv[++i]));
|
||||
rv = NS_NewNativeLocalFile(nsDependentCString(argv[++i]), PR_TRUE,
|
||||
getter_AddRefs(output_dir));
|
||||
PRBool val;
|
||||
if (NS_FAILED(rv) || NS_FAILED(output_dir->Exists(&val)) || !val ||
|
||||
NS_FAILED(output_dir->IsDirectory(&val)) || !val)
|
||||
|
|
Загрузка…
Ссылка в новой задаче