Commit Graph

116 Commits

Author SHA1 Message Date
Thomas A
252d7f75b1 Add Basic Checks For Clang Compiler 2023-09-03 16:59:09 -07:00
CuriousTommy
50c6edc12e
Merge pull request #1409 from darlinghq/ubuntu_hotfix
Fix Building For Ubuntu
2023-07-26 14:29:54 -07:00
Thomas A
3bd007d010 Update CMake Version To 3.13 2023-07-26 12:06:36 -07:00
Thomas A
0fed3b813a Add Clang 13, 14, & 15 To List Of Compilers To Find 2023-07-25 10:23:08 -07:00
Ariel Abreu
ade8cdcbcd Install files to /private/etc, not /etc
This is necessary to install files to the right directory when doing
single-component installations (as used by binary packaging) since the
`/etc` symlink is only installed by the `core` component.
2023-05-12 10:05:41 -07:00
Ariel Abreu
1edcfebc27 Add ability to install individual components
This change allows you to build multiple components and still choose to
install only some of them using CMake's `cmake_install.cmake` script.
2023-05-12 10:05:41 -07:00
Ariel Abreu
1ad855c8ff Initial modular build commit
This new build setup allows you to only build and install certain
components of Darling according to your needs. The primary motivation
for this change is to allow you to build Darling without any GUI
dependencies if you only care about or need the CLI.

JavaScriptCore is now excluded by default. This is a huge build item
that 99% of people don't need and we certainly don't use (yet).

There will be an update to the docs to describe the component options.
2023-05-12 10:05:37 -07:00
Thomas A
d3a244ccf7 Update CMAKE_OSX_DEPLOYMENT_TARGET To 11.0
A bit of a backstory: macOS Big Sur was the first version of macOS to increment it's major version number from 10 to 11. Since Apple doesn't want to break old applications that assume the "10.x" version scheme, they applied a small hack in the xnu kernel to have older applications read off of the SystemVersionCompat.plist instead. So instead of seeing "11.6", the app would see "10.16" instead.

Since the macOS deployment target was not updated to BIg Sur's version, sw_vers would report "10.16". Fixes #1334
2023-05-02 16:22:07 -07:00
Zhaofeng Li
1aa60261f6 cmake: Make Python 2 bytecode pre-compilation optional
This affects performance while preserving compatibility.

Ref: #1074
2023-04-23 16:22:37 -06:00
Ariel Abreu
b811648393
Make Metal an optional part of the build
The new `ENABLE_METAL` option can be set to `ON`/truthy, `OFF`/falsy,
or `AUTO` (the default). When set to `AUTO`, Metal support will only be
enabled if LLVM and Vulkan are available.

