mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Show the program version in the Help header.
1. On startup read the file git-rev if exists and initialize a new global G_program_version. 2. In filechooser's help page's header show the version. This helps to easily identify what version the user is running without asking him to cat git-rev file manually.
This commit is contained in:
@@ -99,6 +99,15 @@ if optarg["G"] ~= nil then
|
||||
globalgamma = optarg["G"]
|
||||
end
|
||||
|
||||
local vfile = io.open("git-rev", "r")
|
||||
if vfile then
|
||||
G_program_version = vfile:read("*a") or "?"
|
||||
G_program_version = G_program_version:gsub("[\n\r]+", "")
|
||||
vfile.close()
|
||||
else
|
||||
G_program_version = "(unknown version)"
|
||||
end
|
||||
|
||||
if util.isEmulated()==1 then
|
||||
input.open("")
|
||||
-- SDL key codes
|
||||
|
||||
Reference in New Issue
Block a user