Implementing main entry point and adding bundling with AppBundler #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I looked into ImageColorThresholderApp as an example for bundling Makie based aplications with AppBundler to find out any missing bugs. Initially the application did not have a main entry point, but adding it was relativellly straightforward. I used NativeFileDialog at the initial launch, enabling the user to select their image file for loading. UX could be enhanced, but for now, demonstrating that it can be done is more useful.
To run the build locally, run
Alternatively, it can be run in the Action tab with
Build Release Assets. The build Release Assets should run automatically once a new version is tagged, which will upload assets to the corresponding release. I don't know how it would interact with TagBot, and hence it may necessitate triggering the action manually.I had not previously attempted to bundle the Makie application. I encountered a minor issue with
SignedDistanceFields, which uses the outdated REQUIRES format, but this has now been resolved. Another issue came from precompilation of GLMakie on a headless server for MacOS and Windows which for now I have resolved with patchingGLMakie/src/precompiles.jlfile by commenting out@compile_workloadpart. In future one can add individual precompilation statements there so OpenGL would not need to be used in compilation step.The build is quite large. Makie is a significant dependency, and there are a total of 300 dependencies. For macOS, it creates an installer of about 500 MB, which is excessively large. Future plans include integrating PackageCompiler, which might help reduce the size.
I have tested the installers for all operating systems. On MacOS It takes only about 5 seconds to launch. The Snap is also functional. On Windows though I found out that GLMakie does not actually work on my computer, for which, I opened the issue MakieOrg/Makie.jl#5342
There is some interference during testing, especially with Aqua, that needs to be resolved. It appears that it attempts to run the
ImageColorThresholderApp.mainfunction during tests, which should be skipped. I have also updated the dependencies.