LinusU / node-appdmg

💾 Generate your app dmgs
MIT License
1.69k stars 152 forks source link

Fails on M1 systems #212

Closed anoopvaidya closed 1 year ago

anoopvaidya commented 2 years ago

I am using this tool from many years, as soon as I moved to M1 system, I am unable to create dmg. My project is a Xamarin Mac application.

Attached the error that I see appdmgIssue .

umutocak commented 1 year ago

In order to fix this problem, you need to try with nvm via terminal.

LinusU commented 1 year ago

@anoopvaidya it seems like you have installed appdmg when running a native arm64 Node.js process, but are then trying to run it under Rosetta.

How are you installing appdmg? How are you executing appdmg?

anoopvaidya commented 1 year ago

Hi @LinusU, In the past few months, I tried to narrow down the issue, and looks like there is some issue between cakebuild and appdmg, which I am unable to resolve yet.

I am able to create dmgs directly executing the appdmg command. But when the same command is invoked through cake-build I get the above error. The command is StartProcess("appdmg", $"./TinyInstaller/appdmg.json ./TinyInstaller/test.dmg");

https://cakebuild.net/api/Cake.Common/ProcessAliases/81E648CC

LinusU commented 1 year ago

@anoopvaidya could you try starting it using arch to start the arm64 version?

I'm guessing something like:

StartProcess("arch", $"-arch arm64 appdmg ./TinyInstaller/appdmg.json ./TinyInstaller/test.dmg");