Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9172929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:28:11+00:00 2026-06-17T16:28:11+00:00

I am trying to create and install package (.deb & .rpm too) for an

  • 0

I am trying to create and install package (.deb & .rpm too) for an application I am developing, using CMake and CPack. The package gets created nice and well, however I don’t get an entry in the KDE menu after running the dpkg -i mypackage.deb.

Here are the steps I am doing:

Excerpt from CMakeLists.txt:

SET(CMAKE_INSTALL_PREFIX /opt/ddm)
SET(DDM_DESKTOP_DIR     ${CMAKE_INSTALL_PREFIX}/${DDM_DATA_SUBDIR}/applications/)
SET(DDM_PIXMAPS_DIR     ${CMAKE_INSTALL_PREFIX}/${DDM_DATA_SUBDIR}/pixmaps/)

INSTALL (FILES share/ddm.desktop DESTINATION ${DDM_DESKTOP_DIR})
INSTALL (FILES share/ddm.xml DESTINATION ${DDM_DESKTOP_DIR})

# Copy the ddm pixmap
INSTALL (FILES share/ddm.png DESTINATION ${DDM_PIXMAPS_DIR})

# try to set up the menu system
find_program(XDG-MIME_EXECUTABLE xdg-mime)
find_program(XDG-DESKTOP-MENU_EXECUTABLE xdg-desktop-menu)

INSTALL(CODE "
  execute_process(COMMAND ${XDG-MIME_EXECUTABLE} install --novendor ${DDM_DESKTOP_DIR}/ddm.xml)
  execute_process(COMMAND ${XDG-DESKTOP-MENU_EXECUTABLE} install --novendor ${DDM_DESKTOP_DIR}/ddm.desktop)
  execute_process(COMMAND ${XDG-MIME_EXECUTABLE} default ${DDM_DESKTOP_DIR}/ddm.desktop application/x-ddm-item)
  "
)
# Debian packages
INCLUDE (${CMAKE_MODULE_PATH}/DpkgBuild.cmake)
IF(DPKG_FOUND AND NOT WIN32)
    SET(CPACK_GENERATOR "DEB")
    SET(CPACK_DEBIAN_PACKAGE_NAME ${CPACK_PACKAGE_NAME})
    SET(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
    SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
    SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_VENDOR} <${CPACK_PACKAGE_CONTACT}>")
    SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
    SET(CPACK_DEBIAN_PACKAGE_DEBUG ON)
    SET(CPACK_DEBIAN_PACKAGE_DEPENDS ${PACKAGE_REQUIRES})
    SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-gui ( >= 4.6 ), libqt4-xml ( >= 4.6 ), libqt4-sql-mysql, libmysqlclient18, libqt4-dbus, libqt4-network, libqt4-sql, libqt4-sql-mysql, libqt4-xml, libqtcore4, libqtgui4, libqtwebkit4") # Specify dependencies here
    SET(CPACK_SET_DESTDIR TRUE)
ENDIF(DPKG_FOUND AND NOT WIN32)

SET(CPACK_PACKAGE_EXECUTABLES "ddm" "DDM")
INCLUDE(CPack)

The ddm.desktop looks like:

[Desktop Entry]
Version=0.1
Name=Database Deployment Manager
Comment=Database Deployment manager
Exec=/opt/ddm/bin/ddm %U
Icon=ddm
Terminal=false
Type=Application
Categories=Qt;Development
MimeType=application/x-ddm-item;
GenericName=Database Deployment Manager

And the ddm.xml looks like:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
 <mime-type type="application/x-ddm-item">
    <sub-class-of type="text/xml"/>
    <sub-class-of type="application/xml"/>
    <comment>Database Deployment Manager solution file</comment>
    <icon>ddm</icon>
    <glob pattern=".dmx" weight="50" />
    <magic priority="90">
          <match type="string" offset="2" value="!DOCTYPE DBM"/>
    </magic>
    <root-XML localName="ddm" />
  </mime-type>
 </mime-info>

what happens now is that when I run the sudo make install the application installs itself in the menu (But without an icon) but when I run the dpk -i package.deb the application installs itself but does not create any kde menu entry…

Any idea what am I doing wrongly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:28:13+00:00Added an answer on June 17, 2026 at 4:28 pm

    Problem solved: KDE is looking for icons and .desktop files at the following locations.

    SET(DDM_DESKTOP_DIR     "/usr/share/applications/")
    SET(DDM_PIXMAPS_DIR     "/usr/share/icons/")
    

    This did solve the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a Debain .deb package. Package is being created successfully
I am trying to create an MSI package that uses the AppCmd application to
I am trying to create a package in R wherein I have created lots
I'm trying to create an install package for a Python project with included unit
I'm trying to create my first NuGet package. I don't know why my install.ps1
I am trying to create an install for a windows service package. I had
I am trying to create a rpm package for a library I wrote in
I am trying to create an installer using Package Maker, which installs a plugin
I'm trying to create an RPM in Fedora 15 that will install my software,
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.