How to create standalone applications for Windows with a [G]UI in Julia 1.11 or 1.12

Thanks for proving my point that the community is helping a lot !

I think it did not exist a few months ago, still is branded as experimental in fact.
I just tried but I get a (roughly translated from my system language) error saying

The installation program could not install package dependencies. Please ask the package developper.

Not sure what this means.

About Mousetrap, the more standard & maintained package is Gtk4, it can be used with Makie for integrated plots (e.g Exploring Depth-Based Raw Photo Processing in Julia | jonathanBieler.github.io). I’m not sure how packageable it is though. IIRC I managed to make a relocatable app with Gkt3.jl but is was very tricky.

1 Like

5 posts were split to a new topic: Challenges with installing Julia on Windows

These were basically my points:

  • new feature for our software should be to classify sensor data with small neuronal nets → we need mature NN libraries, thus either Python or Julia
  • there should be an active community → Python and Julia have, both also have their own conferences
  • we supply scientists → Julia is focused on that, Python is also widely adopted in R&D, but before it is compiled to e.g. C its code runs slow → for rapid prototyping Julia seems to be better
  • we need a UI → both offer to compile its code as library to use it for GUI programming of our choice

In effect, except of the potential faster development, Python and Julia were on a par, so I decided to use Julia.
Except of the last point, I was right. Meanwhile I struggle with a point I did not have in mind - the development policy. I work with Python for 15 years now, despite I never fall in love with it. But I never had regressions that blocked me, for known issues workaround were published. I also cannot remember a case where a regression was known but a new release was issued. For Julia this is not the case. Take the case of PackageCompiler. Since Julia 1.11 one cannot use more than one thread. This reduces the compilation speed a lot. The problem was already reported in October. But since it was not mentioned in release notes, I run into that. Now I know, but it caused me hours to find out and thus of course also unnecessary frustration. Now I see that Julia 1.11.5 was released and despite this ongoing discussion, the issue is still not mentioned in the release notes and a new release was made despite there is a known regression. However, for this issue I already created a separate discussion thread.

Section manually split into dedicated topic on Windows installer

Regarding this meaning of user space, doesn’t Users/Public count? Software going there or especially C:/Program Files doesn’t sound out of the question. I’m ignorant of the exact drawbacks and when it matters more, though, is it about security? I recall similar discussions about installing CPython on Windows.

Not sure if you’re implying this exactly, but PackageCompiler issues wouldn’t and shouldn’t be mentioned in the release notes of its dependencies, including base Julia. Independent developments are responsible for public communication in their own release notes or probably somewhere more immediate for a regression caused by a dependency instead of their own release. We don’t want a world where updating 1 package of interest demands re-reading something for each and every dependency.

You have two problems, a) “standalone applications”, covered in many ways in Julia (more smooth to compile in some other languages, though you got it working, but consider NOT compiling, just make easily distributable/usable), and b) “how to create .. a UI”. The latter is a much harder choice, in any language, you CAN do it in Julia only, but also consider doing it in another language, and Julia for computation/access to sensor, and even web-based/no-code in general [in Julia], e.g. with Genie (see below).

You don’t actually need to provide a program (in many cases, i.e. only do a web-based UI, very possible with Julia), you also CAN just provide the script, or rather have it packaged in one executable file, just working, without the user knowing how (without needing Julia preinstalled, e.g. with AppBundler.jl; with WebAssembly also possible, but it’s seemingly not easy yet).

From the interesting blog already quoted (I’m hoping Mousetrap.jl is actually better than GTK it builds on, as claimed; Qt also claimed bad to use directly, from C++; maybe not from Julia?):

In retrospect, those books were nothing compared to today’s tech overload. On the desktop, Motif has been passĂ© forever, so you better moved to Qt or GTK. And suffered through not just their inherent terribleness, but also all the upgrade cycles and framework updates that broke your code.
..
And let’s also consider for a moment the web application, that mythical beast which is such a royal pain to deal with, yet is somehow still hailed as transcending the problems of the “traditional” desktop GUI. Well, it transcends and replaces those with other problems that can only be fixed in the next version of the framework, or if that fails, the next completely new framework. If it hurts, 
 Or just live with it (everything is broken anyway).

You have a LOT of options for UIs with Julia (I added the [G] to the title, I believe you meant traditional desktop/Windows GUI, there are also non-traditional web-based “GUIs” likely not capable of accessing your sensor from browser sandbox; and text-based TUIs, also available with Julia), see Janis’ answer: How to create standalone applications for Windows with a [G]UI in Julia 1.11 or 1.12 - #37 by Janis_Erdmanis

I’m very impressed by some of the options such as (I think relevant to you):

Real-time adaptive optics control with a high level programming language

https://arxiv.org/pdf/2407.07207

This duplication of effort adds costs and slows the experimentation process. We present instead a technical demonstration of performing real time, sub-millisecond latency control with an adaptive optics system using the high-level Julia programming language. This open-source software demonstrates support for multiple cameras, pixel streaming, and network-transparency distributed computing. Furthermore, it is easy to interface it with other programming languages as desired
..
We developed this RTC framework for the SPIDERS instrument, an upcoming high contrast imaging instrument that implements focal plane wavefront sensing, [..] The software is available at the following URL: New-Earth-Lab · GitHub.
..
2.5 Graphical User Interface
We developed a graphical user interface (GUI) to let the user interact and monitor the system. We developed the GUI using the immediate-mode GUI library, Dear ImGui. Dear ImGui is very convenient for making custom interfaces that render at 60 frame/s and 4k resolution using a GPU. As a downside for this convenience, Dear ImGui does not resemble a native OS application nor does it provide affordances for accessibility. We feel that this is acceptable since the RTC software can be controlled via a text-based command line interface, for scripted or interactive use. Screenshots of the GUI are presented in Figures 3 and 4.

Genie is an open source framework with all you need to quickly build production-ready, data-centric web apps with Julia.

  • Drag & drop, no-code UI builder
    Build rich UIs in minutes choosing from 70+ web UI components & plots.
  • Backend app logic in low-code Julia
    Import your Julia code and define your app logic with simple macros.

Note, Genie/Stipple is free/open source, while GenieBuilder, the add-on, has:

Free and Paid Plans

Genie Builder offers a generous free “Lite” tier for hobbyists and non-commercial users with a comprehensive list of components and plots suitable for building most dashboard applications. For commercial use and access to advanced features —such as the theme editor, a broader range of web UI components, and the AI assistant—we offer Pro and Enterprise licenses. Check out our pricing plans for more info. Free EDU licenses are available upon request.

All new signups get a 30-day free trial of the Pro license,

Since it’s proprietary, you do get the company support you want
 from them.

I believe you’ve found out by now, and the unfortunate bug/workaround. So please make a PR to its docs, if it can be clarified.

Also FYI, since you mentioned wiki, there is an Julia wiki[book], so please consider adding to it (it’s I guess an official wikibook.org, but unoffical to the Julialang project), it could/should also mention PackageCompiler.jl AND AppBundler.jl, and I think maybe the latter might be a better option, at least for you:

Does anyone know of any other wiki or unofficial resource? Note there is, JuliaLang/julia · Discussions · GitHub in case it applies, no similar for juliaup, I guess discussions relating to it might be ok there, since it’s official. And possibly ok for discussions on PackageCompiler.jl to despite it not official, or maybe semi-official.

Note, not helpful other “wiki”:

2 Likes

After a lot of work, found a solution and created a complete repository, with step by step instructions, a Wiki and an example for the Lazarus UI.

See this new discussion thread for more about this.

I mark this thread as resolved.

5 Likes