Differences From Artifact [cc434070e1]:
- File
README.md
— part of check-in
[cb75aa16d9]
at
2022-03-24 21:12:34
on branch trunk
— README.md: Move "Donating" to the Wiki
This is to prevent including instructions that might get out of date
into a tarball. (user: js, size: 14084) [annotate] [blame] [check-ins using] [more...]
To Artifact [711c05e9ce]:
- File README.md — part of check-in [4170c39898] at 2022-10-14 21:42:55 on branch trunk — README.md: Recommend CLANG64/CLANG32 for MSYS2 (user: js, size: 15028) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 41 42 | * [Wii](#wii) * [Amiga](#amiga) * [Writing your first application with ObjFW](#first-app) * [Documentation](#documentation) * [Bugs and feature requests](#bugs) * [Support and community](#support) * [Donating](#donating) * [Commercial use](#commercial-use) <h1 id="what">What is ObjFW?</h1> ObjFW is a portable, lightweight framework for the Objective-C language. It enables you to write an application in Objective-C that will run on any | > | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | * [Wii](#wii) * [Amiga](#amiga) * [Writing your first application with ObjFW](#first-app) * [Documentation](#documentation) * [Bugs and feature requests](#bugs) * [Support and community](#support) * [Donating](#donating) * [Thanks](#thanks) * [Commercial use](#commercial-use) <h1 id="what">What is ObjFW?</h1> ObjFW is a portable, lightweight framework for the Objective-C language. It enables you to write an application in Objective-C that will run on any |
︙ | ︙ | |||
155 156 157 158 159 160 161 | $ ./autogen.sh <h2 id="macos-and-ios">macOS and iOS</h2> <h3 id="building-framework">Building as a framework</h3> When building for macOS or iOS, everything is built as a `.framework` by | | > > > > > | | > | 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | $ ./autogen.sh <h2 id="macos-and-ios">macOS and iOS</h2> <h3 id="building-framework">Building as a framework</h3> 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 <a href="#installation">regular instructions</a> 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" $ ./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 |
︙ | ︙ | |||
218 219 220 221 222 223 224 | The first thing to install is [MSYS2](https://www.msys2.org) to provide a basic UNIX-like environment for Windows. Unfortunately, the binaries are not signed, so make sure you download it via HTTPS. However, packages you download and install via MSYS2 are cryptographically signed. <h3 id="setting-up-msys2">Setting up MSYS2</h3> | | | | < | < < < < < > > > > > > > > > > > > > > > > | 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | The first thing to install is [MSYS2](https://www.msys2.org) to provide a basic UNIX-like environment for Windows. Unfortunately, the binaries are not signed, so make sure you download it via HTTPS. However, packages you download and install via MSYS2 are cryptographically signed. <h3 id="setting-up-msys2">Setting up MSYS2</h3> MSYS2 currently supports 7 different [environments](https://www.msys2.org/docs/environments/). All of them except for the one called just "MSYS" are supported, but which packages you need to install depends on the environment(s) you want to use. If you only want to target Windows 10 and newer, the CLANG64 and CLANG32 environments are the recommended ones. For CLANG64, use: $ pacman -Syu mingw-w64-clang-x86_64-clang mingw-w64-clang-x86_64-fossil For CLANG32, use: $ pacman -Syu mingw-w64-clang-i686-clang mingw-w64-clang-i686-fossil For CLANGARM64, use (you need to use Fossil via another environment): $ pacman -Syu mingw-w64-clang-aarch64-clang For MINGW64, use: $ pacman -Syu mingw-w64-x86_64-clang mingw-w64-x86_64-fossil For MINGW32, use: $ pacman -Syu mingw-w64-i686-clang mingw-w64-i686-fossil For UCRT64, use: $ pacman -Syu mingw-w64-ucrt-x86_64-clang mingw-w64-ucrt-x86_64-fossil When using `pacman` to install the packages, `pacman` might tell you to close the window. If it does so, close the window, restart MSYS2 and execute the `pacman` command again. There is nothing wrong with installing multiple environments, as MSYS2 has created shortcuts for each of them in your start menu. Just make sure to use the correct shortcut for the environment you want to use. |
︙ | ︙ | |||
300 301 302 303 304 305 306 | $ ./configure --host=m68k-amigaos <h1 id="first-app">Writing your first application with ObjFW</h1> To create your first, empty application, you can use `objfw-new`: | | | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | $ ./configure --host=m68k-amigaos <h1 id="first-app">Writing your first application with ObjFW</h1> To create your first, empty application, you can use `objfw-new`: $ objfw-new --app MyFirstApp 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 367 368 369 370 371 372 373 374 375 376 377 378 379 | <h1 id="donating">Donating</h1> If you want to donate to ObjFW, you can read about possible ways to do so [here](https://objfw.nil.im/wiki?name=Donating). <h1 id="commercial-use">Commercial use</h1> 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. | > > > > > > > > > | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 | <h1 id="donating">Donating</h1> If you want to donate to ObjFW, you can read about possible ways to do so [here](https://objfw.nil.im/wiki?name=Donating). <h1 id="thanks">Thanks</h1> * 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! <h1 id="commercial-use">Commercial use</h1> 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. |