Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [RESOLVED] INSTALLS add "strip" command to makefile
Forum Updated to NodeBB v4.3 + New Features

[RESOLVED] INSTALLS add "strip" command to makefile

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 2 Posters 4.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    t_visualappeal
    wrote on last edited by
    #1

    My pro file looks like this:

    @OTHER_FILES +=
    .gitignore
    README.md
    qt.conf
    start.sh

    qtconf.files = $${PWD}/qt.conf
    qtconf.path = $${OUT_PWD}/

    start.files = $${PWD}/start.sh
    start.path = $${OUT_PWD}/

    INSTALLS += qtconf start
    @

    and it adds two targets to my makefile:

    @install_qtconf: first FORCE
    @test -d $(INSTALL_ROOT)/home/tim/Programmieren/quptime/build-quptime-Desktop-Release/ || mkdir -p $(INSTALL_ROOT)/home/tim/Programmieren/quptime/build-quptime-Desktop-Release/
    -$(INSTALL_FILE) /home/tim/Programmieren/quptime/quptime/qt.conf $(INSTALL_ROOT)/home/tim/Programmieren/quptime/build-quptime-Desktop-Release/

    uninstall_qtconf: FORCE
    -$(DEL_FILE) -r $(INSTALL_ROOT)/home/tim/Programmieren/quptime/build-quptime-Desktop-Release/qt.conf
    -$(DEL_DIR) $(INSTALL_ROOT)/home/tim/Programmieren/quptime/build-quptime-Desktop-Release/

    install_start: first FORCE
    @test -d $(INSTALL_ROOT)/home/tim/Programmieren/quptime/build-quptime-Desktop-Release/ || mkdir -p $(INSTALL_ROOT)/home/tim/Programmieren/quptime/build-quptime-Desktop-Release/
    -$(INSTALL_PROGRAM) /home/tim/Programmieren/quptime/quptime/start.sh $(INSTALL_ROOT)/home/tim/Programmieren/quptime/build-quptime-Desktop-Release/
    -strip $(INSTALL_ROOT)/home/tim/Programmieren/quptime/build-quptime-Desktop-Release/start.sh

    uninstall_start: FORCE
    -$(DEL_FILE) -r $(INSTALL_ROOT)/home/tim/Programmieren/quptime/build-quptime-Desktop-Release/start.sh
    -$(DEL_DIR) $(INSTALL_ROOT)/home/tim/Programmieren/quptime/build-quptime-Desktop-Release/@

    My problem is the "strip" command at the end of the "install_start" target. "start.sh" is a shell script to start the application but the "strip" commands produces an error because the fileformat is unknown. How can I remove "strip"? When I change the permissions of "start.sh" to be not executable "strip" is not added but the file should be executable.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      I could find how to disable to call a strip on an executable file.
      But here is a possible workaround

      Make start.sh non-executable and add an ".extra" item to your start object.
      According "qmake doc on Installing Files":http://qt-project.org/doc/qt-5/qmake-advanced-usage.html#installing-files
      it should execute extra commands on your target.
      @
      ...
      start.files = $${PWD}/start.sh
      start.path = $${OUT_PWD}/
      unix:start.extra = chmod 755 start.sh
      ...
      @

      1 Reply Last reply
      0
      • T Offline
        T Offline
        t_visualappeal
        wrote on last edited by
        #3

        Yeah, that should work. Thank you!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved