-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Basic Windows build #11
Comments
bxRelease was actually repeated due to linkage issues :) I'll implement the bits I can, but I can't validate as I haven't got Windows >_> - Thanks bud |
FWIW I know some stuff is going to fail on paths so I'll preempt some of that |
In older toolchain versions (Ubuntu) we had to present bxRelease.a twice to satisfy linking. It appears to be solved now. Thanks for heads up in issue #11. Signed-off-by: Ikey Doherty <[email protected]>
Contribution is from @Superbelko per issue #11, as we begin to add some initial Windows support. We'll need to improve our library configuration and ensure we're not directly accessing POSIX specific paths anywhere, which we probably are because stuff is still hacky. Signed-off-by: Ikey Doherty <[email protected]>
For POSIX APIs we currently expect X11 linkage, which isn't present on a Windows build. Eventually we'll make this a Linux-X11 specific target as we're planning for macOS, and Wayland on Linux. This is a contribution from @Superbelko per issue #11 to start being a bit more portable for Windows. Signed-off-by: Ikey Doherty <[email protected]>
Just use enforce, we're looking at fatal errors here, so there is no sense in our custom weird exception handling right now. This is due to cleanups per issue #11. Signed-off-by: Ikey Doherty <[email protected]>
Some initial changes now in |
We're gonna need to figure out compilation of shaders on Windows too which will be fun.. |
Ok, tried it again, and there is some issues with coordination of things. Paths and other stuff isn't uniform right now, there is discrepancies in behavior between prepare-shaders.d and .sh variants and some other little nasty things. I see there is plans to use google shaderc instead bgfx one, but anyway, for some reason script uses plain shaderc name while bgfx built version adds suffixes like 'Release' and 'Debug'. So I got the exception about world context manager assets/World doesn't exists, adding empty folder solved this. After all manipulations it worked as before. |
Aye, I'm in the process of deprecating the current scripts in favour of prepare-shaders.d. I need to fix some bugs in the repo so that the demo-rpg repo can build against this repo and benefit from the internal shaders, which means we won't need to load any files in the core, helping with portability and startup speed a lot. Primarily our focus is Linux, so we need to be able to correctly link against the system libraries and runtime stuff like bgfx. Eventually we expect Serpent games to bundle minimal requirements such as bgfx and the LDC runtime, to run correctly everywhere. Unfortunately bgfx has no release process, no versioning and no SONAME, so we're having to jimmy the whole lot together.
|
We're moving to `prepare-shaders.d` which does the work of precompiling shaders for us. Thus, kill the hacky confusing script now. Signed-off-by: Ikey Doherty <[email protected]>
Signed-off-by: Ikey Doherty <[email protected]>
Signed-off-by: Ikey Doherty <[email protected]>
Hi, sorry for bothering again. But this has to be capitalized. Only 'linux' one is all lower case for some historical reasons, all the rest version identifiers names are capitalized (ok, iOS is funky too).[1] |
Derp, my bad sorry. don't mind the the bothering it helps me :D |
Signed-off-by: Ikey Doherty <[email protected]>
Sorry for not going normal fork-PR procedure. But if you insist I can do it that way.
So, anyway. In order to build on Windows you need to handle dependencies with dub and handle platform init.
dub.json - split 'posix' deps (these are your current deps) and 'windows' deps (also note you have bxRelease two times, which is probably a type or copy paste error)
However this is not enough, LDC will happily tell you that unreachable code is detected in file
source\serpent\graphics\pipeline\bgfx\pipeline.d somewhere inside integrateWindowBgfx() function.
Let's fix this, and while we are here let's also change platform handling to proper static assert which will clearly state the problem and give a hint to potential devs what they should do before they can build and use it.
source\serpent\graphics\pipeline\bgfx\pipeline.d
Assuming you've already build SDL2, SDL2_Image and bgfx libraries and placed them inside that same folder(a hacky solution for now) you will be able to build demo scene project like the one on a repo page.
The text was updated successfully, but these errors were encountered: