How to add a system envrionment variable in an appimage

There is a snake game I want to package, it use some libraries like libjpeg8 not in my system debian 10. So I package them all.
But it need to run:
at first, so the main execute program can load the libraries.
Anyone know how can I do that in my appimage? Because seems that appimage not support a bash shell for AppRun.
Please help.

The app:

Hi @eclair. You can use your own bash script as AppRun, and export the variable from there. We are doing it all the time.

here is my filelist:
[eclair@debian:DungeonRush_1.0a_amd64]$ ls
AppRun snake
bin snake.desktop snake.png storage.dat res usr

here is my AppRun:
[eclair@debian:DungeonRush_1.0a_amd64]$ cat AppRun
export PATH=%PATH%:.

after appimage created, run it:
[eclair@debian:DungeonRush_1.0a_amd64]$ LANG=en_us ./Snake-x86_64.AppImage
/tmp/.mount_Snake-klf0zz/AppRun: line 4: snake: command not found

I don’t know what’s wrong with it. It seems the shell can not load other executable file in the appimage, is there a grammar to do that?
Please help.

Please see

Thank you very much.
I am just learning make appimage package myself.
The travis CI job log is very useful.
Thanks again.

And I should say the program is not suitable to be a appimage, it’s save file not in user’s home, but in it’s program’s directory which is readonly, will make the appimage report some error.