1*b1cdbd2cSJim Jagielski#************************************************************** 2*b1cdbd2cSJim Jagielski# 3*b1cdbd2cSJim Jagielski# Licensed to the Apache Software Foundation (ASF) under one 4*b1cdbd2cSJim Jagielski# or more contributor license agreements. See the NOTICE file 5*b1cdbd2cSJim Jagielski# distributed with this work for additional information 6*b1cdbd2cSJim Jagielski# regarding copyright ownership. The ASF licenses this file 7*b1cdbd2cSJim Jagielski# to you under the Apache License, Version 2.0 (the 8*b1cdbd2cSJim Jagielski# "License"); you may not use this file except in compliance 9*b1cdbd2cSJim Jagielski# with the License. You may obtain a copy of the License at 10*b1cdbd2cSJim Jagielski# 11*b1cdbd2cSJim Jagielski# http://www.apache.org/licenses/LICENSE-2.0 12*b1cdbd2cSJim Jagielski# 13*b1cdbd2cSJim Jagielski# Unless required by applicable law or agreed to in writing, 14*b1cdbd2cSJim Jagielski# software distributed under the License is distributed on an 15*b1cdbd2cSJim Jagielski# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b1cdbd2cSJim Jagielski# KIND, either express or implied. See the License for the 17*b1cdbd2cSJim Jagielski# specific language governing permissions and limitations 18*b1cdbd2cSJim Jagielski# under the License. 19*b1cdbd2cSJim Jagielski# 20*b1cdbd2cSJim Jagielski#************************************************************** 21*b1cdbd2cSJim Jagielski 22*b1cdbd2cSJim Jagielski# Builds the SpreadSheet examples of the Developers Guide. 23*b1cdbd2cSJim Jagielski 24*b1cdbd2cSJim JagielskiPRJ=../../.. 25*b1cdbd2cSJim JagielskiSETTINGS=$(PRJ)/settings 26*b1cdbd2cSJim Jagielski 27*b1cdbd2cSJim Jagielskiinclude $(SETTINGS)/settings.mk 28*b1cdbd2cSJim Jagielskiinclude $(SETTINGS)/std.mk 29*b1cdbd2cSJim Jagielskiinclude $(SETTINGS)/dk.mk 30*b1cdbd2cSJim Jagielski 31*b1cdbd2cSJim Jagielski# Define non-platform/compiler specific settings 32*b1cdbd2cSJim JagielskiSAMPLE_NAME=DevGuideSpreadsheetExamples 33*b1cdbd2cSJim JagielskiSAMPLE_CLASS_OUT=$(OUT_CLASS)/$(SAMPLE_NAME) 34*b1cdbd2cSJim JagielskiSAMPLE_GEN_OUT=$(OUT_MISC)/$(SAMPLE_NAME) 35*b1cdbd2cSJim Jagielski 36*b1cdbd2cSJim Jagielski# Example add-in component 37*b1cdbd2cSJim JagielskiCOMP1_NAME=ExampleAddIn 38*b1cdbd2cSJim JagielskiCOMP1_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(COMP1_NAME) 39*b1cdbd2cSJim JagielskiCOMP1_GEN_OUT=$(SAMPLE_GEN_OUT)/$(COMP1_NAME) 40*b1cdbd2cSJim JagielskiCOMP1_RDB_NAME=$(COMP1_NAME).uno.rdb 41*b1cdbd2cSJim JagielskiCOMP1_RDB=$(COMP1_GEN_OUT)/$(COMP1_RDB_NAME) 42*b1cdbd2cSJim JagielskiCOMP1_PACKAGE=$(OUT_BIN)/$(COMP1_NAME).$(UNOOXT_EXT) 43*b1cdbd2cSJim JagielskiCOMP1_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP1_NAME).$(UNOOXT_EXT)") 44*b1cdbd2cSJim JagielskiCOMP1_JAR_NAME=$(COMP1_NAME).uno.jar 45*b1cdbd2cSJim JagielskiCOMP1_JAR=$(SAMPLE_CLASS_OUT)/$(COMP1_JAR_NAME) 46*b1cdbd2cSJim JagielskiCOMP1_MANIFESTFILE=$(COMP1_GEN_OUT)/$(COMP1_NAME).uno.Manifest 47*b1cdbd2cSJim JagielskiCOMP1_UNOPKG_MANIFEST=$(COMP1_GEN_OUT)/$(COMP1_NAME)/META-INF/manifest.xml 48*b1cdbd2cSJim JagielskiCOMP1_REGISTERFLAG=$(SAMPLE_GEN_OUT)/devguide_$(COMP1_NAME)_register_component.flag 49*b1cdbd2cSJim JagielskiCOMP1_COMPONENTS=$(COMP1_NAME).components 50*b1cdbd2cSJim Jagielski 51*b1cdbd2cSJim Jagielski# Example DataPilot component 52*b1cdbd2cSJim JagielskiCOMP2_NAME=ExampleDataPilotSource 53*b1cdbd2cSJim JagielskiCOMP2_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(COMP2_NAME) 54*b1cdbd2cSJim JagielskiCOMP2_GEN_OUT=$(SAMPLE_GEN_OUT)/$(COMP2_NAME) 55*b1cdbd2cSJim JagielskiCOMP2_PACKAGE=$(OUT_BIN)/$(COMP2_NAME).$(UNOOXT_EXT) 56*b1cdbd2cSJim JagielskiCOMP2_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP2_NAME).$(UNOOXT_EXT)") 57*b1cdbd2cSJim JagielskiCOMP2_JAR_NAME=$(COMP2_NAME).uno.jar 58*b1cdbd2cSJim JagielskiCOMP2_JAR=$(SAMPLE_CLASS_OUT)/$(COMP2_JAR_NAME) 59*b1cdbd2cSJim JagielskiCOMP2_MANIFESTFILE=$(COMP2_GEN_OUT)/$(COMP2_NAME).uno.Manifest 60*b1cdbd2cSJim JagielskiCOMP2_UNOPKG_MANIFEST=$(COMP2_GEN_OUT)/$(COMP2_NAME)/META-INF/manifest.xml 61*b1cdbd2cSJim JagielskiCOMP2_REGISTERFLAG=$(SAMPLE_GEN_OUT)/devguide_$(COMP2_NAME)_register_component.flag 62*b1cdbd2cSJim JagielskiCOMP2_COMPONENTS=$(COMP2_NAME).components 63*b1cdbd2cSJim Jagielski 64*b1cdbd2cSJim Jagielski#REGISTERFLAG = $(OUT_MISC)$(PS)devguide_$(SAMPLE_NAME)_register_component.flag 65*b1cdbd2cSJim Jagielski 66*b1cdbd2cSJim JagielskiAPP1_NAME=GeneralTableSample 67*b1cdbd2cSJim JagielskiAPP1_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP1_NAME) 68*b1cdbd2cSJim JagielskiAPP1_GEN_OUT=$(SAMPLE_GEN_OUT)/$(APP1_NAME) 69*b1cdbd2cSJim JagielskiAPP1_JAR=$(SAMPLE_CLASS_OUT)/$(APP1_NAME).jar 70*b1cdbd2cSJim Jagielski 71*b1cdbd2cSJim JagielskiAPP2_NAME=SpreadsheetSample 72*b1cdbd2cSJim JagielskiAPP2_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP2_NAME) 73*b1cdbd2cSJim JagielskiAPP2_GEN_OUT=$(SAMPLE_GEN_OUT)/$(APP2_NAME) 74*b1cdbd2cSJim JagielskiAPP2_JAR=$(SAMPLE_CLASS_OUT)/$(APP2_NAME).jar 75*b1cdbd2cSJim Jagielski 76*b1cdbd2cSJim JagielskiAPP3_NAME=ViewSample 77*b1cdbd2cSJim JagielskiAPP3_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP3_NAME) 78*b1cdbd2cSJim JagielskiAPP3_GEN_OUT=$(SAMPLE_GEN_OUT)/$(APP3_NAME) 79*b1cdbd2cSJim JagielskiAPP3_JAR=$(SAMPLE_CLASS_OUT)/$(APP3_NAME).jar 80*b1cdbd2cSJim Jagielski 81*b1cdbd2cSJim Jagielski 82*b1cdbd2cSJim JagielskiCOMP1_IDLFILES = XExampleAddIn.idl 83*b1cdbd2cSJim Jagielski 84*b1cdbd2cSJim Jagielski# normally the idl file should be stored in a directory tree fitting the 85*b1cdbd2cSJim Jagielski# module structure, for the example we know the module structure 86*b1cdbd2cSJim JagielskiPACKAGE = org/openoffice/sheet/addin 87*b1cdbd2cSJim Jagielski 88*b1cdbd2cSJim JagielskiCOMP1_JAVAFILES = \ 89*b1cdbd2cSJim Jagielski ExampleAddIn.java 90*b1cdbd2cSJim Jagielski 91*b1cdbd2cSJim JagielskiCOMP2_JAVAFILES = \ 92*b1cdbd2cSJim Jagielski ExampleDataPilotSource.java 93*b1cdbd2cSJim Jagielski 94*b1cdbd2cSJim JagielskiAPP_JAVAFILES = \ 95*b1cdbd2cSJim Jagielski SpreadsheetDocHelper.java 96*b1cdbd2cSJim Jagielski 97*b1cdbd2cSJim JagielskiAPP_CLASSFILES = $(patsubst %.java,$(SAMPLE_CLASS_OUT)/%.class,$(APP_JAVAFILES)) 98*b1cdbd2cSJim JagielskiAPP_CLASSNAMES = $(patsubst %.java,%.class,$(APP_JAVAFILES)) 99*b1cdbd2cSJim Jagielski 100*b1cdbd2cSJim JagielskiCOMP1_GENCLASSFILES = $(patsubst %.idl,$(COMP1_CLASS_OUT)/$(PACKAGE)/%.class,$(COMP1_IDLFILES)) 101*b1cdbd2cSJim JagielskiCOMP1_GENTYPELIST = $(subst /,.,$(patsubst %.idl,-T$(PACKAGE)/% ,$(COMP1_IDLFILES))) 102*b1cdbd2cSJim JagielskiCOMP1_GENURDFILES = $(patsubst %.idl,$(COMP1_GEN_OUT)/%.urd,$(COMP1_IDLFILES)) 103*b1cdbd2cSJim Jagielski 104*b1cdbd2cSJim JagielskiCOMP1_CLASSFILES = $(patsubst %.java,$(COMP1_CLASS_OUT)/%.class,$(COMP1_JAVAFILES)) 105*b1cdbd2cSJim Jagielski 106*b1cdbd2cSJim JagielskiCOMP2_CLASSFILES = $(patsubst %.java,$(COMP2_CLASS_OUT)/%.class,$(COMP2_JAVAFILES)) 107*b1cdbd2cSJim Jagielski 108*b1cdbd2cSJim Jagielski 109*b1cdbd2cSJim JagielskiSDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\ 110*b1cdbd2cSJim Jagielski $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT)\ 111*b1cdbd2cSJim Jagielski $(PATH_SEPARATOR)$(COMP1_CLASS_OUT)\ 112*b1cdbd2cSJim Jagielski $(PATH_SEPARATOR)$(COMP2_CLASS_OUT)\ 113*b1cdbd2cSJim Jagielski $(PATH_SEPARATOR)$(APP1_CLASS_OUT)\ 114*b1cdbd2cSJim Jagielski $(PATH_SEPARATOR)$(APP2_CLASS_OUT)\ 115*b1cdbd2cSJim Jagielski $(PATH_SEPARATOR)$(APP3_CLASS_OUT)) 116*b1cdbd2cSJim Jagielski 117*b1cdbd2cSJim Jagielski 118*b1cdbd2cSJim Jagielski# Targets 119*b1cdbd2cSJim Jagielski.PHONY: ALL 120*b1cdbd2cSJim JagielskiALL : $(SAMPLE_NAME) 121*b1cdbd2cSJim Jagielski 122*b1cdbd2cSJim Jagielskiinclude $(SETTINGS)/stdtarget.mk 123*b1cdbd2cSJim Jagielski 124*b1cdbd2cSJim Jagielski$(SAMPLE_GEN_OUT)/%.Manifest : 125*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 126*b1cdbd2cSJim Jagielski @echo UNO-Type-Path: $(basename $(notdir $*)).uno.jar> $@ 127*b1cdbd2cSJim Jagielski @echo RegistrationClassName: $(basename $(basename $(@F)))>> $@ 128*b1cdbd2cSJim Jagielski 129*b1cdbd2cSJim Jagielski# IDLs only for component 1 relevant 130*b1cdbd2cSJim Jagielski$(COMP1_GEN_OUT)/%.urd : %.idl 131*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 132*b1cdbd2cSJim Jagielski $(IDLC) -I. -I$(IDL_DIR) -O$(COMP1_GEN_OUT) $^ 133*b1cdbd2cSJim Jagielski 134*b1cdbd2cSJim Jagielski$(COMP1_RDB) : $(COMP1_GENURDFILES) 135*b1cdbd2cSJim Jagielski -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 136*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 137*b1cdbd2cSJim Jagielski $(REGMERGE) $@ /UCR $< 138*b1cdbd2cSJim Jagielski 139*b1cdbd2cSJim Jagielski$(COMP1_CLASS_OUT)/$(PACKAGE)/%.class : $(COMP1_RDB) 140*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 141*b1cdbd2cSJim Jagielski $(JAVAMAKER) -BUCR -nD $(COMP1_GENTYPELIST) -O$(COMP1_CLASS_OUT) $(COMP1_RDB) -X$(URE_TYPES) -X$(OFFICE_TYPES) 142*b1cdbd2cSJim Jagielski 143*b1cdbd2cSJim Jagielski$(COMP1_CLASSFILES) : $(COMP1_JAVAFILES) $(COMP1_GENCLASSFILES) 144*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 145*b1cdbd2cSJim Jagielski $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMP1_CLASS_OUT) $(COMP1_JAVAFILES) 146*b1cdbd2cSJim Jagielski 147*b1cdbd2cSJim Jagielski$(COMP2_CLASSFILES) : $(COMP2_JAVAFILES) 148*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 149*b1cdbd2cSJim Jagielski $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMP2_CLASS_OUT) $^ 150*b1cdbd2cSJim Jagielski 151*b1cdbd2cSJim Jagielski$(COMP1_JAR) : $(COMP1_MANIFESTFILE) $(COMP1_CLASSFILES) 152*b1cdbd2cSJim Jagielski -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 153*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 154*b1cdbd2cSJim Jagielski $(SDK_JAR) cvfm $@ $< -C $(COMP1_CLASS_OUT) . 155*b1cdbd2cSJim Jagielski 156*b1cdbd2cSJim Jagielski$(COMP2_JAR) : $(COMP2_MANIFESTFILE) $(COMP2_CLASSFILES) 157*b1cdbd2cSJim Jagielski -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 158*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 159*b1cdbd2cSJim Jagielski $(SDK_JAR) cvfm $@ $< -C $(COMP2_CLASS_OUT) . 160*b1cdbd2cSJim Jagielski 161*b1cdbd2cSJim Jagielski$(COMP1_UNOPKG_MANIFEST) : 162*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 163*b1cdbd2cSJim Jagielski @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@ 164*b1cdbd2cSJim Jagielski @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@ 165*b1cdbd2cSJim Jagielski @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@ 166*b1cdbd2cSJim Jagielski @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)" >> $@ 167*b1cdbd2cSJim Jagielski @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(COMP1_GEN_OUT)/,,$(@D))).uno.rdb$(QM)"/$(CSEP) >> $@ 168*b1cdbd2cSJim Jagielski @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@ 169*b1cdbd2cSJim Jagielski @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP1_COMPONENTS)$(QM)"/$(CSEP)>> $@ 170*b1cdbd2cSJim Jagielski @echo $(OSEP)/manifest:manifest$(CSEP) >> $@ 171*b1cdbd2cSJim Jagielski 172*b1cdbd2cSJim Jagielski$(COMP2_UNOPKG_MANIFEST) : 173*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 174*b1cdbd2cSJim Jagielski @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@ 175*b1cdbd2cSJim Jagielski @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@ 176*b1cdbd2cSJim Jagielski @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@ 177*b1cdbd2cSJim Jagielski @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@ 178*b1cdbd2cSJim Jagielski @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP2_COMPONENTS)$(QM)"/$(CSEP)>> $@ 179*b1cdbd2cSJim Jagielski @echo $(OSEP)/manifest:manifest$(CSEP) >> $@ 180*b1cdbd2cSJim Jagielski 181*b1cdbd2cSJim Jagielski$(COMP1_PACKAGE) : $(COMP1_RDB) $(COMP1_JAR) $(COMP1_UNOPKG_MANIFEST) $(COMP1_COMPONENTS) 182*b1cdbd2cSJim Jagielski echo "####" $(@) 183*b1cdbd2cSJim Jagielski -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 184*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 185*b1cdbd2cSJim Jagielski $(SDK_ZIP) $@ $(COMP1_COMPONENTS) 186*b1cdbd2cSJim Jagielski cd $(subst /,$(PS),$(COMP1_GEN_OUT)) && $(SDK_ZIP) -u ../../../bin/$(@F) $(<F) 187*b1cdbd2cSJim Jagielski cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP1_JAR_NAME) 188*b1cdbd2cSJim Jagielski cd $(subst /,$(PS),$(COMP1_GEN_OUT)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../../bin/$(@F) META-INF/manifest.xml 189*b1cdbd2cSJim Jagielski 190*b1cdbd2cSJim Jagielski$(COMP2_PACKAGE) : $(COMP2_JAR) $(COMP2_UNOPKG_MANIFEST) $(COMP2_COMPONENTS) 191*b1cdbd2cSJim Jagielski -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 192*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 193*b1cdbd2cSJim Jagielski $(SDK_ZIP) $@ $(COMP2_COMPONENTS) 194*b1cdbd2cSJim Jagielski cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(<F) 195*b1cdbd2cSJim Jagielski cd $(subst /,$(PS),$(COMP2_GEN_OUT)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../../bin/$(@F) META-INF/manifest.xml 196*b1cdbd2cSJim Jagielski 197*b1cdbd2cSJim Jagielski$(SAMPLE_GEN_OUT)/devguide_$(COMP1_NAME)_register_component.flag : $(OUT_BIN)/$(COMP1_NAME).$(UNOOXT_EXT) 198*b1cdbd2cSJim Jagielskiifeq "$(SDK_AUTO_DEPLOYMENT)" "YES" 199*b1cdbd2cSJim Jagielski -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 200*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 201*b1cdbd2cSJim Jagielski $(DEPLOYTOOL) $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP1_NAME).$(UNOOXT_EXT)") 202*b1cdbd2cSJim Jagielski @echo flagged > $(subst /,$(PS),$@) 203*b1cdbd2cSJim Jagielskielse 204*b1cdbd2cSJim Jagielski @echo -------------------------------------------------------------------------------- 205*b1cdbd2cSJim Jagielski @echo If you want to install your component automatically, please set the environment 206*b1cdbd2cSJim Jagielski @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only 207*b1cdbd2cSJim Jagielski @echo possible if no office instance is running. 208*b1cdbd2cSJim Jagielski @echo -------------------------------------------------------------------------------- 209*b1cdbd2cSJim Jagielskiendif 210*b1cdbd2cSJim Jagielski 211*b1cdbd2cSJim Jagielski$(SAMPLE_GEN_OUT)/devguide_$(COMP2_NAME)_register_component.flag : $(OUT_BIN)/$(COMP2_NAME).$(UNOOXT_EXT) 212*b1cdbd2cSJim Jagielskiifeq "$(SDK_AUTO_DEPLOYMENT)" "YES" 213*b1cdbd2cSJim Jagielski -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 214*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 215*b1cdbd2cSJim Jagielski $(DEPLOYTOOL) $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP2_NAME).$(UNOOXT_EXT)") 216*b1cdbd2cSJim Jagielski @echo flagged > $(subst /,$(PS),$@) 217*b1cdbd2cSJim Jagielskielse 218*b1cdbd2cSJim Jagielski @echo -------------------------------------------------------------------------------- 219*b1cdbd2cSJim Jagielski @echo If you want to install your component automatically, please set the environment 220*b1cdbd2cSJim Jagielski @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only 221*b1cdbd2cSJim Jagielski @echo possible if no office instance is running. 222*b1cdbd2cSJim Jagielski @echo -------------------------------------------------------------------------------- 223*b1cdbd2cSJim Jagielskiendif 224*b1cdbd2cSJim Jagielski 225*b1cdbd2cSJim Jagielski$(APP_CLASSFILES) : $(APP_JAVAFILES) 226*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 227*b1cdbd2cSJim Jagielski $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SAMPLE_CLASS_OUT) $(APP_JAVAFILES) 228*b1cdbd2cSJim Jagielski 229*b1cdbd2cSJim Jagielski$(APP1_CLASS_OUT)/%.class : %.java $(APP_CLASSFILES) 230*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 231*b1cdbd2cSJim Jagielski $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP1_CLASS_OUT) $< 232*b1cdbd2cSJim Jagielski 233*b1cdbd2cSJim Jagielski$(APP2_CLASS_OUT)/%.class : %.java $(APP_CLASSFILES) 234*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 235*b1cdbd2cSJim Jagielski $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP2_CLASS_OUT) $< 236*b1cdbd2cSJim Jagielski 237*b1cdbd2cSJim Jagielski$(APP3_CLASS_OUT)/%.class : %.java $(APP_CLASSFILES) 238*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 239*b1cdbd2cSJim Jagielski $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP3_CLASS_OUT) $< 240*b1cdbd2cSJim Jagielski 241*b1cdbd2cSJim Jagielski$(SAMPLE_GEN_OUT)/%.mf : 242*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 243*b1cdbd2cSJim Jagielski @echo Main-Class: com.sun.star.lib.loader.Loader> $@ 244*b1cdbd2cSJim Jagielski $(ECHOLINE)>> $@ 245*b1cdbd2cSJim Jagielski @echo Name: com/sun/star/lib/loader/Loader.class>> $@ 246*b1cdbd2cSJim Jagielski @echo Application-Class: $(basename $(@F))>> $@ 247*b1cdbd2cSJim Jagielski 248*b1cdbd2cSJim Jagielski$(APP1_JAR) : $(APP1_GEN_OUT)/$(APP1_NAME).mf $(APP1_CLASS_OUT)/$(APP1_NAME).class $(APP_CLASSFILES) 249*b1cdbd2cSJim Jagielski -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 250*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 251*b1cdbd2cSJim Jagielski +$(SDK_JAR) cvfm $@ $< -C $(APP1_CLASS_OUT) . 252*b1cdbd2cSJim Jagielski +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES) 253*b1cdbd2cSJim Jagielski +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(APP_CLASSNAMES) 254*b1cdbd2cSJim Jagielski 255*b1cdbd2cSJim Jagielski$(APP2_JAR) : $(APP2_GEN_OUT)/$(APP2_NAME).mf $(APP2_CLASS_OUT)/$(APP2_NAME).class $(APP_CLASSFILES) 256*b1cdbd2cSJim Jagielski -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 257*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 258*b1cdbd2cSJim Jagielski +$(SDK_JAR) cvfm $@ $< -C $(APP2_CLASS_OUT) . 259*b1cdbd2cSJim Jagielski +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES) 260*b1cdbd2cSJim Jagielski +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(APP_CLASSNAMES) 261*b1cdbd2cSJim Jagielski 262*b1cdbd2cSJim Jagielski$(APP3_JAR) : $(APP3_GEN_OUT)/$(APP3_NAME).mf $(APP3_CLASS_OUT)/$(APP3_NAME).class $(APP_CLASSFILES) 263*b1cdbd2cSJim Jagielski -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 264*b1cdbd2cSJim Jagielski -$(MKDIR) $(subst /,$(PS),$(@D)) 265*b1cdbd2cSJim Jagielski +$(SDK_JAR) cvfm $@ $< -C $(APP3_CLASS_OUT) . 266*b1cdbd2cSJim Jagielski +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES) 267*b1cdbd2cSJim Jagielski +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(APP_CLASSNAMES) 268*b1cdbd2cSJim Jagielski 269*b1cdbd2cSJim Jagielski$(SAMPLE_NAME) : $(COMP1_REGISTERFLAG) $(COMP2_REGISTERFLAG) $(APP1_JAR) $(APP2_JAR) $(APP3_JAR) 270*b1cdbd2cSJim Jagielski @echo -------------------------------------------------------------------------------- 271*b1cdbd2cSJim Jagielski @echo Please use one of the following commands to execute the examples! 272*b1cdbd2cSJim Jagielski @echo - 273*b1cdbd2cSJim Jagielski @echo $(MAKE) $(APP1_NAME).run 274*b1cdbd2cSJim Jagielski @echo $(MAKE) $(APP2_NAME).run 275*b1cdbd2cSJim Jagielski @echo $(MAKE) $(APP3_NAME).run 276*b1cdbd2cSJim Jagielski @echo -------- 277*b1cdbd2cSJim Jagielski @echo The "$(QM)$(COMP1_NAME)$(QM)" and "$(QM)$(COMP2_NAME)$(QM)" component are installed if 278*b1cdbd2cSJim Jagielski @echo SDK_AUTO_DEPLOYMENT = YES. You can use this components inside your office 279*b1cdbd2cSJim Jagielski @echo installation, see the example descriptions. You can also load the "$(QM)ExampleAddIn.ods$(QM)" 280*b1cdbd2cSJim Jagielski @echo document to see how the add-in functions can be used. For more details about the 281*b1cdbd2cSJim Jagielski @echo "$(QM)$(COMP2_NAME)$(QM)" component see the "$(QM)DataPilotReadme.txt"$(QM). 282*b1cdbd2cSJim Jagielski @echo - 283*b1cdbd2cSJim Jagielski @echo $(MAKE) ExampleAddIn.ods.load 284*b1cdbd2cSJim Jagielski @echo -------------------------------------------------------------------------------- 285*b1cdbd2cSJim Jagielski 286*b1cdbd2cSJim Jagielski%.run: $(SAMPLE_CLASS_OUT)/%.jar 287*b1cdbd2cSJim Jagielski $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< 288*b1cdbd2cSJim Jagielski 289*b1cdbd2cSJim JagielskiExampleAddIn.ods.load : $(COMP1_REGISTERFLAG) 290*b1cdbd2cSJim Jagielski "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@) 291*b1cdbd2cSJim Jagielski 292*b1cdbd2cSJim Jagielski.PHONY: clean 293*b1cdbd2cSJim Jagielskiclean : 294*b1cdbd2cSJim Jagielski -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) 295*b1cdbd2cSJim Jagielski -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT)) 296*b1cdbd2cSJim Jagielski -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP1_PACKAGE_URL))) 297*b1cdbd2cSJim Jagielski -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP2_PACKAGE_URL))) 298