KScript docs
EN

Programs: kscript compile

Names, icons and versions

In a project, the app section of kscript.json describes the program:

JSON
{
  "name": "life-lab",
  "app": {
    "main": "desktop.kscript",     // what kscript compile builds when you don't name a script
    "name": "Life Lab",            // the program's name: the .app, the .exe, the Dock and Task Manager
    "id": "app.kscript.lifelab",   // the Mac bundle id
    "version": "1.2.0",            // shown in Finder's Get Info and in the .exe's details
    "icon": "icon.png"             // one picture for every platform
  }
}

--name overrides app.name. Without either, a desktop app is named after the script's file (life-lab.kscript becomes Life Lab) and a terminal program keeps the file's name (hello). Spaces become - in file names except for Mac apps and Windows programs.

The icon can be a PNG, an .ico or an .icns. kscript compile puts it where each platform looks: inside the Windows .exe (so Explorer, the taskbar and shortcuts show it), as AppIcon.icns inside the Mac app, and as a PNG beside the Linux program. Pictures are carried over unchanged, not resized, so a 1024×1024 PNG gives a sharp icon everywhere. For the best Windows icon, use an .ico with several sizes up to 256×256.

Windows programs also get the app's name and version in their file details, which is what Task Manager shows. Desktop apps open without a console window on Windows; terminal programs keep theirs.