Removed extra macros, used PLATFORM. Also removed MACOS, as it's redundant C code that's already encapsulated within PLATFORM.
This commit is contained in:
parent
e13529444f
commit
713ef787c2
|
@ -5,7 +5,7 @@ keymap.modkeys = {}
|
||||||
keymap.map = {}
|
keymap.map = {}
|
||||||
keymap.reverse_map = {}
|
keymap.reverse_map = {}
|
||||||
|
|
||||||
local macos = rawget(_G, "MACOS")
|
local macos = PLATFORM == "Mac OS X"
|
||||||
|
|
||||||
-- Thanks to mathewmariani, taken from his lite-macos github repository.
|
-- Thanks to mathewmariani, taken from his lite-macos github repository.
|
||||||
local modkeys_os = require("core.modkeys-" .. (macos and "macos" or "generic"))
|
local modkeys_os = require("core.modkeys-" .. (macos and "macos" or "generic"))
|
||||||
|
|
|
@ -20,7 +20,7 @@ package.path = DATADIR .. '/?/init.lua;' .. package.path
|
||||||
package.path = USERDIR .. '/?.lua;' .. package.path
|
package.path = USERDIR .. '/?.lua;' .. package.path
|
||||||
package.path = USERDIR .. '/?/init.lua;' .. package.path
|
package.path = USERDIR .. '/?/init.lua;' .. package.path
|
||||||
|
|
||||||
local dynamic_suffix = MACOS and 'lib' or (WINDOWS and 'dll' or 'so')
|
local dynamic_suffix = PLATFORM == "Mac OS X" and 'lib' or (PLATFORM == "Windows" and 'dll' or 'so')
|
||||||
package.cpath = DATADIR .. '/?.' .. dynamic_suffix .. ";" .. USERDIR .. '/?.' .. dynamic_suffix
|
package.cpath = DATADIR .. '/?.' .. dynamic_suffix .. ";" .. USERDIR .. '/?.' .. dynamic_suffix
|
||||||
package.native_plugins = {}
|
package.native_plugins = {}
|
||||||
package.searchers[3] = function(modname)
|
package.searchers[3] = function(modname)
|
||||||
|
|
|
@ -141,15 +141,10 @@ init_lua:
|
||||||
|
|
||||||
lua_pushboolean(L, true);
|
lua_pushboolean(L, true);
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
lua_setglobal(L, "MACOS");
|
|
||||||
enable_momentum_scroll();
|
enable_momentum_scroll();
|
||||||
#ifdef MACOS_USE_BUNDLE
|
#ifdef MACOS_USE_BUNDLE
|
||||||
set_macos_bundle_resources(L);
|
set_macos_bundle_resources(L);
|
||||||
#endif
|
#endif
|
||||||
#elif _WIN32
|
|
||||||
lua_setglobal(L, "WINDOWS");
|
|
||||||
#else
|
|
||||||
lua_setglobal(L, "LINUX");
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *init_lite_code = \
|
const char *init_lite_code = \
|
||||||
|
|
Loading…
Reference in New Issue