From 221bc10404a0a74207a527f830ae71359e0bd0b5 Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Sun, 24 Mar 2013 15:11:21 -0400 Subject: [PATCH 1/2] add bootstrapemu target and update README --- Makefile | 17 +++++++++++++---- README.md | 12 ++++++------ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 577db8e90..78c6fbed2 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,9 @@ VERSION=$(shell git describe HEAD) # subdirectory we use to build the installation bundle INSTALL_DIR=koreader +# subdirectory we use to setup emulation environment +EMU_DIR=emu + # files to copy from main directory LUA_FILES=reader.lua @@ -30,10 +33,16 @@ clean: cleanthirdparty: cd koreader-base && make cleanthirdparty -setupemu: - test -d libs-emu || ln -s koreader-base/libs-emu ./ - test -d fonts || ln -s koreader-base/fonts ./ - test -d data || ln -s koreader-base/data ./ +bootstrapemu: + test -d $(EMU_DIR) || mkdir $(EMU_DIR) + test -d $(EMU_DIR)/libs-emu || (cd $(EMU_DIR) && ln -s ../koreader-base/libs-emu ./) + test -d $(EMU_DIR)/fonts || (cd $(EMU_DIR) && ln -s ../koreader-base/fonts ./) + test -d $(EMU_DIR)/data || (cd $(EMU_DIR) && ln -s ../koreader-base/data ./) + test -d $(EMU_DIR)/frontend || (cd $(EMU_DIR) && ln -s ../frontend ./) + test -d $(EMU_DIR)/resources || (cd $(EMU_DIR) && ln -s ../resources ./) + test -e $(EMU_DIR)/koreader-base || (cd $(EMU_DIR) && ln -s ../koreader-base/koreader-base ./) + test -e $(EMU_DIR)/extr || (cd $(EMU_DIR) && ln -s ../koreader-base/extr ./) + test -e $(EMU_DIR)/reader.lua || (cd $(EMU_DIR) && ln -s ../reader.lua ./) customupdate: koreader-base/koreader-base koreader-base/extr # ensure that the binaries were built for ARM diff --git a/README.md b/README.md index 0893d4b9d..b205319f1 100644 --- a/README.md +++ b/README.md @@ -73,19 +73,19 @@ In emulator ----------- You need to first compile koreader-base in emulation mode. * If you have built koreader in real mode before, you need to clean it up: -``` +```bash make clean && make cleanthirdparty ``` * Then compile with emulation mode flag: -``` -EMULATE_READER_W=600 EMULATE_READER_H=800 EMULATE_READER=1 make +```bash +EMULATE_READER=1 make ``` * You may want to see README.md in koreader-base for more information. -Next run `make setupemu` to setup basic runtime environment needed by emulation -mode. +Next run `make bootstrapemu` to setup basic runtime environment needed by +emulation mode. A new emu directory will be created. Last, run the emulator with following command: ``` -./koreader-base/koreader-base reader.lua -d ./ +cd emu && reader.lua -d ./ ``` From d016717bc07d1a5060bcd0e3b1456288078fddfa Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Sun, 24 Mar 2013 15:13:03 -0400 Subject: [PATCH 2/2] update README --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b205319f1..7fd173513 100644 --- a/README.md +++ b/README.md @@ -73,18 +73,24 @@ In emulator ----------- You need to first compile koreader-base in emulation mode. * If you have built koreader in real mode before, you need to clean it up: -```bash + +``` make clean && make cleanthirdparty ``` + * Then compile with emulation mode flag: -```bash + +``` EMULATE_READER=1 make ``` + * You may want to see README.md in koreader-base for more information. + Next run `make bootstrapemu` to setup basic runtime environment needed by emulation mode. A new emu directory will be created. + Last, run the emulator with following command: ``` cd emu && reader.lua -d ./