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

@@ -1,6 +1,7 @@
local InputContainer = require("ui/widget/container/inputcontainer")
local DictQuickLookup = require("ui/widget/dictquicklookup")
local InfoMessage = require("ui/widget/infomessage")
local DataStorage = require("datastorage")
local UIManager = require("ui/uimanager")
local Screen = require("device").screen
local Device = require("device")
@@ -15,11 +16,8 @@ local ReaderDictionary = InputContainer:new{
function ReaderDictionary:init()
self.ui.menu:registerToMainMenu(self)
if Device:isAndroid() then
self.data_dir = "/sdcard/koreader/data/dict"
else
self.data_dir = os.getenv("STARDICT_DATA_DIR") or "data/dict"
end
self.data_dir = os.getenv("STARDICT_DATA_DIR") or
DataStorage:getDataDir() .. "/data/dict"
end
function ReaderDictionary:addToMainMenu(tab_item_table)