Author Topic: How to set execution permissions on the exec files?  (Read 3761 times)

Offline Bolkonskij

  • Gold Member
  • *****
  • Posts: 207
    • Cornica.org
How to set execution permissions on the exec files?
« on: January 05, 2018, 08:12:14 AM »
Hey everyone,

lots of tech-savvy folks around here, so maybe someone can help me out. Wrote some code and compiled it as carbon app. Works perfectly fine on 10.4.

OS9 however just shows me the .app as a folder. Since I compiled it on Windows, I expect I'll have to set execution permissions on the file or it won't run it as a program.

Any ideas on how to do that? It's easy under OSX and there's lots of guides, but I couldn't dig up anything OS9 related. Probably a wording issue... :)
Reel changer over at cornica.org

Offline Astroman

  • Gold Member
  • *****
  • Posts: 206
  • new to the forums
Re: How to set execution permissions on the exec files?
« Reply #1 on: January 05, 2018, 09:05:55 AM »
I doubt that any current developement environment has support for OS output.
At least those permissions don't even exist(ed) there, so you can ignore that part.

A traditional Mac application from the M68k days had it's code compiled in a bunch of CODE resources and the filetype set to APPL which told the Finder it's executable.
What is displayed as a single file in Finder is in fact 2 physical files, one the resource fork and the other the data fork (which was often empty with applications)
When the PPC processor appeared, the PPC code was stored in the data fork and the resource had some loading mechanism - or at least something in it's resource fork that identified it as an application. (sorry never used it myself, only M68k experience)
At least you know for what to look in your docs/program features, good luck.

Offline Daniel

  • Gold Member
  • *****
  • Posts: 300
  • Programmer, Hacker, Thinker
Re: How to set execution permissions on the exec files?
« Reply #2 on: January 05, 2018, 12:32:39 PM »
Some technote or something describes application packages. I believe that some bit has to be set in the folder metadata for it to be treated as an application.

Offline nanopico

  • Moderator
  • Platinum Member
  • *****
  • Posts: 767
Re: How to set execution permissions on the exec files?
« Reply #3 on: January 05, 2018, 02:01:31 PM »
What did you use to build the app?
If I remember correctly (and it's highly likely I may not) that  XCode (and previously Project Builder) could not longer compile compatible OS 9 applications.

Even though it is a carbon app, you still have to be careful how it is compiled and that it doesn't use any OS X specific stuff.
All methods from carbon in OS 9 are in the OS X implimentation, but not all methods from OS X carbon are in OS 9 carbon.
If it ain't broke, don't fix it, or break it so you can fix it!

Offline MacTron

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2116
  • keep it simple
Re: How to set execution permissions on the exec files?
« Reply #4 on: January 06, 2018, 05:25:25 AM »
Some technote or something describes application packages. I believe that some bit has to be set in the folder metadata for it to be treated as an application.
Yes, that is. Furthermore inside the folder must be an alias to the main file. I have this tecnote, somewhere....
Please don't PM about things that are not private.

Offline teroyk

  • Platinum Member
  • *****
  • Posts: 623
  • -
Re: How to set execution permissions on the exec files?
« Reply #5 on: January 11, 2018, 02:47:31 PM »
I want also know how to do that!

Offline Naiw

  • Veteran Member
  • ****
  • Posts: 126
  • new to the forums
Re: How to set execution permissions on the exec files?
« Reply #6 on: January 11, 2018, 02:54:04 PM »
You can't set executable permission on OS 9. Applications are identified by their type signature APPL forexample.
However what it executes depends on what's in the 'cfrg' resource and most other systems don't have support for forked files like classic Mac OS uses.

Additionally the executable must be in PEF or XCOFF format to work on OS 9, MACH-O will hence not work no matter what you do.