QT using appimage packaged under ultra-detailed procedures Linux

A packaging tool

1.linuxdeployqt

Download: https://github.com/probonopd/linuxdeployqt/releases

 

2.patchelf

Download: https://nixos.org/releases/patchelf/patchelf-0.9/patchelf-0.9.tar.gz

 

Two configuration linuxdeployqt

 

1. Click on Download linuxdeploy-continuous-x86_64.AppImage

 

linuxdeployqt moved to the / usr / local / bin directory 2. Then follow the code will change the name

 
  1. sudo mv linuxdeployqt-continuous-x86_64.AppImage linuxdeployqt

  2. sudo mv ./linuxdeployqt /usr/local/bin

  3. chmod 777 linuxdeployqt

  4. sudo linuxdelpoyqt --version

  5. linuxdeployqt 4 (commit 988d294), build 481 built on 2018-02-02 15:05:23 UTC

  6.  

 

3. Display version represents a successful installation.

But not to play, but also to install patchelf

 

Three configuration patchelf

1. Download and extract the folder into patchelf extracted folder, run the following command

 
  1. ./configure

  2. make

  3. sudo make install

 

2. Go to the / usr / local / bin directory and execute the ls command appeared about the situation

linuxdeployqt  patchelf

Configuration is successful. But no play.

 

Four Packager

1. just a directory, create a folder named output, my directory is home / linjun / qtworkspace / output

 

2. The file is about to execute a program packed into the output folder, for example, my name is program execution demotest (will only put under QTCreator release mode compilation of an executable file on it)

 

3. Then enter the directory execute the following command

sudo linuxdeployqt demotest -appimage

 

4. At this time will generally encounter such a situation (if not met skip)

qmake: could not exec '/usr/lib/i386-linux-gnu/qt4/bin/qmake': No such file or directory

the reason:

qtchooser default selection path does not point qmake path, qtchooser default path:

/usr/lib/i386-linux-gnu/qt-default/qtchooser/default.conf

Solution:

Excuting an order:

sudo vim /usr/lib/i386-linux-gnu/qt-default/qtchooser/default.conf

Adding qt bin directory is the first line :( I)

/home/linjun/myqt/5.11.0/gcc_64

Save and exit execution:

 
  1. linjun@linjun:~/qtworkspace/output$ qmake -v

  2. QMake version 3.1

  3. Using Qt version 5.11.0 in /home/linjun/myqt/5.11.0/gcc_64/lib

If the version displayed with your QT version is the same, it means success.

5. This time again with step 3 below command generation application

 

Packaging Success!

Published 25 original articles · won praise 4 · views 20000 +

Guess you like

Origin blog.csdn.net/zhou8400/article/details/104544318