[Vm-dev] VM Maker: ImageFormat-dtl.29.mcz
K K Subbu
kksubbu.ml at gmail.com
Thu Apr 12 11:58:32 UTC 2018
On Thursday 12 April 2018 12:19 AM, Eliot Miranda wrote:
> This is unreadable. Either express it as a string or as a Slang
> program; anything but this horrid mashup of nextPutAll:s and C
> fragments :-(
>
The program itself is not needed. There is a file(1) utility to detect
file types from file content based on pattern specs (aka magic file).
Squeak can already generate this magic file (save in $HOME/.magic). E.g.
$ file --mime-type /opt/gits/oscogvm/image/*.image
/opt/gits/oscogvm/image/spurreader.image: application/spur-image
/opt/gits/oscogvm/image/SpurVMMaker.image: application/spur-image
/opt/gits/oscogvm/image/trunk50.image: application/spur-image
/opt/gits/oscogvm/image/trunk6.image: application/spur-image
To add a launcher to the desktop menu, the following desktop spec
--- spur.desktop ---
[Desktop Entry]
Type=Application
Exec=cog %F
Name=Cog
GenericName=Squeak VM
Icon=cog
Terminal=false
Categories=Development;
MimeType=application/spur-image;application/cog-image;application/squeak-image;
-----
$ xdg-desktop-menu install --novendor spur.desktop
On my machine, I symlink cog to
/opt/gits/oscogvm/image/sqlinux..../squeak and then I can open any image
from file browser or from command line with:
$ xdg-open blahblah.image
HTH .. Subbu
More information about the Vm-dev
mailing list