-
Notifications
You must be signed in to change notification settings - Fork 171
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
Make rwgame build and run on windows #130
Conversation
Ignore this. We are going to have a better platform abstraction later - this is fine for now.
I'll probably review this too but I'm not sure when I'll find the time to do it. |
Linking this to #117 |
@@ -25,6 +25,9 @@ option(ENABLE_PROFILING "Enable detailed profiling metrics") | |||
# | |||
# Build configuration | |||
# | |||
if(NOT CMAKE_BUILD_TYPE) | |||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: Debug Release" FORCE) | |||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this still work for non-makefile generators like Visual Studio?
Sorry for the delay. I'd prefer abstracting the file-system interaction to avoid needing platform specific fix ups in the game code itself. This could live in |
That being said I think abstracting the file system access would be outside the scope of this PR. If there is nothing else you'd like to add to it then I'll accept on the basis that file system access will be changed in future. |
There is currently a merge conflict with master; could you re-base these changes? |
@@ -0,0 +1,3 @@ | |||
#undef IGNORE | |||
#undef near | |||
#undef far |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do these collide with? Could needing these undefinitions be avoided by including different windows headers or by changing the name that conflict?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IGNORE is defined in winbase.h, near and far are defined in windef.h.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those sound required. The windows headers should definitely be isolated from the rest of the code eventually, but this header is an OK fix for now.
Sorry to bother you again, but we accidently caused another merge conflict just before wanting to merge this. Could you rebase & test again? We'll merge it then and we fix any remaining issues (if there are any) later. You can also talk to us on IRC in #openrw on freenode for a more interactive conversation :) |
I have rebased and built it locally, but now it doesn't run so good. I'll join IRC sometime soon, because it seems I can't figure out the cause of all them segfaults. |
As you didn't join IRC yet I'll spoil the bug hunting fun here instead: OpenRW is currently very crashy due to a bug in the physics code; there is another PR to fix it, but it's still WIP (ever since adding parked cars last week, so test mode should be slightly less crashy) |
Works pretty well, only problem I had was with mman.h being copied to $MINGW64_ROOT/include/sys (I guess sys wasn't already a directory, so it just copied it to that filename.) It also needs a rebase. |
f9d566e
to
1ad5bf7
Compare
re WinSock: you need to WSAStartup before you use any WinSock functions. Can always do that later I suppose. Other than that, LGTM. Can we get this merged soon? |
Keen to get more developers looking at windows and in general. Further issues can be resolved with more PRs. |
Hi. I'm kinda new at all of this, so there are couple things I am not sure about.
I haven't tried to build tools and tests, just rwgame/rwengine/rwlib.