I want to build a snap. And i have a folder with all my files and 2 exeutables which i want to pack into the snap, therefoe i use the plugin “dump”, like:
so far so good.
My folder contains 2 Executables. The first Executable (AppEngine) is executed by the snap command, like:
so far so good , too.
So, the problem: The First executable calls another Executabe (the second one), but this fails , beecause, the second executable is search in:
/var/snap/myApp/
but the second Executable is located (which are from the dump plugin) in
/snap/myApp
So it seem, that snap runs my first Exectuable form /var/snap/myApp not /snap/myApp ? is that right!?
if this the case, how can i tell Snap that the second exectuable must be copies into the /var/snap/myApp folder!?
In your code, how is your first executable referring to the second one?
By simply browsing your file system, can you check if your first executable is located in your /var/snap/myApp and the second one in /snap/myApp?
Also to make sure where you are placing your files (your two binaries in your case), you could use the organize keyword in your part (see the dump plugin page)
if i run my ab wihtout snap from this location… it works… because the “AppEngine” call the “AppEngine.LibLauncher” because it is in the same folder…
but when ich pack /dump this folder into a snap… all this file are in “/snap/AppEngine/current” right? And my question is, what is happening in the “/var/snap/Appengine/current” folder!? Why does AppEngine search the AppEngine.Liblauncher there?
../install/ points to the same directory as the env var $SNAPCRAFT_PART_INSTALL. It is only used during the snap creation.
Everything that is put inside that path, ends up in the root directory of the builded snap.
Once the snap is installed, its content lives under /snap/myapp/current/ - exactly as you expected!
which is why you should not use the relative path but the env var … (a future snapcraft version might call that dir “output” or whatever ideas the devs have) no matter how the dir is called the var will point to the correct place: