forked from OpenDungeons/OpenDungeons
-
Notifications
You must be signed in to change notification settings - Fork 6
Fix what only worked on Linux, and a CRLF level file bug #21
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
Open
Upabjojr
wants to merge
5
commits into
tomluchowski:shaders-improvement
Choose a base branch
from
Upabjojr:split/cross-platform-fixes
base: shaders-improvement
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9ee783e
Fix two things that only ever worked on Linux
Upabjojr d20d946
Fix the rest of what only worked on Linux, and one level file bug it hid
Upabjojr f876104
Fix the two things that still did not compile on macOS
9ccaa13
Guard the Windows macro definitions so -Werror builds survive
2e2df09
Let macOS find data and plugins outside an .app bundle
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Maybe I am not too smart, but this branch will not compile on WINDOWS OS, because std::string command would end up being not declared anywhere .......
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.
Claude reported that compiling on Windows would require more extensive code changes. I told him to stop. Do you want to go on?
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.
Hmm I have my local code augmentation for my Windows installment in here, otherwise I wouldn't ship my binary version of ODP for Windows. Just for the sake of sanity , move the declaration of std::string command above the preprocessor '#if' ... I will cope with rest. BTW: are you aware of this little site : https://opendungeons.org/ ? ( with binary for W included ) .
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.
No, I wasn't aware of that site. I've asked Claude to fix building for Windows and test building for Mac. After he finishes, I will push the changes here.
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.
Claude has now verified this directly: it compile-checked every translation unit of the game for Windows with MinGW-w64 (GCC 16, both x86_64 and i686) against real Windows headers plus Ogre 13.6.5 / CEGUI / SFML 2.6 headers.
AdvertMode.cppcompiles cleanly as it is:commandis only declared and used inside the non-Windows#elsebranch — on Windows the call goes throughShellExecuteAinstead, so nothing ends up undeclared. If you would still preferstd::string commandhoisted above the#iffor readability, happy to move it.Two commits are now pushed to this branch:
#define NOMINMAXcollides with MinGW's libstdc++, which predefines it, and that warning is fatal under the project's default-Werror. Both defines are now guarded with#ifndef.Caveats: this was per-file compilation with MinGW, not a full Windows link, and the two StackTraceWin* files could not be checked here (they need bfd.h / MSVC).
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.
YEah I usually build my W binary bundle with MSVC ...
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.
I don't have Windows. Cannot test it.