From ee7dfe3c90f1fab424dddc5f1f17a386e432cb4b Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Sun, 27 Oct 2024 17:07:40 +0100 Subject: [PATCH] less precompilation if no GUI attached --- src/KiteViewers.jl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/KiteViewers.jl b/src/KiteViewers.jl index fa7c695..cfde48d 100644 --- a/src/KiteViewers.jl +++ b/src/KiteViewers.jl @@ -32,11 +32,13 @@ end @compile_workload begin # all calls in this block will be precompiled, regardless of whether # they belong to your package or not (on Julia 1.8 and higher) - viewer=Viewer3D(true; precompile=true) segments=se().segments state=demo_state_4p(segments+1) - update_system(viewer, state, kite_scale=0.25) - close(viewer.screen) + if haskey(ENV, "DISPLAY") + viewer=Viewer3D(true; precompile=true) + update_system(viewer, state, kite_scale=0.25) + close(viewer.screen) + end nothing end end