1*2407af08SAndrew Rist#**************************************************************
2*2407af08SAndrew Rist#
3*2407af08SAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4*2407af08SAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5*2407af08SAndrew Rist#  distributed with this work for additional information
6*2407af08SAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7*2407af08SAndrew Rist#  to you under the Apache License, Version 2.0 (the
8*2407af08SAndrew Rist#  "License"); you may not use this file except in compliance
9*2407af08SAndrew Rist#  with the License.  You may obtain a copy of the License at
10*2407af08SAndrew Rist#
11*2407af08SAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12*2407af08SAndrew Rist#
13*2407af08SAndrew Rist#  Unless required by applicable law or agreed to in writing,
14*2407af08SAndrew Rist#  software distributed under the License is distributed on an
15*2407af08SAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*2407af08SAndrew Rist#  KIND, either express or implied.  See the License for the
17*2407af08SAndrew Rist#  specific language governing permissions and limitations
18*2407af08SAndrew Rist#  under the License.
19*2407af08SAndrew Rist#
20*2407af08SAndrew Rist#**************************************************************
21*2407af08SAndrew Rist
22*2407af08SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweirPRJ = ../../..
25cdf0e10cSrcweirPRJNAME = desktop
26cdf0e10cSrcweirTARGET = test_deployment_active
27cdf0e10cSrcweir
28cdf0e10cSrcweirENABLE_EXCEPTIONS = TRUE
29cdf0e10cSrcweir
30cdf0e10cSrcweirPACKAGE = com/sun/star/comp/test/deployment/active_java
31cdf0e10cSrcweirJAVAFILES = Dispatch.java Provider.java Services.java
32cdf0e10cSrcweirJARFILES = juh.jar ridl.jar unoil.jar
33cdf0e10cSrcweir
34cdf0e10cSrcweir.INCLUDE: settings.mk
35cdf0e10cSrcweir
36cdf0e10cSrcweirDLLPRE =
37cdf0e10cSrcweir
38cdf0e10cSrcweirSLOFILES = $(SHL1OBJS)
39cdf0e10cSrcweir
40cdf0e10cSrcweirSHL1TARGET = active_native.uno
41cdf0e10cSrcweirSHL1OBJS = $(SLO)/active_native.obj
42cdf0e10cSrcweirSHL1RPATH = OXT
43cdf0e10cSrcweirSHL1STDLIBS = $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB)
44cdf0e10cSrcweirSHL1VERSIONMAP = $(SOLARENV)/src/reg-component.map
45cdf0e10cSrcweirDEF1NAME = $(SHL1TARGET)
46cdf0e10cSrcweir
47cdf0e10cSrcweir.INCLUDE: target.mk
48cdf0e10cSrcweir
49cdf0e10cSrcweirALLTAR : $(MISC)/active.oxt
50cdf0e10cSrcweir
51cdf0e10cSrcweir$(MISC)/active.oxt : manifest.xml description.xml Addons.xcu \
52cdf0e10cSrcweir        ProtocolHandler.xcu $(SHL1TARGETN) $(MISC)/$(TARGET)/active_java.jar \
53cdf0e10cSrcweir        active_python.py
54cdf0e10cSrcweir    $(RM) $@
55cdf0e10cSrcweir    $(RM) -r $(MISC)/$(TARGET)/active.oxt-zip
56cdf0e10cSrcweir    $(MKDIR) $(MISC)/$(TARGET)/active.oxt-zip
57cdf0e10cSrcweir    $(MKDIRHIER) $(MISC)/$(TARGET)/active.oxt-zip/META-INF
58cdf0e10cSrcweir    $(SED) -e 's|@PATH@|$(SHL1TARGETN:f)|g' \
59cdf0e10cSrcweir        -e 's|@PLATFORM@|$(RTL_OS:l)_$(RTL_ARCH:l)|g' < manifest.xml \
60cdf0e10cSrcweir        > $(MISC)/$(TARGET)/active.oxt-zip/META-INF/manifest.xml
61cdf0e10cSrcweir    $(COPY) description.xml Addons.xcu ProtocolHandler.xcu $(SHL1TARGETN) \
62cdf0e10cSrcweir        $(MISC)/$(TARGET)/active_java.jar active_python.py \
63cdf0e10cSrcweir        $(MISC)/$(TARGET)/active.oxt-zip/
64cdf0e10cSrcweir    cd $(MISC)/$(TARGET)/active.oxt-zip && zip ../../active.oxt \
65cdf0e10cSrcweir        META-INF/manifest.xml description.xml Addons.xcu ProtocolHandler.xcu \
66cdf0e10cSrcweir        $(SHL1TARGETN:f) active_java.jar active_python.py
67cdf0e10cSrcweir
68cdf0e10cSrcweir$(MISC)/$(TARGET)/active_java.jar : MANIFEST.MF $(JAVATARGET)
69cdf0e10cSrcweir    $(MKDIRHIER) $(@:d)
70cdf0e10cSrcweir    $(RM) $@
71cdf0e10cSrcweir    $(RM) -r $(MISC)/$(TARGET)/active_java.jar-zip
72cdf0e10cSrcweir    $(MKDIR) $(MISC)/$(TARGET)/active_java.jar-zip
73cdf0e10cSrcweir    $(MKDIRHIER) $(MISC)/$(TARGET)/active_java.jar-zip/META-INF \
74cdf0e10cSrcweir        $(MISC)/$(TARGET)/active_java.jar-zip/$(PACKAGE)
75cdf0e10cSrcweir    $(COPY) MANIFEST.MF $(MISC)/$(TARGET)/active_java.jar-zip/META-INF/
76cdf0e10cSrcweir    $(COPY) $(foreach,i,$(JAVAFILES:b) $(CLASSDIR)/$(PACKAGE)/$i.class) \
77cdf0e10cSrcweir        $(MISC)/$(TARGET)/active_java.jar-zip/$(PACKAGE)/
78cdf0e10cSrcweir    cd $(MISC)/$(TARGET)/active_java.jar-zip && zip ../active_java.jar \
79cdf0e10cSrcweir        META-INF/MANIFEST.MF $(foreach,i,$(JAVAFILES:b) $(PACKAGE)/$i.class)
80