Salome HOME
PAL issue 2757: Traiter de manière masquée lâ\80\99exécution de la commande DEBUT...
[tools/yacsgen.git] / module_generator / gui_tmpl.py
1 # Copyright (C) 2009-2013  EDF R&D
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 try:
21   from string import Template
22 except:
23   from compat import Template,set
24
25 pyguimakefile="""
26 include $$(top_srcdir)/adm_local/make_common_starter.am
27
28 # Scripts to be installed
29 salomepython_PYTHON= ${sources}
30
31 salomeres_DATA =SalomeApp.xml ${other_sources}
32 """
33 pyguimakefile=Template(pyguimakefile)
34
35
36 pysalomeapp="""
37 <document>
38   <section name="${module}">
39     <parameter name="name" value="${module}"/>
40     <parameter name="icon" value="${module}.png"/>
41     <parameter name="library" value="SalomePyQtGUI"/>
42     <parameter name="documentation" value="${lmodule}_help"/>
43   </section>
44   <section name="resources">
45     <parameter name="${module}" value="$${${module}_ROOT_DIR}/share/salome/resources/${lmodule}"/>
46   </section>
47   <section name="${lmodule}_help" >
48     <parameter name="sub_menu"          value="%1 module"/>
49     <parameter name="User's Guide"      value="%${module}_ROOT_DIR%/share/doc/salome/gui/${lmodule}/index.html"/>
50   </section>
51 </document>
52 """
53 pysalomeapp=Template(pysalomeapp)
54
55 cppguimakefile="""
56 include $$(top_srcdir)/adm_local/make_common_starter.am
57
58 BUILT_SOURCES=${uisources}
59
60 lib_LTLIBRARIES= lib${module}.la
61 lib${module}_la_SOURCES = ${sources}
62 lib${module}_la_CPPFLAGS = $$(SALOME_INCLUDES) $$(GUI_CXXFLAGS) $$(BOOST_CPPFLAGS) $$(QT_INCLUDES) -I$$(top_builddir)/idl
63 lib${module}_la_LIBADD   = -L$$(top_builddir)/idl -lSalomeIDL${module}
64
65 salomeres_DATA =SalomeApp.xml ${other_sources}
66
67 # meta object implementation files generation (moc)
68 %_moc.cxx: %.h
69         $$(MOC) $$< -o $$@
70
71 # qt forms files generation (uic)
72 ui_%.h: %.ui
73         $$(UIC) -o $$@ $$<
74
75 # translation (*.qm) files generation (lrelease)
76 %.qm: %.ts
77         $$(LRELEASE) $$< -qm $$@
78 """
79 cppguimakefile=Template(cppguimakefile)
80
81 cppsalomeapp="""
82 <document>
83   <section name="${module}">
84     <parameter name="name" value="${module}"/>
85     <parameter name="icon" value="${module}.png"/>
86     <parameter name="documentation" value="${lmodule}_help"/>
87   </section>
88   <section name="resources">
89     <parameter name="${module}" value="$${${module}_ROOT_DIR}/share/salome/resources/${lmodule}"/>
90   </section>
91   <section name="${lmodule}_help" >
92     <parameter name="sub_menu"          value="%1 module"/>
93     <parameter name="User's Guide"      value="%${module}_ROOT_DIR%/share/doc/salome/gui/${lmodule}/index.html"/>
94   </section>
95 </document>
96 """
97 cppsalomeapp=Template(cppsalomeapp)