[feat] Build AppImage (#3850)

References #1417.
This commit is contained in:
Frans de Jonge
2018-04-08 22:39:52 +02:00
committed by GitHub
parent 0e61eb7a7b
commit ab712f1a29
8 changed files with 115 additions and 6 deletions

View File

@@ -15,8 +15,10 @@ function DataStorage:getDataDir()
elseif os.getenv("UBUNTU_APPLICATION_ISOLATION") then
local app_id = os.getenv("APP_ID")
local package_name = app_id:match("^(.-)_")
-- confinded ubuntu app has write access to this dir
-- confined ubuntu app has write access to this dir
data_dir = string.format("%s/%s", os.getenv("XDG_DATA_HOME"), package_name)
elseif os.getenv("APPIMAGE") then
data_dir = string.format("%s/%s/%s", os.getenv("HOME"), ".config", "koreader")
else
data_dir = "."
end