diff --git a/.editorconfig b/.editorconfig index 904eab0e8..3db0a7dde 100644 --- a/.editorconfig +++ b/.editorconfig @@ -18,6 +18,10 @@ trim_trailing_whitespace = false indent_style = tab indent_size = 8 +[Makefile.def] +indent_style = tab +indent_size = 4 + [*.{js,css,scss,sass,html,handlebars,tpl}] indent_style = space indent_size = 2 diff --git a/.gitignore b/.gitignore index 8eeaa94e4..bcf7e344c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,13 +8,15 @@ lua-* .vimrc *.o tags -test/*.sdr +test/* *.tar *.log spec/unit/data doc/html - +git-rev emu +luacov.stats.out +trace-out.txt koreader-*.zip koreader-*.apk @@ -37,5 +39,6 @@ koreader-kobo-arm-linux-gnueabihf* koreader-emulator-i686-w64-mingw32 koreader-emulator-x86_64-linux-gnu koreader-emulator-x86_64-pc-linux-gnu +koreader-emulator-x86_64-apple-darwin* koreader-pocketbook-arm-obreey-linux-gnueabi koreader-ubuntu-touch-arm-linux-gnueabihf diff --git a/Makefile b/Makefile index e24910c12..c94379363 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ ifneq ($(or $(EMULATE_READER),$(WIN32)),) cd $(INSTALL_DIR)/koreader/spec/front/unit && test -e data || \ ln -sf ../../test ./data else - cp -rfL $(KOR_BASE)/$(OUTPUT_DIR)/* $(INSTALL_DIR)/koreader/ + $(RCP) -fL $(KOR_BASE)/$(OUTPUT_DIR)/* $(INSTALL_DIR)/koreader/ endif for f in $(INSTALL_FILES); do \ ln -sf ../../$$f $(INSTALL_DIR)/koreader/; \ @@ -77,9 +77,9 @@ ifdef WIN32 cd $(INSTALL_DIR)/koreader && cp ../../$(WIN32_DIR)/*.dll . endif @echo "[*] Install plugins" - cp -r plugins/* $(INSTALL_DIR)/koreader/plugins/ + $(RCP) plugins/* $(INSTALL_DIR)/koreader/plugins/ @echo "[*] Installresources" - cp -rpL resources/fonts/* $(INSTALL_DIR)/koreader/fonts/ + $(RCP) -pL resources/fonts/* $(INSTALL_DIR)/koreader/fonts/ install -d $(INSTALL_DIR)/koreader/{screenshots,data/{dict,tessdata},fonts/host,ota} ifeq ($(or $(EMULATE_READER),$(WIN32)),) @echo "[*] Clean up, remove unused files for releases" diff --git a/README.md b/README.md index 540b4fc94..83959578c 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,9 @@ KOReader KOReader is a document viewer application, originally created for Kindle e-ink readers. It currently runs on Kindle, Kobo, PocketBook, Ubuntu Touch -and Android (2.3+) devices. Developers can also run Koreader emulator -for development purpose on desktop PC with Linux and Windows operating system. +and Android (2.3+) devices. Developers can also run KOReader emulator +for development purpose on desktop PC with Linux and Windows and +Mac OSX (experimental for now). Main features for users ----------------------- @@ -91,6 +92,11 @@ sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf sudo apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686 ``` +Mac OSX users may need to install these tools: +``` +brew install nasm binutils libtool autoconf automake sdl2 +``` + A recent version of Android SDK/NDK and `ant` are needed in order to build Koreader for Android devices. ``` @@ -155,10 +161,10 @@ Then, run this command to build installable package for Android: ./kodev release android ``` -For emulating KOReader on Linux and Windows +For emulating KOReader on Linux, Windows and Mac OSX ------------- -To build an emulator on current Linux machine just run: +To build an emulator on current Linux or OSX machine: ``` ./kodev build ``` diff --git a/base b/base index 02c4e24e7..afaf36bc7 160000 --- a/base +++ b/base @@ -1 +1 @@ -Subproject commit 02c4e24e732f4d7009b71c763dbaa503c40365a1 +Subproject commit afaf36bc7aba673a6c4ec8159f79ed8f5d9996ec diff --git a/spec/unit/readersearch_spec.lua b/spec/unit/readersearch_spec.lua index 3766e0d47..41c216850 100644 --- a/spec/unit/readersearch_spec.lua +++ b/spec/unit/readersearch_spec.lua @@ -87,7 +87,7 @@ describe("Readersearch module", function() for _, word in ipairs(words) do --dbg("found word", word.start) end - doc:gotoXPointer(words[1].start) + doc:gotoXPointer(words[#words].start) words = search:searchNext("Verona", 0) end assert.are.equal(13, count)