Note that even if Metal support is compiled-in, Metal will only be
available at runtime if LLVM and Vulkan are available. This also means
that you can build Darling on a host with LLVM and Vulkan available and
install it on machines without these libraries available with no issue
(the only effect would be that Metal would be unavailable at runtime on
these machines).
2023-04-12 15:10:59 -04:00
IsaccBarker
c54e86a1a3 fail configuration if python2 not found 2023-02-04 18:18:09 -07:00
CuriousTommy
029d33179b
Implement Support For Generating Header (#1213)
Implemented CMake methods for:
* Deleting the old headers before generating the new headers.
* Updating the "Developer" and "framework-include" headers.
* Generating the private frameworks headers into their proper dedicated folders ("PrivateFrameworks" and "framework-private-include")

Updated multiple frameworks to take advantage of this feature.
2022-09-06 12:14:20 -07:00
Ariel Abreu
49f1f9ba52
Update darlingserver and libkqueue
This commit includes support for Mach port filters in kqueue (via the new kqchan facility in darlingserver).

Additionally, ccache usage can now be disabled via DARLING_NO_CCACHE.
2022-02-10 14:00:31 -05:00
Ariel Abreu
df8cbdfc92
Move macOS version flag to non-native build section
Now the flag is only set for targets being built for the Darling environment, not those being built to run natively.

Fixes #1064
2022-01-25 09:43:03 -05:00
Ariel Abreu
97fc8eeaa4
Create our own passwd files during prefix setup
Previously, we were just using Linux's passwd, which caused inconsistencies, e.g., with home directory lookups.

Now, we also add the user to /etc/master.passwd so programs running as fake root within the prefix can still look our user up (since libinfo checks /etc/master.passwd when running as root instead of /etc/passwd).
2021-11-28 23:55:31 -05:00
JJTech0130
d3d43c66f4
added clang 11 and 12 support 2021-06-25 13:02:09 -04:00
Ariel Abreu
4fd969bf1e
Implement __simple_vsnprintf
...and use it in the various printing functions, instead of `__simple_vsprintf`. This fixes some buffer overflow issues with really long messages (like for applications with long path names when logging the execv expansion message).

Also, install an empty `/Library/Preferences` directory.
2021-06-22 08:13:45 -04:00
Ariel Abreu
23aacf047a
Add CREATE_LINK polyfill for older CMakes 2021-01-13 23:26:27 -05:00
Ariel Abreu
11f024aaf2
Fixes for Clang 11+ 2020-12-01 23:49:29 -05:00
Thomas A
03db084961 Abstract Architecture Detection/Assignment
The main goal of this commit is to make it more easy to add or update any architecture we want to support (such as ARM64). Any changes we want to make would be done in the architectures.cmake file.

The secondary goal of this commit is to encourage a more architecture generic nomenclature. We shouldn't use i368/x86_64 unless we are dealing with code that is specific to those architectures.
2020-09-27 18:54:06 -07:00
Ariel Abreu
ef2d9c7622
Shut up a repeated warning (-Wavailability)
It happens because non-Apple clang doesn't understand the iosmac, bridgeos, and a few other newer Apple platforms, and it complains about it
2020-08-31 16:31:10 -04:00
Ariel Abreu
e9ca7e9f71
Update gnutar
It's now locked behind an option called ADDITIONAL_PACKAGES, because it's not included by default in a standard macOS install
2020-08-02 17:53:57 -04:00
Ariel Abreu
802a0a9884
Use a whole version for the macOS system version
It's probably less problematic
2020-06-29 14:36:50 -04:00
Ariel Abreu
938e7e3446
Prevent object filename conflicts for two source files that differ only in extensions 2020-06-07 18:58:40 -04:00
Ariel Abreu
835c2ca0bd
Set macOS deployment version
This helps clang correctly determine the availability of APIs in the code we're building and helps it shut up about some warnings
2020-05-19 21:15:34 -04:00
Lubos Dolezel
d4b5a9ee1d Unfinished work on fseventsd - will be finished after Linux 5.7 is released 2020-05-04 21:09:20 +02:00
Andrew Hyatt
1e440a759c Fix build on clang 10
Fixes #727 (not building on Ubuntu 20.04)

Also detect clang-10 if installed
2020-04-14 22:19:45 -04:00
Andrew Hyatt
a4ce49a7b6 Detect clang-9
clang-8 fails to build on Debian Testing and clang-7 is no longer available
2020-04-14 18:08:03 -04:00
Andrew Hyatt
9dca710a60 Fix compiler detection on fresh Debian 10
Fixes #535
2020-04-14 13:10:52 -04:00
Stephen
e3eab6f5f9
Using Github Actions to build (#667)
* Create ccpp.yml

use git remote set-url

run makedeb

add ccache

add devscripts

use ccache if possible

src before made

* Update ccpp.yml

* move ccache and different debug

* naming

* add artifacts

* try with a cp

* try escaping? now regex might now work

* try moving to debbuild

* move and compress debs

* try seperate jobs

* try getting source in, probably too big

* fix name
2020-04-13 14:18:08 +02:00
Lubos Dolezel
34147e8243 Fix #722 2020-03-31 15:19:07 +02:00
Lubos Dolezel
495b0f23fc Missing CMakeLists.txt must trigger an error 2020-03-20 19:11:20 +01:00
Andrew Hyatt
d75567cb06
Revert "Install shortcuts for DMGs and PKGs"
This reverts commit d1406957df.
2020-03-17 14:56:31 -04:00
Andrew Hyatt
d1406957df
Install shortcuts for DMGs and PKGs
Fixes #643
2020-03-17 13:39:29 -04:00
Lubos Dolezel
4da40f9cf5 Make user's home specific to the prefix, provide a link to real home via LinuxHome 2020-02-25 21:15:19 +01:00
TheBrokenRail
53a8e59b49 Remove FRAMEWORK_* Options 2020-02-16 12:52:31 -05:00
Sergey Bugaev
614782852d Remove host /lib symlinks
We don't need them anymore with vchroot
2020-02-10 06:20:51 +03:00
Lubos Dolezel
01ac8e22c0 First successful run under vchroot 2020-02-08 15:19:25 +01:00
Andrew Hyatt
bc177bc650
Add CMake option to build unit tests
Pass -DENABLE_TESTS into CMake
2020-01-20 12:56:12 -05:00
TheBrokenRail
d87d703330 Setup Fonts and ld.so during DEB installaton (#605)
* Update CMakeLists.txt

* Update darling.install

* Create darling.postinst

* Update rules
2020-01-04 00:19:14 -05:00
TheBrokenRail
24157d34cb Fix Lintian Overrides (#599) 2020-01-03 22:40:20 -05:00
Andrew Hyatt
7df5cc8042
Add uninstall command and tool
Invoke as 'make uninstall' in CMake build directory
or run as tools/uninstall

Fixes #590
2020-01-03 22:20:04 -05:00
Andrew Hyatt
48b099771b
Shut down running instances during install
This prevents forgetting to shut down darling and wondering why
your changes have no effect.
2019-11-23 17:30:06 -05:00
Andrew Hyatt
d5f4e68180
Allow i386 or x86_64 only builds
Currently x86_64 or i386 only builds fail to enter shell.

CMake generation flags:
Build x86_64 only: -DTARGET_i386=OFF
Build i386 only: -DTARGET_x86_64=OFF

The default is still to build FAT binaries for both.
2019-08-13 14:29:14 -04:00
Andrew Hyatt
36245caa2e
Use different reexport style
The old one couldn't work under the limitations of CMake
2019-06-10 23:25:31 -04:00
Andrew Hyatt
cdba0f1612 Automatically detect compiler 2019-04-06 12:25:26 -04:00
Andrew Hyatt
9c9496ce59 Allow specifying a different compiler
Use -DCMAKE_C_COMPILER and -DCMAKE_CXX_COMPILER
when configuring cmake. The previous behavior overrided
these variables.
2019-01-11 10:43:48 -05:00
Andrew Hyatt
720a5dcb32 Add build option to disable large build items
This greatly speeds up build time when enabled.

For now it disables building JavaScriptCore. Use it like this:

cmake .. -DFULL_BUILD=OFF

To enable large items again, do:

cmake .. -DFULL_BUILD=ON

By default it is ON.

This fixes #391.
2018-12-17 16:22:57 -05:00
Sergey Bugaev
e9cd71b73b Symlink /etc/nsswitch.conf from the host, fixes #416 2018-09-02 23:29:43 +03:00
Sergey Bugaev
2b3ee7776c Symlink /etc/machine-id from the host
This fixes gethostuuid() syscall not working, which surfaced as issues with Core Foundation
2018-08-14 11:17:16 +03:00