Server Assets
BookServer
Preparation
- In BookServer Folder, you find copyright.txt, please edit the text file to put your copyright message in it.
Later the script file(copy_books.bat, copy_books.command) will put it into the image folders of pages. After published your Book’s project, you can use copy_books.bat(WIN) or copy_books.command(MAC)
Book01/assets.zip
book01
├── copyright.txt
├── images
├── audios
└── sprites
Book02/assets.zip
book02
├── copyright.txt
├── images
├── audios
└── sprites
After the project published, run copy_books.bat(WIN), copy_books.command(MAC) and the zip files are created in BookServer folder.
Then please put them on a http server.
- http://YourHost/your_path/book01/assets.zip
- http://YourHost/your_path/book02/assets.zip
In the sample BookSever folder, the path is like this
\bookshelf
- http://localhost:8080/bookshelf/book01/assets.zip
the host url and path are defined in tmplt/components/store/model.lua
local YourHost = "http://localhost:8080"
M.URL = YourHost.."/bookShelf/"
M.backgroundImg = "bg.png"
Run copy_books script
After the kwik project is published, please run the copy_books.bat(WIN) or copy_books.command(MAC) to make the asset zip files.
You need to edit the script file to add the folder name of project and the id of a book in IAP setting. For instance. The script will make an asset.zip from Book01 folder. The id is book01
copy_books.bat (WIN)
call :MyCopy Book01 book01
call :MyCopy Book02 book02
copy_books.command (MAC)
MyCopy Book01 book01
MyCopy Book02 book02
- Open command prompt(WIN) or terminal app(MAC).
WIN, type and hit enter key
cd ~/Documents/Kwik/BookServer
copy_books.bat
MAC, type and hit enter key
cd ~/Documents/Kwik/BookServer
source copy_books.command
please put the zip files to your http server that you have set in store/model.lua
tmplt/components/store/model.lua
local YourHost = "http://localhost:8080"
M.URL = YourHost.."/bookShelf/"
M.backgroundImg = "bg.png"