PackageCompiler.jl `create_app` use path of the binary

I made an app using PackageCompiler.create_app and it works really nice.

My app requires a database which is a file, and I would like to use the file in the same folder as the binary…

However when I run


The pwd() becomes the path from which I called MyApp. Is there a way for the app to know where the bin folder is?

1 Like

Did you have a look at the @__DIR__ macro? (Expand to a string with the absolute path to the directory of the file containing the macrocall.)

It prints it where the source code was, not where the resultant binary is.

I see. Maybe just use a relative path, then?

EDIT: Sorry, too early, that’s where the pwd() issue comes in, I get it.