Creating a standalone app on different platforms

In lack of better answers, I think one alternative is to provide two scripts:

mysoftware_install.jl:

import Pkg
Pkg.activate("MySoftware", shared=true)
Pkg.add("MySoftware")
exit()

and make the user run: julia mysoftware_install.jl

Then, mysoftware.jl with:

import Pkg
Pkg.activate("MySoftware", shared=true)
using MySoftware
main(ARGS.... from command line)

and let the user run it with:

julia mysoftware.jl ARGS...

With good precompilation directives you may do most of the compilation work in the install phase, and using the script will be practical.

(You might be considering deploying a Pluto notebook, depending on the case)

And tell your users to use juliaup to install Julia.

6 Likes