What is actual toolchain used in the compiling of Mac apps?

Mac OSX specific forum
User avatar
Blood
Enthusiast
Enthusiast
Posts: 161
Joined: Tue Dec 08, 2009 8:34 pm
Location: United Kingdom

What is actual toolchain used in the compiling of Mac apps?

Post by Blood »

What is actual toolchain used in the compiling of Mac apps? i.e. we write PB code in the IDE and hit compile, what are the tools use to take that PB source and turn it into a Mac .app? Obviously Xcode is involved in some way, but how?

I'm asking because things could get interesting if PB apps are accepted into the new Mac App Store.
C provides the infinitely-abusable goto statement, and labels to branch to. Formally, the goto is never necessary, and in practice it is almost always easy to write code without it. We have not used goto in this book. -- K&R (2nd Ed.) : Page 65
WilliamL
Addict
Addict
Posts: 1252
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Re: What is actual toolchain used in the compiling of Mac ap

Post by WilliamL »

It's my understanding that XCode is where the compiler is and that is about all I know.
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
User avatar
Blood
Enthusiast
Enthusiast
Posts: 161
Joined: Tue Dec 08, 2009 8:34 pm
Location: United Kingdom

Re: What is actual toolchain used in the compiling of Mac ap

Post by Blood »

Yeah, but GCC/Clang doesn't compile PB source so why is Xcode needed? Im interested in knowing to evaluate wether or not PB apps would be accepted in to the new Mac App Store.
C provides the infinitely-abusable goto statement, and labels to branch to. Formally, the goto is never necessary, and in practice it is almost always easy to write code without it. We have not used goto in this book. -- K&R (2nd Ed.) : Page 65
OrangeJuice
User
User
Posts: 24
Joined: Sat Jul 24, 2010 11:56 am

Re: What is actual toolchain used in the compiling of Mac ap

Post by OrangeJuice »

Maybe PureBasic is a Precompiler that actually generates C/C++/Obj-C/Obj-C++ code.
Maybe it uses XCode just as a linker, building an app from Obj files that the PBCompiler generates.

Whichever is true, I doubt that it will be a general Problem with the Mac Appstore, but violations of the Human Interface Guidlines might very likely be. The XCode gui tools support one in keeping to the HIG, which is of course different when writing a GUI manually. Also, PB doesn't use all the GUI Element styles, like e.g. all the available styles for Buttons on OSX. On iPhone/iPad this would be a major show stopper since for the Appstore Dwarfs usually that is reason enough to reject an app.

I would wait and observe. In general, i have a bad feeling about the Mac Appstore thing.
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: What is actual toolchain used in the compiling of Mac ap

Post by freak »

XCode is an IDE. It doesn't compile anything. It uses gcc for compilation.

PB compiles to assembler which is assembled using the gnu assembler and linker. IIRC, PB nees gccas well because it calls the assembler/linker through it for simplicity. All those are installed if you install XCode, that is why you need to install it for PB.

If this is true, then you are probably out of luck, because PB so far still calls the Carbon API which is deprecated: http://www.purebasic.fr/english/viewtop ... 16#p337116

If you want my opinion on the AppStore thing:
I wouldn't invest too much work into it. Apple has a way of screwing you over if you don't dance 100% to their tune. Even if PB programs fit the rules today. Who says they are still allowed in 6 months? Are you willing to take that chance?
quidquid Latine dictum sit altum videtur
User avatar
Blood
Enthusiast
Enthusiast
Posts: 161
Joined: Tue Dec 08, 2009 8:34 pm
Location: United Kingdom

Re: What is actual toolchain used in the compiling of Mac ap

Post by Blood »

Is there plans to update PB to use Cocoa?
C provides the infinitely-abusable goto statement, and labels to branch to. Formally, the goto is never necessary, and in practice it is almost always easy to write code without it. We have not used goto in this book. -- K&R (2nd Ed.) : Page 65
jamirokwai
Enthusiast
Enthusiast
Posts: 796
Joined: Tue May 20, 2008 2:12 am
Location: Cologne, Germany
Contact:

Re: What is actual toolchain used in the compiling of Mac ap

Post by jamirokwai »

Blood wrote:Is there plans to update PB to use Cocoa?
Hi,

I'd be interested in this as well :-)
Regards,
JamiroKwai
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: What is actual toolchain used in the compiling of Mac ap

Post by freak »

Blood wrote:Is there plans to update PB to use Cocoa?
Yes, but there is no specific time-frame for this yet.
quidquid Latine dictum sit altum videtur
Post Reply