How to know if an app is 32 or 64 bit by script ?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

How to know if an app is 32 or 64 bit by script ?

Post by jmburnod » Wed Oct 31, 2018 9:52 am

Hi All,
OS X 10.6 can't open an 64 bits LiveCode app with a simply "Quit" message.
I want open an answer message inviting use 32 bits version at openstack if the systemversion < 10.9 and the app has been 64 bits compiled.
Best regards
Jean-Marc
https://alternatic.ch

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

Re: How to know if an app is 32 or 64 bit by script ?

Post by LiveCode_Panos » Wed Oct 31, 2018 1:00 pm

Hello Jean-Marc,

Check "the processor" in the dictionary, I think it is exactly what you need.

Kind regards,
Panos
--

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: How to know if an app is 32 or 64 bit by script ?

Post by jmburnod » Wed Oct 31, 2018 1:04 pm

Thanks Panos.
Yes, exactly what I need :D
Kind regards
Jean-Marc
https://alternatic.ch

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

Re: How to know if an app is 32 or 64 bit by script ?

Post by bogs » Wed Oct 31, 2018 1:17 pm

Heya, I'm curious how that would work, exactly.

As I understand Jean-Marc's question, he has both a 64bit and 32bit version of a program for OSX. If someone downloaded the wrong version, (the 64bit in this case on 10.6.x which is a 32bit OS), how would it run long enough to inform the user that they need the other version? Doesn't a 64bit program just not run on a 32bit system?

If, on the other hand, you have a launcher and scripts setup, and say the launcher is 32bit (theoretically should run anywhere), aren't the scripts agnostic? i.e., don't the scripts run under whatever engine is running, in this case the 32bit launcher? I'm very confused :roll:

Of course, since JM has said that was exactly what he needed, I'm thinking maybe he has a 32 bit launcher that launches a compiled standalone, and just needs to know which to launch?
Image

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: How to know if an app is 32 or 64 bit by script ?

Post by jmburnod » Wed Oct 31, 2018 3:34 pm

Bogs is right,
No launcher, just one main stack.
I added a line with an answer dialog but the program doesn't run long enough to inform the user.
In fact that is the liveCode version for 32 or 64 bits (LC 9) which doen't work on OS X 10.6
https://alternatic.ch

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

Re: How to know if an app is 32 or 64 bit by script ?

Post by LiveCode_Panos » Wed Oct 31, 2018 4:00 pm

Hello all,

I think that if you build a "universal" binary (e.g. check both 32 bit and 64 bit in the Mac standalone settings), then the OS will decide which slice to run.

Now, if a standalone built with LC 9 does not work on OSX 10.6, then unfortunately there is no much we can do, since LC 9.x supports OSX 10.9+

Apple has stopped supporting old OSX versions a looong ago, so it does not make much sense for LC to continue supporting them.

Note that it is quite likely that your standalone will continue to work in older MacOS versions, but it is not guaranteed, as this is not officially supported.

Kind regards,
Panos
--

PS: Jean-Marc out of curiosity, if you launch the standalone from the terminal do you get any error (in the terminal) before it quits? I am wondering if it is related to tsNet, since I vaguely remember someone mentioning that standalones with tsNet crash on startup on OSX 10.6

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: How to know if an app is 32 or 64 bit by script ?

Post by jmburnod » Wed Oct 31, 2018 6:11 pm

Hi Panos,
Thanks again for explanations. That is clearer for me.
I haven't got error when i open my app from terminal before the quit message.
tsNet is not in inclusions of my app
Kind regards
Jean-Marc
https://alternatic.ch

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”