probonopd / linuxdeployqt

Makes Linux applications self-contained by copying in the libraries and plugins that the application uses, and optionally generates an AppImage. Can be used for Qt and other applications
Other
2.22k stars 414 forks source link

why not allow a file such as `env.sh` to custom the `env`? #580

Closed yanhuacuo closed 1 year ago

yanhuacuo commented 1 year ago

why not allow a file such as env.sh to custom the env

I need set a env export QT_QPA_PLATFORM=xcb for wayland user

When I test this:

https://github.com/probonopd/linuxdeployqt/wiki/Custom-wrapper-script-instead-of-AppRun

it doesnot work : execv error: Permission denied

this is my AppRun file

#!/bin/bash
HERE="$(dirname "$(readlink -f "${0}")")"
export QT_QPA_PLATFORM=xcb
cd "${HERE}/usr/bin
exec ./newReader "$@"
probonopd commented 1 year ago

Which system has anything else but QT_QPA_PLATFORM=xcb set?

yanhuacuo commented 1 year ago
  • Did you make the AppRun and usr/bin/newReader executable?
  • You should not need to cd, just exec "${HERE}"/usr/bin/newReader

Which system has anything else but QT_QPA_PLATFORM=xcb set?

ubuntu22.04-lts use wayland default,for some reason : https://forum.qt.io/topic/142827/what-can-i-do-for-my-qtwidget-program-s-window-correctly-positioned-on-the-screen/37?_=1689556962349

i have to give a 「xcb」env to my app,

i have a tast as you say, but it doesnot work.

without「xcb」,Qt-App cannot move the window to the right way in wayland

probonopd commented 1 year ago

Argh. Wayland breaks so many things...

probonopd commented 1 year ago

Can you provide a link to your AppImage so that I can help? Thanks.

yanhuacuo commented 1 year ago

https://drive.google.com/file/d/19eyJ14V9ZtjxM6z-3_FMsjNoN9MZLyuW/view?usp=drive_link

yanhuacuo commented 1 year ago

Wayland in KDE Plasma 5.27.5,does not need 「xcb」 any more,everything is ok.

while,Wayland in Gnome,need 「xcb」 .