Re: Windows -> MacOS : file format ? [SOLVED]

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Windows -> MacOS : file format ? [SOLVED]

Post by bangkok » Wed Apr 08, 2020 4:00 am

Hello,

i'm totally newbie with MacOS.

I managed to connect my Windows laptop to my MacBook Air, with file sharing "SMB"

Here is my question : on Windows, I compile a very simple stack for MacOS. Then I copy the whole directory to the MacBook, using SMB file sharing.

When I try to launch the app on the Mac, it fails.

But if i compile the same stack for Mac directly with LC on the Mac... then it works.

I have tried to zip the app directory on Windows and then copy the zip file on the Mac in order to "encapsulate" all the files...
The Mac can "decompress" correctly the zip file, but then again fails to launch the app.

What am I missing ? Is there a "file format" issue ?

Or a special parameter I should put on LC on Windows ? I've tried all the option "MacOS X 32 bits", and "64 bits". No difference.
Last edited by bangkok on Tue Apr 21, 2020 8:38 am, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Windows -> MacOS : file format ?

Post by richmond62 » Wed Apr 08, 2020 7:45 am

This problem has occurred before; re MacOS standalones compiled on a non-MacOS OS.

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

Re: Windows -> MacOS : file format ?

Post by FourthWorld » Wed Apr 08, 2020 7:52 am

The Windows file system has no executable bit, but Unix systems like macOS require the executable bit be set for a file to be able to run as a program.

Inside the Mac bundle of your standalone you'll find the actual executable file itself, in the macos folder. You can change the permissions in the Get Info window for that file. Once you turn on the executable permission it should run well.

When you build on a Mac the executable bit is set for you, but when building on Windows it isn't possible because of the difference in the file systems.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Windows -> MacOS : file format ?

Post by richmond62 » Wed Apr 08, 2020 7:57 am

So . . . there seems no way for someone building a Mac standalone on Windows to
set the executable bit.

So . . . I buy a program authored by you with LIvecode on Windows to run on my Macintosh computer,
and then when the thing arrives on my desktop I'm stymied unless I know all about looking inside the
Mac App bundle and "fiddling around"; this is going to be a pain-in-the-bum if one is selling one's stuff
to people who don't know about this and might be nervous about the "fiddling about."
Last edited by richmond62 on Wed Apr 08, 2020 8:19 am, edited 1 time in total.

SparkOut
Posts: 2839
Joined: Sun Sep 23, 2007 4:58 pm

Re: Windows -> MacOS : file format ?

Post by SparkOut » Wed Apr 08, 2020 8:06 am

I thought it's a security thing where you have to give permission for an app of "unknown source" to run? Windows has a sort of thing like that too, sort of.
Or is it just the executable bit? Or is that the same thing?

If one is selling stuff to "nervous" people then one is likely to be driving down the "publishing via the official store" road.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Windows -> MacOS : file format ?

Post by bogs » Wed Apr 08, 2020 10:27 am

Just out of curiosity, since I have never tried it myself, if your building from Linux, which uses the same method of setting the exe bit, will it then run on a Mac with no further messing around?

SparkOut, what you are describing (if I am thinking of it correctly) is set automatically by OSX when you start a program. Or at least, that is the closest I can think of to what goes on with Windows. What Richard is referencing is literally setting a file to exe. manually, similarly to what happens on 'nix when you dl the Lc installer and have to set it to be executable.
Image

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

Re: Windows -> MacOS : file format ?

Post by FourthWorld » Wed Apr 08, 2020 2:28 pm

richmond62 wrote:
Wed Apr 08, 2020 7:57 am
So . . . I buy a program authored by you with LIvecode on Windows to run on my Macintosh computer,
and then when the thing arrives on my desktop I'm stymied unless I know all about looking inside the
Mac App bundle and "fiddling around"; this is going to be a pain-in-the-bum if one is selling one's stuff
to people who don't know about this and might be nervous about the "fiddling about."
Operating systems have many differences. File system properties are just one of them. Then there are menus, window and font metrics, document associations, and a good many other things.

What vendor would present a software as worthy of purchasing that they've never even tested on the platforms they claim to support?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

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

Re: Windows -> MacOS : file format ?

Post by FourthWorld » Wed Apr 08, 2020 2:42 pm

bogs wrote:
Wed Apr 08, 2020 10:27 am
Just out of curiosity, since I have never tried it myself, if your building from Linux, which uses the same method of setting the exe bit, will it then run on a Mac with no further messing around?
Yep. Unix and Linux file systems are nearly identical in their permissions handling, so the executable bit goes along for the ride IF you transfer the bundle from one OS to the other directly.

If you first copy the file to a thumb drive, it's most likely going to lose the exe bit because most thumb drives are formatted with FAT32, a Microsoft file system designed primarily for compatibility with Windows.
SparkOut, what you are describing (if I am thinking of it correctly) is set automatically by OSX when you start a program. Or at least, that is the closest I can think of to what goes on with Windows. What Richard is referencing is literally setting a file to exe. manually, similarly to what happens on 'nix when you dl the Lc installer and have to set it to be executable.
Yep. The exe bit just says it's possible to run. Other additional settings, like notarization, will determine if the OS requiring such settings will allow the program to run.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Windows -> MacOS : file format ?

