- 🍏 Как запускать приложения Mac на Linux
- Запустите виртуальную машину MacOS (все приложения)
- Использование Darling Translation Layer (только CLI)
- Сборка и установка дорогой Darling
- run Mac OS X applications on Linux
- 1 Answer 1
- OS X apps run on Linux with Wine-like emulator for Mac software
- Oh! «Darling» emulator illustrates complexity of bringing Mac software to Linux.
- reader comments
- Share this story
- Unix/Linux synergy
- No reverse-engineering
- How to Run Mac Apps on Linux
- Run a macOS Virtual Machine (All Apps)
- Using the Darling Translation Layer (CLI Only)
- Building and Installing Darling
🍏 Как запускать приложения Mac на Linux
macOS и Linux имеют общее наследие.
К сожалению, это не означает, что приложения могут плавно переходить между операционными системами.
Для запуска приложений Mac в Linux вам понадобится виртуальная машина или слой перехода.
Запустите виртуальную машину MacOS (все приложения)
Самый надежный способ запуска приложений Mac в Linux – через виртуальную машину.
С помощью бесплатного гипервизора с открытым исходным кодом, такого как VirtualBox, вы можете запускать macOS на виртуальном устройстве на вашем компьютере с Linux.
Правильно установленная виртуализированная среда MacOS без проблем запустит все приложения MacOS.
Подобная виртуализация рабочего стола требует значительного объема оперативной памяти, поэтому она может работать некорректно на устройствах с ограниченными ресурсами.
Для машин с техническими характеристиками наилучшим вариантом является виртуализация операционных систем через виртуальную машину VirtualBox.
Использование Darling Translation Layer (только CLI)
Вы также можете запустить слой перехода под названием Darling.
Он работает как WINE, которая создает среду перевода с Windows на Linux, которая позволяет вам запускать некоторые приложения Windows в системах Linux.
Darling пытается достичь той же цели между macOS и Linux.
Поскольку macOS и Linux совместно используют одну и ту же базу в стиле UNIX, Darling менее ресурсоемок, чем WINE, и в большинстве случаев дает лучшие результаты.
В настоящее время Darling может работать только с очень простыми приложениями с графическим интерфейсом и несколькими приложениями командной строки.
Хотя поддержка приложений с графическим интерфейсом является целью проекта, эта функция еще не реализована.
По сути, вы можете надежно запускать оболочку macOS в Терминале и, возможно, не сможете эффективно запускать другие приложения.
Он также содержит огромное количество кода, требующего около 12 гигабайт дискового пространства после сборки.
По сути, это дублирует функциональность операционной системы MacOS.
Поэтому, если вы беспокоитесь о том, что удаленные исполняемые файлы могут повредить вашу систему, вы можете избегать пакетов такого размера.
Сборка и установка дорогой Darling
1. Следуйте инструкциям по установке, чтобы загрузить правильные зависимости для вашего дистрибутива Linux со страницы установки Darling.
В зависимости от вашего дистрибутива вам может потребоваться выполнить длинную команду.
Например, для Ubuntu выполните следующую команду терминала, чтобы загрузить зависимости Darling:
Источник
run Mac OS X applications on Linux
According to this Wikipedia article:
OS X is a series of Unix-based graphical interface operating systems developed and marketed by Apple Inc.
so i was thinking:
is there any similar application to Wine but runs Mac applications?
is it possible at to run Mac OS X applications on a Linux machine?
1 Answer 1
Darling (link) is a project that aims to become analogous to wine. Currently it only runs some command-line OSX programs, though. As of mid-2019, it can run many command-line programs, and according to their homepage appears to be approaching the point where it can run some rudimentary graphical software as well. It probably won’t run what you want just yet, unless it’s text-based.
As long as the developers of the OS X program released their source code and used cross-platform libraries (such as QT, GTK, X11, GNUStep or WxWidgets) you should be able to re-compile an OS X program for linux. OS X and Linux are much more compatible at the API level than the ABI level.
GNUStep implements the Cocoa APIs of NeXTStep and OS X. It was shockingly complete when I tried it, in terms of how much it seemed capable of doing versus how little seems to use it in the wild. GNUStep only works on the source-code (API) level, so it works if a program is open-source and uses Apple’s Cocoa GUI (NOT «Aqua» which is proprietary). It depends on being able to compile and link the code.
Think of the API, or Application Programming Interface, as something like a car’s dashboard — everything is visible to the driver of the car, and you can get into someone else’s car and find his different dashboard just as easy to figure out.
Think of the ABI, or Application Binary Interface, as the engine of the car — it can vary greatly between makes and models, and you probably won’t be able to trade your Chevy engine into a Volvo very easily.
Darling would in this analogy be putting the Chevy engine in a Volvo’s chassis, and compiling from source would be like just getting out of your Chevy and getting into the Volvo. One is much simpler to do than the other from a programmers’ perspective.
But Apple has some proprietary user interface libraries that no one else has, too. If the developer used one of these (such as Aqua), you’ll have to wait and hope that Darling grows up like Wine did, or port it yourself. If there is no source code released, it’d be like if the engine was made so big that it could not fit in the Volvo’s engine bay, or designed for connecting to a front wheel drive car where your Volvo was rear wheel drive. Unless someone is an absolutely insane maniac (in the best possible way) who has months of free time and ridiculous amount of dedication, it’s not likely to happen.
Additionally, GNUStep is not 100% complete in terms of coverage of the Cocoa API’s, so some shoehorning is likely still going to be necessary for complex programs. And GNUStep does not provide an xcode-equivalent build system — that is, if the original developer used the XCode IDE’s «build» system exclusively, you may be left writing makefiles for it. This was the most frustrating part for me, since while I have experience with compiling and linking software, it’s hard to wrestle useful information out of a format like a .xcodeproj that I have no prior backend experience with.
Источник
OS X apps run on Linux with Wine-like emulator for Mac software
Oh! «Darling» emulator illustrates complexity of bringing Mac software to Linux.
Jon Brodkin — Aug 6, 2013 7:10 pm UTC
reader comments
Share this story
Linux users who want to run Windows applications without switching operating systems have been able to do so for years with Wine, software that lets apps designed for Windows run on Unix-like systems.
There has been no robust equivalent allowing Mac applications to run on Linux, perhaps no surprise given that Windows is far and away the world’s most widely used desktop operating system. A developer from Prague named Luboš Doležel is trying to change that with «Darling,» an emulation layer for OS X.
«The aim is to achieve binary compatible support for Darwin/OS X applications on Linux, plus provide useful tools that will aid especially in application installation,» Doležel’s project page states. Darwin is Apple’s open source operating system, which provides some of the backend technology in OS X and iOS. The name «Darling» combines Darwin and Linux. Darling works by «pars[ing] executable files for the Darwin kernel. load[ing] them into the memory. and execut[ing] them.»
But there is a ways to go. «Darling needs to provide an ABI-compatible [application binary interface] set of libraries and frameworks as available on OS X. by either directly mapping functions to those available on Linux, wrapping native functions to bridge the ABI incompatibility, or providing a re-implementation on top of other native APIs,» the project page notes.
Doležel, who started Darling a year ago, described the project and its progress in an e-mail interview with Ars. Darling is in the early stages, able to run numerous console applications but not much else. «These are indeed the easiest ones to get working, albeit ‘easy’ is not the right word to describe the amount of work required to achieve that,» Doležel said. «Such applications include: Midnight Commander, Bash, VIM, or Apple’s GCC [GNU Compiler Collection]. I know it doesn’t sound all that great, but it proves that Darling provides a solid base for further work.»
Users must compile Darling from the source code and then «use the ‘dyld’ command to run an OS X executable,» Doležel said. One roadblock is actually getting Mac .dmg and .pkg application files working on a Linux system. Because doing so isn’t that straightforward, Doležel said, «I’ve written a FUSE module that enables users to mount .dmg files under Linux directly and without root privileges. An installer for .pkg files is underway.»
Unix/Linux synergy
The fact that OS X is a Unix operating system provides advantages in the development process. «This saved me a lot of work,» Doležel explained. «Instead of implementing all the ‘system’ APIs, it was sufficient to create simple wrappers around the ones available on Linux. I had to check every function for ABI compatibility and then test whether my wrapper works, so it wasn’t as easy as it may sound.»
Another lucky break not available to Wine developers is that Apple releases some of the low-level components of OS X as open source code, «which helped a lot with the dynamic loader and Objective-C runtime support code,» Doležel noted.
But of course, the project is an extremely difficult one. Doležel isn’t the first to try it, as Darling was initially based on a separate project called «maloader.» Doležel said he heard from another group of people «who started a similar project before but abandoned the idea due to lack of time.»
Doležel was actually a novice to OS X development when he started Darling, being more familiar with OS X from a user’s perspective than a developer’s perspective. «I have personally looked for something like Darling before, before I realized I would have to start working on it myself,» he said.
Darling relies heavily on GNUstep, an open source implementation of Apple’s Cocoa API. GNUstep provides several core frameworks to Darling, and «the answer to ‘can it run this GUI app?’ heavily depends on GNUstep,» Doležel said. Doležel is the only developer of Darling, using up all his spare time on the project.
No reverse-engineering
Doležel isn’t reverse-engineering Apple code, noting that it could be problematic in terms of licensing and also that «disassembling Apple’s frameworks wouldn’t be helpful at all because Darling and the environment it’s running in is layered differently than OS X.»
The development process is a painstaking one, done one application at a time. Doležel explains:
To improve Darling, I first take or write an application I’d like to have running. If it is someone else’s application, I first examine it with one of the tools that come with Darling to see what frameworks and APIs it requires. I look up the APIs that are missing in Apple’s documentation; then I create stub functions for them and possibly for the rest of the framework, too. (Stub functions only print a warning when they are called but don’t do any real work.)
The next step is to implement all the APIs according to the documentation and then see how the application reacts. I also add trace statements into important functions to have an insight into what’s happening. I believe this is very much like what Wine developers do.
When things go wrong, I have to use GDB [GNU Debugger] to debug the original application.
It is rather unfortunate that Apple’s documentation is often so poorly written; sometimes I have to experiment to figure out what the function really does. Many OS X applications seem to contain complete pieces of example code from Apple’s documentation, presumably because one would have to spend a lot of time getting to understand how the APIs interact. This is why I appreciate open source so much—when the documentation is sketchy, you can always look into the code.
Years of development are needed. Similar to Wine, «Having a list of applications known to be working is probably the best way to go,» Doležel said.
Darling should work on all Linux distributions, he said, with the catch that «many apps for OS X are 32-bit only, and installing 32-bit packages on a 64-bit Linux system could be tricky depending on your distribution. I personally use Gentoo Linux, so I’m gradually creating a Portage overlay that would compile Darling and all dependencies for both 32-bit and 64-bit applications.»
Doležel would like to bring Angry Birds, other games, and multimedia applications to Linux. Darling could potentially «be used to run applications compiled for iOS,» he writes on the project site. This will also be a challenge. «The intention is to support the ARM platform on the lowest levels (the dynamic loader and the Objective-C runtime),» he writes. «Rewriting the frameworks used on iOS is a whole different story, though.»
Источник
How to Run Mac Apps on Linux
macOS and Linux share a common heritage. Unfortunately, that does not mean applications can smoothly transition between the operating systems. To run Mac apps on Linux, you’ll need some sort of virtual machine or translation layer.
Run a macOS Virtual Machine (All Apps)
The most reliable way to run Mac apps on Linux is through a virtual machine. With a free, open-source hypervisor application like VirtualBox, you can run macOS on a virtual device on your Linux machine. A properly-installed virtualized macOS environment will run all macOS apps without issue.
Virtualizing a desktop like this does require significant RAM, so it may not run smoothly on low-resource devices. For machines with the technical specs, virtualizing an operating systems through a VirtualBox virtual machine is the best option.
Using the Darling Translation Layer (CLI Only)
You can also run a translation layer called Darling. This works like WINE, which creates a Windows-to-Linux translation environment that allows you to run some Windows applications on Linux systems. Darling tries to accomplish the same goal between macOS and Linux. Because macOS and Linux both share the same UNIX-style base, Darling is less resource-intensive than WINE, producing better results in more circumstances.
For the time being, Darling can only work with very simple GUI apps and several command-line apps. While GUI app support is a goal for the project, the feature hasn’t yet been implemented. Basically, you can run a macOS shell in Terminal reliably and may or may not be able to run other apps effectively.
It also contains an enormous amount of code, requiring about 12 gigabytes of disk space after building. It’s essentially duplicating the functionality of the macOS operating system. So, if you worry about remote executables corrupting your system, you might want to avoid a package of this size.
Building and Installing Darling
1. Follow the installation instructions to download the correct dependencies for your Linux distro from the Darling Install page. Depending on your distro, you may need to run a lengthy command.
For example, for Ubuntu, run the following Terminal command to download Darling’s dependencies:
2. Clone Darling’s git depository to your local machine:
Источник