Three questions about Amiga OS3 programming

Find quick help here to get you started with Hollywood
Post Reply
MarkT
Posts: 5
Joined: Mon Jul 03, 2023 11:51 am

Three questions about Amiga OS3 programming

Post by MarkT »

I am still a complete beginner and therefore still have some "stupid" questions.

1) I have created a small program for Amiga OS3. It should be a simple CLI program without a GUI. Basically everything runs as it should. But Hollywood always asks for a display.

Ok, I'm currently using it to display some info on it, but I'd prefer the program to work completely in the background without opening its own "display". Is that possible?

2) Since the above program is more of a simple CLI program, I wonder if it's somehow possible to get the complied file a bit smaller. 2.5 MB is already hefty.

Is it possible to make it smaller, or does Hollywood always "have to" pack "everything" into the exe?

3) How do I find out what file format a certain file is? I don't mean if it is a "Brush" or "Anim", but in which file format it is: IFF, JPG, etc...?

Probably there is a simple function for this, but unfortunately I can't find it.

Thanks for your attention!
MarkT
plouf
Posts: 666
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: Three questions about Amiga OS3 programming

Post by plouf »

1) tou should compule with -console argument
2) no thats the interpreter, its the same for all OSes and all types (console or not)
3) you have to read the header (first bytes) and compare it
All iff have same header all jpg etc
You can rely in file extensions (like dos/windows) for simplicity but offcourse thats not bullet proof
Christos
MarkT
Posts: 5
Joined: Mon Jul 03, 2023 11:51 am

Re: Three questions about Amiga OS3 programming

Post by MarkT »

Thank you very much for your answers!

1) I have also stumbled on it, but have read that it is only usable for a Windows version? But I will try it out tomorrow!
2) Ok, I already thought about it. Thanks for your confirmation.
3) Never programmed something like this before, will look into it as well.

Your posting was a help to me, thanks plouf!
User avatar
airsoftsoftwair
Posts: 5830
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Three questions about Amiga OS3 programming

Post by airsoftsoftwair »

MarkT wrote: Thu Jul 20, 2023 11:29 am Ok, I'm currently using it to display some info on it, but I'd prefer the program to work completely in the background without opening its own "display". Is that possible?
Sure, just use

Code: Select all

@DISPLAY {Hidden = True}
and the display is gone.
MarkT wrote: Thu Jul 20, 2023 11:29 am Is it possible to make it smaller, or does Hollywood always "have to" pack "everything" into the exe?
You can compile the program as a Hollywood applet. Then it will be just a few kilobytes but it will require the Hollywood Player from Aminet.
MarkT wrote: Thu Jul 20, 2023 11:29 am 3) How do I find out what file format a certain file is? I don't mean if it is a "Brush" or "Anim", but in which file format it is: IFF, JPG, etc...?
If you're just interested in image file formats, you can use IsPicture() to do that.
MarkT
Posts: 5
Joined: Mon Jul 03, 2023 11:51 am

Re: Three questions about Amiga OS3 programming

Post by MarkT »

Whoa, thanks so much for your great tips! This really helps me!
Post Reply