Post by richmond62 » Wed Apr 08, 2020 4:55 pm

What vendor would present a software as worthy of purchasing that they've never even tested on the platforms they claim to support?
Dunno: it seems that unless one builds MacOS builds on MacOS, let alone test them, they won't work properly.

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

Re: Windows -> MacOS : file format ?

Post by FourthWorld » Wed Apr 08, 2020 7:06 pm

richmond62 wrote:
Wed Apr 08, 2020 4:55 pm
What vendor would present a software as worthy of purchasing that they've never even tested on the platforms they claim to support?
Dunno: it seems that unless one builds MacOS builds on MacOS, let alone test them, they won't work properly.
Exactly. Selling untested software is not a sound business model.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Windows -> MacOS : file format ?

Post by richmond62 » Wed Apr 08, 2020 7:46 pm

FourthWorld wrote:
Wed Apr 08, 2020 7:06 pm
Exactly. Selling untested software is not a sound business model.
But this makes LiveCode's "develop in one place, deploy everywhere" [I know, I know, I got that quote a bit wrong]
look a bit silly, as one CANNOT carry an application targetted at MacOS to completion outwith MacOS.

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

Re: Windows -> MacOS : file format ?

Post by FourthWorld » Wed Apr 08, 2020 8:42 pm

richmond62 wrote:
Wed Apr 08, 2020 7:46 pm
FourthWorld wrote:
Wed Apr 08, 2020 7:06 pm
Exactly. Selling untested software is not a sound business model.
But this makes LiveCode's "develop in one place, deploy everywhere" [I know, I know, I got that quote a bit wrong]
look a bit silly, as one CANNOT carry an application targetted at MacOS to completion outwith MacOS.
How could anyone expect to test an application they don't test? Are you suggesting LiveCode should replace the file systems of both Mac and Win? Or just one of them? Or buy each customer a Mac? Or if the customer has a Mac maybe LiveCode should buy them a Windows computer?

I'm pretty sure I don't understand what you wrote....
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Windows -> MacOS : file format ?

Post by bogs » Wed Apr 08, 2020 8:54 pm

Um, the premise Richmond is stating is that you write once and deploy it (at least as far as the desktops go) to each platform, which strictly speaking isn't true anymore just through compilation. I wasn't around for the first rounds of this, so I can't say for sure how it was deploying to pre-OSX Mac back then, but the way it reads is that any body who has a desktop computer can -
a.) write a program...
b.) test it on the system they wrote it on...
c.) it works, deploy it to any other OS based on the compilation settings...
d.) ???
e.) profit !!

I have to say, when I first tried Lc, that was the belief I had, of course, I was quickly disallusioned of that belief when one of my friends who only has a Mac couldn't run the program.

I am sure that it is hard for someone with your amount of time in Lc to understand, but to someone just waltzing in, who might actually believe you can just write it and deploy it, they will be just as disallusioned as I was when the light bulb comes on :idea:
Image

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

Re: Windows -> MacOS : file format ?

Post by FourthWorld » Thu Apr 09, 2020 2:29 am

It's not about my time with LC, but it is about my time with using computers with different OSes.

In all this time, I've never heard anyone try to shift some sort of blame for having to account for OS differences onto Java, or OMO, or Gain Momentum, or Plus, or Director, or any other x-plat tool whose communities I've spent time with.

Though FWIW you can run a LiveCode stack in any instance of LiveCode on any platform regardless of the platform it was created on. But he knows that, which is among the things that confuses me about his post.

Maybe Richmond can propose some alternate wording is feels is important to the team for their consideration.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Windows -> MacOS : file format ?

Post by bogs » Thu Apr 09, 2020 3:23 am

I think you are missing it, or we aren't explaining it eloquently enough.
FourthWorld wrote:
Thu Apr 09, 2020 2:29 am
It's not about my time with LC, but it is about my time with using computers with different OSes.
In that area, I think I can match time in and I have a wide variety of experience with many different OS'es, although probably not normal ones. That really doesn't have anything to do with this discussion, though if you really want a death match, we can each go to our respective corners and build dueling Altair's, the first to recreate basic wins.
FourthWorld wrote:
Thu Apr 09, 2020 2:29 am
In all this time, I've never heard anyone try to shift some sort of blame for having to account for OS differences onto Java, or OMO, or Gain Momentum, or Plus, or Director, or any other x-plat tool whose communities I've spent time with.
No one is blaming anyone for anything, so I am not sure where you came up with that. I've never looked at Java (well, not seriously anyway haha), nor any of those others you mentioned. Well, Squeak, which I guess runs anywhere, and maybe a little pharoh (which is really squeak, don't let the name fool you).

Richmond simply stated what is blatantly plastered on the home page, well, it was when I started anyways, I should probably go look before I say that it still is..

Are you blaming Richmond and myself for the way Lc is portrayed on the home page? I certainly had no hand in that, and I doubt he did either.
Image

Post Reply

Return to “Mac OS”