mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
update PATH variable on startup for Windows
This commit is contained in:
12
reader.lua
12
reader.lua
@@ -3,7 +3,17 @@
|
||||
require "defaults"
|
||||
pcall(dofile, "defaults.persistent.lua")
|
||||
package.path = "?.lua;common/?.lua;frontend/?.lua"
|
||||
package.cpath = "?.so;common/?.so;/usr/lib/lua/?.so"
|
||||
package.cpath = "?.so;common/?.so;common/?.dll;/usr/lib/lua/?.so"
|
||||
|
||||
local ffi = require("ffi")
|
||||
if ffi.os == "Windows" then
|
||||
ffi.cdef[[
|
||||
int _putenv(const char *envvar);
|
||||
]]
|
||||
ffi.C._putenv("PATH=libs;common;")
|
||||
--ffi.C._putenv("EMULATE_READER_W=480")
|
||||
--ffi.C._putenv("EMULATE_READER_H=600")
|
||||
end
|
||||
|
||||
local DocSettings = require("docsettings")
|
||||
local _ = require("gettext")
|
||||
|
||||
Reference in New Issue
Block a user