Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native support for ARM-Based Macs #199

Closed
GithubGey opened this issue Sep 19, 2022 · 22 comments · Fixed by #297
Closed

Native support for ARM-Based Macs #199

GithubGey opened this issue Sep 19, 2022 · 22 comments · Fixed by #297
Labels
macos Related specifically to macOS

Comments

@GithubGey
Copy link

期待可以出一个mac M1版本的

@dail8859
Copy link
Owner

If the currently available .dmg file on the releases page does not run on mac M1 then I'm not able to do much. I don't use Mac at all so I'm not sure what all this would require. Someone else would have to look into it.

@dail8859 dail8859 added the macos Related specifically to macOS label Sep 19, 2022
@gtn1024
Copy link

gtn1024 commented Oct 9, 2022

QT's native support for Apple Silicon is from QT 6.2

@necokeine
Copy link

Maybe I can take this issue, I have a mac and did some Qt development several years ago.

@necokeine
Copy link

I'm not sure whether this dmg works too on your side.
https://github.com/necokeine/NotepadNext/releases/tag/v0.5.5

@dail8859
Copy link
Owner

dail8859 commented Oct 9, 2022

@necokeine

Maybe I can take this issue

Any help would be greatly appreciated! And if it's only possible with Qt6.2 then that's fine. This project will be moving to that at some point in the near future.

@xiaoduo
Copy link

xiaoduo commented Oct 12, 2022

I'm using M1 Macbook pro, just tried the .dmg in release 0.55, it can work.

@PaddyTB
Copy link

PaddyTB commented Oct 12, 2022

I’m using a Mac M1 too and the 0.5.5 dmg works fine

@72min
Copy link

72min commented Oct 12, 2022

If the currently available .dmg file on the releases page does not run on mac M1 then I'm not able to do much. I don't use Mac at all so I'm not sure what all this would require. Someone else would have to look into it.

估计他的意思是 希望支持 M1的arm架构 目前是可以通过转译运行。

@PaddyTB
Copy link

PaddyTB commented Oct 12, 2022

Yes, it's running the Intel binaries just fine under Rosetta

@dail8859
Copy link
Owner

Forgive me for being completely illiterate when it comes to Mac hardware...so is this still a valid issue? Or are there arm-based M1 chips that this application still doesn't work for?

@PaddyTB
Copy link

PaddyTB commented Oct 12, 2022

Intel binaries get translated at runtime by Rosetta 2 on ARM macs - and this appears to be working fine for me and @xiaoduo. Native ARM support will be cool when it comes along but I believe it’s working well under emulation for now. It’s not a bug / issue so much a a feature request or enhancement IMO as we should (hopefully) get improved performance once it runs natively on ARM. HTH

@necokeine
Copy link

@necokeine

Maybe I can take this issue

Any help would be greatly appreciated! And if it's only possible with Qt6.2 then that's fine. This project will be moving to that at some point in the near future.

Yes, this compilation is only success Qt higher than 6.2, I did it with Qt6.4. I believe that Qt could cross-compile M1 binary on other platform, so all things should be done is just add a new compilation process for M1.

@dail8859 dail8859 changed the title mac M1 Native support for ARM-Based Macs Oct 13, 2022
@72min
Copy link

72min commented Oct 18, 2022

原谅我在Mac硬件方面完全是文盲...那么这仍然是一个有效的问题吗?或者是否有基于arm的M1芯片,此应用程序仍然不起作用?

转译运行性能跟效率不佳,如果只是简单文本记录影响不大,但是在需要占用大量ram cpu的时候就会表现卡顿。如果可以编译支持arm64架构的应用 会更佳。

@elcuco
Copy link
Contributor

elcuco commented Oct 18, 2022

https://doc.qt.io/qt-6/macos.html - it seems the fix is trivial. Can anyone with a Mac confirm that the generated binary contains also arm64 support?

@PaddyTB
Copy link

PaddyTB commented Oct 18, 2022

https://doc.qt.io/qt-6/macos.html - it seems the fix is trivial. Can anyone with a Mac confirm that the generated binary contains also arm64 support?

Indeed and @necokeine has already done it - see his message earlier in this thread... but the underlying QT version needs to be 6.2+

@elcuco
Copy link
Contributor

elcuco commented Oct 21, 2022

@dail8859 You are currently using Qt 6.2.4 for official builds. IMHO, you can bump this to 6.3.1 without issues. This would fix the official releases, no? If someone wants to locally build against 6.1.x or 6.2.x - some things might be broken. (I am using 6.4.x and its fine, but you might be more conservative).

qt_version: "6.2.4"

@dail8859
Copy link
Owner

@elcuco I'm building with 6.2.4 in the action (and generating the artifact), but the binaries published on the releases page are still using 5.15.

In the next release or two I plan to officially switch to 6.2 (or later) for the 'official' binaries.

@dail8859
Copy link
Owner

dail8859 commented Dec 6, 2022

So now that Qt6.2 (and also Qt6.4) is being used, is this issue as simple as adding:

QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64

To the project file?

@dail8859
Copy link
Owner

dail8859 commented Jan 6, 2023

I've got a new test build (you'll need to unzip it first). This should be a multi-architecture binary that supports ARM.

https://github.com/dail8859/NotepadNext/suites/10221193752/artifacts/500858023

@GithubGey
Copy link
Author

I've got a new test build (you'll need to unzip it first). This should be a multi-architecture binary that supports ARM.

https://github.com/dail8859/NotepadNext/suites/10221193752/artifacts/500858023

收到 我试试

@PaddyTB
Copy link

PaddyTB commented Jan 10, 2023

I've got a new test build (you'll need to unzip it first). This should be a multi-architecture binary that supports ARM.

https://github.com/dail8859/NotepadNext/suites/10221193752/artifacts/500858023

This is running great as an ARM64 binary on my Mac - fab! Loving the new session retention stuff too - thanks @dail8859!

@dail8859
Copy link
Owner

@PaddyTB Thanks for the info and testing it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macos Related specifically to macOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants