Tartışma:SUPER KLIK

Şuraya atla: kullan, ara

.app format (next generation of .cmg)

OVERVIEW

Klik App looks to build on the existing klik work, and make the application file more transparent and tightly integrated into the desktop.

App is an 'ar' file with an exectable header that hosts a cmg and additional data such as icons and dekstop files.

The CMG is then mounted as a loop device using an offset

GOALS

  • RULE NUMBER 1: 1 APPLICATION = 1 FILE, anything that breaks rule number 1 is NOT acceptable
  • Run on as many distros as possible
  • Make .app behave on the cmdline like the real app.
    • Command line start ie firefox.app
    • Application Paramters ie firefox.app -p
  • Each app should display proper icon
  • Correct menu enties (desktop files Applications -> Internet -> Browser)
  • A user should never have to treat the app file as anything other that an executable

Thumbnails / Icons

Klick app will use thumbnailers to render an icon

Fall back should use default kilk icons http://www.linuxhost.cl/~segfault/klik/

RUN SPEC

All work is preformed by 'run', 'run' is always called by the app file 'run' should never have to be called itself.

Would be nice if some of these options were avalible on the contextmenu!

  • Ablity to extact icon/desktop by paramters (the work is done by .zAppRun)
    • firefox.app --app-extract-icon
    • firefox.app --app-extract-desktop
    • firefox.app --app-extract-cmg
  • Ability to list app dependencies
    • firefox.app --app-dependencies
      • Lists what must be installed to run this kilk - [gnome 2.10, etc]
      • This list will change due to the system the app was created on.
  • Ability to call 'other' commands in the app file
    • firefox.app --app-command=mozilla-firefox-bookmarks-import-tool
  • Add app to menu
    • firefox.app --app-register-menu-item
  • Update to latest version of application
    • firefox.app --app-update

NOTE : All other parameters should fall through to application This ability would allow you to have a single app file but mulitiple menu entries (think of OpenOffice)

Security

  • The app should NOT have execute permissions by default
  • The app will need to be made executable before it can be run via the header script. (It will still run via the run script)
  • MD5 Checksums
  • Original Source

LSB Desktop

FUTURE None of the files/packages listed in the LSB Desktop Spec will be included in an 'app' http://www.linuxbase.org/LSBWiki/FrontPage

.app Overview

An app file is just a ar file with a header to make the file executable.

  • The app file should have as little script/code as possible
  • The ar file format
  • The header calls 'run' (was zAppRun) on its self
  • all app files must have a the same offset to the cmg
  • padding should be inserted until offset equals a round number (that is to be defined, e.g., 128) padding should be a null char "echo \0"
  • app.xml is a copy of AppInfo.xml and includes meta data ie (Created For : Ubuntu Breezy ( include Md5 checksum (how to do this??)) this file can be empty.

.app HEADER SPEC

Line 1 : #!/bin/sh # Start the script header to make app file executable
Line 2 : # .app 1.0 # Uniqly identifies the file as an application using magic metadata
Line 3 : APP=firefox run "$0" "$@" #Calls the 'run' script to execute this file
Line 4 : exit #End the script header
Line 5 : \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 # Padding
Line 6 : !<arch>  # Start of AR archive
Line 7 : demo.cmg/       1130834901  1000  1000  100644  32768     ` # ar header
Line 8 : [cmg binary content starts]

Padding should be inserted until the mount offset equals 200. This will allow for varible app names. Padding char should be a null space

ar FILE SPEC

  • app.cmg
  • app.desktop
  • app.jpg
  • app.xml

.app FILE EXAMPLE

#!/bin/bash
#.app 1.0
APP=demo.cmg ~/.zAppRun "$0" "$@"
exit
!<arch>
demo.cmg/       1130834901  1000  1000  100644  32768     `
[ binary file content ]
icon/           1130840727  1000  1000  100744  1839      `
[ binary image content ]

.app Script Extractor

neccessary because "ar" command does not support offset= bash example

Other Ideas

  • Apps should only be added to the menu when located in ~/Applications
  • Home space inside the APP that is writeable? Then apps could save there conffig data inside the app
  • Application version number displayed before download
  • ~/Applications folder

LINKS