ravynsoft / ravynos

A BSD-based OS project that aims to provide source and binary compatibility with macOS® and a similar user experience.
https://www.ravynos.com
Other
5.67k stars 190 forks source link

PoC: build Helium on top of helloSystem image #45

Closed mszoek closed 3 years ago

mszoek commented 3 years ago

Create a Live CD ISO of helloSystem containing all the Helium changes from stock FreeBSD.

Success criteria:

probonopd commented 3 years ago

working clang/LLVM that understands frameworks

What is needed for that? Can you provide FreeBSD packages for clang/LLVM that understands frameworks?

mszoek commented 3 years ago

working clang/LLVM that understands frameworks

What is needed for that? Can you provide FreeBSD packages for clang/LLVM that understands frameworks?

Clang is part of the base OS. The Helium build applies patches to the release/12 branch before doing make world, so the resulting install ISO contains the proper toolchain. It also ensures that the correct ObjC ABI (version 3) is used by default, to match the system's libobjc.

yuki% clang -v
Helium clang version 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2)
Target: x86_64-helium-freebsd12.2
Thread model: posix
InstalledDir: /usr/bin

yuki% cat Foo.m
#import <Cocoa/Cocoa.h>

int main(int argc, const char *argv[])
{
        __NSInitializeProcess(argc, argv);
        NSLog(@"Hello!");
}

yuki% clang -o Foo Foo.m -framework Foundation
yuki% ./Foo
2021-04-25 07:51:51.963 Foo[63214:800a82000] Hello!

I am thinking of putting my modified toolchain and the Headers from all the Framework bundles into their own bundle a la XCode and installing that in /Library/Developer as Apple does. I will still build it out of the FreeBSD source tree but relocate the executables.

Also toying with maybe bundling KDevelop or something like that into the Developer bundle to make it more like an XCode equivalent.

tyu1996 commented 3 years ago

So does that means the Helium is now based on helloSystem?

mszoek commented 3 years ago

So does that means the Helium is now based on helloSystem?

Basically. I'm using the hello ISO generator (based on FuryBSD) and bundling the hello desktop components & apps on top of the Helium base system/kernel/toolchain. It gave us a big speed boost on getting a working desktop environment and some key pieces like the global menu bar, as well as fixing a bunch of issues with Xorg/drivers/etc, which lets me get back to working on Cocoa and Mac compatibility instead of fighting with build & release engineering challenges. The two projects' goals are close enough that collaboration makes sense, although I suspect Helium and hello will not be identical products.