Setting runtime environment variables in appimage-builder

512 Views Asked by At

I was able to successfully package a small QtQuick app (QT 6.2) using appimage-builder

My only issue was to get it to work I need to manually set the environment variable QML2_IMPORT_PATH=$APPDIR/home/rich/Qt/6.2.3/gcc_64/qml

To do this, I extracted the appimage, added the line above to the .env file, then repacked - and that worked

Is there a way to set this variable via appimage-builder?

1

There are 1 best solutions below

0
On BEST ANSWER

Browsing through the examples at appimage-builder.readthedocs.io, I found the answer to my own question:

AppDir:
  runtime:
    env:
      QML2_IMPORT_PATH: $APPDIR/home/rich/Qt/6.2.3/gcc_64/qml