with open( src, "rt" ) as fin:
for line in fin:
l = line.replace( '[LIST_OF_MODULES]', options.modules )
+ l = l.replace( '[VERSION]', options.version )
l = l.replace( '[NAME_OF_APPLICATION]', options.name.upper() )
l = l.replace( '<Name_of_Application>', options.name )
l = l.replace( '(name_of_application)', options.name.lower() )
SALOME_LOG_OPTIONAL_PACKAGE(Sphinx SALOME_BUILD_DOC)
ENDIF()
+
+# Find GUI
+# ===========
+
+SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "Path to the Salome GUI")
+IF(EXISTS ${GUI_ROOT_DIR})
+ LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
+ FIND_PACKAGE(SalomeGUI REQUIRED)
+ FULL_GUI(TRUE) # check whether GUI builded in full mode and with CORBA
+ ADD_DEFINITIONS(${GUI_DEFINITIONS})
+ INCLUDE_DIRECTORIES(${GUI_INCLUDE_DIRS})
+ELSE(EXISTS ${GUI_ROOT_DIR})
+ MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR")
+ENDIF(EXISTS ${GUI_ROOT_DIR})
+
+# Qt4
+FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
+INCLUDE(${QT_USE_FILE})
+
# Directories
# (default values taken from KERNEL)
# ===========
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+# --- resources ---
+SET([NAME_OF_APPLICATION]_RESOURCES_FILES
+ app_icon.png
+ splash.png
+ about.png
+ icon_about.png
+ app_logo.png
+)
+
+# --- rules ---
+INSTALL(FILES ${[NAME_OF_APPLICATION]_RESOURCES_FILES} DESTINATION ${SALOME_[NAME_OF_APPLICATION]_INSTALL_RES_DATA})
+
# --- config ---
SALOME_CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/SalomeApp.xml.in ${CMAKE_CURRENT_BINARY_DIR}/SalomeApp.xml INSTALL ${SALOME_[NAME_OF_APPLICATION]_INSTALL_RES_DATA})
<parameter name="embedded" value="SalomeAppEngine,study,cppContainer,registry,moduleCatalog"/>
<parameter name="standalone" value=""/>
</section>
+ <section name="splash">
+ <parameter name="image" value="%[NAME_OF_APPLICATION]_ROOT_DIR%/share/salome/resources/(name_of_application)/splash.png"/>
+ <parameter name="text_colors" value="#ffffff|#000000"/>
+ <parameter name="show_percents" value="yes"/>
+ <parameter name="show_progress" value="yes"/>
+ <parameter name="show_message" value="yes"/>
+ <parameter name="font" value="Xirod,12,normal"/>
+ </section>
<section name="resources">
- <parameter name="LightApp" value="%[NAME_OF_APPLICATION]_ROOT_DIR%/share/salome/resources"/>
+ <parameter name="LightApp" value="%[NAME_OF_APPLICATION]_ROOT_DIR%/share/salome/resources/(name_of_application)"/>
</section>
</document>
# --- sub-directories ---
ADD_SUBDIRECTORY( tests )
+ADD_SUBDIRECTORY( resources )
--- /dev/null
+# Copyright (C) 2012-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+INCLUDE(UseQt4Ext)
+
+# --- resources ---
+
+# resource files / to be processed by lrelease
+SET(_ts_RESOURCES
+ LightApp_images.ts
+ LightApp_msg_en.ts
+ LightApp_msg_fr.ts
+)
+
+# --- rules ---
+
+QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_[NAME_OF_APPLICATION]_INSTALL_RES_DATA}")
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+<context>
+ <name>@default</name>
+ <message>
+ <source>APP_DEFAULT_ICO</source>
+ <translation>app_icon.png</translation>
+ </message>
+ <message>
+ <source>ICO_ABOUT</source>
+ <translation>icon_about.png</translation>
+ </message>
+ <message>
+ <source>ABOUT</source>
+ <translation>about.png</translation>
+ </message>
+ <message>
+ <source>APP_BASE_LOGO</source>
+ <translation>app_logo.png</translation>
+ </message>
+</context>
+</TS>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+<context>
+ <name>@default</name>
+ <message>
+ <source>ABOUT_COPYRIGHT</source>
+ <translation>Copyright (C)</translation>
+ </message>
+ <message>
+ <source>ABOUT_CAPTION</source>
+ <translation>About <Name_of_Application></translation>
+ </message>
+ <message>
+ <source>APP_NAME</source>
+ <translation><Name_of_Application></translation>
+ </message>
+ <message>
+ <source>APP_VERSION</source>
+ <translation>V[VERSION]</translation>
+ </message>
+ <message>
+ <source>ABOUT_LICENSE</source>
+ <translation>License description</translation>
+ </message>
+ <message>
+ <source>ABOUT_VERSION</source>
+ <translation>Version [VERSION]</translation>
+ </message>
+ <message>
+ <source>ABOUT_TITLE</source>
+ <translation><Name_of_Application></translation>
+ </message>
+</context>
+</TS>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="fr_FR">
+<context>
+ <name>@default</name>
+ <message>
+ <source>ABOUT_COPYRIGHT</source>
+ <translation>Copyright (C)</translation>
+ </message>
+ <message>
+ <source>ABOUT_CAPTION</source>
+ <translation>A propos de <Name_of_Application></translation>
+ </message>
+ <message>
+ <source>APP_NAME</source>
+ <translation><Name_of_Application></translation>
+ </message>
+ <message>
+ <source>APP_VERSION</source>
+ <translation>V[VERSION]</translation>
+ </message>
+ <message>
+ <source>ABOUT_LICENSE</source>
+ <translation>Description de la licence</translation>
+ </message>
+ <message>
+ <source>ABOUT_VERSION</source>
+ <translation>Version [VERSION]</translation>
+ </message>
+ <message>
+ <source>ABOUT_TITLE</source>
+ <translation><Name_of_Application></translation>
+ </message>
+</context>
+</TS>