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