@@ -9,14 +9,15 @@

Table of Contents

* [What is ObjFW?](#what) + * [Installation](#installation) * [License](#license) * [Releases](#releases) * [Cloning the repository](#cloning) - * [Installation](#installation) + * [Building from source](#building-from-source) * [macOS and iOS](#macos-and-ios) * [Building as a framework](#building-framework) * [Using the macOS or iOS framework in Xcode](#framework-in-xcode) * [Broken Xcode versions](#broken-xcode-versions) * [Windows](#windows) @@ -52,11 +53,11 @@ * GNUstep already provides a reimplementation of Foundation, which is only compatible to a certain degree. This means that a developer still needs to care about differences between frameworks if they want to be portable. The idea behind ObjFW is that a developer does not need to concern themselves - with portablility and making sure their code works with multiple + with portability and making sure their code works with multiple frameworks: Instead, if it works it ObjFW on one platform, they can reasonably expect it to also work with ObjFW on another platform. ObjFW behaving differently on different operating systems (unless inevitable because it is a platform-specific part, like the Windows Registry) is considered a bug and will be fixed. @@ -72,10 +73,36 @@ ObjFW also comes with its own lightweight and extremely fast Objective-C runtime, which in real world use cases was found to be significantly faster than both GNU's and Apple's runtime. + +

Installation

+ + ObjFW packages are available for various operating systems and can be + installed as following: + + Operating System | Command + ---------------------------|--------------------------------------------- + Alpine Linux | `doas apk add objfw` + CRUX | `sudo prt-get depinst objfw` + Fedora | `sudo dnf install objfw` + FreeBSD | `sudo pkg install objfw` + Haiku | `pkgman install objfw` + Haiku (gcc2h) | `pkgman install objfw_x86` + macOS (Homebrew) | `brew install objfw` + macOS (pkgsrc) | `cd $PKGSRCDIR/devel/objfw && make install` + NetBSD | `cd /usr/pkgsrc/devel/objfw && make install` + OpenBSD | `doas pkg_add objfw` + OpenIndiana | `sudo pkg install developer/objfw` + Windows (MSYS2/MINGW32) | `pacman -S mingw-w64-i686-objfw` + Windows (MSYS2/CLANG64) | `pacman -S mingw-w64-clang-x86_64-objfw` + Windows (MSYS2/CLANGARM64) | `pacman -S mingw-w64-clang-aarch64-objfw` + + If your operating system is not listed, you can + build ObjFW from source. +

License

ObjFW is released under three licenses: @@ -91,11 +118,11 @@ none of them work for you, contact me and we can find a solution.

Releases

- Releases of ObjFW, as well as changelogs and the accompanying documentation + Releases of ObjFW, as well as change logs and the accompanying documentation, can be found [here](https://objfw.nil.im/wiki?name=Releases).

Cloning the repository

@@ -115,14 +142,10 @@ wiki pages, etc.: $ cd objfw $ fossil ui - It's also possible to open the same local repository multiple times, so that - you have multiple working directories all backed by the same local - repository. - In order to verify the signature of the currently checked out checkin, you can use: $ fossil artifact current | gpg --verify @@ -139,13 +162,13 @@ $ git clone https://github.com/ObjFW/ObjFW Git commits are not signed, so if you want to check the signature of an individual commit, branch head or tag, please use Fossil. -

Installation

+

Building from source

- To install ObjFW, just run the following commands: + To build ObjFW from source and install it, just run the following commands: $ ./configure $ make $ make check $ sudo make install @@ -162,29 +185,28 @@ When building for macOS or iOS, everything is built as a `.framework` by default if `--disable-shared` has not been specified to `./configure`. The frameworks will end up in `$PREFIX/Library/Frameworks`. To build for macOS, just follow the - regular instructions above. + regular instructions above. To build for iOS, follow the regular instructions, but instead of `./configure` do something like this: - $ clang="clang -isysroot $(xcrun --sdk iphoneos --show-sdk-path)" - $ export OBJC="$clang -arch armv7 -arch arm64" - $ export OBJCPP="$clang -arch armv7 -E" - $ export IPHONEOS_DEPLOYMENT_TARGET="9.0" + $ clang="xcrun --sdk iphoneos clang" + $ export OBJC="$clang -arch arm64e -arch arm64" + $ export OBJCPP="$clang -arch arm64e -E" + $ export IPHONEOS_DEPLOYMENT_TARGET="10.0" $ ./configure --prefix=/usr/local/ios --host=arm64-apple-darwin To build for the iOS simulator, follow the regular instructions, but instead of `./configure` use something like this: - $ clang="clang -isysroot $(xcrun --sdk iphonesimulator --show-sdk-path)" - $ export OBJC="$clang -arch arm64 -arch x86_64" - $ export OBJCPP="$clang -arch arm64 -E" - $ export IPHONEOS_DEPLOYMENT_TARGET="9.0" - $ ./configure --prefix=/usr/local/iossim --host=arm64-apple-darwin + $ clang="xcrun --sdk iphonesimulator clang" + $ export OBJC="$clang -arch $(uname -m)" + $ export IPHONEOS_DEPLOYMENT_TARGET="10.0" + $ ./configure --prefix=/usr/local/iossim --host=$(uname -m)-apple-darwin

Using the macOS or iOS framework in Xcode

To use the macOS framework in Xcode, you need to add the `.framework`s to your project and add the following flags to `Other C Flags`: @@ -321,11 +343,11 @@ To create your first, empty application, you can use `objfw-new`: $ objfw-new --app MyFirstApp - This creates a file `MyFirstApp.m`. The `-[applicationDidFinishLaunching]` + This creates a file `MyFirstApp.m`. The `-[applicationDidFinishLaunching:]` method is called as soon as ObjFW finished all initialization. Use this as the entry point to your own code. For example, you could add the following line there to create a "Hello World": [OFStdOut writeLine: @"Hello World!"]; @@ -366,20 +388,18 @@ If you have any questions about ObjFW or would like to talk to other ObjFW users, the following venues are available: * The [forum](https://objfw.nil.im/forum) * A [Matrix room](https://matrix.to/#/%23objfw:nil.im) + * A [Discord room](https://objfw.nil.im/discord), bridged to the Matrix + room above + * A [Telegram room](https://t.me/objfw), bridged to the Matrix room above + * A [Slack room](https://objfw.nil.im/slack), bridged to the Matrix room + above * An IRC channel named `#objfw` on `irc.oftc.net` ([Web chat](https://webchat.oftc.net/?channels=%23objfw)), bridged to the Matrix room above - * A [Slack channel](https://objfw.nil.im/slack), bridged to the Matrix room - above - * A [Discord channel](https://objfw.nil.im/discord), bridged to the Matrix - room above - * A [Telegram room](https://t.me/objfw), bridged to the Matrix room above - * A [Gitter room](https://gitter.im/ObjFW/ObjFW), bridged to the Matrix room - above Please don't hesitate to join any or all of those!

Donating

@@ -392,14 +412,14 @@ * Thank you to [Jonathan Neuschäfer](https://github.com/neuschaefer) for reviewing the *entirety* (all 84k LoC at the time) of ObjFW's codebase in 2017! * Thank you to [Hill Ma](https://github.com/mahiuchun) for donating an M1 Mac - Mini to the project! + Mini to the project in 2022!

Commercial use

If for whatever reason neither the terms of the QPL nor those of the GPL work for you, a proprietary license for ObjFW including support is available upon request. Just write a mail to js@nil.im and we can find a reasonable solution for both parties.