1313#
1414module Create_Modia3D_sysimage
1515
16- path = dirname (@__FILE__ )
17- file = joinpath (path, " create_Modia3D_sysimage.jl" )
18- precompile_file = joinpath (path, " create_Modia3D_sysimage_precompile_statements_file.jl" )
16+ path = dirname (@__FILE__ )
17+ file = joinpath (path, " create_Modia3D_sysimage.jl" )
1918Modia3D_sysimage_path = joinpath (pwd (), Sys. iswindows () ? " Modia3D_sysimage.dll" : " Modia3D_sysimage.so" )
2019
2120import Pkg
2221project = Pkg. project ()
2322projectPath = project. path
2423availablePackages = keys (project. dependencies)
2524addPackages = setdiff! ([" Modia" , " Modia3D" , " ModiaPlot_PyPlot" , " PackageCompiler" , " Revise" ], availablePackages)
26- println (" !!! Creating sysimage for Modia3D from $file " )
25+ println (" !!! Creating sysimage for Modia3D (executing: $file ) " )
2726println (" !!! This will include all packages from project $projectPath " )
2827if length (addPackages) > 0
2928 println (" !!! Additionally, it will include the following packages" )
@@ -32,18 +31,11 @@ if length(addPackages) > 0
3231 Pkg. add (addPackages)
3332end
3433
35- #= Seem to make startup slower
36- println("!!! Define additional artefacts for precompilation ...")
37- using Modia3D
38- usePlotPackage("PyPlot")
39- @usingModiaPlot
40- include("$path/test/Basic/ModelsForPrecompilation.jl")
41- =#
42-
4334# Create sysimage
4435using PackageCompiler
4536create_sysimage (sysimage_path = Modia3D_sysimage_path,
46- precompile_statements_file = precompile_file)
37+ precompile_statements_file = joinpath (path, " create_Modia3D_sysimage_precompile_statements_file.jl" ))
38+ # precompile_execution_file = joinpath(path, "create_Modia3D_sysimage_precompile_execution_file.jl"))
4739
4840println (" !!! Modia3D sysimage created. Use sysimage by starting julia with:" )
4941println (" julia -J$Modia3D_sysimage_path " )
0 commit comments