From 7b462273d622580946cd7acc7a0cc258ffadf758 Mon Sep 17 00:00:00 2001 From: Pratyai Mazumder Date: Tue, 11 Jun 2024 06:31:47 +0200 Subject: [PATCH 1/2] make matlab interface gui-less (#222) --- src/engine.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine.jl b/src/engine.jl index 0e83b7c..f0ca5de 100644 --- a/src/engine.jl +++ b/src/engine.jl @@ -5,8 +5,8 @@ # Session open & close # ########################################################### -const default_startflag = "" # no additional flags -const default_matlabcmd = matlab_cmd * " -nosplash" +const default_startflag = "-nodisplay -nosplash -nodesktop" # no additional flags +const default_matlabcmd = matlab_cmd * " -nodisplay -nosplash -nodesktop" # pass matlab flags directly or as a Vector of flags, i.e. "-a" or ["-a", "-b", "-c"] startcmd(flag::AbstractString = default_startflag) = isempty(flag) ? default_matlabcmd : default_matlabcmd * " " * flag startcmd(flags::AbstractVector{<:AbstractString}) = isempty(flags) ? default_matlabcmd : default_matlabcmd * " " * join(flags, " ") From 3bd0547ce784911dc05f86e420b18086122d6f3b Mon Sep 17 00:00:00 2001 From: bolognam Date: Mon, 10 Jun 2024 21:31:57 -0700 Subject: [PATCH 2/2] Add Path workaround for windows (#226) --- src/MATLAB.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/MATLAB.jl b/src/MATLAB.jl index 2af59ac..4dbf2aa 100644 --- a/src/MATLAB.jl +++ b/src/MATLAB.jl @@ -80,7 +80,10 @@ function __init__() if libmx_size > 0 # non-zero size library path # load libraries - + # workaround for https://github.com/JuliaInterop/MATLAB.jl/issues/200 + if Sys.iswindows() + ENV["PATH"] = string(matlab_libpath, ";", ENV["PATH"]) + end libmx[] = Libdl.dlopen(joinpath(matlab_libpath, "libmx"), Libdl.RTLD_GLOBAL) libmat[] = Libdl.dlopen(joinpath(matlab_libpath, "libmat"), Libdl.RTLD_GLOBAL) libeng[] = Libdl.dlopen(joinpath(matlab_libpath, "libeng"), Libdl.RTLD_GLOBAL)