<div dir="ltr">Jack and Ned, thanks a lot!<div><br></div><div>I had forgotten about Distribution.plist. Will try the suggested value in the next beta.</div><div><br></div><div>Best regards,<br>Aivar</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 29, 2022 at 12:45 AM Ned Deily <<a href="mailto:nad@python.org" target="_blank">nad@python.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 28 Mar 2022, at 10:08, Aivar Annamaa <<a href="mailto:aivar.annamaa@gmail.com" target="_blank">aivar.annamaa@gmail.com</a>> wrote:<br>
> I have an app bundle, with embedded <a href="http://python.org" rel="noreferrer" target="_blank">python.org</a>'s universal build of Python 3.10.2 framework and a Tkinter-based GUI (<a href="https://github.com/thonny/thonny/releases/tag/v4.0.0b1" rel="noreferrer" target="_blank">https://github.com/thonny/thonny/releases/tag/v4.0.0b1</a>)<br>
> <br>
> I've used IDLE's approach in the Info.plist, and the launcher script. Functionally all is working fine, but a M1 user reported, that when opened from Finder, the app is launched in "Intel" mode. When the launcher is invoked in Terminal (/Applications/Thonny.app/Contents/MacOS/thonny), the app gets run in AMD64 mode. I don't have a M1 myself, so I haven't reproduced it myself.<br>
> <br>
> The same user now said that latest IDLE (3.10.4) runs in AMD64 mode even when launched from Finder.<br>
> <br>
> Any ideas what to check or try in order to make my app run in native mode?<br>
> <br>
> My launcher script template is here: <a href="https://github.com/thonny/thonny/blob/master/packaging/mac/Thonny.app.initial_template/Contents/MacOS/thonny" rel="noreferrer" target="_blank">https://github.com/thonny/thonny/blob/master/packaging/mac/Thonny.app.initial_template/Contents/MacOS/thonny</a> (shebang becomes gets set to .../Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/Resources/Python.app/Contents/MacOS/Python by the postinstall script)<br>
> <br>
> Info.plist template is here: <a href="https://github.com/thonny/thonny/blob/master/packaging/mac/Thonny.app.initial_template/Contents/Info.plist" rel="noreferrer" target="_blank">https://github.com/thonny/thonny/blob/master/packaging/mac/Thonny.app.initial_template/Contents/Info.plist</a><br>
<br>
<br>
It looks the problem is in your Distribution.plist; change the hostArchitectures to "arm64,x86_64".  Otherwise, the macOS installer assumes your app can only run as an Intel binary.<br>
<br>
<a href="https://github.com/thonny/thonny/blob/a9d12ba961eac875dc4a77ac1fb226baf5c3acc9/packaging/mac/Distribution.plist#L9" rel="noreferrer" target="_blank">https://github.com/thonny/thonny/blob/a9d12ba961eac875dc4a77ac1fb226baf5c3acc9/packaging/mac/Distribution.plist#L9</a><br>
<br>
--<br>
  Ned Deily<br>
  <a href="mailto:nad@python.org" target="_blank">nad@python.org</a> -- []<br>
<br>
</blockquote></div>