Koreader win32 port

pull/924/head
chrox 10 years ago
parent 36f450e907
commit a4f870753e

@ -32,7 +32,7 @@ all: $(if $(ANDROID),,$(KOR_BASE)/$(OUTPUT_DIR)/luajit)
$(MAKE) -C $(KOR_BASE) $(MAKE) -C $(KOR_BASE)
echo $(VERSION) > git-rev echo $(VERSION) > git-rev
mkdir -p $(INSTALL_DIR)/koreader mkdir -p $(INSTALL_DIR)/koreader
ifdef EMULATE_READER ifneq ($(or $(EMULATE_READER),$(WIN32)),)
cp -f $(KOR_BASE)/ev_replay.py $(INSTALL_DIR)/koreader/ cp -f $(KOR_BASE)/ev_replay.py $(INSTALL_DIR)/koreader/
# create symlink instead of copying files in development mode # create symlink instead of copying files in development mode
cd $(INSTALL_DIR)/koreader && \ cd $(INSTALL_DIR)/koreader && \
@ -51,6 +51,10 @@ endif
ifdef ANDROID ifdef ANDROID
cd $(INSTALL_DIR)/koreader && \ cd $(INSTALL_DIR)/koreader && \
ln -sf ../../$(ANDROID_DIR)/*.lua . ln -sf ../../$(ANDROID_DIR)/*.lua .
endif
ifdef WIN32
# install runtime libraries for win32
cd $(INSTALL_DIR)/koreader && cp ../../windows/*.dll .
endif endif
# install plugins # install plugins
cp -r plugins/* $(INSTALL_DIR)/koreader/plugins/ cp -r plugins/* $(INSTALL_DIR)/koreader/plugins/
@ -60,7 +64,7 @@ endif
mkdir -p $(INSTALL_DIR)/koreader/data/tessdata mkdir -p $(INSTALL_DIR)/koreader/data/tessdata
mkdir -p $(INSTALL_DIR)/koreader/fonts/host mkdir -p $(INSTALL_DIR)/koreader/fonts/host
mkdir -p $(INSTALL_DIR)/koreader/ota mkdir -p $(INSTALL_DIR)/koreader/ota
ifndef EMULATE_READER ifeq ($(or $(EMULATE_READER),$(WIN32)),)
# clean up, remove unused files for releases # clean up, remove unused files for releases
rm -rf $(INSTALL_DIR)/koreader/data/{cr3.ini,cr3skin-format.txt,desktop,devices,manual} rm -rf $(INSTALL_DIR)/koreader/data/{cr3.ini,cr3skin-format.txt,desktop,devices,manual}
rm $(INSTALL_DIR)/koreader/fonts/droid/DroidSansFallbackFull.ttc rm $(INSTALL_DIR)/koreader/fonts/droid/DroidSansFallbackFull.ttc

@ -1,9 +1,9 @@
KOReader [![Build Status][travis-icon]][travis-link] KOReader [![Build Status][travis-icon]][travis-link]
======== ========
KOReader is a document viewer application, originally created for usage on the KOReader is a document viewer application, originally created for Kindle
Kindle e-ink reader. It currently supports Kindle 5 (Touch), Kindle Paperwhite e-ink readers. It currently runs on Kindle 5 (Touch), Kindle Paperwhite,
, Kobo and Android devices. Kobo, Android(2.3+) devices.
KOReader started as the KindlePDFViewer application, but it supports much more KOReader started as the KindlePDFViewer application, but it supports much more
formats than PDF now. Among them are DJVU, FB2, EPUB, TXT, CBZ, HTML. formats than PDF now. Among them are DJVU, FB2, EPUB, TXT, CBZ, HTML.
@ -40,6 +40,8 @@ Cross compile toolchains are available for Ubuntu users through these commands:
sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
# for Kobo # for Kobo
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
# for Win32
sudo apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686
``` ```
A recent version of Android SDK/NDK and `ant` are needed in order to build Koreader for Android A recent version of Android SDK/NDK and `ant` are needed in order to build Koreader for Android
@ -49,7 +51,7 @@ sudo apt-get install ant
``` ```
You might also need SDL library packages if you want to compile and run You might also need SDL library packages if you want to compile and run
Koreader on PC. Fedora users can install `SDL` and `SDL-devel`. Koreader on your Linux PC. Fedora users can install `SDL` and `SDL-devel`.
Ubuntu users probably need to run: Ubuntu users probably need to run:
``` ```
sudo apt-get install libsdl1.2-dev sudo apt-get install libsdl1.2-dev
@ -104,14 +106,19 @@ Then, build installable package for Android:
make TARGET=android clean androidupdate make TARGET=android clean androidupdate
``` ```
For emulating For emulating Koreader on Linux and Windows
------------- -------------
To build an emulator on current machine just run: To build an emulator on current Linux machine just run:
``` ```
make clean && make make clean && make
``` ```
If you want to compile the emulator for Windows you need to run:
```
make TARGET=win32 clean && make TARGET=win32
```
To run koreader on your developing machine To run koreader on your developing machine
(you may need to change $(MACHINE) to the arch of your machine such as 'x86_64'): (you may need to change $(MACHINE) to the arch of your machine such as 'x86_64'):
``` ```
@ -162,13 +169,12 @@ build time when the source have been built. Ccache support has been added to
KOReader's build system. Before using it, you need to install a ccache in your KOReader's build system. Before using it, you need to install a ccache in your
system. system.
* in ubuntu use:`sudo apt-get install ccache` * in Ubuntu use:`sudo apt-get install ccache`
* in fedora use:`sudo yum install ccache` * in Fedora use:`sudo yum install ccache`
* install from source: * install from source:
* get latest ccache source from http://ccache.samba.org/download.html * get latest ccache source from http://ccache.samba.org/download.html
* unarchieve the source package in a directory * unarchieve the source package in a directory
* cd to that directory and use:`./configure && make && sudo make install` * cd to that directory and use:`./configure && make && sudo make install`
* after using ccache, make a clean build will only take 15sec. Enjoy!
* to disable ccache, use `export USE_NO_CCACHE=1` before make. * to disable ccache, use `export USE_NO_CCACHE=1` before make.
* for more detail about ccache. visit: * for more detail about ccache. visit:

Loading…
Cancel
Save