mirror of
https://github.com/koreader/koreader
synced 2024-10-31 21:20:20 +00:00
Merge pull request #384 from tigran123/show-version
Show the program version in the Help header.
This commit is contained in:
commit
239c3bbcbc
6
Makefile
6
Makefile
@ -109,7 +109,9 @@ POPENNSLIB := $(POPENNSDIR)/libpopen_noshell.a
|
|||||||
|
|
||||||
all: kpdfview
|
all: kpdfview
|
||||||
|
|
||||||
|
VERSION?=$(shell git describe HEAD)
|
||||||
kpdfview: kpdfview.o einkfb.o pdf.o blitbuffer.o drawcontext.o input.o $(POPENNSLIB) util.o ft.o lfs.o mupdfimg.o $(MUPDFLIBS) $(THIRDPARTYLIBS) $(LUALIB) djvu.o $(DJVULIBS) cre.o $(CRENGINELIBS)
|
kpdfview: kpdfview.o einkfb.o pdf.o blitbuffer.o drawcontext.o input.o $(POPENNSLIB) util.o ft.o lfs.o mupdfimg.o $(MUPDFLIBS) $(THIRDPARTYLIBS) $(LUALIB) djvu.o $(DJVULIBS) cre.o $(CRENGINELIBS)
|
||||||
|
echo $(VERSION) > git-rev
|
||||||
$(CC) \
|
$(CC) \
|
||||||
$(CFLAGS) \
|
$(CFLAGS) \
|
||||||
kpdfview.o \
|
kpdfview.o \
|
||||||
@ -246,7 +248,6 @@ INSTALL_DIR=kindlepdfviewer
|
|||||||
|
|
||||||
LUA_FILES=alt_getopt.lua commands.lua crereader.lua dialog.lua djvureader.lua extentions.lua filechooser.lua filehistory.lua fileinfo.lua filesearcher.lua font.lua graphics.lua helppage.lua image.lua inputbox.lua keys.lua pdfreader.lua reader.lua rendertext.lua screen.lua selectmenu.lua settings.lua unireader.lua widget.lua
|
LUA_FILES=alt_getopt.lua commands.lua crereader.lua dialog.lua djvureader.lua extentions.lua filechooser.lua filehistory.lua fileinfo.lua filesearcher.lua font.lua graphics.lua helppage.lua image.lua inputbox.lua keys.lua pdfreader.lua reader.lua rendertext.lua screen.lua selectmenu.lua settings.lua unireader.lua widget.lua
|
||||||
|
|
||||||
VERSION?=$(shell git describe HEAD)
|
|
||||||
customupdate: all
|
customupdate: all
|
||||||
# ensure that build binary is for ARM
|
# ensure that build binary is for ARM
|
||||||
file kpdfview | grep ARM || exit 1
|
file kpdfview | grep ARM || exit 1
|
||||||
@ -254,12 +255,11 @@ customupdate: all
|
|||||||
rm -f kindlepdfviewer-$(VERSION).zip
|
rm -f kindlepdfviewer-$(VERSION).zip
|
||||||
rm -rf $(INSTALL_DIR)
|
rm -rf $(INSTALL_DIR)
|
||||||
mkdir -p $(INSTALL_DIR)/{history,screenshots}
|
mkdir -p $(INSTALL_DIR)/{history,screenshots}
|
||||||
echo $(VERSION) > $(INSTALL_DIR)/git-rev
|
|
||||||
cp -p README.md COPYING kpdfview kpdf.sh $(LUA_FILES) $(INSTALL_DIR)
|
cp -p README.md COPYING kpdfview kpdf.sh $(LUA_FILES) $(INSTALL_DIR)
|
||||||
mkdir $(INSTALL_DIR)/data
|
mkdir $(INSTALL_DIR)/data
|
||||||
cp -rpL data/*.css $(INSTALL_DIR)/data
|
cp -rpL data/*.css $(INSTALL_DIR)/data
|
||||||
cp -rpL fonts $(INSTALL_DIR)
|
cp -rpL fonts $(INSTALL_DIR)
|
||||||
cp -r resources $(INSTALL_DIR)
|
cp -r git-rev resources $(INSTALL_DIR)
|
||||||
mkdir $(INSTALL_DIR)/fonts/host
|
mkdir $(INSTALL_DIR)/fonts/host
|
||||||
zip -9 -r kindlepdfviewer-$(VERSION).zip $(INSTALL_DIR) launchpad/ kite/
|
zip -9 -r kindlepdfviewer-$(VERSION).zip $(INSTALL_DIR) launchpad/ kite/
|
||||||
rm -rf $(INSTALL_DIR)
|
rm -rf $(INSTALL_DIR)
|
||||||
|
@ -498,7 +498,7 @@ function FileChooser:addAllCommands()
|
|||||||
self.commands:add(KEY_H,nil,"H",
|
self.commands:add(KEY_H,nil,"H",
|
||||||
"show help page",
|
"show help page",
|
||||||
function(self)
|
function(self)
|
||||||
HelpPage:show(0, G_height, self.commands)
|
HelpPage:show(0, G_height, self.commands, "Hotkeys "..G_program_version)
|
||||||
self.pagedirty = true
|
self.pagedirty = true
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
@ -99,6 +99,15 @@ if optarg["G"] ~= nil then
|
|||||||
globalgamma = optarg["G"]
|
globalgamma = optarg["G"]
|
||||||
end
|
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
|
if util.isEmulated()==1 then
|
||||||
input.open("")
|
input.open("")
|
||||||
-- SDL key codes
|
-- SDL key codes
|
||||||
|
Loading…
Reference in New Issue
Block a user