From: Camille GOUTTEBROZE Date: Tue, 21 Oct 2014 07:35:16 +0000 (+0200) Subject: LightApp resources for default profile X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f0e3c4f554bb52c242b00ad12e0fb8461a8c8731;p=modules%2Fkernel.git LightApp resources for default profile --- diff --git a/bin/app-quickstart.py b/bin/app-quickstart.py index ced8b62f2..cf060b642 100755 --- a/bin/app-quickstart.py +++ b/bin/app-quickstart.py @@ -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( '', options.name ) l = l.replace( '(name_of_application)', options.name.lower() ) diff --git a/bin/app-template/CMakeLists.txt b/bin/app-template/CMakeLists.txt index a78a3055b..6b28b00b3 100644 --- a/bin/app-template/CMakeLists.txt +++ b/bin/app-template/CMakeLists.txt @@ -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) # =========== diff --git a/bin/app-template/resources/CMakeLists.txt b/bin/app-template/resources/CMakeLists.txt index d4521b0f2..bd20dae8b 100644 --- a/bin/app-template/resources/CMakeLists.txt +++ b/bin/app-template/resources/CMakeLists.txt @@ -17,6 +17,18 @@ # 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}) diff --git a/bin/app-template/resources/SalomeApp.xml.in b/bin/app-template/resources/SalomeApp.xml.in index 11102af6c..7ccff68b9 100644 --- a/bin/app-template/resources/SalomeApp.xml.in +++ b/bin/app-template/resources/SalomeApp.xml.in @@ -16,7 +16,15 @@ +
+ + + + + + +
- +
diff --git a/bin/app-template/resources/about.png b/bin/app-template/resources/about.png new file mode 100755 index 000000000..dfdc7e618 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 index 000000000..03e172c3f 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 index 000000000..362c018d7 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 index 000000000..ec56cacc7 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 index 000000000..dfdc7e618 Binary files /dev/null and b/bin/app-template/resources/splash.png differ diff --git a/bin/app-template/src/CMakeLists.txt b/bin/app-template/src/CMakeLists.txt index 0992f87f3..7096041e4 100644 --- a/bin/app-template/src/CMakeLists.txt +++ b/bin/app-template/src/CMakeLists.txt @@ -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 index 000000000..1d8232624 --- /dev/null +++ b/bin/app-template/src/resources/CMakeLists.txt @@ -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 index 000000000..ee44bfc64 --- /dev/null +++ b/bin/app-template/src/resources/LightApp_images.ts @@ -0,0 +1,23 @@ + + + + + @default + + APP_DEFAULT_ICO + app_icon.png + + + ICO_ABOUT + icon_about.png + + + ABOUT + about.png + + + APP_BASE_LOGO + app_logo.png + + + 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 index 000000000..9bc9eabd4 --- /dev/null +++ b/bin/app-template/src/resources/LightApp_msg_en.ts @@ -0,0 +1,35 @@ + + + + + @default + + ABOUT_COPYRIGHT + Copyright (C) + + + ABOUT_CAPTION + About + + + APP_NAME + + + + APP_VERSION + V[VERSION] + + + ABOUT_LICENSE + License description + + + ABOUT_VERSION + Version [VERSION] + + + ABOUT_TITLE + + + + 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 index 000000000..631c19630 --- /dev/null +++ b/bin/app-template/src/resources/LightApp_msg_fr.ts @@ -0,0 +1,35 @@ + + + + + @default + + ABOUT_COPYRIGHT + Copyright (C) + + + ABOUT_CAPTION + A propos de + + + APP_NAME + + + + APP_VERSION + V[VERSION] + + + ABOUT_LICENSE + Description de la licence + + + ABOUT_VERSION + Version [VERSION] + + + ABOUT_TITLE + + + +