Understanding how Kwik works

kwk XML Project File

Understanding how Kwik works

Folder structure

A project folder created under your Default Project folder (you set this via Settings->General tab). Kwik automatically creates a project folder when you create a new project. This folder has the same name of your project, with spaces being replaced by _ (underscore)

YourProject.kwk is a XML file (text format) that contains all project settings plus references to all interactions, animations, etc, you set via the Kwik interface (more on that later)

After hitting the Publish button for the first time, Kwik will create, under your project folder, a folder named build4, which will hold all content required by Corona Simulator to simulate and/or build your final app.

build4 folder

Sub folders

Lua files

Sub Folders

Lua files

kwk Project file

As mentioned above, the “kwk” file is the one holding the intelligence of your project. For every action you associate to a layer, a page or your entire project, Kwik will add this information into the kwk file. If you open your kwik file (any text editor will open it), you will see something like this:

As you can see, this a XML (extended Markup Language) file, containing references (they are called children, when they are indented. For example, is a child of . is a child of , which is a child of ) for each action applied.

When you publish your project, Kwik will read content from your Photoshop page file (each layer will be exported as an image, the start position/alpha/etc of each layer will be capture, etc) and “mix” with the content of the kwk, to create the appropriated code for each page

Editing path

Sometimes you like to change some file paths of .psd or .mp3 etc. Kwik defaults project folder is ~/Documents/Kwik/YourProject. if you like to change your project folder from documents folder to Desktop. You need to edit .kwk

Fistly make sure you set the project folder at ~\Desktop\K4

Before

  <pages>
    <page id="page1">
      <name>page1</name>
      <number>1</number>
      <file>~/Documents/Kwik/HelloWorld/page1.psd</file>
      <fileName>page1.psd</fileName>
    </page>
  </pages>

After

  <pages>
    <page id="page1">
      <name>page1</name>
      <number>1</number>
      <file>~/Desktop/K4/HelloWorld/page1.psd</file>
      <fileName>page1.psd</fileName>
    </page>
  </pages>

Other folders in Your Project Folder

You find these folders and they are automatically created by Kwik

backups contains the backups of .kwk file. If you like to rewind your work, copy it from this folder and replace the kwk file in the root folder.

json folder is for kwik internal use to publish json files before making lua files.

kaboom folder is also internal folder to be used for creating/editing particles

temp is also internal folder

tmplt contains the template files from which kwik uses to generate lua files. You can modify the files in tmplt folder to make custom codes of yours. When Kwik is updated, the template folder is updated with Project Properties > Update tmplt. The old tmplt folder is renamed when updating tmplt.

Update Tmplt

GitHub

The latest tmplt is available from GitHub of Kwiksher. Every time, a daily build of Kwik is released, the git repo is updated too. So if you prefer to use git, just clone the repo.