Avalonia源码学习(一)
.NET 刘宇帅 1月前 阅读量: 450
Mac上启动项目
git clone https://github.com/AvaloniaUI/Avalonia.git
cd Avalonia
git submodule update --init --recursive
./build.sh CompileNative
执行./build.sh CompileNative可能汇报如下错误
12:45:12 [ERR] xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
12:45:12 [ERR] Target CompileNative has thrown an exception
Nuke.Common.Tooling.ProcessException: Process 'xcodebuild' exited with code 1.
执行以下命令后重新执行
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
./build.sh CompileNative
配置成功
══════════════════════════════════════════
Target Status Duration
──────────────────────────────────────────
GenerateCppHeaders Succeeded < 1sec
Clean Succeeded < 1sec
CompileNative Succeeded 0:12
──────────────────────────────────────────
Total 0:12
══════════════════════════════════════════
Build succeeded on 9/30/2024 12:47:23 PM. \(^ᴗ^)/
打开Rider选择ControlCatalog.NetCore运行,如下图,项目启动成功