]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
LightApp resources for default profile
authorCamille GOUTTEBROZE <camille.gouttebroze@cea.fr>
Tue, 21 Oct 2014 07:35:16 +0000 (09:35 +0200)
committerCamille GOUTTEBROZE <camille.gouttebroze@cea.fr>
Tue, 21 Oct 2014 07:35:16 +0000 (09:35 +0200)
14 files changed:
bin/app-quickstart.py
bin/app-template/CMakeLists.txt
bin/app-template/resources/CMakeLists.txt
bin/app-template/resources/SalomeApp.xml.in
bin/app-template/resources/about.png [new file with mode: 0755]
bin/app-template/resources/app_icon.png [new file with mode: 0755]
bin/app-template/resources/app_logo.png [new file with mode: 0644]
bin/app-template/resources/icon_about.png [new file with mode: 0755]
bin/app-template/resources/splash.png [new file with mode: 0755]
bin/app-template/src/CMakeLists.txt
bin/app-template/src/resources/CMakeLists.txt [new file with mode: 0644]
bin/app-template/src/resources/LightApp_images.ts [new file with mode: 0755]
bin/app-template/src/resources/LightApp_msg_en.ts [new file with mode: 0755]
bin/app-template/src/resources/LightApp_msg_fr.ts [new file with mode: 0755]

index ced8b62f29fa343904b1f2c6009455ec273d79da..cf060b64205a001a071104e711e0698417fbe2ad 100755 (executable)
@@ -75,6 +75,7 @@ def profileReplaceStrings( src, dst, options ) :
         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() )
index a78a3055bc75edfd6831912382df476f8b9d1856..6b28b00b346b14c2def1d2537f94667159f0da52 100644 (file)
@@ -61,6 +61,25 @@ IF(SALOME_BUILD_DOC)
   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)
 # ===========
index d4521b0f2d39ed1105b63606a7562442d99e96e7..bd20dae8bebd2bff499fe24b4f6994be1270f8c9 100644 (file)
 # 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})
 
index 11102af6c487283ea0321e6cc882b3f8ab730bc8..7ccff68b95551e69508230820c4f7e48d4ccb01e 100644 (file)
     <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>
diff --git a/bin/app-template/resources/about.png b/bin/app-template/resources/about.png
new file mode 100755 (executable)
index 0000000..dfdc7e6
Binary files /dev/null and b/bin/app-template/resources/about.png differ
diff --git a/bin/app-template/resources/app_icon.png b/bin/app-template/resources/app_icon.png
new file mode 100755 (executable)
index 0000000..03e172c
Binary files /dev/null and b/bin/app-template/resources/app_icon.png differ
diff --git a/bin/app-template/resources/app_logo.png b/bin/app-template/resources/app_logo.png
new file mode 100644 (file)
index 0000000..362c018
Binary files /dev/null and b/bin/app-template/resources/app_logo.png differ
diff --git a/bin/app-template/resources/icon_about.png b/bin/app-template/resources/icon_about.png
new file mode 100755 (executable)
index 0000000..ec56cac
Binary files /dev/null and b/bin/app-template/resources/icon_about.png differ
diff --git a/bin/app-template/resources/splash.png b/bin/app-template/resources/splash.png
new file mode 100755 (executable)
index 0000000..dfdc7e6
Binary files /dev/null and b/bin/app-template/resources/splash.png differ
index 0992f87f3d1edd1a206a9ee5455aa8ad041cea12..7096041e47028166b407c3284eef221df9ee85f3 100644 (file)
@@ -31,3 +31,4 @@ SALOME_INSTALL_SCRIPTS("${_bin_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON})
 
 # --- sub-directories ---
 ADD_SUBDIRECTORY( tests )
+ADD_SUBDIRECTORY( resources )
diff --git a/bin/app-template/src/resources/CMakeLists.txt b/bin/app-template/src/resources/CMakeLists.txt
new file mode 100644 (file)
index 0000000..1d82326
--- /dev/null
@@ -0,0 +1,33 @@
+# 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}")
diff --git a/bin/app-template/src/resources/LightApp_images.ts b/bin/app-template/src/resources/LightApp_images.ts
new file mode 100755 (executable)
index 0000000..ee44bfc
--- /dev/null
@@ -0,0 +1,23 @@
+<?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>
diff --git a/bin/app-template/src/resources/LightApp_msg_en.ts b/bin/app-template/src/resources/LightApp_msg_en.ts
new file mode 100755 (executable)
index 0000000..9bc9eab
--- /dev/null
@@ -0,0 +1,35 @@
+<?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>
diff --git a/bin/app-template/src/resources/LightApp_msg_fr.ts b/bin/app-template/src/resources/LightApp_msg_fr.ts
new file mode 100755 (executable)
index 0000000..631c196
--- /dev/null
@@ -0,0 +1,35 @@
+<?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>