Sharing project with computers that don't have Julia installed

I’m wondering what methods or packages exist to share a Julia project to other computers that don’t have Julia installed. The Julia code would be part of a commercial program, and we don’t want to require nontechnical end users to be responsible for installing the correct Julia packages and versions. I’ve looked into PackageCompiler to make DLLs and EXEs, but have found it to be somewhat unreliable (meaning I follow the documentation and examples but still encounter build errors on a clean installation).

So I have two main questions:

  1. Is PackageCompiler considered mature/reliable for production level programs?
  2. Are there other ways to share a Julia program such that end users don’t have to install Julia?

Apologies if this is a repeat topic, but I couldn’t find it anywhere on discourse. Thanks in advance for the help!

2 Likes

On which operation system shall you project be installed?

You could have a look at GitHub - PeaceFounder/AppBundler.jl: Bundle your Julia application .

Creating an installer that works on all kind of different systems is always a challenge.

2 Likes

It will only be on Windows for the foreseeable future.

AppBundler looks interesting. Only the backend of the application would be in Julia, so I don’t necessarily need a GUI. Do you know if AppBundler allows you to make apps without a GUI? Secondly, is it pretty mature/reliable?

Creating apps with Julia is work-in-progress and will improve a lot in the coming year(s). So it is definitely not mature. Try out yourself if it is already mature enough for your use case. And if it isn’t, try again in a year.

Of course you can always ask here if there is a concrete issue/problem to solve.

And without GUI is always easier than with GUI.

This is how I explain to my students how to run a Julia app:

It requires that they install git-for-windows first. I guess that is too much to ask for your users, but it makes deploying updates trivial.

1 Like

Thanks. Seems like it’s just slightly not mature enough for our use case. But I’ll try it out more to confirm. Appreciate the help!

1 Like

Actually installation of Julia itself using juliaup on Windows doesn’t require admin privileges, and you can put everything into a script which doesn’t require any user interaction. Then instantiation (and updates if necessary) can be done by a Julia script. My package GivEmXL.jl is not exactly what you are asking for, still you might it relevant.

Correct Julia packages and versions is the smallest worry. Having nontechnical end users install the correct version of Julia used to be a bit of a challenge but with juliaup your program can handle the Julia versions as well.

That leaves installing juliaup, which in my experience non-technical users can handle. The one complication I’ve seen on Windows is that in a few cases the PATH variable has been missing the path to the Windows Store installed programs, although in fairness that has been more of a problem with technical users.

It is easy to create a reproducible environment of a project. The question then is: how to run the project? Also easy: for instance as shown here: GitHub - PetrKryslUCSD/VSCode_Julia_portable: Portable Julia running in VSCode

1 Like

The AppBundler.jl also works for terminal applications. In such situations, one would do the bundling and skip the finalisation step to form the MSIX archive. There is a precompile.ps1 script within the bundle that creates a precompilation cache and a launcher appname.ps1 that will launch main.jl from a project folder, where one can start the service, or it can be used as a startup file with an added interactive flag in appname.ps1. This is my debug setup for finding containerisation issues; thus, it has been tested but has yet to be documented.

I recently fixed bundling in Windows (previously, I only tested linux2windows and macos2windows build setups) and managed to bundle QML application that has many dependencies and artifacts. To put it simply a rule of thumb when it works is that if you can instantiate your project, you can bundle it with AppBundler.jl.

2 Likes