Skip to content
Snippets Groups Projects
Commit 0a758570 authored by falood's avatar falood
Browse files

bugfix: src_dir not corrent when use file_system as deps

parent a3dee72e
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,14 @@ defmodule FileSystem.Backends.FSMac do ...@@ -30,7 +30,14 @@ defmodule FileSystem.Backends.FSMac do
exec_file = find_executable() exec_file = find_executable()
unless File.exists?(exec_file) do unless File.exists?(exec_file) do
Logger.info "Compiling executable file..." Logger.info "Compiling executable file..."
cmd = "clang -framework CoreFoundation -framework CoreServices -Wno-deprecated-declarations c_src/mac/*.c -o #{exec_file}" src_dir =
case Mix.Project.config[:app] do
:file_system ->
"."
_ ->
Mix.Project.deps_paths[:file_system]
end
cmd = "clang -framework CoreFoundation -framework CoreServices -Wno-deprecated-declarations #{src_dir}/c_src/mac/*.c -o #{exec_file}"
if Mix.shell.cmd(cmd) > 0 do if Mix.shell.cmd(cmd) > 0 do
Logger.error "Compile executable file error, try to run `#{cmd}` manually." Logger.error "Compile executable file error, try to run `#{cmd}` manually."
raise "compile backend error" raise "compile backend error"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment