1 #*************************************************************************
3 # The Contents of this file are made available subject to the terms of
6 # Copyright 2000, 2010 Oracle and/or its affiliates.
9 # Redistribution and use in source and binary forms, with or without
10 # modification, are permitted provided that the following conditions
12 # 1. Redistributions of source code must retain the above copyright
13 # notice, this list of conditions and the following disclaimer.
14 # 2. Redistributions in binary form must reproduce the above copyright
15 # notice, this list of conditions and the following disclaimer in the
16 # documentation and/or other materials provided with the distribution.
17 # 3. Neither the name of Sun Microsystems, Inc. nor the names of its
18 # contributors may be used to endorse or promote products derived
19 # from this software without specific prior written permission.
21 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
28 # OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
29 # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
30 # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
31 # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 #**************************************************************************
35 # Builds the DialogWithHelp example of the Developers Guide.
38 SETTINGS
=$(PRJ
)/settings
40 include $(SETTINGS
)/settings.mk
41 include $(SETTINGS
)/std.mk
43 # Define non-platform/compiler specific settings
44 SAMPLE_NAME
=ExtDialogWithHelp
45 SAMPLE_GEN_OUT
=$(OUT_MISC
)/$(SAMPLE_NAME
)
47 COMP_NAME
=DialogWithHelp
48 COMP_GEN_OUT
=$(SAMPLE_GEN_OUT
)/$(COMP_NAME
)
49 COMP_PACKAGE
= $(OUT_BIN
)/$(COMP_NAME
).
$(UNOOXT_EXT
)
50 COMP_PACKAGE_URL
= $(subst \\,\
,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
51 COMP_UNOPKG_MANIFEST
= $(COMP_GEN_OUT
)/META-INF
/manifest.xml
52 COMP_REGISTERFLAG
=$(COMP_GEN_OUT
)$(PS
)devguide_basic_
$(COMP_NAME
)_register_component.flag
55 DialogWithHelp
/dialog.xlb\
56 DialogWithHelp
/script.xlb\
57 DialogWithHelp
/Module1.xba\
58 DialogWithHelp
/Dialog1.xdl
61 META-INF
/manifest.xml\
66 help
/de
/com.foocorp.foo-ext
/page1.xhp\
67 help
/de
/com.foocorp.foo-ext
/page2.xhp\
68 help
/de
/com.foocorp.foo-ext
/subfolder
/anotherpage.xhp\
69 help
/en
/com.foocorp.foo-ext
/page1.xhp\
70 help
/en
/com.foocorp.foo-ext
/page2.xhp\
71 help
/en
/com.foocorp.foo-ext
/subfolder
/anotherpage.xhp\
77 include $(SETTINGS
)/stdtarget.mk
79 # rule for component package file
80 $(COMP_PACKAGE
) : $(COMP_LIBRARY_FILES
) $(COMP_MISC_FILES
) $(COMP_HELP_FILES
)
81 -$(DEL
) $(subst \\,\
,$(subst /,$(PS
),$@
))
82 -$(MKDIR
) $(subst /,$(PS
),$(@D
))
83 $(SDK_ZIP
) $@
$(COMP_LIBRARY_FILES
)
84 $(SDK_ZIP
) $@
$(COMP_MISC_FILES
)
85 $(SDK_ZIP
) $@
$(COMP_HELP_FILES
)
87 $(COMP_REGISTERFLAG
) : $(COMP_PACKAGE
)
88 ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
89 -$(DEL
) $(subst \\,\
,$(subst /,$(PS
),$@
))
90 -$(MKDIR
) $(subst /,$(PS
),$(@D
))
91 $(DEPLOYTOOL
) $(COMP_PACKAGE_URL
)
92 @echo flagged
> $(subst /,$(PS
),$@
)
94 @echo
--------------------------------------------------------------------------------
95 @echo If you want to
install your component automatically
, please set the environment
96 @echo variable SDK_AUTO_DEPLOYMENT
= YES. But note that auto deployment is only
97 @echo possible if no office instance is running.
98 @echo
--------------------------------------------------------------------------------
101 $(SAMPLE_NAME
) : $(COMP_REGISTERFLAG
)
102 @echo
--------------------------------------------------------------------------------
103 @echo The
"$(QM)DialogWithHelp$(QM)" library was installed in your office installation
104 @echo if SDK_AUTO_DEPLOYMENT
= YES. You can use it in the BASIC IDE
as a normal
105 @echo Basic library. You also will find a new top level menu
"$(QM)Foo Extension$(QM)"
106 @echo with one menu entry
"$(QM)Start Foo Dialog$(QM)" to start it directly. If a
107 @echo document is active there is also a
"$(QM)Foo Toolbar Item$(QM)" doing the same.
108 @echo All help index entries provided by the help content start with Foo.
109 @echo
--------------------------------------------------------------------------------
111 $(COMP_NAME
).odt.load
: $(COMP_REGISTERFLAG
)
112 "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@
)
116 -$(DELRECURSIVE
) $(subst /,$(PS
),$(COMP_GEN_OUT
))
117 -$(DEL
) $(subst \\,\
,$(subst /,$(PS
),$(COMP_PACKAGE_URL
)))