Skip to content

Commit

Permalink
- fix macOS compilation with project directory with spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Hart committed Jan 24, 2025
1 parent 77f08ee commit 191f084
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
22 changes: 17 additions & 5 deletions hi_backend/backend/CompileExporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1190,17 +1190,20 @@ CompileExporter::ErrorCodes CompileExporter::compileSolution(BuildOption buildOp
}
#else

String permissionCommand = "chmod +x \"" + batchFile.getFullPathName() + "\"";
system(permissionCommand.getCharPointer());
String command = manager != nullptr ? ("sh " + batchFile.getFullPathName()) : ("open " + batchFile.getFullPathName().quoted());
if(manager != nullptr)
{
String permissionCommand = "chmod +x \"" + batchFile.getFullPathName() + "\"";
system(permissionCommand.getCharPointer());
}

String command = manager != nullptr ? batchFile.getFullPathName() : ("open " + batchFile.getFullPathName().quoted());

#endif


#if JUCE_MAC
if (globalCommandLineExport)
{
Logger::writeToLog("Execute" + permissionCommand);
Logger::writeToLog("Call " + command + " in order to compile the project");

return ErrorCodes::OK;
Expand All @@ -1217,7 +1220,14 @@ CompileExporter::ErrorCodes CompileExporter::compileSolution(BuildOption buildOp
{
ChildProcess cp;

cp.start(command);
#if JUCE_MAC
StringArray com;
com.add("sh");
com.add(command);
cp.start(com);
#else
cp.start(command);
#endif

String currentLine;

Expand Down Expand Up @@ -2019,6 +2029,7 @@ void CompileExporter::ProjectTemplateHelpers::handleVisualStudioVersion(const Hi

auto shouldUseVS2017 = !(bool)HISE_USE_VS2022;

#if JUCE_WINDOWS
if (isUsingVisualStudio2017 != shouldUseVS2017)
{
auto buildVersion = shouldUseVS2017 ? "VS2017" : "VS2022";
Expand All @@ -2032,6 +2043,7 @@ void CompileExporter::ProjectTemplateHelpers::handleVisualStudioVersion(const Hi

PresetHandler::showMessageWindow("VS Version mismatch detected", message, PresetHandler::IconType::Warning);
}
#endif

if (isUsingVisualStudio2017)
{
Expand Down
2 changes: 1 addition & 1 deletion hi_core/hi_modules/effects/fx/SlotFX.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class HardcodedSwappableEffect : public HotswappableProcessor,
bool hasLoadedButUncompiledEffect() const
{
#if USE_BACKEND
return currentEffect.isNotEmpty() && factory == nullptr || factory->getNumNodes() == 0;
return currentEffect.isNotEmpty() && (factory == nullptr || factory->getNumNodes() == 0);
#else
return false;
#endif
Expand Down

0 comments on commit 191f084

Please sign in to comment.