diff --git a/Makefile b/Makefile index 04be328..5a021e1 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,7 @@ ifeq ($(OS),Windows_NT) - export HOME = %appdata% - # If you're using Windows, change the path to wherever you put LuaComp in. COMMAND = lua53 "./luacomp.lua" - # COMMAND = lua53 "C:/Standalone Programs/luacomp-5.3.lua" + # COMMAND = lua53 "C:/Standalone Programs/luacomp.lua" else COMMAND = luacomp diff --git a/src/cfg/directive_providers.lua b/src/cfg/directive_providers.lua index 33c8726..cc60b3a 100644 --- a/src/cfg/directive_providers.lua +++ b/src/cfg/directive_providers.lua @@ -1,4 +1,7 @@ -local directive_paths = { - "/usr/share/luacomp/directives", - os.getenv("HOME").."/.local/share/luacomp/directives" -} \ No newline at end of file +local directive_paths = {} +if os.getenv("OS") == "Windows_NT" then + -- table.insert(directive_paths, os.getenv("appdata") .. "/luacomp/directives") +else + table.insert(directive_paths, "/usr/share/luacomp/directives") + table.insert(directive_paths, os.getenv("HOME") .. "/.local/share/luacomp/directives") +end \ No newline at end of file diff --git a/src/cfg/minifier_providers.lua b/src/cfg/minifier_providers.lua index 4278281..5777c4b 100644 --- a/src/cfg/minifier_providers.lua +++ b/src/cfg/minifier_providers.lua @@ -16,10 +16,13 @@ limitations under the License. ]] -local postproc_paths = { - "/usr/share/luacomp/postproc", - os.getenv("HOME").."/.local/share/luacomp/postproc" -} +local postproc_paths = {} +if os.getenv("OS") == "Windows_NT" then + -- table.insert(postproc_paths, os.getenv("appdata") .. "/luacomp/postproc") +else + table.insert(postproc_paths, "/usr/share/luacomp/postproc") + table.insert(postproc_paths, os.getenv("HOME") .. "/.local/share/luacomp/postproc") +end local providers = {}