OTX Filename Extension & macOS FileType & Creator codes

Forum rules
A place to discuss and plan OpenSource xTalk (not exclusively LCC based) and Community Builds of LCC
Ask NOT what xTalk can do for you... get involved you DO have something to contribute, no matter your skillset!

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: OTX Filename Extension & macOS FileType & Creator codes

Re: OTX Filename Extension & macOS FileType & Creator codes

by OpenXTalkPaul » Mon Sep 20, 2021 4:11 pm

xAction wrote: Sun Sep 19, 2021 7:14 am There's a method to this madness
That is a different thing that's about app extensions bundle identifiers. What I'm talking about here is plain old filename extension (name.whatever or a DOS style 3 char, name.wtr),and also for mac app, creator code (4Chars) and filetype codes (4Chars), which is largely a relic of macOS classic but still present in macOS X+.
LC's creator code is Revo and stack file type is 'RSTK'
HyperCard's (mac classic only) creator code was WILD and file type code was 'STAK'
For OpenXTalk, for now at least, I went with OXTk and 'STAK' (since HyperCard is pretty much dead since after 1998, but I'm thinking of having an HC import module)

https://livecode.byu.edu/helps/file-creatorcodes.php

Apple's look up page for codes is dead link (it's been deprecated since OSX but still used by some odd things, like GarageBand MIDI drag & drop for example)
https://developer.apple.com/datatype

I fixed the small 16px icon missing from the .icns file

Still that's an interesting read, thanks!

Re: OTX Filename Extension & macOS FileType & Creator codes

by xAction » Sun Sep 19, 2021 7:14 am

Re: OTX Filename Extension & macOS FileType & Creator codes

by OpenXTalkPaul » Sun Sep 19, 2021 5:07 am

Hmm mine seems to be missing the really small (16px) icon!

Re: OTX Filename Extension & macOS FileType & Creator codes

by OpenXTalkPaul » Sun Sep 19, 2021 5:06 am

For comparison when I change the filename extension it goes right back to the previous LC type info
Screen Shot 2021-09-19 at 1.04.50 AM.png
Screen Shot 2021-09-19 at 1.04.50 AM.png (130.38 KiB) Viewed 6682 times

OTX Filename Extension & macOS FileType & Creator codes

by OpenXTalkPaul » Sun Sep 19, 2021 5:03 am

I made some macOS .icns (icon set) replacement files for the app icon and document icon
Edited the OTX app info.plist to apply the change
Add these in the file menus, and changed some save dialog boxes (removed branding)
And then there is a section of the home.livecodescript part that inserts file types into Windows registry, which I have't tested that yet.

The mac side seems to be working OK, might be a good idea to rebuild launch services.
Screen Shot 2021-09-19 at 12.40.49 AM.png
Screen Shot 2021-09-19 at 12.40.49 AM.png (143.33 KiB) Viewed 6684 times
I went with the old STAK (HC) mac 4char fileType Code, since nothing on modern macOS should be using that.
And for 4char creatorCode I used OXTk (maybe I should've used HC's WILD?)
For filename extensions I used:
  • .stk (as an equivalent to .rev)
  • .otxstack (as equivalent to .livecode)
  • .otxscript (as equivalent to .livecodescript)
Screen Shot 2021-09-19 at 1.01.11 AM.png
Screen Shot 2021-09-19 at 1.01.11 AM.png (61.87 KiB) Viewed 6684 times

Top