[Vm-dev] VM Maker: ImageFormat-dtl.29.mcz
Eliot Miranda
eliot.miranda at gmail.com
Thu Apr 12 14:51:31 UTC 2018
Hi Subbu,
> On Apr 12, 2018, at 4:58 AM, K K Subbu <kksubbu.ml at gmail.com> wrote:
>
>> 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).
While we can't rely on a system having its file database up-to-date we can rely on our district containing a runnable version of ckformat.c. So while what you say is v nice in an ideal world, I think we do need something like ckformat.c now we're on the cusp of a cleaving between the 32/64 compatibility world ushered in by x86_64.
> 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