BlueM / Pashua

Native macOS dialogs for scripting languages
164 stars 16 forks source link

Apple M1 Compatibility #20

Open adhuston opened 3 years ago

adhuston commented 3 years ago

It appears that Pashua is not currently a signed application, which means that it isn't passing Apple's application notarization requirement. It doesn't appear to be affected on Intel based Mac computers, but is an issue on the M1. I'm unable to launch Pashua.

ics-dan-snelson-zz commented 3 years ago

Happy Tuesday, @adhuston!

Pashua 0.11 is working as expected for me with macOS 11.1 (20C69) running on Apple M1.

If you recursively change the owner of Pashua.app to root, do your results change?

Also, the following may help: sudo xattr -r -v -d com.apple.quarantine /path/to/Pashua.app

BlueM commented 3 years ago

So far, I haven’t tested Pashua on an M1 Mac, but – except your issue – haven’t heard of any problems. Have you tried the usual approach for launching unsigned applications? I.e. right-click ➔ ”Open” in context menu?

najk commented 3 years ago

Its working well for us with the latest release, we do codesign our production app though, using this: sudo codesign -f --deep -s "identifier" "Yourapp.app" So all seems well with pashua and rosetta.

paulashbrook commented 3 years ago

Hello,

I have a situation where Pashua won't run on an M1 Mac.

I built a "bootstrap" package that runs some initial build and setup for my site, on new and reinstalled Macs. The package sets up a network location and installs the Munki client tools. It then runs Pashua to ask the technician for a device hostname and for the name of a Munki manifest to be used. Pashua isn't actually installed on the Mac, just copied over temporarily and deleted at the end of the process.

On a new M1 Macbook Air, the Install.log file shows:

2021-01-28 16:37:55+00 MacBook-Air package_script_service[1664]: ./postinstall: /tmp/PKInstallSandbox.z3CWhx/Scripts/uk.co.mysite-MunkiBootstrap.nf4FLc/install-files/Pashua/pashua.sh: line 56: /tmp/PKInstallSandbox.z3CWhx/Scripts/uk.co.mysite-MunkiBootstrap.nf4FLc/install-files/Pashua/Pashua.app/Contents/MacOS/Pashua: Bad CPU type in executable

Line 56 is in the "Run Pashua" function.

BlueM commented 3 years ago

@paulashbrook: I don’t have an M1 Mac yet myself, and therefore cannot experiment with this. But anyways, this is a rather unusual usage scenario – don’t you run into other problems, too, as Pashua is not code-signed?

nblom commented 3 years ago

@paulashbrook Im using Pashua with Rosetta2 and its working just fine on Big Sur 11.0-11.2 on M1. The latest release. Using "softwareupdate --install-rosetta --agree-to-license" in our bootstrap works as expected. I should also notice that we sign our app.

jkeller13 commented 3 years ago

Pashua has been running fine under Rosetta2, but the issue with Bad CPU type in executable is the lack of arm64 support. I recompiled the project in Xcode and added support for arm64, which also enabled dark mode. I have tested my existing Pashua workflows on the two M1 hosts which I have and haven't encountered any issues. I will submit a PR shortly so these changes can hopefully be merged to add these two big features.