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=instsetoo_native 26TARGET=util 27 28.INCLUDE: settings.mk 29.INCLUDE: $(SOLARINCDIR)$/rtlbootstrap.mk 30 31# PERL:=@echo 32 33# watch for the path delimiter 34.IF "$(GUI)"=="WNT" 35PYTHONPATH:=$(PWD)$/$(BIN);$(SOLARLIBDIR);$(SOLARLIBDIR)$/python;$(SOLARLIBDIR)$/python$/lib-dynload 36.ELSE # "$(GUI)"=="WNT" 37PYTHONPATH:=$(PWD)$/$(BIN):$(SOLARLIBDIR):$(SOLARLIBDIR)$/python:$(SOLARLIBDIR)$/python$/lib-dynload 38.ENDIF # "$(GUI)"=="WNT" 39.EXPORT: PYTHONPATH 40 41.IF "$(CWS_WORK_STAMP)"=="" || "$(UPDATER)"!="" 42ENABLE_DOWNLOADSETS*=TRUE 43.ENDIF # "$(CWS_WORK_STAMP)"=="" || "$(UPDATER)"!="" 44.IF "$(FORCE_DOWNLOADSETS)"!="" 45ENABLE_DOWNLOADSETS=TRUE 46.ENDIF # "$(FORCE_DOWNLOADSETS)"!="" 47 48.EXPORT: ENABLE_DOWNLOADSETS 49.EXPORT: LAST_MINOR 50.EXPORT: PRJ 51.EXPORT: PRJNAME 52 53.IF "$(OS)"=="LINUX" 54DONT_REMOVE_PACKAGE:=TRUE 55.EXPORT: DONT_REMOVE_PACKAGE 56.ENDIF # "$(OS)"=="LINUX" 57 58.INCLUDE .IGNORE: $(SRC_ROOT)$/cwsname.mk 59 60SHARED_COM_SDK_PATH*:=. 61 62INSTALLDIR=$(OUT) 63 64.INCLUDE: target.mk 65 66LOCALPYFILES= \ 67 $(BIN)$/uno.py \ 68 $(BIN)$/unohelper.py \ 69 $(BIN)$/pythonloader.py \ 70 $(BIN)$/pythonscript.py \ 71 $(BIN)$/officehelper.py \ 72 $(BIN)$/mailmerge.py 73 74xxxx: 75 echo $(PERL) -w $(SOLARENV)$/bin$/gen_update_info.pl --buildid $(BUILD) --arch "$(RTL_ARCH)" --os "$(RTL_OS)" --lstfile $(PRJ)$/util$/openoffice.lst --product OpenOffice --languages $(subst,$(@:s/_/ /:1)_, $(@:b)) $(PRJ)$/util$/update.xml 76 77.IF "$(GUI)"!="WNT" && "$(EPM)"=="NO" && "$(USE_PACKAGER)"=="" 78ALLTAR : $(LOCALPYFILES) 79 @echo "No EPM: do no packaging at this stage" 80.ELSE # "$(GUI)"!="WNT" && "$(EPM)"=="NO" && "$(USE_PACKAGER)"=="" 81.IF "$(UPDATER)"=="" || "$(USE_PACKAGER)"=="" 82.IF "$(BUILD_TYPE)"=="$(BUILD_TYPE:s/ODK//)" 83ALLTAR : openoffice 84.ELSE 85ALLTAR : openoffice sdkoo_en-US ure_en-US 86.ENDIF 87.ELSE # "$(UPDATER)"=="" || "$(USE_PACKAGER)"=="" 88ALLTAR : updatepack 89.ENDIF # "$(UPDATER)"=="" || "$(USE_PACKAGER)"=="" 90.ENDIF # "$(GUI)"!="WNT" && "$(EPM)"=="NO" && "$(USE_PACKAGER)"=="" 91 92.IF "$(FORCE2ARCHIVE)" == "TRUE" 93PKGFORMAT = archive 94.END 95 96.IF "$(MAKETARGETS:e)"!="" 97PKGFORMAT+=$(MAKETARGETS:e:s/.//) 98.ENDIF # "$(MAKETARGETS:e)"!="" 99 100# Independent of PKGFORMAT, always build a default-language openoffice product 101# also in archive format, so that tests that require an OOo installation (like 102# smoketestoo_native) have one available: 103openoffice_$(defaultlangiso) : $$@.archive 104 105.IF "$(VERBOSE)"=="TRUE" 106VERBOSESWITCH=-verbose 107.ENDIF 108.IF "$(VERBOSE)"=="FALSE" 109VERBOSESWITCH=-quiet 110.ENDIF 111 112updatepack: 113 $(PERL) -w $(SOLARENV)$/bin$/packager.pl 114 115.IF "$(alllangiso)"!="" 116 117openoffice: $(foreach,i,$(alllangiso) openoffice_$i) 118 119openofficedev: $(foreach,i,$(alllangiso) openofficedev_$i) 120 121openofficewithjre: $(foreach,i,$(alllangiso) openofficewithjre_$i) 122 123ooolanguagepack : $(foreach,i,$(alllangiso) ooolanguagepack_$i) 124 125ooodevlanguagepack: $(foreach,i,$(alllangiso) ooodevlanguagepack_$i) 126 127sdkoo: $(foreach,i,$(alllangiso) sdkoo_$i) 128 129sdkoodev: $(foreach,i,$(alllangiso) sdkoodev_$i) 130 131ure: $(foreach,i,$(alllangiso) ure_$i) 132 133MSIOFFICETEMPLATESOURCE=$(PRJ)$/inc_openoffice$/windows$/msi_templates 134MSILANGPACKTEMPLATESOURCE=$(PRJ)$/inc_ooolangpack$/windows$/msi_templates 135MSIURETEMPLATESOURCE=$(PRJ)$/inc_ure$/windows$/msi_templates 136MSISDKOOTEMPLATESOURCE=$(PRJ)$/inc_sdkoo$/windows$/msi_templates 137 138.IF "$(BUILD_SPECIAL)"!="" 139MSIOFFICETEMPLATEDIR=$(MSIOFFICETEMPLATESOURCE) 140MSILANGPACKTEMPLATEDIR=$(MSILANGPACKTEMPLATESOURCE) 141MSIURETEMPLATEDIR=$(MSIURETEMPLATESOURCE) 142MSISDKOOTEMPLATEDIR=$(MSISDKOOTEMPLATESOURCE) 143.ELSE # "$(BUILD_SPECIAL)"!="" 144NOLOGOSPLASH:=$(BIN)$/intro.zip 145DEVNOLOGOSPLASH:=$(BIN)$/dev$/intro.zip 146MSIOFFICETEMPLATEDIR=$(MISC)$/openoffice$/msi_templates 147MSILANGPACKTEMPLATEDIR=$(MISC)$/ooolangpack$/msi_templates 148MSIURETEMPLATEDIR=$(MISC)$/ure$/msi_templates 149MSISDKOOTEMPLATEDIR=$(MISC)$/sdkoo$/msi_templates 150 151ADDDEPS=$(NOLOGOSPLASH) $(DEVNOLOGOSPLASH) 152 153.IF "$(OS)" == "WNT" 154ADDDEPS+=hack_msitemplates 155.ENDIF 156 157$(foreach,i,$(alllangiso) openoffice_$i) : $(ADDDEPS) 158openoffice_$(defaultlangiso).archive : $(ADDDEPS) 159 160$(foreach,i,$(alllangiso) openofficedev_$i) : $(ADDDEPS) 161 162$(foreach,i,$(alllangiso) openofficewithjre_$i) : $(ADDDEPS) 163 164$(foreach,i,$(alllangiso) ooolanguagepack_$i) : $(ADDDEPS) 165 166$(foreach,i,$(alllangiso) ooodevlanguagepack_$i) : $(ADDDEPS) 167 168$(foreach,i,$(alllangiso) sdkoo_$i) : $(ADDDEPS) 169 170$(foreach,i,$(alllangiso) sdkoodev_$i) : $(ADDDEPS) 171 172$(foreach,i,$(alllangiso) ure_$i) : $(ADDDEPS) 173 174.IF "$(MAKETARGETS)"!="" 175$(MAKETARGETS) : $(ADDDEPS) 176.ENDIF # "$(MAKETARGETS)"!="" 177 178.ENDIF # "$(BUILD_SPECIAL)"!="" 179 180$(foreach,i,$(alllangiso) openoffice_$i) : $$@{$(PKGFORMAT:^".")} 181.IF "$(MAKETARGETS)"!="" 182.IF "$(MAKETARGETS:e)"=="" && "$(MAKETARGETS:s/_//)"!="$(MAKETARGETS)" 183$(MAKETARGETS) : $$@{$(PKGFORMAT:^".")} 184$(MAKETARGETS){$(PKGFORMAT:^".")} : $(ADDDEPS) 185.ENDIF # "$(MAKETARGETS:e)"=="" && "$(MAKETARGETS:s/_//)"!="$(MAKETARGETS)" 186.ENDIF # "$(MAKETARGETS)"!="" 187openoffice_%{$(PKGFORMAT:^".") .archive} : 188 $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(MISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH) 189 $(PERL) -w $(SOLARENV)$/bin$/gen_update_info.pl --buildid $(BUILD) --arch "$(RTL_ARCH)" --os "$(RTL_OS)" --lstfile $(PRJ)$/util$/openoffice.lst --product OpenOffice --languages $(subst,$(@:s/_/ /:1)_, $(@:b)) $(PRJ)$/util$/update.xml > $(MISC)/$(@:b)_$(RTL_OS)_$(RTL_ARCH)$(@:e).update.xml 190 191$(foreach,i,$(alllangiso) openofficewithjre_$i) : $$@{$(PKGFORMAT:^".")} 192openofficewithjre_%{$(PKGFORMAT:^".")} : 193 $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice_wJRE -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(MISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH) 194 195$(foreach,i,$(alllangiso) openofficedev_$i) : $$@{$(PKGFORMAT:^".")} 196openofficedev_%{$(PKGFORMAT:^".")} : 197 $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice_Dev -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(MISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH) 198 $(PERL) -w $(SOLARENV)$/bin$/gen_update_info.pl --buildid $(BUILD) --arch "$(RTL_ARCH)" --os "$(RTL_OS)" --lstfile $(PRJ)$/util$/openoffice.lst --product OpenOffice_Dev --languages $(subst,$(@:s/_/ /:1)_, $(@:b)) $(PRJ)$/util$/update.xml > $(MISC)/$(@:b)_$(RTL_OS)_$(RTL_ARCH)$(@:e).update.xml 199 200$(foreach,i,$(alllangiso) ooolanguagepack_$i) : $$@{$(PKGFORMAT:^".")} 201ooolanguagepack_%{$(PKGFORMAT:^".")} : 202 $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSILANGPACKTEMPLATEDIR) -msilanguage $(MISC)$/win_ulffiles -languagepack -format $(@:e:s/.//) $(VERBOSESWITCH) 203 204$(foreach,i,$(alllangiso) ooodevlanguagepack_$i) : $$@{$(PKGFORMAT:^".")} 205ooodevlanguagepack_%{$(PKGFORMAT:^".")} : 206 $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice_Dev -u $(OUT) -buildid $(BUILD) -msitemplate $(MSILANGPACKTEMPLATEDIR) -msilanguage $(MISC)$/win_ulffiles -languagepack -format $(@:e:s/.//) $(VERBOSESWITCH) 207 208$(foreach,i,$(alllangiso) sdkoo_$i) : $$@{$(PKGFORMAT:^".")} 209sdkoo_%{$(PKGFORMAT:^".")} : 210 $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice_SDK -u $(OUT) -buildid $(BUILD) -msitemplate $(MSISDKOOTEMPLATEDIR) -msilanguage $(MISC)$/win_ulffiles -dontstrip -format $(@:e:s/.//) $(VERBOSESWITCH) 211 212$(foreach,i,$(alllangiso) sdkoodev_$i) : $$@{$(PKGFORMAT:^".")} 213sdkoodev_%{$(PKGFORMAT:^".")} : 214 $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice_Dev_SDK -u $(OUT) -buildid $(BUILD) -msitemplate $(MSISDKOOTEMPLATEDIR) -msilanguage $(MISC)$/win_ulffiles -dontstrip -format $(@:e:s/.//) $(VERBOSESWITCH) 215 216$(foreach,i,$(alllangiso) ure_$i) : $$@{$(PKGFORMAT:^".")} 217ure_%{$(PKGFORMAT:^".")} : 218.IF "$(OS)" == "MACOSX" 219 @echo 'for now, there is no standalone URE for Mac OS X' 220.ELSE 221 $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst \ 222 -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p URE -u $(OUT) -buildid $(BUILD) -format $(@:e:s/.//) $(VERBOSESWITCH) \ 223 -msitemplate $(MSIURETEMPLATEDIR) \ 224 -msilanguage $(MISC)$/win_ulffiles 225.ENDIF 226 227.IF "$(MAKETARGETS)"!="" 228.IF "$(MAKETARGETS:e)"=="" && "$(MAKETARGETS:s/_//)"!="$(MAKETARGETS)" 229$(MAKETARGETS) : $$@{$(PKGFORMAT:^".")} 230$(MAKETARGETS){$(PKGFORMAT:^".")} : $(ADDDEPS) 231.ENDIF # "$(MAKETARGETS:e)"=="" && "$(MAKETARGETS:s/_//)"!="$(MAKETARGETS)" 232.ENDIF # "$(MAKETARGETS)"!="" 233 234.ELSE # "$(alllangiso)"!="" 235openoffice: 236 @echo cannot pack nothing... 237 238.ENDIF # "$(alllangiso)"!="" 239 240.IF "$(LOCALPYFILES)"!="" 241$(foreach,i,$(alllangiso) openoffice_$i{$(PKGFORMAT:^".") .archive} openofficewithjre_$i{$(PKGFORMAT:^".")} openofficedev_$i{$(PKGFORMAT:^".")} sdkoo_$i{$(PKGFORMAT:^".")}) updatepack : $(LOCALPYFILES) 242.ENDIF # "$(LOCALPYFILES)"!="" 243 244$(BIN)$/%.py : $(SOLARSHAREDBIN)$/pyuno$/%.py 245 @$(COPY) $< $@ 246 247$(BIN)$/intro.zip : $(SOLARCOMMONPCKDIR)$/openoffice_nologo$/intro.zip 248 $(COPY) $< $@ 249 250$(BIN)$/dev$/intro.zip : $(SOLARCOMMONPCKDIR)$/openoffice_dev_nologo$/intro.zip 251 @-$(MKDIR) $(@:d) 252 $(COPY) $< $@ 253 254hack_msitemplates .PHONY: 255 -$(MKDIRHIER) $(MSIOFFICETEMPLATEDIR) 256 -$(MKDIRHIER) $(MSILANGPACKTEMPLATEDIR) 257 -$(MKDIRHIER) $(MSIURETEMPLATEDIR) 258 -$(MKDIRHIER) $(MSISDKOOTEMPLATEDIR) 259 -$(MKDIRHIER) $(MSIOFFICETEMPLATEDIR)$/Binary 260 -$(MKDIRHIER) $(MSILANGPACKTEMPLATEDIR)$/Binary 261 -$(MKDIRHIER) $(MSIURETEMPLATEDIR)$/Binary 262 -$(MKDIRHIER) $(MSISDKOOTEMPLATEDIR)$/Binary 263 $(GNUCOPY) -u $(MSIOFFICETEMPLATESOURCE)$/*.* $(MSIOFFICETEMPLATEDIR) 264 $(GNUCOPY) -u $(MSILANGPACKTEMPLATESOURCE)$/*.* $(MSILANGPACKTEMPLATEDIR) 265 $(GNUCOPY) -u $(MSIURETEMPLATESOURCE)$/*.* $(MSIURETEMPLATEDIR) 266 $(GNUCOPY) -u $(MSISDKOOTEMPLATESOURCE)$/*.* $(MSISDKOOTEMPLATEDIR) 267 $(GNUCOPY) -u $(MSIOFFICETEMPLATESOURCE)$/Binary$/*.* $(MSIOFFICETEMPLATEDIR)$/Binary 268 $(GNUCOPY) -u $(MSILANGPACKTEMPLATESOURCE)$/Binary$/*.* $(MSILANGPACKTEMPLATEDIR)$/Binary 269 $(GNUCOPY) -u $(MSIURETEMPLATESOURCE)$/Binary$/*.* $(MSIURETEMPLATEDIR)$/Binary 270 $(GNUCOPY) -u $(MSISDKOOTEMPLATESOURCE)$/Binary$/*.* $(MSISDKOOTEMPLATEDIR)$/Binary 271 $(RM) $(MSIOFFICETEMPLATEDIR)$/Binary$/Image.bmp 272 $(RM) $(MSILANGPACKTEMPLATEDIR)$/Binary$/Image.bmp 273 $(RM) $(MSIURETEMPLATEDIR)$/Binary$/Image.bmp 274 $(RM) $(MSISDKOOTEMPLATEDIR)$/Binary$/Image.bmp 275 $(COPY) $(PRJ)$/res$/nologoinstall.bmp $(MSIOFFICETEMPLATEDIR)$/Binary$/Image.bmp 276 $(COPY) $(PRJ)$/res$/nologoinstall.bmp $(MSILANGPACKTEMPLATEDIR)$/Binary$/Image.bmp 277 $(COPY) $(PRJ)$/res$/nologoinstall.bmp $(MSIURETEMPLATEDIR)$/Binary$/Image.bmp 278 $(COPY) $(PRJ)$/res$/nologoinstall.bmp $(MSISDKOOTEMPLATEDIR)$/Binary$/Image.bmp 279 280 281