Skip to content

Commit d655f8e

Browse files
committed
[platform] Add setting support for apple backend
1 parent 64e0153 commit d655f8e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/platform/platform_osx.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
#include "backends/virtualbox/virtualbox_virtual_machine_factory.h"
3636
#endif
3737

38+
#ifdef APPLE_ENABLED
39+
#include "backends/apple/apple_virtual_machine_factory.h"
40+
#endif
41+
3842
#include "shared/macos/process_factory.h"
3943
#include "shared/sshfs_server_process_spec.h"
4044
#include <daemon/default_vm_image_vault.h>
@@ -221,6 +225,9 @@ bool mp::platform::Platform::is_backend_supported(const QString& backend) const
221225
#endif
222226
#ifdef VIRTUALBOX_ENABLED
223227
backend == "virtualbox" ||
228+
#endif
229+
#ifdef APPLE_ENABLED
230+
backend == "apple" ||
224231
#endif
225232
false;
226233
}
@@ -297,6 +304,12 @@ mp::VirtualMachineFactory::UPtr mp::platform::vm_backend(const mp::Path& data_di
297304
return std::make_unique<QemuVirtualMachineFactory>(data_dir);
298305
#endif
299306
}
307+
else if (driver == QStringLiteral("apple"))
308+
{
309+
#if APPLE_ENABLED
310+
return std::make_unique<apple::AppleVirtualMachineFactory>(data_dir);
311+
#endif
312+
}
300313

301314
throw std::runtime_error(fmt::format("Unsupported virtualization driver: {}", driver));
302315
}

0 commit comments

Comments
 (0)