Trying to build a MacOS standalone: need Xcode?

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

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

Post by FourthWorld » Mon Dec 20, 2021 2:00 am

Fjord wrote:
Sun Dec 19, 2021 3:12 pm
All right, still with 9.6.0., tried to make a splash screen, following
https://lessons.livecode.com/m/4071/l/1 ... pplication
and
https://lessons.livecode.com/m/4603/l/6 ... n-settings
(for the n-th time in my life :x ); I got this (there more below but I liked the 'There was an error…' when there are a thousand errors).What am I to do with these error codes?
Seeing that dialog is itself a bug. The IDE normally provides a much more readable format for conveying error info. What you're seeing there instead is raw error info used internally. It is not meant for human reading, useful only for tools to parse to obtain human-readable guidance. I would imagine you've stumbled into a case where someone working on the IDE put in a temporary error handler and forgot to back it out to use the human-readable error handling before shipping.

Please submit that recipe and screen shot to the bug database at:
https://quality.livecode.com/
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

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 » Mon Dec 20, 2021 5:14 am

On the other hand, if the error is coming from a standalone then this raw error report is normal.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

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

Post by FourthWorld » Mon Dec 20, 2021 5:34 pm

jacque wrote:
Mon Dec 20, 2021 5:14 am
On the other hand, if the error is coming from a standalone then this raw error report is normal.
There's nothing normal about presenting raw error info to any person. It's not useful to devs, less so for end-users. For devs it gives a bad impression of LC; for end users it gives a bad impression of apps made with LC.

If the goal is to provide some UI for error reporting (a good and generally useful thing to do), making the Error Dialog UI they already have for that a default when building a standalone would be far better than this Answer Dialog UI they've mystifyingly also created.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

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 » Mon Dec 20, 2021 7:20 pm

Fjord wrote:
Sun Dec 19, 2021 9:48 pm
Is there a good reason why my stack, which is 470x560, gets elongated when I try to generate the standalone? it is now 721x371…
It shouldn't. Do you have a resizestack handler anywhere?
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 » Thu Dec 23, 2021 6:31 pm

