-
Notifications
You must be signed in to change notification settings - Fork 608
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows Support #437
Comments
Some targets were duplicated in the all-targets definition list that will not build for a Windows target. They're all moved to the non-Windows configuration. The target now builds against a mingw64 prefix with the appropriate dependencies installed. Updates #437
Hello, I today tried to build all listed dependencies on Windows:
It went without problems, only |
@barvirm they're all in vcpkg & mingw too, but so far we're able to build the test target without looking up any externals. |
Extracted from #871 (win support not a goal until 1.0):
Further, I had no debug output when starting from another terminal, only for directly starting via clicking. Further, I noticed that for example nvim-qt is heavily penalized by the scheduler and freezes, when my system is under heavy load (ie compiling). So I believe that the "native frontend" might require some experimentation of what things Microsoft chooses to penalize under heavy loads, since the terminal should be always repsonsive. |
In general, the config path should be completely unrelated to LANG settings, unless Windows in particular behaves very strangely. I imagine these are two separate issues, though. |
|
@mitchellh The README of Windows shell has a nice design motivation and overview, which is visualized in the browser https://github.com/microsoft/terminal/tree/be9fc200c7b22c544103ec3304ca31c3b984031e/src/renderer/atlas:
Would you mind taking a look how you'd like to proceed? TextAtlas restricts support to monospace fonts, see microsoft/terminal#10461 (comment), so I'm not sure what your plans would be related to that. To other interested folks: Do you know, if all "Windows native fonts" are all monospace? Afaiu, Monospace fonts can be also have Cleartype enabled, but not necessarily all. Do you happen to know from knowledge or trying, if that "just works" with "TextAtlas" renderer in Windows Terminal? |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
This is a tracking issue for windows support. I'm not yet committed on Windows working for Ghostty 1.0 but I wanted to make this issue in case anyone wants to help, as well as to provide some guidance on the order of operations I've taken before to support new platforms. We can make incremental progress towards Windows without it completely working at any time as long as we can keep those pieces tested in CI.
The recommended approach I take with new platforms is to get the GLFW, OpenGL, Freetype build working first. This doesn't provide a super native experience but it forces you to get dependencies compiling and gets you a window + renderable surface very quickly. This isn't something we'd want to ship, but it moves the needle forward and is satisfying to see. From there... you can dive into the weeds incrementally.
Tasks
The tasks below are in the order I would take, for reasons stated in "notes". I think each checkbox is individually PR-able.
zig build test
working. Testing doesn't bring in a lot of dependencies like apprt, font rendering, pty creation, so this should be a priority and will make all the following steps easier. (windows: add support for the glfw backend #773)zig build test
(Inital windows CI support #581)build.zig
updates)zig build -Dapp-runtime=glfw run
working (windows: add support for the glfw backend #773)pkg/freetype
. You can PR those separately.termio
implementation, i.e. how to open a pty.release-tip.yml
changes)Notes
The ordering above is purposeful. It incrementally goes from a feature-poor not-super-native cross-platform experience to a fully native, dedicated experience. The "GLFW+OpenGL+Freetype" combo is a fully cross-platform stack that will let you get a basic terminal working. Its not something we want to ship but its the lowest lines of code, forces you to get the build system to work, the CI, etc.
I then move on to "font discovery" because it lets users type font names and integrates a really simple, small C API for a dedicated platform. I still use Freetype usually at this point for rasterization. See
coretext_freetype
as an example for macOS which uses CoreText for discovery but Freetype for rasterization.I then do the dedicated font rasterization using the platform-native solution. This is important for the fonts to feel right. Each OS does subtly different font rasterization so this is important.
Next, I use the GLFW native API to grab a window handle so I can swap OpenGL for a platform-native solution. This lets me keep using GLFW for window creation and input events while iterating on the renderer.
Finally, I start building a custom windowing layer in apprt.
The text was updated successfully, but these errors were encountered: