From faa0815cf55a08cd974f01134821d4dcfd019e62 Mon Sep 17 00:00:00 2001 From: akshay-c Date: Wed, 31 Jul 2019 11:18:02 +0530 Subject: Standard debian installation --- ldmicro/CMakeLists.txt | 32 +++++++-- ldmicro/LDMicro.desktop | 9 --- ldmicro/applications/LDMicro.desktop | 12 ++++ ldmicro/icons/hicolor/128x128/apps/ldmicro.png | Bin 0 -> 1793 bytes .../128x128/mimetypes/application-x-ldmicro-ld.png | Bin 0 -> 1793 bytes ldmicro/icons/hicolor/16x16/apps/ldmicro.png | Bin 0 -> 349 bytes .../16x16/mimetypes/application-x-ldmicro-ld.png | Bin 0 -> 349 bytes ldmicro/icons/hicolor/22x22/apps/ldmicro.png | Bin 0 -> 395 bytes .../22x22/mimetypes/application-x-ldmicro-ld.png | Bin 0 -> 395 bytes ldmicro/icons/hicolor/24x24/apps/ldmicro.png | Bin 0 -> 527 bytes .../24x24/mimetypes/application-x-ldmicro-ld.png | Bin 0 -> 527 bytes ldmicro/icons/hicolor/32x32/apps/ldmicro.png | Bin 0 -> 518 bytes .../32x32/mimetypes/application-x-ldmicro-ld.png | Bin 0 -> 518 bytes ldmicro/icons/hicolor/48x48/apps/ldmicro.png | Bin 0 -> 875 bytes .../48x48/mimetypes/application-x-ldmicro-ld.png | Bin 0 -> 875 bytes ldmicro/icons/hicolor/64x64/apps/ldmicro.png | Bin 0 -> 1002 bytes .../64x64/mimetypes/application-x-ldmicro-ld.png | Bin 0 -> 1002 bytes ldmicro/icons/hicolor/scalable/apps/ldmicro.svg | 78 +++++++++++++++++++++ .../mimetypes/application-x-ldmicro-ld.svg | 78 +++++++++++++++++++++ ldmicro/ldmicro.qrc | 5 ++ ldmicro/lib/linuxUI/linuxLD.h | 2 +- 21 files changed, 201 insertions(+), 15 deletions(-) delete mode 100755 ldmicro/LDMicro.desktop create mode 100644 ldmicro/applications/LDMicro.desktop create mode 100644 ldmicro/icons/hicolor/128x128/apps/ldmicro.png create mode 100644 ldmicro/icons/hicolor/128x128/mimetypes/application-x-ldmicro-ld.png create mode 100644 ldmicro/icons/hicolor/16x16/apps/ldmicro.png create mode 100644 ldmicro/icons/hicolor/16x16/mimetypes/application-x-ldmicro-ld.png create mode 100644 ldmicro/icons/hicolor/22x22/apps/ldmicro.png create mode 100644 ldmicro/icons/hicolor/22x22/mimetypes/application-x-ldmicro-ld.png create mode 100644 ldmicro/icons/hicolor/24x24/apps/ldmicro.png create mode 100644 ldmicro/icons/hicolor/24x24/mimetypes/application-x-ldmicro-ld.png create mode 100644 ldmicro/icons/hicolor/32x32/apps/ldmicro.png create mode 100644 ldmicro/icons/hicolor/32x32/mimetypes/application-x-ldmicro-ld.png create mode 100644 ldmicro/icons/hicolor/48x48/apps/ldmicro.png create mode 100644 ldmicro/icons/hicolor/48x48/mimetypes/application-x-ldmicro-ld.png create mode 100644 ldmicro/icons/hicolor/64x64/apps/ldmicro.png create mode 100644 ldmicro/icons/hicolor/64x64/mimetypes/application-x-ldmicro-ld.png create mode 100644 ldmicro/icons/hicolor/scalable/apps/ldmicro.svg create mode 100644 ldmicro/icons/hicolor/scalable/mimetypes/application-x-ldmicro-ld.svg create mode 100644 ldmicro/ldmicro.qrc (limited to 'ldmicro') diff --git a/ldmicro/CMakeLists.txt b/ldmicro/CMakeLists.txt index 35ffc05..adb0c0f 100644 --- a/ldmicro/CMakeLists.txt +++ b/ldmicro/CMakeLists.txt @@ -103,6 +103,7 @@ IF(UNIX) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) + set(CMAKE_AUTORCC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) find_package(Qt5Widgets CONFIG REQUIRED) find_package(Qt5Core CONFIG REQUIRED) @@ -165,19 +166,40 @@ endif() target_link_libraries (ldinterpret LinuxUI) ## Build main LDMicro executable - add_executable (LDMicro ${COMPILE_CPP_SOURCES}) + add_executable (LDMicro ${COMPILE_CPP_SOURCES} ldmicro.qrc) add_dependencies(LDMicro LDMicro_SCRIPT_GENERATED_FILES) - install (TARGETS LDMicro DESTINATION bin) target_link_libraries (LDMicro LinuxUI) target_link_libraries (LDMicro FreezeLD) target_link_libraries(LDMicro ${Qt5Widgets_LIBRARIES}) target_link_libraries(LDMicro ${Qt5Core_LIBRARIES}) target_link_libraries(LDMicro ${Qt5Gui_LIBRARIES}) - INSTALL(TARGETS LDMicro DESTINATION /usr/local/bin/ldmicro) - INSTALL(FILES ldmicro.ico DESTINATION /usr/local/bin/ldmicro) - INSTALL(FILES LDMicro.desktop DESTINATION /usr/share/applications) + # Package Creation + if( NOT DEFAULT_INSTALL_PATH ) + set( DEFAULT_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}" + CACHE + PATH + "Location of LDMicro data files." ) + endif() + + # Set paths + set( UNIX_ICON_FILES icons/ ) + set( UNIX_APPLICATIONS_FILES applications/ ) + set( LDMICRO_BIN bin CACHE PATH "LDmicro binaries.") + + install( DIRECTORY ${UNIX_ICON_FILES} + DESTINATION share/icons + COMPONENT resources + ) + + install( DIRECTORY ${UNIX_APPLICATIONS_FILES} + DESTINATION share/applications + COMPONENT resources + ) + install( TARGETS LDMicro + DESTINATION bin + ) ##Debian package creation set(CPACK_GENERATOR "DEB") set(CPACK_PACKAGE_VERSION_MAJOR ${LDMicro_VERSION_MAJOR}) diff --git a/ldmicro/LDMicro.desktop b/ldmicro/LDMicro.desktop deleted file mode 100755 index 3d93818..0000000 --- a/ldmicro/LDMicro.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Terminal=false -Icon[en_IN]=/usr/local/bin/ldmicro/ldmicro.ico -Name[en_IN]=LDMicro -Exec=/usr/local/bin/ldmicro/LDMicro -Name=LDMicro -Icon=/usr/local/bin/ldmicro/ldmicro.ico diff --git a/ldmicro/applications/LDMicro.desktop b/ldmicro/applications/LDMicro.desktop new file mode 100644 index 0000000..28c71d9 --- /dev/null +++ b/ldmicro/applications/LDMicro.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=2.2 +Terminal=false +Icon=ldmicro +Type=Application +Categories=Education;Development;Electronics; +Exec=LDMicro +MimeType=application/x-ldmicro-ld; +Name=LDMicro +GenericName=PLC Ladder CAD +Comment=Ladder Logic editor, simulator and compiler for 8 bit microcontrollers +X-Desktop-File-Install-Version=2.2 \ No newline at end of file diff --git a/ldmicro/icons/hicolor/128x128/apps/ldmicro.png b/ldmicro/icons/hicolor/128x128/apps/ldmicro.png new file mode 100644 index 0000000..9012cc1 Binary files /dev/null and b/ldmicro/icons/hicolor/128x128/apps/ldmicro.png differ diff --git a/ldmicro/icons/hicolor/128x128/mimetypes/application-x-ldmicro-ld.png b/ldmicro/icons/hicolor/128x128/mimetypes/application-x-ldmicro-ld.png new file mode 100644 index 0000000..9012cc1 Binary files /dev/null and b/ldmicro/icons/hicolor/128x128/mimetypes/application-x-ldmicro-ld.png differ diff --git a/ldmicro/icons/hicolor/16x16/apps/ldmicro.png b/ldmicro/icons/hicolor/16x16/apps/ldmicro.png new file mode 100644 index 0000000..381071b Binary files /dev/null and b/ldmicro/icons/hicolor/16x16/apps/ldmicro.png differ diff --git a/ldmicro/icons/hicolor/16x16/mimetypes/application-x-ldmicro-ld.png b/ldmicro/icons/hicolor/16x16/mimetypes/application-x-ldmicro-ld.png new file mode 100644 index 0000000..381071b Binary files /dev/null and b/ldmicro/icons/hicolor/16x16/mimetypes/application-x-ldmicro-ld.png differ diff --git a/ldmicro/icons/hicolor/22x22/apps/ldmicro.png b/ldmicro/icons/hicolor/22x22/apps/ldmicro.png new file mode 100644 index 0000000..97b66ad Binary files /dev/null and b/ldmicro/icons/hicolor/22x22/apps/ldmicro.png differ diff --git a/ldmicro/icons/hicolor/22x22/mimetypes/application-x-ldmicro-ld.png b/ldmicro/icons/hicolor/22x22/mimetypes/application-x-ldmicro-ld.png new file mode 100644 index 0000000..97b66ad Binary files /dev/null and b/ldmicro/icons/hicolor/22x22/mimetypes/application-x-ldmicro-ld.png differ diff --git a/ldmicro/icons/hicolor/24x24/apps/ldmicro.png b/ldmicro/icons/hicolor/24x24/apps/ldmicro.png new file mode 100644 index 0000000..cb64f40 Binary files /dev/null and b/ldmicro/icons/hicolor/24x24/apps/ldmicro.png differ diff --git a/ldmicro/icons/hicolor/24x24/mimetypes/application-x-ldmicro-ld.png b/ldmicro/icons/hicolor/24x24/mimetypes/application-x-ldmicro-ld.png new file mode 100644 index 0000000..cb64f40 Binary files /dev/null and b/ldmicro/icons/hicolor/24x24/mimetypes/application-x-ldmicro-ld.png differ diff --git a/ldmicro/icons/hicolor/32x32/apps/ldmicro.png b/ldmicro/icons/hicolor/32x32/apps/ldmicro.png new file mode 100644 index 0000000..adef79d Binary files /dev/null and b/ldmicro/icons/hicolor/32x32/apps/ldmicro.png differ diff --git a/ldmicro/icons/hicolor/32x32/mimetypes/application-x-ldmicro-ld.png b/ldmicro/icons/hicolor/32x32/mimetypes/application-x-ldmicro-ld.png new file mode 100644 index 0000000..adef79d Binary files /dev/null and b/ldmicro/icons/hicolor/32x32/mimetypes/application-x-ldmicro-ld.png differ diff --git a/ldmicro/icons/hicolor/48x48/apps/ldmicro.png b/ldmicro/icons/hicolor/48x48/apps/ldmicro.png new file mode 100644 index 0000000..9941fcd Binary files /dev/null and b/ldmicro/icons/hicolor/48x48/apps/ldmicro.png differ diff --git a/ldmicro/icons/hicolor/48x48/mimetypes/application-x-ldmicro-ld.png b/ldmicro/icons/hicolor/48x48/mimetypes/application-x-ldmicro-ld.png new file mode 100644 index 0000000..9941fcd Binary files /dev/null and b/ldmicro/icons/hicolor/48x48/mimetypes/application-x-ldmicro-ld.png differ diff --git a/ldmicro/icons/hicolor/64x64/apps/ldmicro.png b/ldmicro/icons/hicolor/64x64/apps/ldmicro.png new file mode 100644 index 0000000..5d84300 Binary files /dev/null and b/ldmicro/icons/hicolor/64x64/apps/ldmicro.png differ diff --git a/ldmicro/icons/hicolor/64x64/mimetypes/application-x-ldmicro-ld.png b/ldmicro/icons/hicolor/64x64/mimetypes/application-x-ldmicro-ld.png new file mode 100644 index 0000000..5d84300 Binary files /dev/null and b/ldmicro/icons/hicolor/64x64/mimetypes/application-x-ldmicro-ld.png differ diff --git a/ldmicro/icons/hicolor/scalable/apps/ldmicro.svg b/ldmicro/icons/hicolor/scalable/apps/ldmicro.svg new file mode 100644 index 0000000..5c6cbde --- /dev/null +++ b/ldmicro/icons/hicolor/scalable/apps/ldmicro.svg @@ -0,0 +1,78 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/ldmicro/icons/hicolor/scalable/mimetypes/application-x-ldmicro-ld.svg b/ldmicro/icons/hicolor/scalable/mimetypes/application-x-ldmicro-ld.svg new file mode 100644 index 0000000..5c6cbde --- /dev/null +++ b/ldmicro/icons/hicolor/scalable/mimetypes/application-x-ldmicro-ld.svg @@ -0,0 +1,78 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/ldmicro/ldmicro.qrc b/ldmicro/ldmicro.qrc new file mode 100644 index 0000000..a68b238 --- /dev/null +++ b/ldmicro/ldmicro.qrc @@ -0,0 +1,5 @@ + + + ldmicro.ico + + diff --git a/ldmicro/lib/linuxUI/linuxLD.h b/ldmicro/lib/linuxUI/linuxLD.h index 8b19538..1b2117d 100644 --- a/ldmicro/lib/linuxUI/linuxLD.h +++ b/ldmicro/lib/linuxUI/linuxLD.h @@ -26,7 +26,7 @@ /// Image loading flags #define IMAGE_ICON 1 -#define LDMICRO_ICON "../ldmicro.ico" +#define LDMICRO_ICON ":/ldmicro.ico" /// Typedefs //typedef int64_t __int64; -- cgit