dev-docs/development.md
To build/install from sources do the following:
Keychain Access.appIf you struggle to build AeroSpace locally, you can also refer to builds in GitHub Actions
SPM. Swift package manager and Swift build tool. In other words, swift CLI tool
.swift-version file.
brew install swiftlybrew install bash fishrbenv install 3.3.4 (or whatever 3.x version)bundler. cd AeroSpace && bundler installxcbeautify to make Xcode build logs readable. brew install xcbeautifyIf you want to run AeroSpace as App Bundle (AeroSpace.app) you need to create self-signed certificate that will be used to codesign AeroSpace. Release artifact is built as App Bundle. If you only plan to build the debug version of AeroSpace, you can run it from the terminal and custom certificate is not required.
Keychain Access.appKeychain Access -> Certificate Assistance -> Create a Certificate...
aerospace-codesign-certificateSelf-Signed RootCode SigningDebug build
build-debug.sh - Build debug build to .debug dir by using SPM. (Xcode is not involved)run-tests.sh - Run tests.swiftformat.sh - Format the code.run-debug.sh - Run AeroSpace.app debug build.run-cli.sh - Run aerospace in CLI. Arguments are forwarded to aerospace binary.build-docs.sh - Build the site and man pages to .site and .man dirs respectively.build-shell-completion.sh - Build shell completion to .shell-completion.
You can test that the completion works properly by sourcing the file source ./.shell-completion/zsh/_aerospacegenerate.sh - Regenerate generated project files. AeroSpace.xcodeproj is generated, and some of the source files
(the source files have Generated suffix in their names).Release build
build-release.sh - Build release build to .release dir by using Xcode.install-from-sources.sh - Build release build from sources and install it as aerospace-dev brew cask.
This script is "work in progress".
Use it on your own risk.Even if you use LSP and another text editor, Xcode is still useful to attach debugger (though you can use lldb in CLI).
Package.swift file instead of AeroSpace.xcodeproj.
It's better to open Package.swift, because SPM project is more lightweight.
AeroSpace.xcodeproj is only used in *release*.sh build scripts.Terminal.
This way Accessibility permission will be requested from Terminal.
If you don't change Console to Terminal, Accessibility permission will be requested on every rebuild, because the debug binary is unsigned.script/clean-project.sh to clean the project when something goes wrong.