Mac bundle, icons
|
|
@ -109,3 +109,9 @@ $ zig build -Drelease-fast
|
|||
You can verify you have a release version by checking the filesize of the
|
||||
built binary (`zig-out/bin/ghostty`). The release version should be less
|
||||
than 5 MB on all platforms. The debug version is around 70MB.
|
||||
|
||||
### Mac `.app`
|
||||
|
||||
When targeting macOS, a macOS application bundle will be created at
|
||||
`zig-out/Ghostty.app`. This can be copied as-is and used like a normal app.
|
||||
This app will be not be signed or notarized.
|
||||
|
|
|
|||
|
|
@ -89,6 +89,14 @@ pub fn build(b: *std.build.Builder) !void {
|
|||
try addDeps(b, exe, static);
|
||||
}
|
||||
|
||||
// App (Mac)
|
||||
if (target.isDarwin()) {
|
||||
const bin_path = try std.fmt.allocPrint(b.allocator, "{s}/bin/ghostty", .{b.install_path});
|
||||
b.installFile(bin_path, "Ghostty.app/Contents/MacOS/ghostty");
|
||||
b.installFile("dist/macos/Info.plist", "Ghostty.app/Contents/Info.plist");
|
||||
b.installFile("dist/macos/Ghostty.icns", "Ghostty.app/Contents/Resources/Ghostty.icns");
|
||||
}
|
||||
|
||||
// term.wasm
|
||||
{
|
||||
const wasm = b.addSharedLibrary(
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>ghostty</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.mitchellh.ghostty</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Ghostty</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Ghostty</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Ghostty.icns</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
BIN
images/ghost.png
|
Before Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 582 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 93 KiB |