Browse Source

Fix some wine bridge details

Signed-off-by: falkTX <falktx@falktx.com>
pull/1811/head
falkTX 1 year ago
parent
commit
dd092c74aa
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 25 additions and 19 deletions
  1. +23
    -19
      source/backend/plugin/CarlaPluginBridge.cpp
  2. +2
    -0
      source/frontend/pluginlist/pluginlistdialog.cpp

+ 23
- 19
source/backend/plugin/CarlaPluginBridge.cpp View File

@@ -324,7 +324,7 @@ protected:
if (fWinePrefix.isNotEmpty())
{
carla_setenv("WINEDEBUG", "-all");
carla_setenv("WINEPREFIX", fWinePrefix.toRawUTF8());
carla_setenv("WINEPREFIX", fWinePrefix.buffer());

if (options.wine.rtPrio)
{
@@ -341,7 +341,7 @@ protected:
carla_setenv("WINE_SVR_RT", strBuf);

carla_stdout("Using WINEPREFIX '%s', with base RT prio %i and server RT prio %i",
fWinePrefix.toRawUTF8(), options.wine.baseRtPrio, options.wine.serverRtPrio);
fWinePrefix.buffer(), options.wine.baseRtPrio, options.wine.serverRtPrio);
}
else
{
@@ -353,7 +353,7 @@ protected:
carla_unsetenv("WINE_RT_PRIO");
carla_unsetenv("WINE_SVR_RT");

carla_stdout("Using WINEPREFIX '%s', without RT priorities", fWinePrefix.toRawUTF8());
carla_stdout("Using WINEPREFIX '%s', without RT priorities", fWinePrefix.buffer());
}
}
#endif
@@ -430,7 +430,7 @@ private:
String fLabel;
String fShmIds;
#ifndef CARLA_OS_WIN
String fWinePrefix;
CarlaString fWinePrefix;
#endif

CarlaScopedPointer<ChildProcess> fProcess;
@@ -2538,15 +2538,15 @@ public:
if (fBinaryType == BINARY_WIN32 || fBinaryType == BINARY_WIN64)
{
const StringArray driveLetterSplit(StringArray::fromTokens(realBigValueFilePath, ":/", ""));
carla_stdout("big value save path BEFORE => %s", realBigValueFilePath.toRawUTF8());
carla_stdout("big value save path BEFORE => '%s' | using wineprefix '%s'", realBigValueFilePath.toRawUTF8(), fWinePrefix.buffer());

realBigValueFilePath = fWinePrefix;
realBigValueFilePath = fWinePrefix.buffer();
realBigValueFilePath += "/drive_";
realBigValueFilePath += driveLetterSplit[0].toLowerCase();
realBigValueFilePath += driveLetterSplit[1];

realBigValueFilePath = realBigValueFilePath.replace("\\", "/");
carla_stdout("big value save path AFTER => %s", realBigValueFilePath.toRawUTF8());
carla_stdout("big value save path AFTER => '%s'", realBigValueFilePath.toRawUTF8());
}
#endif

@@ -2579,15 +2579,15 @@ public:
if (fBinaryType == BINARY_WIN32 || fBinaryType == BINARY_WIN64)
{
const StringArray driveLetterSplit(StringArray::fromTokens(realChunkFilePath, ":/", ""));
carla_stdout("chunk save path BEFORE => %s", realChunkFilePath.toRawUTF8());
carla_stdout("chunk save path BEFORE => '%s' | using wineprefix '%s'", realChunkFilePath.toRawUTF8(), fWinePrefix.buffer());

realChunkFilePath = fWinePrefix;
realChunkFilePath = fWinePrefix.buffer();
realChunkFilePath += "/drive_";
realChunkFilePath += driveLetterSplit[0].toLowerCase();
realChunkFilePath += driveLetterSplit[1];

realChunkFilePath = realChunkFilePath.replace("\\", "/");
carla_stdout("chunk save path AFTER => %s", realChunkFilePath.toRawUTF8());
carla_stdout("chunk save path AFTER => '%s'", realChunkFilePath.toRawUTF8());
}
#endif

@@ -2764,20 +2764,24 @@ public:
{
const EngineOptions& engineOptions(pData->engine->getOptions());

water::String winePrefix;

if (engineOptions.wine.autoPrefix)
fWinePrefix = findWinePrefix(pData->filename);
winePrefix = findWinePrefix(pData->filename);

if (fWinePrefix.isEmpty())
if (winePrefix.isEmpty())
{
const char* const envWinePrefix = std::getenv("WINEPREFIX");

if (envWinePrefix != nullptr && envWinePrefix[0] != '\0')
fWinePrefix = envWinePrefix;
winePrefix = envWinePrefix;
else if (engineOptions.wine.fallbackPrefix != nullptr && engineOptions.wine.fallbackPrefix[0] != '\0')
fWinePrefix = engineOptions.wine.fallbackPrefix;
winePrefix = engineOptions.wine.fallbackPrefix;
else
fWinePrefix = File::getSpecialLocation(File::userHomeDirectory).getFullPathName() + "/.wine";
winePrefix = File::getSpecialLocation(File::userHomeDirectory).getFullPathName() + "/.wine";
}

fWinePrefix = winePrefix.toRawUTF8();
}
#endif

@@ -2794,9 +2798,9 @@ public:
std::strncpy(shmIdsStr+6*3, &fShmNonRtServerControl.filename[fShmNonRtServerControl.filename.length()-6], 6);

fBridgeThread.setData(
#ifndef CARLA_OS_WIN
fWinePrefix.toRawUTF8(),
#endif
#ifndef CARLA_OS_WIN
fWinePrefix,
#endif
binaryArchName, bridgeBinary, label, shmIdsStr);
}

@@ -2917,7 +2921,7 @@ private:
BridgeNonRtServerControl fShmNonRtServerControl;

#ifndef CARLA_OS_WIN
String fWinePrefix;
CarlaString fWinePrefix;
#endif

class ReceivingParamText {


+ 2
- 0
source/frontend/pluginlist/pluginlistdialog.cpp View File

@@ -341,6 +341,7 @@ struct PluginPaths {
{
vst2 += ":" + winePrefix + "/drive_c/Program Files/VstPlugins";
vst2 += ":" + winePrefix + "/drive_c/Program Files/Steinberg/VstPlugins";
vst2 += ":" + winePrefix + "/drive_c/Program Files/Common Files/VST2";
vst3 += ":" + winePrefix + "/drive_c/Program Files/Common Files/VST3";
clap += ":" + winePrefix + "/drive_c/Program Files/Common Files/CLAP";

@@ -349,6 +350,7 @@ struct PluginPaths {
{
vst2 += ":" + winePrefix + "/drive_c/Program Files (x86)/VstPlugins";
vst2 += ":" + winePrefix + "/drive_c/Program Files (x86)/Steinberg/VstPlugins";
vst2 += ":" + winePrefix + "/drive_c/Program Files (x86)/Common Files/VST2";
vst3 += ":" + winePrefix + "/drive_c/Program Files (x86)/Common Files/VST3";
clap += ":" + winePrefix + "/drive_c/Program Files (x86)/Common Files/CLAP";
}


Loading…
Cancel
Save