ZUGFeRD / quba-viewer

Quba is a viewer for electronic invoices
Apache License 2.0
97 stars 20 forks source link

Does not work on intel macs #23

Closed jstaerk closed 1 month ago

jstaerk commented 1 year ago

We build the Mac version on a M1, i.e. on a ARM platform. Apparently this does not give us universal binaries so the >70% of intel users cant start Quba? (What error message do they get?)

Is somebody affected and can someone assist, e.g. by helping us build on a intel mac or pointing to a good build service (which works, https://github.com/electron-userland/electron-build-service seems to be down) ?

PS: I attributed previous issues on the mac (#14, #19) mainly to the old version of electron we used, which should be fixed now. If I was wrong and it was in fact this issues pls let me know.

beleeisenmann commented 1 year ago

Hi there, I tried to install the viewer on my Mac. Got error-message that it is not supported.

quba-not_supported03 quba-not_supported02 quba-not_supported01
beleeisenmann commented 1 year ago

Hi there, I tried to install the viewer on my Mac. Got error-message that it is not supported. quba-not_supported03 quba-not_supported02 quba-not_supported01

If I click on the question-mark-icon I get an empty window.

jstaerk commented 10 months ago

We tried to compile a prerelease of 1.4.0, can someone please try and let us know if https://quba-viewer.org/files/issue23_quba_intel.dmg works?

d--j commented 10 months ago

We tried to compile a prerelease of 1.4.0, can someone please try and let us know if https://quba-viewer.org/files/issue23_quba_intel.dmg works?

it successfully starts on an Intel Mac with macOS 14.3

RF3 commented 7 months ago

We tried to compile a prerelease of 1.4.0, can someone please try and let us know if https://quba-viewer.org/files/issue23_quba_intel.dmg works?

I can confirm it also runs on an Intel Mac with macOS 12.7.4 (Monterey).

jstaerk commented 6 months ago

26 and #42 have been solved and we need some volunteer with a intel mac to release versions for both. We do now sign and notarize this stuff but my understanding is that only when we build it in a intel mac we get a universal binary, in which cases it would start on both intel and m macs, if we only build it on a m it will also only run on a m and AFAIK there is no setting to prevent this. -> Any volunteers?

RF3 commented 4 months ago

26 and #42 have been solved and we need some volunteer with a intel mac to release versions for both. We do now sign and notarize this stuff but my understanding is that only when we build it in a intel mac we get a universal binary, in which cases it would start on both intel and m macs, if we only build it on a m it will also only run on a m and AFAIK there is no setting to prevent this. -> Any volunteers?

I can test it on an Intel Mac with macOS Ventura 13.6.6.

jstaerk commented 3 months ago

@RF3 shall we have a look together e.g. at Thu, August 15th, 15:00-16:00 CET?

jstaerk commented 2 months ago

I just had another look and it actually seems to work so we need only someone with intel mac to build&release because we only have Ms and intel seems to be the only way to get universal binaries. we can talk on wednesday

smarsching commented 2 months ago

@jstaerk According to my research, you should be able to build a universal binary on a Mac with Apple Silicon. I modified the package.json as suggested on Stack Overflow:

diff --git a/package.json b/package.json
index a8402d8..852f418 100644
--- a/package.json
+++ b/package.json
@@ -49,7 +49,13 @@
     "appId": "org.quba-viewer.viewer",
     "mac": {
       "category": "Document",
-      "icon": "./assets/img/logo_small_icon_only.png"
+      "icon": "./assets/img/logo_small_icon_only.png",
+      "target": {
+        "target": "dmg",
+        "arch": [
+          "universal"
+        ]
+      }
     },
     "win": {
       "icon": "./assets/img/logo_small_icon_only.png"

The resulting binary (built on a Mac with Apple Silicon) can be started on both Intel and Apple Silicon Macs. At the moment, I have the problem that after starting the built application, there only is a white window, but I assume that this rather happens because I did something wrong during the build process (I am neither familiar with NPM nor Electron) than this being a result of building a universal binary.

smarsching commented 2 months ago

I was able to confirm that the problems that I experienced when starting Quba were caused by my inability to correctly handle the build tools, not a problem with the universal binary: I replaced the Contents/Resources directory in the universal app that I built with the one from the official 1.4.0 release, and now everything is working fine.

So, I can definitely say that there is no need for an Intel Mac in order to build a universal binary.

jstaerk commented 2 months ago

merged it we'll try

Ostalf24 commented 2 months ago

I was not able to run Quba 1.4.0 on my Intel Mac Book under iOS 14.4.1. Can you please help me?

jstaerk commented 2 months ago

Hi @akemlek could you please build with your M mac and send me a mail when done? Did the size of the dmg increase? thanks!

jstaerk commented 1 month ago

Whoever wants to try please let us know if https://quba-viewer.org/files/Quba-1.4.1-universal.dmg works!

smarsching commented 1 month ago

@jstaerk I just tested it on both my Intel and my Apple Silicon Mac and it seems to work on both. So, I think you got it right. 👍

5now commented 1 month ago

I've tried it on my Mac and it's not working. Bildschirmfoto 2024-09-24 um 19 25 01

smarsching commented 1 month ago

@5now I think that you accidentally opened the wrong file: Your screenshot says “Quba 1.4.0-arm64”, but the linked DMG is “Quba-1.4.1-universal”.

5now commented 1 month ago

But this is was the Download link on the Webpage ok i try the other one. Thank you

5now commented 1 month ago

@smarsching so i have tried the Quba-1.4.1-universal as you suggested and am now receiving following error message: Bildschirmfoto 2024-09-24 um 19 34 40

smarsching commented 1 month ago

@5now I assume that because this is not a release but just a pre-release built, it has not been signed, and macOS does not allow running unsigned apps that have been downloaded. If you want to mark it as safe, you have to run

xattr -d com.apple.quarantine Quba-1.4.1-universal.dmg

before opening the DMG. After doing that, macOS will not assume that the file has been downloaded from the Internet and it will thus run the app, even though it is not signed.

5now commented 1 month ago

@smarsching thx a lot now its working

RF3 commented 1 month ago

It's working with macOS Ventura 13.6.9 on an Intel Mac.

In the menu, the entry Datei öffnen... / Open File... is missing the ⌘O shortcut but Command+O is still working. Beenden / Quit is also missing the ⌘Q shortcut and Command+Q does not close the app.

Lenni-builder commented 1 month ago

I can confirm that it works on my MacBook, even though the startup time is unusually long. It starts up way faster on Linux on the same machine. image

Lenni-builder commented 1 month ago

After some more testing I noticed a few things:

My guess is that you set some build option incorrectly so that the app "thinks" it's running on Linux or Windows.

jstaerk commented 1 month ago

After some more testing I noticed a few things:

  • The menu bar says "Exit" instead of "Quit" with Cmd+Q (as previously mentioned)
  • Shortcuts like Ctrl + O should be Cmd + O (also mentioned before)
  • There seems to be no way to close the "about" dialog without exiting the entire app. (I don't know how it behaves on ARM macOS, I don't have a way to test that)

My guess is that you set some build option incorrectly so that the app "thinks" it's running on Linux or Windows.

Please open separate issues for separate issues, thanks

Lenni-builder commented 1 month ago

I think those issues are related to the Intel/Universal build, but I can't verify that. Somebody should try both the stable ARM as well as universal builds on an ARM machine.

beleeisenmann commented 1 month ago

Installed the Quba viewer today on my macBookAir Sonoma 14.6.1 successfully.

beleeisenmann commented 1 month ago

I had a look at the surface with different language-settings and reported a translation error on the edit-menu: the last section is not translated.

Bildschirmfoto 2024-10-01 um 10 02 28 Bildschirmfoto 2024-10-01 um 10 02 04

I although asked myself why a user would need emoticons to view a document.

The icon in the dock is very small.

Bildschirmfoto 2024-10-01 um 10 03 25
beleeisenmann commented 1 month ago

Installed the Quba viewer today on my macBookAir Sonoma 14.6.1 successfully.

apologizes for not using an Intel Mac - i do not own it anymore - try to find one.

jstaerk commented 1 month ago

Apprently it now works and will be released with the next version for the time being pls refer to the link above, if there were any other issues please open separate tickets. @smarsching thanks a million, I guess this was the first community patch at all.