Trying to build a MacOS standalone: need Xcode?

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Trying to build a MacOS standalone: need Xcode?

Post by jacque » Wed Jan 05, 2022 7:26 am

mattyj2001 wrote:
Wed Jan 05, 2022 7:02 am
My behavior scripts are text-only files, created by LiveCode itself, and not renamed.
This is a different problem than the OP's. It sounds like LC isn't adding your script-only file to the stackfiles. You can do that by saving the script-only stack to disk, selecting the stackfiles pane in the stack property inspector, and adding it there. Maybe LC doesn't do that automatically at first, because the stack has to be saved to disk before it can be added.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

stam
Posts: 2599
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Trying to build a MacOS standalone: need Xcode?

Post by stam » Wed Jan 05, 2022 9:35 am

mattyj2001 wrote:
Wed Jan 05, 2022 7:02 am
I typically start with no behavior script, use LiveCode to create one, initially edit it with LiveCode. Builds fine. Runs fine. But the first time closing and re-opening LiveCode it's hosed. (until I manually remove and re-add it.)
Sounds like it works only when already in memory?

I use similar setup for my apps, always have a startup routine in the splash stack that attempts to locate the actual file (if it can’t it copies a fresh copy to the target location) and then “start using” said stack to load in memory.

Are you doing the same? If not, that may be the issue…

Fjord
Posts: 132
Joined: Sat Dec 06, 2008 6:18 pm
Location: France

Re: Trying to build a MacOS standalone: need Xcode?

Post by Fjord » Wed Jan 12, 2022 1:06 pm

@Jacqueline:
I have a couple of comments about your settings but none of them would throw the XCode error you received.
If you need any inclusions, LC may miss some of them so it's usually better to include them manually.
BTW: what would be these inclusions for? passive files, like images? or external libraries? …? Basically: was I missing something here?
--
François

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Trying to build a MacOS standalone: need Xcode?

Post by jacque » Wed Jan 12, 2022 9:55 pm

Fjord wrote:
Wed Jan 12, 2022 1:06 pm
BTW: what would be these inclusions for? passive files, like images? or external libraries? …? Basically: was I missing something here?
Inclusions aren't related to your original problem, but it's something people often miss. In standalone settings, General pane, there is a choice to scan for inclusions or select them manually. Scanning can miss some things your app may need, so I always choose the manual method.

When manual is selected, the Inclusions pane in standalone settings becomes active. You will see a long list of things from which you can select the ones that your standalone uses. These include libraries, internet capabilities, widgets, databases, and a lot of others. You need to be familiar with the features your standalone uses. It doesn't hurt to select things you don't use, but it will add some size to the standalone. The answer and ask dialogs are always included by default and can't be deselected. Everything else is optional.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Fjord
Posts: 132
Joined: Sat Dec 06, 2008 6:18 pm
Location: France

Re: Trying to build a MacOS standalone: need Xcode?

Post by Fjord » Fri Jan 14, 2022 9:21 pm

Basically, my question is:
I develop a project with Livecode 9.6.2 on MacOS 11.6.2 BigSur; do I really need Xcode to build a standalone for target that same MacOS? Considering I couldn't find a doc mentioning Xcode for that case… can someone point me to docs?
--
François

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Trying to build a MacOS standalone: need Xcode?

Post by jacque » Sat Jan 15, 2022 1:56 am

You need the command line tools that Xcode provides, LC uses them to create standalones. You don't always need the whole app but that's the easiest way to get them. As I said before, there's a way to get them with terminal commands but I don't have a link to that info.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Fjord
Posts: 132
Joined: Sat Dec 06, 2008 6:18 pm
Location: France

Re: Trying to build a MacOS standalone: need Xcode?

Post by Fjord » Sat Jan 15, 2022 4:50 pm

I dloaded Xcode, only to find that the version from the App Store doesn't fit with LC 9.6.2 (I guessed that was hanging over my head) and that I should get an older (version 12 something) Xcode. OK… another day lost :? I'm going to fetch that version of Xcode
You need the command line tools that Xcode provides, LC uses them to create standalones.
Not that I doubt what you say -considering you're way more experienced than me with the 'finesses' [French polite word for 'quirks'] of LC-, but where do you get that from? can you point me to any doc? or, are you telling me that's an undocumented feature :shock: , oral tradition from gourou's mouth to gourou's ear?
Kind of frustrating: all the docs I can find mention using Xcode for development for iOS, but I'm just trying to make a Mac standalone for speed (maybe) and code safety.
Thanks for your help, I do appreciate it anyway!
--
François

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Trying to build a MacOS standalone: need Xcode?

