Checking the host OS

Mark Waddingham mark at livecode.com
Sat Aug 31 08:37:43 EDT 2019


On 2019-08-31 04:41, Devin Asay via use-livecode wrote:
> No, I’m just toying with the idea of having a 32-bit launcher that
> would examine the host OS, then launch the proper executable based on
> whether it is 32 or 64 bit. Sort of like a poor man’s universal app
> like we used to create for MacOS. It’s possible I’m use way
> overthinking this.

I think you might be overthinking this...

The Windows world is different from mac because the former don't have 
the
idea of multi-architecture binaries.

Obviously on mac this isn't something you have to worry about - 
especially
since versions of macOS going back many years have supported 64-bit as 
have
the machines it runs on.

On Windows it is usual for the user to choose whether they want 32-bit 
or
64-bit versions of the apps they download and install. This is usually 
guided
by the webpages which offer downloads as you can usually assume that if 
the user
is on a 64-bit windows machine, then the browser they are running will 
be 64-bit
which means that you can tell from the UserAgent string what 
architecture their
machine has and so you can guide the user to the right choice.

In an end-user setting, you could always have a dialog which pops up 
when running
the 32-bit version on a 64-bit machine (by using Dar's suggestion) on 
first run
to suggest the user might want to download the 64-bit version - however, 
you then
have to ask yourself whether your app actually benefits from being 
64-bit enough
to justify this extra complexity.

In an organizational setting then one would hope that the IT department 
would
know what to do when presented with the choice of both a 32-bit and a 
64-bit
build of a Windows app... In reality this may or may not be the case ;)

So my suggestion (in general - obviously specific circumstances always 
apply) is
don't worry about it. Offer two downloads explicitly named and marked - 
one as
32-bit one as 64-bit and then, if you can, guide the user to the right 
choice
online by offering the appropriate build (which Chrome does, for 
example, adding
further weight to being able to rely on the bitness of the browser 
accessing your
download site).

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps



More information about the use-livecode mailing list