diff --git a/README.md b/README.md index e8653a4c8..cac618d0d 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/build.zig b/build.zig index 424bf08f6..a7922ae7e 100644 --- a/build.zig +++ b/build.zig @@ -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( diff --git a/dist/macos/Ghostty.icns b/dist/macos/Ghostty.icns new file mode 100755 index 000000000..52365a405 Binary files /dev/null and b/dist/macos/Ghostty.icns differ diff --git a/dist/macos/Info.plist b/dist/macos/Info.plist new file mode 100644 index 000000000..8283cc529 --- /dev/null +++ b/dist/macos/Info.plist @@ -0,0 +1,17 @@ + + + + + CFBundleExecutable + ghostty + CFBundleIdentifier + com.mitchellh.ghostty + CFBundleName + Ghostty + CFBundleDisplayName + Ghostty + CFBundleIconFile + Ghostty.icns + + + diff --git a/images/ghost.png b/images/ghost.png deleted file mode 100755 index 08355a8da..000000000 Binary files a/images/ghost.png and /dev/null differ diff --git a/images/icons/icon_128x128.png b/images/icons/icon_128x128.png new file mode 100755 index 000000000..7b581449b Binary files /dev/null and b/images/icons/icon_128x128.png differ diff --git a/images/icons/icon_128x128@2x@2x.png b/images/icons/icon_128x128@2x@2x.png new file mode 100755 index 000000000..1c29b7011 Binary files /dev/null and b/images/icons/icon_128x128@2x@2x.png differ diff --git a/images/icons/icon_16x16.png b/images/icons/icon_16x16.png new file mode 100755 index 000000000..d7cb16795 Binary files /dev/null and b/images/icons/icon_16x16.png differ diff --git a/images/icons/icon_16x16@2x@2x.png b/images/icons/icon_16x16@2x@2x.png new file mode 100755 index 000000000..5e738dfd3 Binary files /dev/null and b/images/icons/icon_16x16@2x@2x.png differ diff --git a/images/icons/icon_256x256.png b/images/icons/icon_256x256.png new file mode 100755 index 000000000..2dda0d6d3 Binary files /dev/null and b/images/icons/icon_256x256.png differ diff --git a/images/icons/icon_256x256@2x@2x.png b/images/icons/icon_256x256@2x@2x.png new file mode 100755 index 000000000..b0b5c70aa Binary files /dev/null and b/images/icons/icon_256x256@2x@2x.png differ diff --git a/images/icons/icon_32x32.png b/images/icons/icon_32x32.png new file mode 100755 index 000000000..5e738dfd3 Binary files /dev/null and b/images/icons/icon_32x32.png differ diff --git a/images/icons/icon_32x32@2x@2x.png b/images/icons/icon_32x32@2x@2x.png new file mode 100755 index 000000000..c7cbb7f58 Binary files /dev/null and b/images/icons/icon_32x32@2x@2x.png differ diff --git a/images/icons/icon_512x512.png b/images/icons/icon_512x512.png new file mode 100755 index 000000000..b0b5c70aa Binary files /dev/null and b/images/icons/icon_512x512.png differ diff --git a/images/icons/icon_512x512@2x@2x.png b/images/icons/icon_512x512@2x@2x.png new file mode 100755 index 000000000..0368b4a42 Binary files /dev/null and b/images/icons/icon_512x512@2x@2x.png differ