Installation
To use vftool
, you need to compile it from the source code. This requires either the Xcode Command Line Tools or a full Xcode installation on macOS 11.0 (Big Sur) or newer.
Prerequisites
- macOS >= 11.0
- Xcode or Xcode Command Line Tools. You can install the command line tools by running:
xcode-select --install
There are two primary methods for building vftool
: using the provided Makefile
or building directly in Xcode.
Building from the Command Line (Recommended)
This is the simplest method for most users.
-
Clone the Repository
git clone https://github.com/evansm7/vftool.git cd vftool
-
Run Make
Execute the
make
command in the root of the repository.make
This command performs the following steps as defined in the
Makefile
:- Creates a
build/
directory. - Compiles the
vftool/main.m
source file usingclang
, linking against theFoundation
andVirtualization
frameworks. - Applies a code signature with the necessary entitlements (
com.apple.security.virtualization
) to the resulting binary. The default signature is ad-hoc, which is sufficient to run the application on your own machine.
- Creates a
-
Locate the Binary
The compiled executable will be located at
build/vftool
. You can run it from there or copy it to a location in yourPATH
, such as/usr/local/bin
.# Example: copy to /usr/local/bin cp build/vftool /usr/local/bin/
Building with Xcode
If you prefer using an IDE, you can build the project with Xcode.
-
Open the Project
Clone the repository as described above and open the
vftool.xcodeproj
file in Xcode. -
Configure Signing
- Select the
vftool
project in the Xcode navigator. - Go to the "Signing & Capabilities" tab for the
vftool
target. - You may need to select your Apple ID developer Team to satisfy code signing requirements. A free developer account is sufficient.
- Select the
-
Build the Project
- From the Xcode menu, select "Product" > "Build" (or press
⌘B
). - Xcode will compile the source code and place the
vftool
executable in its derived data directory. - You can run it directly from Xcode or find the product in the "Products" group in the project navigator, right-click, and select "Show in Finder".
- From the Xcode menu, select "Product" > "Build" (or press