ZMake documentation

Installation & Usage

Download application package from "Application" page. Unpack downloaded ZIP somewhere. And that's all.

Windows and macOS users can run program via drag and drop. Just drag file to process to application icon.

Linux's users should call zmake from terminal. Open terminal in application folder and just run:

./zmake file_to_process.bin

What they can do?

Action to be taken by application depends on what you give to the input.

You give... ZMake will...
App/watchface as bin-file unpack this file and convert all graphic assets into PNG. New folder appear near source bin-file
Empty directory generate new project template inside this folder. Type of project will be asked in prompt.
Unpacked app/watchface
(directory with app.json inside)
build your project.
  1. Convert all graphics to ZeppOS TGA
  2. If src dir exists, combine files into index.js
  3. If enabled, process all files in page/watchface dir via esbuild
  4. If enabled, process all files in page/watchface dir via uglifyjs
  5. If enabled, will create preview image via ZeppPlayer
  6. If enabled, will place smaller preview into assets dir
  7. If enabled, will upload result watchface to your phone via ADB
Any other files/directories try to convert them into PNG or ZeppOS TGA. Direction will be asked, if can't be detected automatically.

Graphics processing

ZeppOS support images compressed in different ways. So, you can describe how zmake should process some images. When converting PNG to TGA, app selects compression method due to filename ending. There is a list of available compression options with some notices.

Name... Format Description
.p.png TGA-P Palette-encoded image. You can use any RGBA colors inside your image, but single image can't contain more than 256 different colors (one color with different transparency layer wasn't the same color). No specific compression will be applied. Final image filesize will be 64 + (count_of_colors * 4) + (width * height) bytes.
.rlp.png TGA-RLP Same as TGA-P, but also use per-line pixel compression. E.g. same pixels in one line will be written once. But images encoded in that way can't be rotated, so don't use this format for clock pointers.
.rgb.png TGA-RGB 16-bit RGB images, e.g. 5-6 bits per channel. Images in that format can't contain transparent parts. File size will be 64 + (2 * width * height) bytes.
.rgba.png TGA-RGBA Full 32-bit RGBA image, e.g. 8 bit for channel. No color limitations, but very big file size: 64 + (4 * width * height) bytes.

If you don't set compression format via filename, default will be used (TGA-P).

If some images have too much colors for TGA-RLP/TGA-P, they will be automatically quantized. Backup file will appear in backup directory near application.