Browse Source

Update build.md

Update Mac instructions to use the build command
pull/5066/head
Hank G 5 years ago
committed by GitHub
parent
commit
c9f7461204
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      Documentation/build.md

19
Documentation/build.md

@ -60,23 +60,10 @@ git submodule update --init --recursive
### Build native libraries (macOS only) ### Build native libraries (macOS only)
On macOS it is necessary to build and manually install the respective native libraries using [Xcode](https://developer.apple.com/xcode/). The steps to get this working correctly are: On macOS it is necessary to build and manually install the respective native libraries using [Xcode](https://developer.apple.com/xcode/). Execute the build script in the root project with the `CompileNative` task. It will build the headers, build the libraries, and place them in the appropriate place to allow .NET to find them at compilation and run time.
- (for revisions after 2 Nov 2020) Run `./build.sh GenerateCppHeaders` to generate `avalonia-native.h` from `avn.idl`
- Navigate to the Avalonia/native/Avalonia.Native/src/OSX folder and open the `Avalonia.Native.OSX.xcodeproj` project
- Build the library via the Product->Build menu. This will generate binaries in your local path under ~/Library/Developer/Xcode/DerivedData/Avalonia.Native.OSX-*guid* where "guid" is uniquely generated every time you build.
- Manually install the native library by copying it from the build artifacts folder into the shared dynamic library path:
```
cd ~/Library/Developer/Xcode/DerivedData/Avalonia.Native.OSX-[guid]/Build/Products/Debug
cp libAvalonia.Native.OSX.dylib /usr/local/lib/libAvalonia.Native.OSX.dylib
```
For compilation we also need this library on the build path. From the Avalonia root project directory:
```
mkdir -p build/Products/Release
cp /usr/local/lib/libAvalonia.Native.OSX.dylib build/Products/Release
```bash
./build.sh CompileNative
``` ```
### Build and Run Avalonia ### Build and Run Avalonia

Loading…
Cancel
Save