Browse Source

Add a little hack for running under wine, used in testing

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.06
falkTX 2 years ago
parent
commit
697e5ea677
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 3 additions and 0 deletions
  1. +1
    -0
      .github/workflows/build.yml
  2. +2
    -0
      src/override/common.cpp

+ 1
- 0
.github/workflows/build.yml View File

@@ -5,6 +5,7 @@ on:

env:
CACHE_VERSION: 24
CARDINAL_UNDER_WINE: 1
DEBIAN_FRONTEND: noninteractive
HOMEBREW_NO_AUTO_UPDATE: 1
LIBGL_ALWAYS_SOFTWARE: 'true'


+ 2
- 0
src/override/common.cpp View File

@@ -38,6 +38,8 @@
#include <windows.h>

FILE* fopen_u8(const char* filename, const char* mode) {
if (std::strncmp(filename, "\\\\?\\", 4) == 0 && std::getenv("CARDINAL_UNDER_WINE") != nullptr)
filename = "Z:\\dev\\null";
return _wfopen(rack::string::UTF8toUTF16(filename).c_str(), rack::string::UTF8toUTF16(mode).c_str());
}



Loading…
Cancel
Save