7 Commits

Author SHA1 Message Date
Jeffrey C. Ollie
593d70a42f fix missing check of emit_termcap build option 2025-01-24 10:06:40 -06:00
Jeffrey C. Ollie
d1969f74ac only the cp step needs to depend on the mkdir step 2025-01-24 10:06:39 -06:00
Jeffrey C. Ollie
2f8b0dc899 build: options to enable/disable terminfo & termcap install (take 2)
Fixes #5253

Add -Demit-terminfo and -Demit-termcap build options to enable/disable
installation of source terminfo and termcap files.
2025-01-24 10:06:39 -06:00
Mitchell Hashimoto
c0eb6985ee Revert "build: options to enable/disable terminfo & termcap install"
This reverts commit 8f49a227b7c352083b0815e7818db900402513e0.
2025-01-23 19:38:13 -08:00
Jeffrey C. Ollie
8f49a227b7 build: options to enable/disable terminfo & termcap install
Fixes #5253

Add `-Demit-terminfo` and `-Demit-termcap` build options to
enable/disable installtion of source terminfo and termcap files.
2025-01-23 14:17:33 -06:00
Gabriele Musco
c972051611 linux: add "Open in Ghostty" shortcut for nautilus 2025-01-08 13:49:32 +01:00
Mitchell Hashimoto
8bf5c4ed7f This is a major refactor of build.zig.
The major idea behind the refactor is to split the `build.zig` file up into
distinct `src/build/*.zig` files. By doing so, we can improve readability of
the primary `build.zig` while also enabling better reuse of steps. Our
`build.zig` is now less than 150 lines of code (of course, it calls into a lot
more lines but they're neatly organized now).

Improvements:

  * `build.zig` is less than 150 lines of readable code.
  * Help strings and unicode table generators are only run once when multiple
    artifacts are built since the results are the same regardless of target.
  * Metal lib is only built once per architecture (rather than once per artifact)
  * Resources (shell integration, terminfo, etc.) and docs are only
    built/installed for artifacts that need them

Breaking changes:

  * Removed broken wasm build (@gabydd will re-add)
  * Removed conformance files, shell scripts are better and we don't run
    these anymore
  * Removed macOS app bundle creation, we don't use this anymore since we
    use Xcode

## Some History

Our `build.zig` hasn't been significantly refactored since the project started,
when Zig was _version 0.10_. Since then, the build system has changed
significantly. We've only ever duct taped the `build.zig` as we needed to
support new Zig versions, new features, etc. It was a mess.

The major improvement is adapting the entire Ghostty `build.zig` to the Step
and LazyPath changes introduced way back in Zig 0.12. This lets us better take
advantage of parallelism and the dependency graph so that steps are only
executed as they're needed.

As such, you can see in the build.zig that we initialize a lot of things, but
unless a final target (i.e. install, run) references those steps, _they'll
never be executed_. This lets us clean up a lot.
2025-01-07 19:47:43 -08:00