Merge pull request #5 from houqp/master

bootstrap target for emulator
pull/6/head
HW 11 years ago
commit 845ba5f16e

@ -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

@ -73,19 +73,25 @@ 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:
```
make clean && make cleanthirdparty
```
* Then compile with emulation mode flag:
```
EMULATE_READER_W=600 EMULATE_READER_H=800 EMULATE_READER=1 make
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 ./
```

Loading…
Cancel
Save