Making an AS app compatible with both 32-bit and 64-bit environments

Hi all

I hope I can get the benefit of your experience with this gnarly problem of supporting legacy apps.

I’m working on AppleScripts that manage the Helix suite of database applications - Helix RADE (HR), Helix Engine (HE), Helix Server (HS), Helix Client (HC), Helix Utilities (HU).

These applications date back to the introduction of the Macintosh itself and in their current form are 32-bit apps limited to macOS Mojave 10.14.6 or earlier, running on Intel hardware.

I maintain a script that runs regular backups of Helix Collections (aka databases).

In its basic form it will take the HS down, clone the collection, run HU to fix irregularities and then put the HS back online.

In a more complex scenario the collection, once cloned, may also be launched in HR, or even HE, to complete some esoteric functions before HU is run again and then put back into service with HS.

This script, in both forms, has run quite well on a number of client sites for years. Now though, the Helix Suite is being modernised, firstly by transitioning HS and HU to 64-bits so that they can be deployed on modern hardware and software.

When I run my script in this modern environment - which of course won’t host the 32-bit apps: HR, HE or HC - I was confronted with a dialog asking for the whereabouts of said apps. I tracked the issue down to a couple of handlers in a script library that do basic things like launching, saving and quitting said apps. I could just comment out the references to those apps and all might be well - but for the need for some clients to run those apps for the more complex backup tasks described above.

So now I’m confronted with a code management problem: do I have to fork the code and maintain separate 32-bit and 64-bit safe versions?

Or, is there a way to do on-the-fly code base switching that will avoid this problem altogether?

Does no-one have a suggestion?

Isn’t it difficult to answer because it is difficult for people around you to understand what you are having trouble with?

It is not possible to generate an executable binary that supports all Intel 32-bit / Intel 64-bit / ARM 64-bit platforms with one AppleScript source code and one environment.

You will be able to export AppleScript applets for Intel 32bit / Intel 64bit on older macOS.

In the current environment, you can export AppleScript applets for Intel 64 bit / ARM 64 bit.

I guess we have no choice but to keep the old environment and the current environment, and write out AppleScript applets separately for each.

For older environments, it is also possible to maintain them on top of a virtual environment such as Parallels Desktop.

In order to support all of Intel 32-bit / Intel 64 bit / ARM 64-bit, it is necessary to build and maintain an environment for it.

1 Like

Thanks for that. Its pretty much as I expected but I was hoping someone else had found a way that I could not see.