LinusU / node-appdmg

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

bless: The 'openfolder' is not supported on Apple Silicon devices. #239

Open anoopvaidya opened 5 months ago

anoopvaidya commented 5 months ago

I have been using appdmg for a long time, and I just noticed the issue in Apple Silicon devices. Since gradually I am moving from Intel based to Apple Silicon (M1, M2 etc) macs the appdmg tools started giving this error.

Attached is the screenshot showing the appdmg version and the error. I saw Issue#204, but could not understand how can I use it on our project.

Please help us with this.

appdmg issue
GZixeT commented 4 months ago

Quick solution:

  1. Open file /usr/local/lib/node_modules/appdmg/lib/appdmg.js
  2. Find and remove code
if (os.arch() !== 'arm64') {
args.push('--openfolder', global.temporaryMountPath)
}
  1. Save file
  2. Try make dmg again
  3. Done

Quick solution:

  1. Download master appdmg
  2. Open folder /usr/local/lib/node_modules/appdmg/lib/
  3. Replace files from /usr/local/lib/node_modules/appdmg/ with files from [1]
  4. The folder node_modulesshould remain in /usr/local/lib/node_modules/appdmg/
  5. Done
anoopvaidya commented 4 months ago

@GZixeT : I did both the steps but no luck. And one more thing the path you mentioned /usr/local/lib/node_modules/appdmg/lib/appdmg.js does not exist on my(teams) system. In fact the path is /opt/homebrew/lib/node_modules/appdmg/lib/appdmg.js

Is this ok, or we need to do something else to get it updated?

GZixeT commented 4 months ago

Is this ok, or we need to do something else to get it updated?

It's normal that you have a different path, try to follow the steps to follow your path. If all else fails, then your problem is different from mine, and you will have to look for your own solutions.

anoopvaidya commented 4 months ago

@GZixeT : I did the same changes, but Logically commenting the if condition that will never get executed on an ARM (Apple silicon system), how can that fix the issue?

if (os.arch() !== 'arm64') {
    args.push('--openfolder', global.temporaryMountPath)
}

Either you have an Intel chipset or you did something else to fix it.

GZixeT commented 4 months ago

Either you have an Intel chipset or you did something else to fix it.

Yes, it's strange, I have an M2, but the first solution helped me. Just try, you will always have time to change the changes back image image image