Koreader Ubuntu-touch port

Currently only tested on Ubuntu-touch emulator with framework
ubuntu-sdk-14.10 for armhf.
The ubuntu-touch port is binary compatible with the Kobo port
major changes in this PR are:
1. rename the emulator device to sdl device since both the emulator
and the ubuntu-touch target use libsdl to handle input/output.
2. ubuntu-touch app has no write access to the installation dir so
all write-outs should be in a seperate dir definded in `datastorage`.
This commit is contained in:
chrox
2015-10-03 14:18:47 +08:00
parent c44d9fa595
commit a60544b1ad
27 changed files with 233 additions and 48 deletions

View File

@@ -3,6 +3,7 @@ local Document = require("document/document")
local Configurable = require("configurable")
local Blitbuffer = require("ffi/blitbuffer")
local lfs = require("libs/libkoreader-lfs")
local DataStorage = require("datastorage")
local Geom = require("ui/geometry")
local Device = require("device")
local Screen = require("device").screen
@@ -44,7 +45,7 @@ function CreDocument:cacheInit()
if lfs.attributes("./cr3cache", "mode") == "directory" then
os.execute("rm -r ./cr3cache")
end
cre.initCache("./cache/cr3cache", 1024*1024*32)
cre.initCache(DataStorage:getDataDir() .. "/cache/cr3cache", 1024*1024*32)
end
function CreDocument:engineInit()