@Jacqueline: both stack (main and launcher) were resized when I tried to build the standalone, together with the object inspectors. The launcher stack has only a small script (taken from https://lessons.livecode.com/m/4071/l/1 ... pplication), nothing more. The main stack has a
on resizeStack pNewWidth, pNewHeight, pOldWidth, pOldHeight
and sets properties for the fields; which is nice because that's the way I can resize the stacks when it has changed size.

@Richard: Tried to submit that bug. Sorry, but I gave up after a 30 mins of getting, again and again, useless msgs:
It looks like you didn't come from the right page (you have no valid token for the create_attachment action while processing the 'attachment.cgi' script)
Tried many strategies to go back on my tracks, and yes, I must have made a mistake at one point. Frankly, what do I have to care about so called tokens or create-attachments or whatever? That info is only useful if you know the insides of the system, which is not my case (and I don't want to know). So my reporting is incomplete. People at Livecode do not seem to understand that I'm just trying to make Livecode work on a standard Mac and I'm NOT going to spend hours to try to report a bug THEY left, on a bug tracking system that's buggy too. <breathe deeply and slowly to calm down>
Now, as I seem to get <paranoïa on> unusual bugs <paranoïa off>, I suspect it might be linked to the fact that I have a non-English version of MacOS…?
Still, the bug reproduced nicely :? meaning I still can't generate a standalone.
--
François

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 » Thu Dec 23, 2021 6:47 pm

Fjord wrote:
Sun Dec 19, 2021 2:27 pm
Tried with 9.6.0., worked like a charm; and compiling in half the time.
Then tried again with 9.6.2. same problem as before.
Where can I find the prefs? I can't seem to find anything called 'Livecode' in
'iBook'>'Big Sur'>'Library' (it's Bibliothèque in French)>Preferences
to locate the file:

Code: Select all

put the filename of stack "revpreferences"
once located, you can just delete it... on relaunching LC it will create a new one (but all your settings will have course reverted to default)

Hope that helps,
Stam

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 Dec 26, 2021 6:59 pm

the filename of stack "revpreferences"
Yes it does help!! never even thought of writing that! Thanks!
--
François

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

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

Post by FourthWorld » Mon Dec 27, 2021 2:19 am

Thank you for at least attempting to submit a report on that errant error dialog. Sorry you enountered issues with the reporting system. Bugzilla is a capable tool, but wins no awards for usability.

I've seen that error dialog discussed for years, so often it's sometimes considered normal. But it's so unhelpful we'll all be glad when that answer statement is found and replaced.

Someday we'll get a repeatable recipe...
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

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 » Mon Dec 27, 2021 6:27 pm

Fjord wrote:
Sun Dec 26, 2021 6:59 pm
the filename of stack "revpreferences"
Yes it does help!! never even thought of writing that! Thanks!
LC prefs don't affect the problem you're trying to solve. The error message you posted indicates that Xcode's command line tools aren't installed and so ad-hoc signing can't be completed. So the short answer is yes, you need at least the command line tools. Someone on the mailing list posted a way to install only the tools without the overhead of the whole Xcode app but I haven't tried it.

That said, it used to be that ad-hoc signing was only for iOS apps but now that OS X is more locked down it might be necessary for Mac apps too. If older versions of LC work then maybe newer versions have added the new requirement to the build process. Or it might be that you've accidentally selected iOS in standalone settings. Richmond may have suggested that but he didn't post in English so I couldn't tell.

The easiest way is to reinstall Xcode but I can try to find the list post if you'd rather just install the command line tools.
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 » Mon Dec 27, 2021 11:30 pm

@Richard: I finally succeeded in posting the bug on the LiveCode Quality Control Center

I tried again to build a standalone, which I never succeeded in all these years.
Questions, not clear to me (I leave aside for now the answer from Jacqueline)
1° I have both my useful stack (called Indicateurs) and a launcher stack (called Launcher); when I want to generate a standalone, I supposed I had to define the Standalone Settings with the Launcher stack in the front, right? or is it irrelevant?
2° the Launcher stack script has only an 'openStack' handler that calls the Indicateur stack ('open stack "Indicateurs.livecode'), correct?
3° am I even supposed to have the Indicateur stack open, when I generate the standalone in the Launcher?

I'll post the thumbnails of the Standalone Settings for the Launcher stack here, just in case someone with a sharp eye sees a mistake of mine… (maybe not even so sharp, btw).
- General thumbnail: I left the default options
- Stacks thumbnail (attached) the long line is the pathname for my 'Scripts' utilities stack, sitting in my Dropbox (see viewtopic.php?f=9&t=36202)
- Copy Files: empty
- Inclusions: it's deactivated
- Mac (attached), I left most fields empty or with a default value
- Windows, Linux, iOS Android, HTML5 are unchecked
- Bug report unchecked
Attachments
Mac.gif
Stacks.gif
--
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 » Tue Dec 28, 2021 9:00 pm

1. Correct, the Launcher stack will become the standalone and is the stack that Standalone Settings applies to.
2. The openStack handler looks okay.
3. It doesn't matter if the Indicateurs stack is also open when you build.

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.
  • In the Mac OS settings, you don't have a full bundle ID. That's important. The bundle is missing the middle item, which should be a domain name. For example: com.domain.appname. If you have a domain, put it in the middle position; otherwise make up one.
  • There is no app icon specified. The place where you've included an icon ID is for use within the app when dialogs are displayed. Your app will have a generic icon unless you specify a file, which needs to be in a Mac icon format.
These are all generic issues though, the app should build whether you change the settings or not. The XCode error is a different thing.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

mattyj2001
Posts: 15
Joined: Tue Apr 04, 2017 8:02 am

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

Post by mattyj2001 » Tue Jan 04, 2022 11:11 am

I've had a similar problem as Fjord as late.

It happens to me when I add a new behavior script to a card or widget using the button/menu in the object's property inspector (Advanced tab). Usually it'll be fine until I close and re-open the stack the first time after adding it.

To fix it, I have to completely remove references to the behavior script from the stack (in property inspector and standalone settings, plus removing the extra stack it creates to hold the behavior script, then save, close/reopen stack) then manually add it back in through the object's property inspector. After that, it seems to work forever, at least with regard to that new script. If I add another one, boom. Same problem. Three times and counting on my current project.

Did this error start happening after you added a new stack file or reference?


-Matt

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

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

Post by FourthWorld » Tue Jan 04, 2022 5:04 pm

Fjord wrote:
Mon Dec 27, 2021 11:30 pm
@Richard: I finally succeeded in posting the bug on the LiveCode Quality Control Center
Thank you.

I think I was able to find it - this one?
https://quality.livecode.com/show_bug.cgi?id=23494
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

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 » Tue Jan 04, 2022 6:37 pm

mattyj2001 wrote:
Tue Jan 04, 2022 11:11 am
I've had a similar problem as Fjord as late.

It happens to me when I add a new behavior script to a card or widget using the button/menu in the object's property inspector (Advanced tab). Usually it'll be fine until I close and re-open the stack the first time after adding it.
Do you change the name of either stack? That breaks the links. Is your behavior script a text-only file?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

mattyj2001
Posts: 15
Joined: Tue Apr 04, 2017 8:02 am

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

Post by mattyj2001 » Wed Jan 05, 2022 7:02 am

jacque wrote:
Tue Jan 04, 2022 6:37 pm
mattyj2001 wrote:
Tue Jan 04, 2022 11:11 am
I've had a similar problem as Fjord as late.

It happens to me when I add a new behavior script to a card or widget using the button/menu in the object's property inspector (Advanced tab). Usually it'll be fine until I close and re-open the stack the first time after adding it.
Do you change the name of either stack? That breaks the links. Is your behavior script a text-only file?
My behavior scripts are text-only files, created by LiveCode itself, and not renamed.

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.)

Next time maybe I'll start by creating an empty behavior script and adding that manually. It's dang strange.

Post Reply

Return to “Mac OS”