[Solved] How to install application with other files



  • Hello.
    I trying to create Makefile file with qmake application.

    But application file isn't written in Makefile. Project variable with name appFile has no effect.
    How can I to install application file.

    This is part of my project file.

        appFile.path = "$$INST_BINDIR/$$TARGET"
        docFiles.path = "$$INST_SHAREDIR/doc"
        docFiles.files = $$getShareFiles("doc")
        iconFiles.path = "$$INST_SHAREDIR/icons"
        iconFiles.files = $$getShareFiles("icons")
        manFiles.path = "$$INST_SYSSHAREDIR/man/man1"
        manFiles.files = $$getShareFiles("man")
        menuitemFiles.path = "$$INST_SYSSHAREDIR/applications"
        menuitemFiles.files = $$getShareFiles("menuitem")
        servicemenuFiles.path = "$$INST_SYSSHAREDIR/kde4/services/ServiceMenus"
        servicemenuFiles.files = $$getShareFiles("servicemenu")
        INSTALLS += appFile docFiles iconFiles manFiles menuitemFiles servicemenuFiles
    

    There is part of Makefile file:

    ####### Install
    
    install_docFiles: first FORCE
            @test -d $(INSTALL_ROOT)/opt/tvclipper/doc || mkdir -p $(INSTALL_ROOT)/opt/tvclipper/doc
            -$(INSTALL_FILE) /home/lukas/programy/dvbcut/tvclipper/tvclipper/share/doc/tvclipper_en.html $(INSTALL_ROOT)/opt/tvclipper/doc/
            -$(INSTALL_FILE) /home/lukas/programy/dvbcut/tvclipper/tvclipper/share/doc/COPYING $(INSTALL_ROOT)/opt/tvclipper/doc/
            -$(INSTALL_FILE) /home/lukas/programy/dvbcut/tvclipper/tvclipper/share/doc/CREDITS $(INSTALL_ROOT)/opt/tvclipper/doc/
    
    uninstall_docFiles: FORCE
            -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/tvclipper/doc/CREDITS
            -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/tvclipper/doc/COPYING
            -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/tvclipper/doc/tvclipper_en.html
            -$(DEL_DIR) $(INSTALL_ROOT)/opt/tvclipper/doc/ 
    
    
    install_iconFiles: first FORCE
            @test -d $(INSTALL_ROOT)/opt/tvclipper/icons || mkdir -p $(INSTALL_ROOT)/opt/tvclipper/icons
            -$(INSTALL_FILE) /home/lukas/programy/dvbcut/tvclipper/tvclipper/share/icons/bookmark.svgz $(INSTALL_ROOT)/opt/tvclipper/icons/
            -$(INSTALL_FILE) /home/lukas/programy/dvbcut/tvclipper/tvclipper/share/icons/chapter.svgz $(INSTALL_ROOT)/opt/tvclipper/icons/
            -$(INSTALL_FILE) /home/lukas/programy/dvbcut/tvclipper/tvclipper/share/icons/play.svgz $(INSTALL_ROOT)/opt/tvclipper/icons/
            -$(INSTALL_FILE) /home/lukas/programy/dvbcut/tvclipper/tvclipper/share/icons/stop.svgz $(INSTALL_ROOT)/opt/tvclipper/icons/
            -$(INSTALL_FILE) /home/lukas/programy/dvbcut/tvclipper/tvclipper/share/icons/bookmark.png $(INSTALL_ROOT)/opt/tvclipper/icons/
            -$(INSTALL_FILE) /home/lukas/programy/dvbcut/tvclipper/tvclipper/share/icons/chapter.png $(INSTALL_ROOT)/opt/tvclipper/icons/
            -$(INSTALL_FILE) /home/lukas/programy/dvbcut/tvclipper/tvclipper/share/icons/play.png $(INSTALL_ROOT)/opt/tvclipper/icons/
            -$(INSTALL_FILE) /home/lukas/programy/dvbcut/tvclipper/tvclipper/share/icons/stop.png $(INSTALL_ROOT)/opt/tvclipper/icons/
            -$(INSTALL_FILE) /home/lukas/programy/dvbcut/tvclipper/tvclipper/share/icons/tvclipper.svg $(INSTALL_ROOT)/opt/tvclipper/icons/
    
    uninstall_iconFiles: FORCE
            -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/tvclipper/icons/tvclipper.svg
            -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/tvclipper/icons/stop.png
            -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/tvclipper/icons/play.png
            -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/tvclipper/icons/chapter.png
            -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/tvclipper/icons/bookmark.png
            -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/tvclipper/icons/stop.svgz
            -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/tvclipper/icons/play.svgz
            -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/tvclipper/icons/chapter.svgz
            -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/tvclipper/icons/bookmark.svgz
            -$(DEL_DIR) $(INSTALL_ROOT)/opt/tvclipper/icons/ 
    
    
    install_manFiles: first FORCE
            @test -d $(INSTALL_ROOT)/usr/share/man/man1 || mkdir -p $(INSTALL_ROOT)/usr/share/man/man1
            -$(INSTALL_FILE) /home/lukas/programy/dvbcut/tvclipper/tvclipper/share/man/tvclipper.1 $(INSTALL_ROOT)/usr/share/man/man1/
    
    uninstall_manFiles: FORCE
            -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/man/man1/tvclipper.1
            -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/man/man1/ 
    
    
    install_menuitemFiles: first FORCE
            @test -d $(INSTALL_ROOT)/usr/share/applications || mkdir -p $(INSTALL_ROOT)/usr/share/applications
            -$(INSTALL_FILE) /home/lukas/programy/dvbcut/tvclipper/tvclipper/share/menuitem/tvclipper.desktop $(INSTALL_ROOT)/usr/share/applications/
    
    uninstall_menuitemFiles: FORCE
            -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/applications/tvclipper.desktop
            -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/applications/ 
    
    
    install_servicemenuFiles: first FORCE
            @test -d $(INSTALL_ROOT)/usr/share/kde4/services/ServiceMenus || mkdir -p $(INSTALL_ROOT)/usr/share/kde4/services/ServiceMenus
            -$(INSTALL_FILE) /home/lukas/programy/dvbcut/tvclipper/tvclipper/share/servicemenu/tvclipper-servicemenu.desktop $(INSTALL_ROOT)/usr/share/kde4/services/ServiceMenus/
    
    uninstall_servicemenuFiles: FORCE
            -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/kde4/services/ServiceMenus/tvclipper-servicemenu.desktop
            -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/kde4/services/ServiceMenus/ 
    
    
    install:  install_docFiles install_iconFiles install_manFiles install_menuitemFiles install_servicemenuFiles  FORCE
    
    uninstall: uninstall_docFiles uninstall_iconFiles uninstall_manFiles uninstall_menuitemFiles uninstall_servicemenuFiles   FORCE
    
    FORCE:

  • Lifetime Qt Champion

    Hi,

    Replace "appFile" by "target" and you should be good to go



  • @SGaist
    Hi,
    thanks, it works.



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.