darlinghq / darling

Darwin/macOS emulation layer for Linux
http://www.darlinghq.org
GNU General Public License v3.0
11.26k stars 428 forks source link

Mounting and coping .app #764

Open venkiiee opened 4 years ago

venkiiee commented 4 years ago

Dear developer ,

I am able to mount the app using

Darling [~]$ hdiutil attach Downloads/SomeApp.dmg

the command returns

Skipping partition of type Primary GPT Header Skipping partition of type Primary GPT Table Skipping partition of type Apple_Free Using partition #3 of type Apple_HFS Everything looks OK, disk mounted

but i am unable to copy it to applications folder

Darling [~]$ cp -r /Volumes/SomeApp/SomeApp.app /Applications/ cp: no such file or directory

facekapow commented 4 years ago

Can you share what DMG it was?

venkiiee commented 4 years ago

dingtalk lite for mac https://www.dingtalk.com/en/

facekapow commented 4 years ago

Could you try downloading it again and trying to mount and copy it again? It might be that the download got corrupted.

I was able to download it, mount it, and copy it just fine:

Darling [~/Downloads]$ curl -L "https://www.dingtalk.com/mac/d/qd=20170420173511985?spm=a213l2.14171110.4290834532.3.71fa549dEr1vyG&acm=lb-zebra-631264-8036408.1003.4.7546250&scm=1003.4.lb-zebra-631264-8036408.OTHER_15839668937141_7546250" > dingtalk-lite.dmg
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
100  188M  100  188M    0     0   667k      0  0:04:48  0:04:48 --:--:--  693k
Darling [~/Downloads]$ ls
Xcode_11.4.1.xip  dingtalk-lite.dmg dingtalk.dmg      rustup.rs
Darling [~/Downloads]$ hdiutil attach dingtalk-lite.dmg 
/Volumes/dingtalk-lite
Darling [~/Downloads]$ ls /Volumes/dingtalk-lite 
Applications      DingTalk Lite.app
Darling [~/Downloads]$ cp -r /Volumes/dingtalk-lite/DingTalk\ Lite.app /Applications/DingTalk\ Lite.app
Darling [~/Downloads]$ ls /Applications/                   
DingTalk Lite.app

Also, you said you did /Volumes/SomeApp/SomeApp.app so I'm guessing you did /Volumes/DingTalk\ Lite/DingTalk\ Lite.app. hdiutil actually mounts it in a location with the same directory name as the filename of the DMG. For example, if you do hdiutil attach dingtalk-lite.dmg, it'll be mounted at /Volumes/dingtalk-lite. hdiutil should output a path when it's done; this is the location where the DMG was mounted.

venkiiee commented 4 years ago

Yes , i was able to mount the file. But could'nt run it due to some reasons, were you able to open the installed ?

How to open the installed file ?

CuriousTommy commented 4 years ago

How did you try to open it?

venkiiee commented 4 years ago

inside applications folder and running the app via terminal

facekapow commented 4 years ago

Yes , i was able to mount the file. But could'nt run it due to some reasons, were you able to open the installed ?

How to open the installed file ?

@venkiiee If you mean actually running the app, I think it's still too advanced for Darling. It uses the Chromium Embedded Framework (basically, a whole web browser but stripped down a bit). That's not to say that the Chromium framework is impossible to run in Darling, but at the moment it doesn't run. Right now, it seems to be missing the AudioUnit framework:

Darling [~/Downloads]$ /Applications/DingTalk\ Lite.app/Contents/MacOS/DingTalk
dyld: Library not loaded: /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
  Referenced from: /Applications/DingTalk Lite.app/Contents/Frameworks/Chromium Embedded Framework.framework/Versions/A/Chromium Embedded Framework
  Reason: image not found
abort_with_payload: reason: Library not loaded: /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
  Referenced from: /Applications/DingTalk Lite.app/Contents/Frameworks/Chromium Embedded Framework.framework/Versions/A/Chromium Embedded Framework
  Reason: image not found; code: 1
Abort trap: 6 (core dumped)
LubosD commented 4 years ago

@facekapow Missing AudioUnit.framework must be some kind of omission on my part, because we do have AudioUnits, but they live in AudioToolbox.framework (AudioUnit.framework is a legacy thing).