Skip to content

Commit

Permalink
Make DLLs executable during initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
jheinen committed Jun 1, 2023
1 parent 96e7f92 commit 1abd0d5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Mplay.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ const shortcuts = Dict(
GLFW.KEY_LEFT => KEY_LEFT,
GLFW.KEY_RIGHT => KEY_RIGHT )

function __init__()
if Sys.KERNEL == :NT
lib= joinpath(@__DIR__, "lib")
chmod(joinpath(lib, "libglfw.dll"), 0o755)
chmod(joinpath(lib, "libmidi.dll"), 0o755)
end
end

function read_image(path)
f = open(path)
readline(f) # magic number
Expand Down
8 changes: 8 additions & 0 deletions src/tui.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ const intensities = (

include("player.jl")

function __init__()
if Sys.KERNEL == :NT
lib= joinpath(@__DIR__, "lib")
chmod(joinpath(lib, "libconsole.dll"), 0o755)
chmod(joinpath(lib, "libmidi.dll"), 0o755)
end
end

function showlyrics(smf)
if 1 <= smf.line <= length(smf.lyrics)
outtextxy(1, 22, rpad(smf.lyrics[smf.line], 80))
Expand Down

0 comments on commit 1abd0d5

Please sign in to comment.