Server assets

BookServer

Preparation

Later the script file(copy_pages.bat, copy_pages.command) will put it into the image folders of pages. build4/assets/images/p##/copyright.txt. After published your project, you can use copy_pages.bat(WIN) or copy_pages.command(MAC)

For Episode02

Episode02/assets.zip

assets
    └──images
        ├── p4
        │   ├── copyright.txt
        │   ├── layer_1.png
        │   ├── layer_1@2x.png
        │   └── layer_1@4x.png
        └── p5
            ├── copyright.txt
            ├── layer_1.png
            ├── layer_1@2x.png
            └── layer_1@4x.png

For Episode03

Episode03/assets.zip

    assets
        └─images
            └─p6

After the project published, run copy_pages.bat(WIN), copy_pages.command(MAC) and the zip files are created in BookServer folder.

Then please put them on a http server.

In the sample BookSever folder, the path is like this

\Bookshelf

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_pages script

After the kwik project is published, please run the copy_pages.bat(WIN) or copy_pages.command(MAC) to make the asset zip files.

You need to edit the script file for the episode name with the properties. For instance, Episode02 consists of page4 and page5, Episode03 is page6. You need to write the following codes to tell the script which ones to be copied from BookShelfPages project.

copy_pages.bat (WIN)

call :MyCopy Episode02 4
call :MyCopy Episode02 5
call :MyCopy Episode03 6

copy_pages.command (MAC)

MyCopy Episode02 4
MyCopy Episode02 5
MyCopy Episode03 6

WIN, type and hit enter key

cd ~/Documents/Kwik/BookServer
copy_pages.bat

MAC, type and hit enter key

cd ~/Documents/Kwik/BookServer
source copy_pages.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"

After copy_pages script is used, the image folders of the episodes are removed from build4/assets/images.