-
Notifications
You must be signed in to change notification settings - Fork 0
File format and structure
ProgramPack files are usually compressed .ZIP files. They can have (or not) shebang. If they have shebang, that means that on Linux/Unix systems they will execute as a file. This does not work on Windows.
In the following example, we can see file structure of unpacked ProgramPack file:
.
├── App
├── manifest.json
└── Resources
└── example.txt
Mainfile is the main program.
manifest.json is a file that describes our program.
Here is an example of manifest file:
Here is table with definitions of these values:
| Value | Description |
|---|---|
name |
Program name. |
description |
Program description. |
author |
Author(s) that created the program. |
version |
Program version. |
mainfile |
Main file that will be executed when using the programpack run <file-name> command. |
resources_folder |
Name of folder with resources. |
image |
Image encoded as Base64 data URI. |
Resources is a folder that contains all the files that program needs. For example, we can load pictures, sounds or data from there.
You can change the folder in manifest.json. See the table above.
To make file executable, use the following command:
python3 -m programpack convert <file-name>
To make your file virtual, use this flag: --virtual.
To make file non-executable, use the following command:
python3 -m programpack deconvert <file-name>
To unpack, just rename it and unzip it.
{ "name": "example", "description": "Simple program (that does nothing)", "author": "Your Name", "version": "1.0.0", "mainfile": "App" }