Post by jacque » Sat Jan 15, 2022 7:17 pm

You're right, I can't find any docs about it, and I was conflating iOS requirements with Mac requirements. I assumed that the build process used the same set of commands that iOS does, because you had errors that repeatedly referenced Xcode.

I'd guess the requirement started when Apple locked down the OS with Gatekeeper, which has become more and more restrictive with each OS update. Now even Mac apps have to be signed and notarized, otherwise they can't be easily installed at all. The error you got indicated there was an issue finding the commands related to app security.

There will be an additional step after the app is built, if you plan to distribute it or use it yourself on a different Mac. You will have to sign and notarize the built app, which requires you to request a signing certificate from Apple. Matthias Rebbe has a very useful tool to help with that. If you plan to run the app only on the same machine that built it then I don't think you need to do that step.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Trying to build a MacOS standalone: need Xcode?

Post by LiveCode_Panos » Thu Jan 20, 2022 9:27 am

Hello all,

Sorry for the late reply, things have been quite busy lately.

So, the answer to the original question ("Do I need Xcode to build a Mac app?") is no, but you do need the command line tools.

If you already have Xcode installed, you probably won't see this error, because Xcode does include the command line tools.

If you do not have Xcode installed, and you do not want to install it, you can install *just* the command line tools by doing the following:

- Open Terminal
- Type

Code: Select all

sudo xcode-select --install

- Press Return, then enter your password, and press Return again

As Jacque said, this was not necessary in the past, but Apple's requirements regarding Mac apps have become stricter, so now the apps have to be signed, even ad-hoc. This is why these command line tools are needed for.

Kind regards,
Panos

Fjord
Posts: 132
Joined: Sat Dec 06, 2008 6:18 pm
Location: France

Re: Trying to build a MacOS standalone: need Xcode?

Post by Fjord » Sun Jan 23, 2022 11:44 am

@Panos: thanks, I must say I had given up building a standalone; I'll try that next week (going on honeymoon now :D trying development things might be unappreciated :? ), hoping I can get the version that's happy with LC 9.6.2
--
François

Fjord
Posts: 132
Joined: Sat Dec 06, 2008 6:18 pm
Location: France

Re: Trying to build a MacOS standalone: need Xcode?

Post by Fjord » Sat Mar 12, 2022 8:52 pm

So back to the old problem. I'm stuck with
- macOS 11.6.4 Big Sur anyway (can't go any further, it's a iBook Pro mid-2014)
- LC Community 9.6.2 (can't go any further with community edition).
I did a clean re-install (always nice to feel clean).

Now I looked at https://downloads.livecode.com/livecode/, which pointed me to https://downloads.livecode.com/livecode ... -9_6_3.pdf "LiveCode 9.6.2 Release Notes 5/17/21" which says
Platform support
   Mac
      The Mac engine supports: (…) 11.x (Big Sur)
OK, I know 9.6.2 *does* work on Big Sur
   iOS
      Currently, the supported versions of Xcode are:
…nothing about macOS 11 Big Sur, but most recent version is:
      Xcode 12.1 on MacOS 10.15 (Note: You need to upgrade to 10.15.4)
      We currently support building against the following versions of the iOS SDK:
      (…)
      14.1 (included in Xcode 12.1)
So, I dloaded Xcode 12.1.1, as it:
- is the latest version that's compatible with LC 9.6.2
- contains iOS SDK 14.1

But once that was done, I tried to plug together LiveCode 9.6.2 and Xcode 12.1.1 in LC preferences and got this:
Capture écran 2022-03-12 à 19.52.09.png
AND I saw in the forum a thread "[ANN] Release LiveCode 9.6.2" that says:
"New Features
- Support for the newly released MacOS Big Sur
- Support for building with Xcode 12.1, using the iOS 14.1 SDK (…)"
In short: iOS SDK 14.1 is included in Xcode 12.1, but LC 9.6.2 is not happy with it and says I need Xcode 12.1 !!?
What is the catch?
--
François

Fjord
Posts: 132
Joined: Sat Dec 06, 2008 6:18 pm
Location: France

Re: Trying to build a MacOS standalone: need Xcode?

Post by Fjord » Sun Mar 20, 2022 12:35 pm

I had to delete Xcode 12.1.1 and install Xcode 11.3.1 and everything works, finally. Thanks to all!
--
François

Post Reply

Return to “Mac OS”