Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg committed Sep 22, 2022
1 parent 571f79d commit 9ec8539
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions GRPreferences/src/GRPreferences.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module GRPreferences
using Preferences

const os = if Sys.KERNEL == :NT
const os = if Sys.KERNEL === :NT
:Windows
else
Sys.KERNEL
Expand All @@ -16,9 +16,9 @@ module GRPreferences
const libpath = @load_preference("libpath", nothing)

function use_system_binary(grdir; export_prefs = false, force = false)
loadpath = if os :Windows
loadpath = if os === :Windows
joinpath(grdir, "bin")
elseif os :Darwin
elseif os === :Darwin
joinpath(grdir, "lib")
else
joinpath(grdir, "lib")
Expand All @@ -27,7 +27,7 @@ module GRPreferences
set_preferences!(GRPreferences,
"binary" => "system",
"grdir" => grdir,
"gksqt" => joinpath(grdir, "bin", "gksqt" * (os :Windows ? ".exe" : "")),
"gksqt" => joinpath(grdir, "bin", "gksqt" * (os === :Windows ? ".exe" : "")),
"libGR" => joinpath(loadpath, "libGR"),
"libGR3" => joinpath(loadpath, "libGR3"),
"libGRM" => joinpath(loadpath, "libGRM"),
Expand Down
8 changes: 3 additions & 5 deletions src/GR.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@ else
error("Unknown GR binary: $(GRPreferences.binary)")
end

@info GRDIR[]

const libGR_handle = Ref{Ptr{Nothing}}()
const libGR3_handle = Ref{Ptr{Nothing}}()
const libGRM_handle = Ref{Ptr{Nothing}}()

if Sys.KERNEL == :NT
const os = :Windows
const os = if Sys.KERNEL === :NT
:Windows
else
const os = Sys.KERNEL
Sys.KERNEL
end

export
Expand Down

0 comments on commit 9ec8539

Please sign in to comment.