cleaned the repository from dead code, simplified some functions, users can now create a system image of the JuliaMSI repo that runs the core dependencies faster without compiler time, alongside a docker environment for running scripts, the instructions are on the readme

This commit is contained in:
Pixelguy14
2026-04-09 13:46:30 -06:00
parent 8c37ea64aa
commit 05cb79253f
15 changed files with 281 additions and 828 deletions
+27 -13
View File
@@ -1,27 +1,35 @@
# build_sysimage.jl
using PackageCompiler
headless = "--headless" in ARGS
println("--- Starting Custom System Image Build ---")
println("This process can take 5-10 minutes.")
println("Mode: ", headless ? "Headless (Scripting/Docker)" : "Full GUI (Genie App)")
println("This process can take 5-15 minutes.")
# Define the image path with OS-specific extension
ext = Sys.iswindows() ? ".dll" : Sys.isapple() ? ".dylib" : ".so"
sysimage_path = "MSI_sysimage" * ext
sysimage_name = headless ? "sys_msi_headless" * ext : "sys_msi_gui" * ext
sysimage_path = joinpath(@__DIR__, sysimage_name)
# List dependencies to include in the sysimage for maximum stability
# We have removed graphical heavy-lifters (CairoMakie, PlotlyBase) to ensure
# the build completes successfully on systems with standard RAM.
packages_to_include = [
:Genie,
:GenieFramework,
:PlotlyBase,
:Libz,
packages_to_include = Symbol[
:MSI_src, # <--- Bake our core library
:DataFrames,
:SparseArrays,
:Mmap,
:Libz,
:Serialization,
:Printf,
:JSON
]
if !headless
append!(packages_to_include, [
:Genie,
:GenieFramework,
:PlotlyBase
])
end
create_sysimage(
packages_to_include,
sysimage_path = sysimage_path,
@@ -31,5 +39,11 @@ create_sysimage(
)
println("--- System Image Build Successful! ---")
println("To start Julia with this image, use:")
println("julia --threads auto --project=. --sysimage $(sysimage_path) start_MSI_GUI.jl")
println("Created: $(sysimage_path)")
if headless
println("To use in a headles script:")
println("julia --threads auto --project=. --sysimage $(sysimage_name) my_script.jl")
else
println("To start Julia with the GUI image, use:")
println("julia --threads auto --project=. --sysimage $(sysimage_name) start_MSI_GUI.jl")
end