Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Script to run my app QT
QtWS25 Last Chance

Script to run my app QT

Scheduled Pinned Locked Moved General and Desktop
scriptshell
2 Posts 2 Posters 1.4k Views
  • 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.
  • Lays147L Offline
    Lays147L Offline
    Lays147
    wrote on last edited by
    #1

    Hi again!
    I'm trying write a shell script to run my qt app, because my libraries remains in folders like this img: http://i62.tinypic.com/s426o2.png , where de qt platform is the file libxcb.so.1 and the qtlibs is the rest of the libs.
    But then, i copied the script of the http://doc.qt.io/qt-5/linux-deployment.html#creating-the-application-package .
    ´´´
    #!/bin/sh
    appname=basename $0 | sed s,\.sh$,,

    dirname=dirname $0
    tmp="${dirname#?}"

    if [ "${dirname%$tmp}" != "/" ]; then
    dirname=$PWD/$dirname
    fi
    LD_LIBRARY_PATH=$dirname;
    export LD_LIBRARY_PATH
    $dirname/$appname "$@" ´´´

    What i change to make this script valid for my app? I dont now anything about shell script. Please give me a light. rs

    Lays Rodrigues
    Newby on Qt - Learning always!
    Using QT 5.7
    ArchLinux

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      Hi,

      The script works only if the Qt libraries are in the same directory of the executable.
      Move the .so files from qtlibs to the directory where the script and the executable are.

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      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