Skip to content
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 fixes #503

Merged
merged 3 commits into from Jun 18, 2021
Merged

Conversation

MegabytePhreak
Copy link
Contributor

Fix windows/mingw build issues identified in #502

Also fix resource search path issues identified during testing.

Should also pull matching PR in scopehal-apps and update the submodule.

This was updated for MacOS a while ago but that broke mingw/windows
@azonenberg
Copy link
Collaborator

  1. Curly braces go on their own line
  2. Why dirname() after PathRemoveFileSpec()? That shouldn't be necessary.
  3. Don't use raw printf(). Use LogTrace(), LogDebug(), LogVerbose(), LogNotice(), LogWarning(), etc. which allow for verbosity level control, IO redirection, pretty printed indentation, etc. These wrappers all have the same semantics as normal printf.

Improve windows (mingw64) builds to look for resources such as
shaders, icons, etc. in the share directory adjacent to the bin
directory where execuatable lives. This matches the pattern for a
mingw64 package install, and is the same as on Linux.

Without this, a freshly installed mingw package will fail to start
the glscopeclient GUI due to inability to find resources.
@azonenberg azonenberg merged commit 545e2f9 into ngscopeclient:master Jun 18, 2021
@MegabytePhreak
Copy link
Contributor Author

Fixed 1 and 3. Printf was leftover debug.

For 2, this mirrors how this is done on the linux side of the codepath. On mingw64, glscopeclient.exe ends up at
/mingw64/bin/glscopeclient, and it's resources at /ming64/share/glscopeclient
So starting from the binary path, we need to pop the executable name and one more layer of hierarchy (bin) before appending share/glscopeclient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants