From 145e4b1c3689fe1b917626e617dcbb783373ab88 Mon Sep 17 00:00:00 2001 From: aptmcl Date: Sun, 9 Sep 2018 22:50:00 +0100 Subject: [PATCH] Allow compilation in other OSs besides Windows. --- src/AutoCAD.jl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/AutoCAD.jl b/src/AutoCAD.jl index 453c5d1..1ae464d 100644 --- a/src/AutoCAD.jl +++ b/src/AutoCAD.jl @@ -27,9 +27,11 @@ local_plugins = joinpath(dirname(dirname(abspath(@__FILE__))), "Plugins", "AutoC local_khepri_plugin = joinpath(local_plugins, bundle_name) local_khepri_plugin_dll_folder = joinpath(local_plugins, bundle_dll_folder) -autocad_general_plugins = joinpath(dirname(joinpath(ENV["CommonProgramFiles"])), "Autodesk", "ApplicationPlugins") -autocad_allusers_plugins = joinpath(ENV["ALLUSERSPROFILE"], "Autodesk", "ApplicationPlugins") -autocad_user_plugins = joinpath(ENV["APPDATA"], "Autodesk", "ApplicationPlugins") +env(name) = Sys.iswindows() ? ENV[name] : "" + +autocad_general_plugins = joinpath(dirname(env("CommonProgramFiles")), "Autodesk", "ApplicationPlugins") +autocad_allusers_plugins = joinpath(env("ALLUSERSPROFILE"), "Autodesk", "ApplicationPlugins") +autocad_user_plugins = joinpath(env("APPDATA"), "Autodesk", "ApplicationPlugins") autocad_khepri_plugin = joinpath(autocad_user_plugins, bundle_name) autocad_khepri_plugin_dll_folder = joinpath(autocad_user_plugins, bundle_dll_folder)