Creating an AppImage distribution...how can I find the "Extra Files" path at runtime?

Post

Posted
Rating:
#1 (In Topic #1258)
Trainee
 I'm playing around with the creating an AppImage using the Make Installation Package distribution in 3.19.2, and I've got to say…it's really nice and obviously has taken some hard work. The AppImage it creates seems to work fine, but once it is executed as an AppImage, I can't figure out how to find the path of files that were added in the "Extra Files" step. For example, if I include a file named "bg.jpg" and tell it to use "images/" as the folder, I can see that "bg.jpg" is indeed copied to "/home/username/.var/tmp/AppImage/AppDir/images/bg.jpg" when the AppImage is launched, but when the application launches, in Form_Show, it sees "Application.Dir" as whatever location the .AppImage file is launched from, and I can't figure out how to find that AppDir path at runtime to get access to the "extra file" that I included. Does this question make sense? I have a feeling that there is a simple way around this that I'm just not seeing.
Online now: No Back to the top

Post

Posted
Rating:
#2
Trainee
Also, I can see that doing this works, but I'm not sure that this is the right way to do it. Will this always be the location that the "Extra File" is copied to, or could it vary in different distributions?

Code

Dim bg As Picture = Picture.FromString(File.Load("~/.var/tmp/AppImage/AppDir/Images/bg.jpg"))
Online now: No Back to the top
1 guest and 0 members have just viewed this.