this repo has no description
1# Darling
2
3
4
5Darling is a runtime environment for OS X applications.
6
7Please note that no GUI applications are supported at the moment.
8
9## Download
10
11Packages for some distributions are available for download
12under [releases](https://github.com/darlinghq/darling/releases).
13
14## Build Instructions
15
16For build instructions, visit [DarlingHQ Wiki](https://wiki.darlinghq.org/build_instructions).
17
18### Prefixes
19
20Darling has support for DPREFIXes, which are very similar to WINEPREFIXes. They are virtual “chroot” environments with an macOS-like filesystem structure, where you can install software safely. The default DPREFIX location is `~/.darling`, but this can be changed by exporting an identically named environment variable. A prefix is automatically created and initialized on first use.
21
22Please note that we use `overlayfs` for creating prefixes, and so we cannot support putting prefix on a filesystem like NFS or eCryptfs. In particular, the default prefix location won't work if you have an encrypted home directory.
23
24### Hello world
25
26Let's start with a Hello world:
27
28````
29$ darling shell echo Hello world
30Hello world
31````
32
33Congratulations, you have printed Hello world through Darling's OS X system call emulation and runtime libraries.
34
35### Installing software
36
37You can install `.pkg` packages with the installer tool available inside shell. It is a somewhat limited cousin of OS X's installer:
38
39````
40$ darling shell
41Darling [~]$ installer -pkg mc-4.8.7-0.pkg -target /
42````
43
44You can uninstall and list packages with the `uninstaller` command.
45
46### Working with DMG images
47
48DMG images can be attached and deattached from inside `darling shell` with `hdiutil`. This is how you can install Xcode along with its toolchain and SDKs (note that Xcode itself doesn't run yet):
49
50````
51Darling [~]$ hdiutil attach Xcode_7.2.dmg
52/Volumes/Xcode_7.2
53Darling [~]$ cp -r /Volumes/Xcode_7.2/Xcode.app /Applications
54Darling [~]$ export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
55Darling [~]$ echo 'void main() { puts("Hello world"); }' > helloworld.c
56Darling [~]$ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang helloworld.c -o helloworld
57Darling [~]$ ./helloworld
58Hello world
59````
60
61Congratulations, you have just compiled and run your own Hello world application with Apple's toolchain.
62