desktop integration for Linux, embedded icons on Windows
@ -57,6 +57,12 @@ if(LAMMPS_GUI_USE_PLUGIN)
|
||||
set(PLUGIN_LOADER_SRC ${LAMMPS_PLUGINLIB_DIR}/liblammpsplugin.c)
|
||||
endif()
|
||||
|
||||
# include resource compiler to embed icons into the executable on Windows
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
enable_language(RC)
|
||||
set(ICON_RC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/lmpicons.rc)
|
||||
endif()
|
||||
|
||||
# we require Qt 5 and at least version 5.12 at that.
|
||||
find_package(Qt5 5.12 REQUIRED COMPONENTS Widgets Charts)
|
||||
|
||||
@ -85,6 +91,7 @@ set(PROJECT_SOURCES
|
||||
setvariables.h
|
||||
stdcapture.cpp
|
||||
${PLUGIN_LOADER_SRC}
|
||||
${ICON_RC_FILE}
|
||||
)
|
||||
qt5_add_resources(PROJECT_SOURCES lammpsgui.qrc)
|
||||
|
||||
@ -184,6 +191,8 @@ elseif((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING)
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
install(TARGETS lammps-gui DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lammps-gui.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications/)
|
||||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/icons/hicolor DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/)
|
||||
install(CODE [[
|
||||
file(GET_RUNTIME_DEPENDENCIES
|
||||
LIBRARIES $<TARGET_FILE:lammps>
|
||||
|
||||
BIN
tools/lammps-gui/icons/hicolor/128x128/apps/lammps.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
tools/lammps-gui/icons/hicolor/16x16/apps/lammps.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
tools/lammps-gui/icons/hicolor/22x22/apps/lammps.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
tools/lammps-gui/icons/hicolor/32x32/apps/lammps.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
tools/lammps-gui/icons/hicolor/48x48/apps/lammps.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
tools/lammps-gui/icons/hicolor/64x64/apps/lammps.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
tools/lammps-gui/icons/lammps.ico
Normal file
|
After Width: | Height: | Size: 204 KiB |
BIN
tools/lammps-gui/icons/lmpfile.ico
Normal file
|
After Width: | Height: | Size: 186 KiB |
10
tools/lammps-gui/lammps-gui.desktop
Normal file
@ -0,0 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Categories=Science;Engineering;
|
||||
Exec=lammps-gui %f
|
||||
Name=The LAMMPS GUI
|
||||
Terminal=false
|
||||
GenericName=MD Simulator
|
||||
Keywords=MD Simulation;LAMMPS;Molecular Dynamics;N-Body
|
||||
Icon=lammps
|
||||
2
tools/lammps-gui/lmpicons.rc
Normal file
@ -0,0 +1,2 @@
|
||||
id1 ICON icons/lammps.ico
|
||||
id2 ICON icons/lmpfile.ico
|
||||