Browse Source

config: rename UTMQemuConfiguration -> UTMLegacyQemuConfiguration

osy 3 năm trước cách đây
mục cha
commit
bdb5cb4ebb
100 tập tin đã thay đổi với 530 bổ sung411 xóa
  1. 3 3
      Configuration/Legacy/UTMLegacyQemuConfiguration+Constants.h
  2. 22 22
      Configuration/Legacy/UTMLegacyQemuConfiguration+Constants.m
  3. 2 2
      Configuration/Legacy/UTMLegacyQemuConfiguration+ConstantsGenerated.m
  4. 3 3
      Configuration/Legacy/UTMLegacyQemuConfiguration+Defaults.h
  5. 13 13
      Configuration/Legacy/UTMLegacyQemuConfiguration+Defaults.m
  6. 2 2
      Configuration/Legacy/UTMLegacyQemuConfiguration+Display.h
  7. 4 4
      Configuration/Legacy/UTMLegacyQemuConfiguration+Display.m
  8. 2 2
      Configuration/Legacy/UTMLegacyQemuConfiguration+Drives.h
  9. 15 15
      Configuration/Legacy/UTMLegacyQemuConfiguration+Drives.m
  10. 2 2
      Configuration/Legacy/UTMLegacyQemuConfiguration+Miscellaneous.h
  11. 4 4
      Configuration/Legacy/UTMLegacyQemuConfiguration+Miscellaneous.m
  12. 7 7
      Configuration/Legacy/UTMLegacyQemuConfiguration+Networking.h
  13. 11 11
      Configuration/Legacy/UTMLegacyQemuConfiguration+Networking.m
  14. 2 2
      Configuration/Legacy/UTMLegacyQemuConfiguration+Sharing.h
  15. 4 4
      Configuration/Legacy/UTMLegacyQemuConfiguration+Sharing.m
  16. 2 2
      Configuration/Legacy/UTMLegacyQemuConfiguration+System.h
  17. 9 9
      Configuration/Legacy/UTMLegacyQemuConfiguration+System.m
  18. 1 1
      Configuration/Legacy/UTMLegacyQemuConfiguration.h
  19. 12 12
      Configuration/Legacy/UTMLegacyQemuConfiguration.m
  20. 3 3
      Configuration/Legacy/UTMLegacyQemuConfigurationDelegate.h
  21. 4 4
      Configuration/Legacy/UTMLegacyQemuConfigurationExtension.swift
  22. 1 1
      Configuration/Legacy/UTMLegacyQemuConfigurationPortForward.h
  23. 2 2
      Configuration/Legacy/UTMLegacyQemuConfigurationPortForward.m
  24. 17 0
      Configuration/UTMQemuConfiguration.swift
  25. 17 0
      Configuration/UTMQemuConfigurationDisplay.swift
  26. 17 0
      Configuration/UTMQemuConfigurationInfo.swift
  27. 17 0
      Configuration/UTMQemuConfigurationQEMU.swift
  28. 17 0
      Configuration/UTMQemuConfigurationSystem.swift
  29. 17 0
      Configuration/UTMQemuConstants.swift
  30. 17 0
      Configuration/UTMQemuConstantsGenerated.swift
  31. 1 1
      Managers/UTMDrive.h
  32. 2 2
      Managers/UTMDrive.m
  33. 1 1
      Managers/UTMQemu.h
  34. 2 2
      Managers/UTMQemuSystem.h
  35. 13 13
      Managers/UTMQemuSystem.m
  36. 2 2
      Managers/UTMQemuVirtualMachine+SPICE.m
  37. 2 2
      Managers/UTMQemuVirtualMachine.h
  38. 11 11
      Managers/UTMQemuVirtualMachine.m
  39. 3 3
      Managers/UTMSpiceIO.h
  40. 4 4
      Managers/UTMSpiceIO.m
  41. 1 1
      Managers/UTMVirtualMachine.m
  42. 6 6
      Managers/UTMVirtualMachineExtension.swift
  43. 1 1
      Platform/Shared/VMCardView.swift
  44. 2 2
      Platform/Shared/VMConfigAdvancedNetworkView.swift
  45. 3 3
      Platform/Shared/VMConfigDisplayConsoleView.swift
  46. 6 6
      Platform/Shared/VMConfigDisplayView.swift
  47. 1 1
      Platform/Shared/VMConfigDriveCreateView.swift
  48. 4 4
      Platform/Shared/VMConfigDriveDetailsView.swift
  49. 1 1
      Platform/Shared/VMConfigInfoView.swift
  50. 2 2
      Platform/Shared/VMConfigInputView.swift
  51. 7 7
      Platform/Shared/VMConfigNetworkView.swift
  52. 4 4
      Platform/Shared/VMConfigPortForwardForm.swift
  53. 6 6
      Platform/Shared/VMConfigQEMUView.swift
  54. 2 2
      Platform/Shared/VMConfigSharingView.swift
  55. 4 4
      Platform/Shared/VMConfigSoundView.swift
  56. 14 14
      Platform/Shared/VMConfigSystemView.swift
  57. 2 2
      Platform/Shared/VMDetailsView.swift
  58. 2 2
      Platform/Shared/VMDriveImage.swift
  59. 1 1
      Platform/Shared/VMRemovableDrivesView.swift
  60. 4 4
      Platform/Shared/VMWizardHardwareView.swift
  61. 5 5
      Platform/Shared/VMWizardState.swift
  62. 10 10
      Platform/Swift-Bridging-Header.h
  63. 13 13
      Platform/UTMData.swift
  64. 2 2
      Platform/iOS/Display/VMDisplayMetalViewController+Gamepad.m
  65. 2 2
      Platform/iOS/Display/VMDisplayMetalViewController+Pointer.m
  66. 2 2
      Platform/iOS/Display/VMDisplayMetalViewController+Touch.m
  67. 2 2
      Platform/iOS/Display/VMDisplayMetalViewController.m
  68. 2 2
      Platform/iOS/Display/VMDisplayTerminalViewController.m
  69. 2 2
      Platform/iOS/Display/VMDisplayViewController.h
  70. 2 2
      Platform/iOS/Display/VMDisplayViewController.m
  71. 1 1
      Platform/iOS/Legacy/VMConfigCreateViewController.m
  72. 3 3
      Platform/iOS/Legacy/VMConfigDisplayViewController.m
  73. 1 1
      Platform/iOS/Legacy/VMConfigDriveDetailViewController.h
  74. 10 10
      Platform/iOS/Legacy/VMConfigDriveDetailViewController.m
  75. 2 2
      Platform/iOS/Legacy/VMConfigDrivePickerViewController.h
  76. 4 4
      Platform/iOS/Legacy/VMConfigDrivePickerViewController.m
  77. 2 2
      Platform/iOS/Legacy/VMConfigDrivesViewController.h
  78. 5 5
      Platform/iOS/Legacy/VMConfigDrivesViewController.m
  79. 4 4
      Platform/iOS/Legacy/VMConfigExistingViewController.m
  80. 1 1
      Platform/iOS/Legacy/VMConfigInputViewController.m
  81. 2 2
      Platform/iOS/Legacy/VMConfigPortForwardingViewController.h
  82. 6 6
      Platform/iOS/Legacy/VMConfigPortForwardingViewController.m
  83. 2 2
      Platform/iOS/Legacy/VMConfigSharingViewController.m
  84. 1 1
      Platform/iOS/Legacy/VMConfigSoundViewController.m
  85. 3 3
      Platform/iOS/Legacy/VMConfigSystemArgumentsViewController.h
  86. 1 1
      Platform/iOS/Legacy/VMConfigSystemArgumentsViewController.m
  87. 7 7
      Platform/iOS/Legacy/VMConfigSystemViewController.m
  88. 2 2
      Platform/iOS/Legacy/VMConfigViewController.h
  89. 8 8
      Platform/iOS/Legacy/VMConfigViewController.m
  90. 9 9
      Platform/iOS/Legacy/VMListViewController.m
  91. 2 2
      Platform/iOS/VMConfigDrivesView.swift
  92. 8 8
      Platform/iOS/VMConfigNetworkPortForwardView.swift
  93. 2 2
      Platform/iOS/VMSettingsView.swift
  94. 9 9
      Platform/ko.lproj/Localizable.strings
  95. 2 2
      Platform/macOS/Display/VMDisplayQemuDisplayController.swift
  96. 8 8
      Platform/macOS/VMConfigDrivesButtons.swift
  97. 10 10
      Platform/macOS/VMConfigNetworkPortForwardView.swift
  98. 2 2
      Platform/macOS/VMQEMUSettingsView.swift
  99. 2 2
      Platform/macOS/VMSettingsView.swift
  100. 6 6
      Platform/zh-Hans.lproj/Localizable.strings

+ 3 - 3
Configuration/UTMQemuConfiguration+Constants.h → Configuration/Legacy/UTMLegacyQemuConfiguration+Constants.h

@@ -14,11 +14,11 @@
 // limitations under the License.
 //
 
-#import "UTMQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface UTMQemuConfiguration (Constants)
+@interface UTMLegacyQemuConfiguration (Constants)
 
 @property (class, nonatomic, readonly) NSString *diskImagesDirectory;
 @property (class, nonatomic, readonly) NSString *debugLogName;
@@ -42,7 +42,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @end
 
-@interface UTMQemuConfiguration (ConstantsGenerated)
+@interface UTMLegacyQemuConfiguration (ConstantsGenerated)
 
 + (NSArray<NSString *>*)supportedArchitectures;
 + (NSArray<NSString *>*)supportedArchitecturesPretty;

+ 22 - 22
Configuration/UTMQemuConfiguration+Constants.m → Configuration/Legacy/UTMLegacyQemuConfiguration+Constants.m

@@ -20,9 +20,9 @@
 #else
 #import <AppKit/AppKit.h>
 #endif
-#import "UTMQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
 
-@implementation UTMQemuConfiguration (Constants)
+@implementation UTMLegacyQemuConfiguration (Constants)
 
 + (NSString *)diskImagesDirectory {
     return @"Images";
@@ -109,13 +109,13 @@
 
 + (NSArray<NSString *>*)supportedImageTypesPretty {
     return @[
-             NSLocalizedString(@"None", "UTMQemuConfiguration"),
-             NSLocalizedString(@"Disk Image", "UTMQemuConfiguration"),
-             NSLocalizedString(@"CD/DVD (ISO) Image", "UTMQemuConfiguration"),
-             NSLocalizedString(@"BIOS", "UTMQemuConfiguration"),
-             NSLocalizedString(@"Linux Kernel", "UTMQemuConfiguration"),
-             NSLocalizedString(@"Linux RAM Disk", "UTMQemuConfiguration"),
-             NSLocalizedString(@"Linux Device Tree Binary", "UTMQemuConfiguration")
+             NSLocalizedString(@"None", "UTMLegacyQemuConfiguration"),
+             NSLocalizedString(@"Disk Image", "UTMLegacyQemuConfiguration"),
+             NSLocalizedString(@"CD/DVD (ISO) Image", "UTMLegacyQemuConfiguration"),
+             NSLocalizedString(@"BIOS", "UTMLegacyQemuConfiguration"),
+             NSLocalizedString(@"Linux Kernel", "UTMLegacyQemuConfiguration"),
+             NSLocalizedString(@"Linux RAM Disk", "UTMLegacyQemuConfiguration"),
+             NSLocalizedString(@"Linux Device Tree Binary", "UTMLegacyQemuConfiguration")
              ];
 }
 
@@ -182,8 +182,8 @@
 
 + (NSArray<NSString *>*)supportedScalersPretty {
     return @[
-        NSLocalizedString(@"Linear", "UTMQemuConfiguration"),
-        NSLocalizedString(@"Nearest Neighbor", "UTMQemuConfiguration"),
+        NSLocalizedString(@"Linear", "UTMLegacyQemuConfiguration"),
+        NSLocalizedString(@"Nearest Neighbor", "UTMLegacyQemuConfiguration"),
     ];
 }
 
@@ -219,19 +219,19 @@
     static NSMutableArray<NSString *> *fonts;
     if (!fonts) {
         fonts = [NSMutableArray new];
-        for (NSString *fontName in [UTMQemuConfiguration supportedConsoleFonts]) {
+        for (NSString *fontName in [UTMLegacyQemuConfiguration supportedConsoleFonts]) {
             UIFont *font = [UIFont fontWithName:fontName size:1];
             UIFontDescriptorSymbolicTraits traits = font.fontDescriptor.symbolicTraits;
             NSString *description;
             if ((traits & (UIFontDescriptorTraitItalic | UIFontDescriptorTraitBold)) ==
                 (UIFontDescriptorTraitItalic | UIFontDescriptorTraitBold)) {
-                description = NSLocalizedString(@"Italic, Bold", @"UTMQemuConfiguration+Constants");
+                description = NSLocalizedString(@"Italic, Bold", @"UTMLegacyQemuConfiguration+Constants");
             } else if ((traits & UIFontDescriptorTraitItalic) != 0) {
-                description = NSLocalizedString(@"Italic", @"UTMQemuConfiguration+Constants");
+                description = NSLocalizedString(@"Italic", @"UTMLegacyQemuConfiguration+Constants");
             } else if ((traits & UIFontDescriptorTraitBold) != 0) {
-                description = NSLocalizedString(@"Bold", @"UTMQemuConfiguration+Constants");
+                description = NSLocalizedString(@"Bold", @"UTMLegacyQemuConfiguration+Constants");
             } else {
-                description = NSLocalizedString(@"Regular", @"UTMQemuConfiguration+Constants");
+                description = NSLocalizedString(@"Regular", @"UTMLegacyQemuConfiguration+Constants");
             }
             NSString *label = [NSString stringWithFormat:@"%@ (%@)", font.familyName, description];
             [fonts addObject:label];
@@ -255,7 +255,7 @@
     static NSMutableArray<NSString *> *fonts;
     if (!fonts) {
         fonts = [NSMutableArray new];
-        for (NSString *fontName in [UTMQemuConfiguration supportedConsoleFonts]) {
+        for (NSString *fontName in [UTMLegacyQemuConfiguration supportedConsoleFonts]) {
             NSFont *font = [NSFont fontWithName:fontName size:1];
             [fonts addObject:font.displayName];
         }
@@ -276,11 +276,11 @@
 
 + (NSArray<NSString *> *)supportedNetworkModesPretty {
     return @[
-        NSLocalizedString(@"None", "UTMQemuConfiguration"),
-        NSLocalizedString(@"Emulated VLAN", "UTMQemuConfiguration"),
-        NSLocalizedString(@"Shared Network", "UTMQemuConfiguration"),
-        NSLocalizedString(@"Host Only", "UTMQemuConfiguration"),
-        NSLocalizedString(@"Bridged (Advanced)", "UTMQemuConfiguration"),
+        NSLocalizedString(@"None", "UTMLegacyQemuConfiguration"),
+        NSLocalizedString(@"Emulated VLAN", "UTMLegacyQemuConfiguration"),
+        NSLocalizedString(@"Shared Network", "UTMLegacyQemuConfiguration"),
+        NSLocalizedString(@"Host Only", "UTMLegacyQemuConfiguration"),
+        NSLocalizedString(@"Bridged (Advanced)", "UTMLegacyQemuConfiguration"),
     ];
 }
 

+ 2 - 2
Configuration/UTMQemuConfiguration+ConstantsGenerated.m → Configuration/Legacy/UTMLegacyQemuConfiguration+ConstantsGenerated.m

@@ -16,9 +16,9 @@
 
 // !! THIS FILE IS GENERATED FROM const-gen.py, DO NOT MODIFY MANUALLY !!
 
-#import "UTMQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
 
-@implementation UTMQemuConfiguration (ConstantsGenerated)
+@implementation UTMLegacyQemuConfiguration (ConstantsGenerated)
 
 + (NSArray<NSString *>*)supportedArchitectures {
     return @[

+ 3 - 3
Configuration/UTMQemuConfiguration+Defaults.h → Configuration/Legacy/UTMLegacyQemuConfiguration+Defaults.h

@@ -14,12 +14,12 @@
 // limitations under the License.
 //
 
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Drives.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Drives.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface UTMQemuConfiguration (Defaults)
+@interface UTMLegacyQemuConfiguration (Defaults)
 
 - (void)loadDefaults;
 - (void)loadDefaultsForTarget:(nullable NSString *)target architecture:(nullable NSString *)architecture;

+ 13 - 13
Configuration/UTMQemuConfiguration+Defaults.m → Configuration/Legacy/UTMLegacyQemuConfiguration+Defaults.m

@@ -14,21 +14,21 @@
 // limitations under the License.
 //
 
-#import "UTMQemuConfiguration+Constants.h"
-#import "UTMQemuConfiguration+Defaults.h"
-#import "UTMQemuConfiguration+Display.h"
-#import "UTMQemuConfiguration+Miscellaneous.h"
-#import "UTMQemuConfiguration+Networking.h"
-#import "UTMQemuConfiguration+Sharing.h"
-#import "UTMQemuConfiguration+System.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration+Defaults.h"
+#import "UTMLegacyQemuConfiguration+Display.h"
+#import "UTMLegacyQemuConfiguration+Miscellaneous.h"
+#import "UTMLegacyQemuConfiguration+Networking.h"
+#import "UTMLegacyQemuConfiguration+Sharing.h"
+#import "UTMLegacyQemuConfiguration+System.h"
 
-@interface UTMQemuConfiguration ()
+@interface UTMLegacyQemuConfiguration ()
 
 - (NSString *)generateMacAddress;
 
 @end
 
-@implementation UTMQemuConfiguration (Defaults)
+@implementation UTMLegacyQemuConfiguration (Defaults)
 
 - (void)loadDefaults {
     self.systemArchitecture = @"x86_64";
@@ -47,7 +47,7 @@
     self.consoleFont = @"Menlo";
     self.consoleFontSize = @12;
     self.consoleTheme = @"Default";
-    self.networkCardMac = [UTMQemuConfiguration generateMacAddress];
+    self.networkCardMac = [UTMLegacyQemuConfiguration generateMacAddress];
     self.usbRedirectionMaximumDevices = @3;
     self.name = [NSUUID UUID].UUIDString;
     self.existingPath = nil;
@@ -61,7 +61,7 @@
     } else if ([target isEqualToString:@"virt"] || [target hasPrefix:@"virt-"]) {
         card = @"virtio-ramfb";
     } else if (architecture) {
-        NSArray<NSString *> *cards = [UTMQemuConfiguration supportedDisplayCardsForArchitecture:architecture];
+        NSArray<NSString *> *cards = [UTMLegacyQemuConfiguration supportedDisplayCardsForArchitecture:architecture];
         NSString *first = cards.firstObject;
         if (first) {
             card = first;
@@ -85,7 +85,7 @@
     } else if ([target isEqualToString:@"mac99"]) {
         card = @"screamer";
     } else if (architecture) {
-        NSArray<NSString *> *cards = [UTMQemuConfiguration supportedSoundCardsForArchitecture:architecture];
+        NSArray<NSString *> *cards = [UTMLegacyQemuConfiguration supportedSoundCardsForArchitecture:architecture];
         NSString *first = cards.firstObject;
         if (first) {
             card = first;
@@ -109,7 +109,7 @@
     } else if ([target isEqualToString:@"virt"] || [target hasPrefix:@"virt-"]) {
         card = @"virtio-net-pci";
     } else if (architecture) {
-        NSArray<NSString *> *cards = [UTMQemuConfiguration supportedNetworkCardsForArchitecture:architecture];
+        NSArray<NSString *> *cards = [UTMLegacyQemuConfiguration supportedNetworkCardsForArchitecture:architecture];
         NSString *first = cards.firstObject;
         if (first) {
             card = first;

+ 2 - 2
Configuration/UTMQemuConfiguration+Display.h → Configuration/Legacy/UTMLegacyQemuConfiguration+Display.h

@@ -14,12 +14,12 @@
 // limitations under the License.
 //
 
-#import "UTMQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration.h"
 @import Metal;
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface UTMQemuConfiguration (Display)
+@interface UTMLegacyQemuConfiguration (Display)
 
 @property (nonatomic, assign) BOOL displayConsoleOnly;
 @property (nonatomic, assign) BOOL displayFitScreen;

+ 4 - 4
Configuration/UTMQemuConfiguration+Display.m → Configuration/Legacy/UTMLegacyQemuConfiguration+Display.m

@@ -15,7 +15,7 @@
 //
 
 #import <TargetConditionals.h>
-#import "UTMQemuConfiguration+Display.h"
+#import "UTMLegacyQemuConfiguration+Display.h"
 #import "UTM-Swift.h"
 
 extern const NSString *const kUTMConfigDisplayKey;
@@ -34,13 +34,13 @@ const NSString *const kUTMConfigConsoleBlinkKey = @"ConsoleBlink";
 const NSString *const kUTMConfigConsoleResizeCommandKey = @"ConsoleResizeCommand";
 const NSString *const kUTMConfigDisplayCardKey = @"DisplayCard";
 
-@interface UTMQemuConfiguration ()
+@interface UTMLegacyQemuConfiguration ()
 
 @property (nonatomic, readonly) NSMutableDictionary *rootDict;
 
 @end
 
-@implementation UTMQemuConfiguration (Display)
+@implementation UTMLegacyQemuConfiguration (Display)
 
 #pragma mark - Migration
 
@@ -53,7 +53,7 @@ const NSString *const kUTMConfigDisplayCardKey = @"DisplayCard";
     }
     if (self.consoleFont.length == 0) {
         self.consoleFont = @"Menlo-Regular";
-    } else if (![[UTMQemuConfiguration supportedConsoleFonts] containsObject:self.consoleFont]) {
+    } else if (![[UTMLegacyQemuConfiguration supportedConsoleFonts] containsObject:self.consoleFont]) {
         // migrate to new fully-formed name
 #if TARGET_OS_OSX
         NSFont *font = [NSFont fontWithName:self.consoleFont size:1];

+ 2 - 2
Configuration/UTMQemuConfiguration+Drives.h → Configuration/Legacy/UTMLegacyQemuConfiguration+Drives.h

@@ -14,7 +14,7 @@
 // limitations under the License.
 //
 
-#import "UTMQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration.h"
 
 typedef NS_ENUM(NSInteger, UTMDiskImageType) {
     UTMDiskImageTypeNone,
@@ -29,7 +29,7 @@ typedef NS_ENUM(NSInteger, UTMDiskImageType) {
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface UTMQemuConfiguration (Drives)
+@interface UTMLegacyQemuConfiguration (Drives)
 
 @property (nonatomic, readonly) NSURL *imagesPath;
 @property (nonatomic, readonly) NSInteger countDrives;

+ 15 - 15
Configuration/UTMQemuConfiguration+Drives.m → Configuration/Legacy/UTMLegacyQemuConfiguration+Drives.m

@@ -14,8 +14,8 @@
 // limitations under the License.
 //
 
-#import "UTMQemuConfiguration+Constants.h"
-#import "UTMQemuConfiguration+Drives.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration+Drives.h"
 #import "UTM-Swift.h"
 
 extern const NSString *const kUTMConfigDrivesKey;
@@ -27,21 +27,21 @@ static const NSString *const kUTMConfigInterfaceTypeKey = @"InterfaceType";
 static const NSString *const kUTMConfigRemovableKey = @"Removable";
 static const NSString *const kUTMConfigCdromKey = @"Cdrom";
 
-@interface UTMQemuConfiguration ()
+@interface UTMLegacyQemuConfiguration ()
 
 @property (nonatomic, readonly) NSMutableDictionary *rootDict;
 
 @end
 
-@implementation UTMQemuConfiguration (Drives)
+@implementation UTMLegacyQemuConfiguration (Drives)
 
 #pragma mark - Images Path
 
 - (NSURL *)imagesPath {
     if (self.existingPath) {
-        return [self.existingPath URLByAppendingPathComponent:[UTMQemuConfiguration diskImagesDirectory] isDirectory:YES];
+        return [self.existingPath URLByAppendingPathComponent:[UTMLegacyQemuConfiguration diskImagesDirectory] isDirectory:YES];
     } else {
-        return [[NSFileManager defaultManager].temporaryDirectory URLByAppendingPathComponent:[UTMQemuConfiguration diskImagesDirectory] isDirectory:YES];
+        return [[NSFileManager defaultManager].temporaryDirectory URLByAppendingPathComponent:[UTMLegacyQemuConfiguration diskImagesDirectory] isDirectory:YES];
     }
 }
 
@@ -132,7 +132,7 @@ static BOOL ValidQemuIdentifier(NSString *name) {
 
 - (NSInteger)newDrive:(NSString *)name path:(NSString *)path type:(UTMDiskImageType)type interface:(NSString *)interface {
     NSInteger index = [self countDrives];
-    NSString *strType = [UTMQemuConfiguration supportedImageTypes][type];
+    NSString *strType = [UTMLegacyQemuConfiguration supportedImageTypes][type];
     NSMutableDictionary *drive = [[NSMutableDictionary alloc] initWithDictionary:@{
         kUTMConfigDriveNameKey: name,
         kUTMConfigImagePathKey: path,
@@ -146,7 +146,7 @@ static BOOL ValidQemuIdentifier(NSString *name) {
 
 - (NSInteger)newRemovableDrive:(NSString *)name type:(UTMDiskImageType)type interface:(NSString *)interface {
     NSInteger index = [self countDrives];
-    NSString *strType = [UTMQemuConfiguration supportedImageTypes][type];
+    NSString *strType = [UTMLegacyQemuConfiguration supportedImageTypes][type];
     NSMutableDictionary *drive = [[NSMutableDictionary alloc] initWithDictionary:@{
         kUTMConfigDriveNameKey: name,
         kUTMConfigRemovableKey: @(YES),
@@ -202,7 +202,7 @@ static BOOL ValidQemuIdentifier(NSString *name) {
         return UTMDiskImageTypeDisk;
     }
     NSString *strType = self.rootDict[kUTMConfigDrivesKey][index][kUTMConfigImageTypeKey];
-    NSInteger type = [[UTMQemuConfiguration supportedImageTypes] indexOfObject:strType];
+    NSInteger type = [[UTMLegacyQemuConfiguration supportedImageTypes] indexOfObject:strType];
     if (type == NSNotFound || type >= UTMDiskImageTypeMax) {
         return UTMDiskImageTypeDisk;
     } else {
@@ -211,7 +211,7 @@ static BOOL ValidQemuIdentifier(NSString *name) {
 }
 
 - (void)setDriveImageType:(UTMDiskImageType)type forIndex:(NSInteger)index {
-    NSString *strType = [UTMQemuConfiguration supportedImageTypes][type];
+    NSString *strType = [UTMLegacyQemuConfiguration supportedImageTypes][type];
     [self propertyWillChange];
     self.rootDict[kUTMConfigDrivesKey][index][kUTMConfigImageTypeKey] = strType;
 }
@@ -245,8 +245,8 @@ static BOOL ValidQemuIdentifier(NSString *name) {
 }
 
 - (NSString *)driveLabelForIndex:(NSInteger)index {
-    NSArray<NSString *> *interfaces = [UTMQemuConfiguration supportedDriveInterfaces];
-    NSArray<NSString *> *interfacesPretty = [UTMQemuConfiguration supportedDriveInterfacesPretty];
+    NSArray<NSString *> *interfaces = [UTMLegacyQemuConfiguration supportedDriveInterfaces];
+    NSArray<NSString *> *interfacesPretty = [UTMLegacyQemuConfiguration supportedDriveInterfacesPretty];
     NSString *interface = [self driveInterfaceTypeForIndex:index];
     NSString *path = [self driveImagePathForIndex:index];
     NSInteger interfaceIndex = NSNotFound;
@@ -258,10 +258,10 @@ static BOOL ValidQemuIdentifier(NSString *name) {
     if (interfaceIndex == NSNotFound) {
         interfaceIndex = interfacesPretty.count - 1;
     }
-    if ((interface.length == 0 || [interface isEqualToString:@"none"]) && [path isEqualToString:UTMQemuConfiguration.efiVariablesFileName]) {
-        return NSLocalizedString(@"EFI Variables", "UTMQemuConfiguration+Drives");
+    if ((interface.length == 0 || [interface isEqualToString:@"none"]) && [path isEqualToString:UTMLegacyQemuConfiguration.efiVariablesFileName]) {
+        return NSLocalizedString(@"EFI Variables", "UTMLegacyQemuConfiguration+Drives");
     } else {
-        return [NSString stringWithFormat:NSLocalizedString(@"%@ Drive", @"UTMQemuConfiguration+Drives"), interfacesPretty[interfaceIndex]];
+        return [NSString stringWithFormat:NSLocalizedString(@"%@ Drive", @"UTMLegacyQemuConfiguration+Drives"), interfacesPretty[interfaceIndex]];
     }
 }
 

+ 2 - 2
Configuration/UTMQemuConfiguration+Miscellaneous.h → Configuration/Legacy/UTMLegacyQemuConfiguration+Miscellaneous.h

@@ -14,11 +14,11 @@
 // limitations under the License.
 //
 
-#import "UTMQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface UTMQemuConfiguration (Miscellaneous)
+@interface UTMLegacyQemuConfiguration (Miscellaneous)
 
 @property (nonatomic, assign) BOOL inputLegacy;
 @property (nonatomic, assign) BOOL inputScrollInvert;

+ 4 - 4
Configuration/UTMQemuConfiguration+Miscellaneous.m → Configuration/Legacy/UTMLegacyQemuConfiguration+Miscellaneous.m

@@ -14,8 +14,8 @@
 // limitations under the License.
 //
 
-#import "UTMQemuConfiguration+Constants.h"
-#import "UTMQemuConfiguration+Miscellaneous.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration+Miscellaneous.h"
 #import "UTM-Swift.h"
 
 extern const NSString *const kUTMConfigInputKey;
@@ -38,13 +38,13 @@ const NSString *const kUTMConfigIconKey = @"Icon";
 const NSString *const kUTMConfigIconCustomKey = @"IconCustom";
 const NSString *const kUTMConfigNotesKey = @"Notes";
 
-@interface UTMQemuConfiguration ()
+@interface UTMLegacyQemuConfiguration ()
 
 @property (nonatomic, readonly) NSMutableDictionary *rootDict;
 
 @end
 
-@implementation UTMQemuConfiguration (Miscellaneous)
+@implementation UTMLegacyQemuConfiguration (Miscellaneous)
 
 #pragma mark - Migration
 

+ 7 - 7
Configuration/UTMQemuConfiguration+Networking.h → Configuration/Legacy/UTMLegacyQemuConfiguration+Networking.h

@@ -14,13 +14,13 @@
 // limitations under the License.
 //
 
-#import "UTMQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration.h"
 
-@class UTMQemuConfigurationPortForward;
+@class UTMLegacyQemuConfigurationPortForward;
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface UTMQemuConfiguration (Networking)
+@interface UTMLegacyQemuConfiguration (Networking)
 
 @property (nonatomic, assign) BOOL networkEnabled;
 @property (nonatomic, assign) BOOL networkIsolate;
@@ -43,11 +43,11 @@ NS_ASSUME_NONNULL_BEGIN
 + (NSString *)generateMacAddress;
 - (void)migrateNetworkConfigurationIfNecessary;
 
-- (NSInteger)newPortForward:(UTMQemuConfigurationPortForward *)argument;
-- (nullable UTMQemuConfigurationPortForward *)portForwardForIndex:(NSInteger)index;
-- (void)updatePortForwardAtIndex:(NSInteger)index withValue:(UTMQemuConfigurationPortForward *)argument;
+- (NSInteger)newPortForward:(UTMLegacyQemuConfigurationPortForward *)argument;
+- (nullable UTMLegacyQemuConfigurationPortForward *)portForwardForIndex:(NSInteger)index;
+- (void)updatePortForwardAtIndex:(NSInteger)index withValue:(UTMLegacyQemuConfigurationPortForward *)argument;
 - (void)removePortForwardAtIndex:(NSInteger)index;
-- (NSArray<UTMQemuConfigurationPortForward *> *)portForwards;
+- (NSArray<UTMLegacyQemuConfigurationPortForward *> *)portForwards;
 
 @end
 

+ 11 - 11
Configuration/UTMQemuConfiguration+Networking.m → Configuration/Legacy/UTMLegacyQemuConfiguration+Networking.m

@@ -14,8 +14,8 @@
 // limitations under the License.
 //
 
-#import "UTMQemuConfiguration+Networking.h"
-#import "UTMQemuConfigurationPortForward.h"
+#import "UTMLegacyQemuConfiguration+Networking.h"
+#import "UTMLegacyQemuConfigurationPortForward.h"
 #import "UTM-Swift.h"
 
 extern const NSString *const kUTMConfigNetworkingKey;
@@ -44,13 +44,13 @@ static const NSString *const kUTMConfigNetworkPortForwardHostPortKey = @"HostPor
 static const NSString *const kUTMConfigNetworkPortForwardGuestAddressKey = @"GuestAddress";
 static const NSString *const kUTMConfigNetworkPortForwardGuestPortKey = @"GuestPort";
 
-@interface UTMQemuConfiguration ()
+@interface UTMLegacyQemuConfiguration ()
 
 @property (nonatomic, readonly) NSMutableDictionary *rootDict;
 
 @end
 
-@implementation UTMQemuConfiguration (Networking)
+@implementation UTMLegacyQemuConfiguration (Networking)
 
 #pragma mark - Migration
 
@@ -61,7 +61,7 @@ static const NSString *const kUTMConfigNetworkPortForwardGuestPortKey = @"GuestP
     }
     // Generate MAC if missing
     if (!self.networkCardMac) {
-        self.networkCardMac = [UTMQemuConfiguration generateMacAddress];
+        self.networkCardMac = [UTMLegacyQemuConfiguration generateMacAddress];
     }
     // default network mode
     if ([self.rootDict[kUTMConfigNetworkingKey] objectForKey:kUTMConfigNetworkEnabledKey]) {
@@ -239,17 +239,17 @@ static const NSString *const kUTMConfigNetworkPortForwardGuestPortKey = @"GuestP
     return [self.rootDict[kUTMConfigNetworkingKey][kUTMConfigNetworkPortForwardKey] count];
 }
 
-- (NSInteger)newPortForward:(UTMQemuConfigurationPortForward *)argument {
+- (NSInteger)newPortForward:(UTMLegacyQemuConfigurationPortForward *)argument {
     NSInteger index = [self countPortForwards];
     [self updatePortForwardAtIndex:index withValue:argument];
     return index;
 }
 
-- (nullable UTMQemuConfigurationPortForward *)portForwardForIndex:(NSInteger)index {
+- (nullable UTMLegacyQemuConfigurationPortForward *)portForwardForIndex:(NSInteger)index {
     NSDictionary *dict = self.rootDict[kUTMConfigNetworkingKey][kUTMConfigNetworkPortForwardKey][index];
-    UTMQemuConfigurationPortForward *portForward = nil;
+    UTMLegacyQemuConfigurationPortForward *portForward = nil;
     if (dict) {
-        portForward = [[UTMQemuConfigurationPortForward alloc] init];
+        portForward = [[UTMLegacyQemuConfigurationPortForward alloc] init];
         portForward.protocol = dict[kUTMConfigNetworkPortForwardProtocolKey];
         portForward.hostAddress = dict[kUTMConfigNetworkPortForwardHostAddressKey];
         portForward.hostPort = dict[kUTMConfigNetworkPortForwardHostPortKey];
@@ -259,7 +259,7 @@ static const NSString *const kUTMConfigNetworkPortForwardGuestPortKey = @"GuestP
     return portForward;
 }
 
-- (void)updatePortForwardAtIndex:(NSInteger)index withValue:(UTMQemuConfigurationPortForward *)argument {
+- (void)updatePortForwardAtIndex:(NSInteger)index withValue:(UTMLegacyQemuConfigurationPortForward *)argument {
     if (![self.rootDict[kUTMConfigNetworkingKey][kUTMConfigNetworkPortForwardKey] isKindOfClass:[NSMutableArray class]]) {
         self.rootDict[kUTMConfigNetworkingKey][kUTMConfigNetworkPortForwardKey] = [NSMutableArray array];
     }
@@ -278,7 +278,7 @@ static const NSString *const kUTMConfigNetworkPortForwardGuestPortKey = @"GuestP
     [self.rootDict[kUTMConfigNetworkingKey][kUTMConfigNetworkPortForwardKey] removeObjectAtIndex:index];
 }
 
-- (NSArray<UTMQemuConfigurationPortForward *> *)portForwards {
+- (NSArray<UTMLegacyQemuConfigurationPortForward *> *)portForwards {
     return self.rootDict[kUTMConfigNetworkingKey][kUTMConfigNetworkPortForwardKey];
 }
 

+ 2 - 2
Configuration/UTMQemuConfiguration+Sharing.h → Configuration/Legacy/UTMLegacyQemuConfiguration+Sharing.h

@@ -14,11 +14,11 @@
 // limitations under the License.
 //
 
-#import "UTMQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface UTMQemuConfiguration (Sharing)
+@interface UTMLegacyQemuConfiguration (Sharing)
 
 @property (nonatomic, assign) BOOL shareClipboardEnabled;
 @property (nonatomic, assign) BOOL shareDirectoryEnabled;

+ 4 - 4
Configuration/UTMQemuConfiguration+Sharing.m → Configuration/Legacy/UTMLegacyQemuConfiguration+Sharing.m

@@ -14,8 +14,8 @@
 // limitations under the License.
 //
 
-#import "UTMQemuConfiguration+Sharing.h"
-#import "UTMQemuConfiguration+System.h"
+#import "UTMLegacyQemuConfiguration+Sharing.h"
+#import "UTMLegacyQemuConfiguration+System.h"
 #import "UTM-Swift.h"
 
 extern const NSString *const kUTMConfigSharingKey;
@@ -28,13 +28,13 @@ const NSString *const kUTMConfigDirectoryBookmarkKey = @"DirectoryBookmark";
 const NSString *const kUTMConfigUsb3SupportKey = @"Usb3Support";
 const NSString *const kUTMConfigUsbRedirectMaxKey = @"UsbRedirectMax";
 
-@interface UTMQemuConfiguration ()
+@interface UTMLegacyQemuConfiguration ()
 
 @property (nonatomic, readonly) NSMutableDictionary *rootDict;
 
 @end
 
-@implementation UTMQemuConfiguration (Sharing)
+@implementation UTMLegacyQemuConfiguration (Sharing)
 
 #pragma mark - Migration
 

+ 2 - 2
Configuration/UTMQemuConfiguration+System.h → Configuration/Legacy/UTMLegacyQemuConfiguration+System.h

@@ -14,11 +14,11 @@
 // limitations under the License.
 //
 
-#import "UTMQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface UTMQemuConfiguration (System)
+@interface UTMLegacyQemuConfiguration (System)
 
 @property (nonatomic, nullable, copy) NSString *systemArchitecture;
 @property (nonatomic, nullable, copy) NSString *systemCPU;

+ 9 - 9
Configuration/UTMQemuConfiguration+System.m → Configuration/Legacy/UTMLegacyQemuConfiguration+System.m

@@ -14,9 +14,9 @@
 // limitations under the License.
 //
 
-#import "UTMQemuConfiguration+Constants.h"
-#import "UTMQemuConfiguration+Defaults.h"
-#import "UTMQemuConfiguration+System.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration+Defaults.h"
+#import "UTMLegacyQemuConfiguration+System.h"
 #import "UTM-Swift.h"
 
 extern const NSString *const kUTMConfigSystemKey;
@@ -39,13 +39,13 @@ static const NSString *const kUTMConfigUseHypervisorKey = @"UseHypervisor";
 static const NSString *const kUTMConfigRTCUseLocalTimeKey = @"RTCUseLocalTime";
 static const NSString *const kUTMConfigForcePs2ControllerKey = @"ForcePS2Controller";
 
-@interface UTMQemuConfiguration ()
+@interface UTMLegacyQemuConfiguration ()
 
 @property (nonatomic, readonly) NSMutableDictionary *rootDict;
 
 @end
 
-@implementation UTMQemuConfiguration (System)
+@implementation UTMLegacyQemuConfiguration (System)
 
 #pragma mark - Migration
 
@@ -59,14 +59,14 @@ static const NSString *const kUTMConfigForcePs2ControllerKey = @"ForcePS2Control
     }
     // Migrate default target
     if ([self.rootDict[kUTMConfigSystemKey][kUTMConfigTargetKey] length] == 0) {
-        NSInteger index = [UTMQemuConfiguration defaultTargetIndexForArchitecture:self.systemArchitecture];
-        self.rootDict[kUTMConfigSystemKey][kUTMConfigTargetKey] = [UTMQemuConfiguration supportedTargetsForArchitecture:self.systemArchitecture][index];
+        NSInteger index = [UTMLegacyQemuConfiguration defaultTargetIndexForArchitecture:self.systemArchitecture];
+        self.rootDict[kUTMConfigSystemKey][kUTMConfigTargetKey] = [UTMLegacyQemuConfiguration supportedTargetsForArchitecture:self.systemArchitecture][index];
     }
     // Fix issue with boot order
-    NSArray<NSString *> *bootPretty = [UTMQemuConfiguration supportedBootDevicesPretty];
+    NSArray<NSString *> *bootPretty = [UTMLegacyQemuConfiguration supportedBootDevicesPretty];
     if ([bootPretty containsObject:self.systemBootDevice]) {
         NSInteger index = [bootPretty indexOfObject:self.systemBootDevice];
-        self.systemBootDevice = [UTMQemuConfiguration supportedBootDevices][index];
+        self.systemBootDevice = [UTMLegacyQemuConfiguration supportedBootDevices][index];
     }
     // Default CPU
     if ([self.rootDict[kUTMConfigSystemKey][kUTMConfigCPUKey] length] == 0) {

+ 1 - 1
Configuration/UTMQemuConfiguration.h → Configuration/Legacy/UTMLegacyQemuConfiguration.h

@@ -19,7 +19,7 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface UTMQemuConfiguration : NSObject<NSCopying, UTMConfigurable>
+@interface UTMLegacyQemuConfiguration : NSObject<NSCopying, UTMConfigurable>
 
 @property (nonatomic, weak, readonly) NSDictionary *dictRepresentation;
 @property (nonatomic, nullable, copy) NSNumber *version;

+ 12 - 12
Configuration/UTMQemuConfiguration.m → Configuration/Legacy/UTMLegacyQemuConfiguration.m

@@ -14,15 +14,15 @@
 // limitations under the License.
 //
 
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Constants.h"
-#import "UTMQemuConfiguration+Defaults.h"
-#import "UTMQemuConfiguration+Display.h"
-#import "UTMQemuConfiguration+Drives.h"
-#import "UTMQemuConfiguration+Miscellaneous.h"
-#import "UTMQemuConfiguration+Networking.h"
-#import "UTMQemuConfiguration+Sharing.h"
-#import "UTMQemuConfiguration+System.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration+Defaults.h"
+#import "UTMLegacyQemuConfiguration+Display.h"
+#import "UTMLegacyQemuConfiguration+Drives.h"
+#import "UTMLegacyQemuConfiguration+Miscellaneous.h"
+#import "UTMLegacyQemuConfiguration+Networking.h"
+#import "UTMLegacyQemuConfiguration+Sharing.h"
+#import "UTMLegacyQemuConfiguration+System.h"
 #import "UTM-Swift.h"
 #import <CommonCrypto/CommonDigest.h>
 #import <TargetConditionals.h>
@@ -43,13 +43,13 @@ const NSInteger kCurrentConfigurationVersion = 2;
 
 const NSString *const kUTMConfigAppleVirtualizationKey = @"isAppleVirtualization";
 
-@interface UTMQemuConfiguration ()
+@interface UTMLegacyQemuConfiguration ()
 
 @property (nonatomic, readonly) NSMutableDictionary *rootDict;
 
 @end
 
-@implementation UTMQemuConfiguration {
+@implementation UTMLegacyQemuConfiguration {
     NSMutableDictionary *_rootDict;
 }
 
@@ -189,7 +189,7 @@ const NSString *const kUTMConfigAppleVirtualizationKey = @"isAppleVirtualization
 #pragma mark - NSCopying
 
 - (id)copyWithZone:(NSZone *)zone {
-    return [[UTMQemuConfiguration alloc] initWithDictionary:_rootDict name:self.name path:nil];
+    return [[UTMLegacyQemuConfiguration alloc] initWithDictionary:_rootDict name:self.name path:nil];
 }
 
 #pragma mark - Settings

+ 3 - 3
Configuration/UTMQemuConfigurationDelegate.h → Configuration/Legacy/UTMLegacyQemuConfigurationDelegate.h

@@ -16,15 +16,15 @@
 
 #import <Foundation/Foundation.h>
 
-@class UTMQemuConfiguration;
+@class UTMLegacyQemuConfiguration;
 
 NS_ASSUME_NONNULL_BEGIN
 
-@protocol UTMQemuConfigurationDelegate <NSObject>
+@protocol UTMLegacyQemuConfigurationDelegate <NSObject>
 
 @required
 
-@property (nonatomic) UTMQemuConfiguration *configuration;
+@property (nonatomic) UTMLegacyQemuConfiguration *configuration;
 
 @end
 

+ 4 - 4
Configuration/UTMQemuConfigurationExtension.swift → Configuration/Legacy/UTMLegacyQemuConfigurationExtension.swift

@@ -16,7 +16,7 @@
 
 import Combine
 
-@objc extension UTMQemuConfiguration: ObservableObject {
+@objc extension UTMLegacyQemuConfiguration: ObservableObject {
     func propertyWillChange() -> Void {
         if #available(iOS 13, macOS 11, *) {
             DispatchQueue.main.async { self.objectWillChange.send() }
@@ -24,7 +24,7 @@ import Combine
     }
 }
 
-@objc extension UTMQemuConfigurationPortForward: ObservableObject {
+@objc extension UTMLegacyQemuConfigurationPortForward: ObservableObject {
     func propertyWillChange() -> Void {
         if #available(iOS 13, macOS 11, *) {
             DispatchQueue.main.async { self.objectWillChange.send() }
@@ -43,7 +43,7 @@ import Combine
 extension UTMDiskImageType: CustomStringConvertible {
     public var description: String {
         let index = rawValue
-        let imageTypeList = UTMQemuConfiguration.supportedImageTypes()
+        let imageTypeList = UTMLegacyQemuConfiguration.supportedImageTypes()
         if index >= 0 && index < imageTypeList.count {
             return imageTypeList[index]
         } else {
@@ -52,7 +52,7 @@ extension UTMDiskImageType: CustomStringConvertible {
     }
     
     static public func enumFromString(_ str: String?) -> UTMDiskImageType {
-        let imageTypeList = UTMQemuConfiguration.supportedImageTypes()
+        let imageTypeList = UTMLegacyQemuConfiguration.supportedImageTypes()
         guard let unwrapStr = str else {
             return UTMDiskImageType.disk
         }

+ 1 - 1
Configuration/UTMQemuConfigurationPortForward.h → Configuration/Legacy/UTMLegacyQemuConfigurationPortForward.h

@@ -18,7 +18,7 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface UTMQemuConfigurationPortForward : NSObject
+@interface UTMLegacyQemuConfigurationPortForward : NSObject
 
 @property (nonatomic, nullable) NSString *protocol;
 @property (nonatomic) NSString *hostAddress;

+ 2 - 2
Configuration/UTMQemuConfigurationPortForward.m → Configuration/Legacy/UTMLegacyQemuConfigurationPortForward.m

@@ -14,10 +14,10 @@
 // limitations under the License.
 //
 
-#import "UTMQemuConfigurationPortForward.h"
+#import "UTMLegacyQemuConfigurationPortForward.h"
 #import "UTM-Swift.h"
 
-@implementation UTMQemuConfigurationPortForward
+@implementation UTMLegacyQemuConfigurationPortForward
 
 @synthesize protocol = _protocol;
 @synthesize hostAddress = _hostAddress;

+ 17 - 0
Configuration/UTMQemuConfiguration.swift

@@ -0,0 +1,17 @@
+//
+// Copyright © 2022 osy. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+import Foundation

+ 17 - 0
Configuration/UTMQemuConfigurationDisplay.swift

@@ -0,0 +1,17 @@
+//
+// Copyright © 2022 osy. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+import Foundation

+ 17 - 0
Configuration/UTMQemuConfigurationInfo.swift

@@ -0,0 +1,17 @@
+//
+// Copyright © 2022 osy. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+import Foundation

+ 17 - 0
Configuration/UTMQemuConfigurationQEMU.swift

@@ -0,0 +1,17 @@
+//
+// Copyright © 2022 osy. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+import Foundation

+ 17 - 0
Configuration/UTMQemuConfigurationSystem.swift

@@ -0,0 +1,17 @@
+//
+// Copyright © 2022 osy. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+import Foundation

+ 17 - 0
Configuration/UTMQemuConstants.swift

@@ -0,0 +1,17 @@
+//
+// Copyright © 2022 osy. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+import Foundation

+ 17 - 0
Configuration/UTMQemuConstantsGenerated.swift

@@ -0,0 +1,17 @@
+//
+// Copyright © 2022 osy. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+import Foundation

+ 1 - 1
Managers/UTMDrive.h

@@ -15,7 +15,7 @@
 //
 
 #import <Foundation/Foundation.h>
-#import "UTMQemuConfiguration+Drives.h"
+#import "UTMLegacyQemuConfiguration+Drives.h"
 
 typedef NS_ENUM(NSInteger, UTMDriveStatus) {
     UTMDriveStatusFixed,

+ 2 - 2
Managers/UTMDrive.m

@@ -15,12 +15,12 @@
 //
 
 #import "UTMDrive.h"
-#import "UTMQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
 
 @implementation UTMDrive
 
 - (NSString *)label {
-    NSString *imageTypeStr = [UTMQemuConfiguration supportedImageTypesPretty][self.imageType];
+    NSString *imageTypeStr = [UTMLegacyQemuConfiguration supportedImageTypesPretty][self.imageType];
     NSString *filename = self.path.lastPathComponent;
     if (!filename) {
         filename = NSLocalizedString(@"none", @"UTMDrive");

+ 1 - 1
Managers/UTMQemu.h

@@ -19,7 +19,7 @@
 
 typedef void * _Nullable (* _Nonnull UTMQemuThreadEntry)(void * _Nullable args);
 
-@class UTMQemuConfiguration;
+@class UTMLegacyQemuConfiguration;
 @class UTMLogging;
 
 NS_ASSUME_NONNULL_BEGIN

+ 2 - 2
Managers/UTMQemuSystem.h

@@ -20,13 +20,13 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface UTMQemuSystem : UTMQemu
 
-@property (nonatomic) UTMQemuConfiguration *configuration;
+@property (nonatomic) UTMLegacyQemuConfiguration *configuration;
 @property (nonatomic) NSURL *imgPath;
 @property (nonatomic, nullable) NSString *snapshot;
 @property (nonatomic) BOOL runAsSnapshot;
 
 - (instancetype)init NS_UNAVAILABLE;
-- (instancetype)initWithConfiguration:(UTMQemuConfiguration *)configuration imgPath:(NSURL *)imgPath;
+- (instancetype)initWithConfiguration:(UTMLegacyQemuConfiguration *)configuration imgPath:(NSURL *)imgPath;
 - (void)updateArgvWithUserOptions:(BOOL)userOptions;
 - (void)startWithCompletion:(void(^)(BOOL, NSString *))completion;
 

+ 13 - 13
Managers/UTMQemuSystem.m

@@ -18,15 +18,15 @@
 #import <sys/sysctl.h>
 #import <TargetConditionals.h>
 #import "UTMQemuSystem.h"
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Constants.h"
-#import "UTMQemuConfiguration+Display.h"
-#import "UTMQemuConfiguration+Drives.h"
-#import "UTMQemuConfiguration+Miscellaneous.h"
-#import "UTMQemuConfiguration+Networking.h"
-#import "UTMQemuConfiguration+Sharing.h"
-#import "UTMQemuConfiguration+System.h"
-#import "UTMQemuConfigurationPortForward.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration+Display.h"
+#import "UTMLegacyQemuConfiguration+Drives.h"
+#import "UTMLegacyQemuConfiguration+Miscellaneous.h"
+#import "UTMLegacyQemuConfiguration+Networking.h"
+#import "UTMLegacyQemuConfiguration+Sharing.h"
+#import "UTMLegacyQemuConfiguration+System.h"
+#import "UTMLegacyQemuConfigurationPortForward.h"
 #import "UTMJailbreak.h"
 #import "UTMLogging.h"
 
@@ -88,7 +88,7 @@ static size_t sysctl_read(const char *name) {
     return ncpu;
 }
 
-- (instancetype)initWithConfiguration:(UTMQemuConfiguration *)configuration imgPath:(nonnull NSURL *)imgPath {
+- (instancetype)initWithConfiguration:(UTMLegacyQemuConfiguration *)configuration imgPath:(nonnull NSURL *)imgPath {
     self = [self init];
     if (self) {
         self.configuration = configuration;
@@ -296,7 +296,7 @@ static size_t sysctl_read(const char *name) {
             if ([path characterAtIndex:0] == '/') {
                 fullPathURL = [NSURL fileURLWithPath:path isDirectory:NO];
             } else {
-                fullPathURL = [[self.imgPath URLByAppendingPathComponent:[UTMQemuConfiguration diskImagesDirectory]] URLByAppendingPathComponent:[self.configuration driveImagePathForIndex:i]];
+                fullPathURL = [[self.imgPath URLByAppendingPathComponent:[UTMLegacyQemuConfiguration diskImagesDirectory]] URLByAppendingPathComponent:[self.configuration driveImagePathForIndex:i]];
             }
             [self accessDataWithBookmark:[fullPathURL bookmarkDataWithOptions:0
                                                includingResourceValuesForKeys:nil
@@ -428,7 +428,7 @@ static size_t sysctl_read(const char *name) {
         }
         if (!useVMnet) {
             for (NSUInteger i = 0; i < [self.configuration countPortForwards]; i++) {
-                UTMQemuConfigurationPortForward *portForward = [self.configuration portForwardForIndex:i];
+                UTMLegacyQemuConfigurationPortForward *portForward = [self.configuration portForwardForIndex:i];
                 [netstr appendFormat:@",hostfwd=%@:%@:%@-%@:%@", portForward.protocol, portForward.hostAddress, portForward.hostPort, portForward.guestAddress, portForward.guestPort];
             }
         }
@@ -579,7 +579,7 @@ static size_t sysctl_read(const char *name) {
 }
 
 - (NSURL *)efiVariablesURL {
-    return [[self.imgPath URLByAppendingPathComponent:[UTMQemuConfiguration diskImagesDirectory]] URLByAppendingPathComponent:UTMQemuConfiguration.efiVariablesFileName];
+    return [[self.imgPath URLByAppendingPathComponent:[UTMLegacyQemuConfiguration diskImagesDirectory]] URLByAppendingPathComponent:UTMLegacyQemuConfiguration.efiVariablesFileName];
 }
 
 /// Set either name=value or does nothing if name= is already in `properties`

+ 2 - 2
Managers/UTMQemuVirtualMachine+SPICE.m

@@ -15,8 +15,8 @@
 //
 
 #import "UTMQemuVirtualMachine+SPICE.h"
-#import "UTMQemuConfiguration+Display.h"
-#import "UTMQemuConfiguration+Sharing.h"
+#import "UTMLegacyQemuConfiguration+Display.h"
+#import "UTMLegacyQemuConfiguration+Sharing.h"
 #import "UTMLogging.h"
 #import "UTMQemuManager.h"
 #import "UTMSpiceIO.h"

+ 2 - 2
Managers/UTMQemuVirtualMachine.h

@@ -18,7 +18,7 @@
 #import "UTMQemuManagerDelegate.h"
 #import "UTMSpiceIODelegate.h"
 
-@class UTMQemuConfiguration;
+@class UTMLegacyQemuConfiguration;
 
 typedef NS_ENUM(NSInteger, UTMDisplayType) {
     UTMDisplayTypeFullGraphic,
@@ -30,7 +30,7 @@ NS_ASSUME_NONNULL_BEGIN
 @interface UTMQemuVirtualMachine : UTMVirtualMachine<UTMQemuManagerDelegate>
 
 @property (nonatomic, weak, nullable) id<UTMSpiceIODelegate> ioDelegate;
-@property (nonatomic, readonly) UTMQemuConfiguration *qemuConfig;
+@property (nonatomic, readonly) UTMLegacyQemuConfiguration *qemuConfig;
 
 - (UTMDisplayType)supportedDisplayType;
 

+ 11 - 11
Managers/UTMQemuVirtualMachine.m

@@ -20,11 +20,11 @@
 #import "UTMQemuVirtualMachine.h"
 #import "UTMQemuVirtualMachine+Drives.h"
 #import "UTMQemuVirtualMachine+SPICE.h"
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Constants.h"
-#import "UTMQemuConfiguration+Display.h"
-#import "UTMQemuConfiguration+Drives.h"
-#import "UTMQemuConfiguration+Miscellaneous.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration+Display.h"
+#import "UTMLegacyQemuConfiguration+Drives.h"
+#import "UTMLegacyQemuConfiguration+Miscellaneous.h"
 #import "UTMViewState.h"
 #import "UTMQemuManager.h"
 #import "UTMQemuSystem.h"
@@ -53,8 +53,8 @@ NSString *const kSuspendSnapshotName = @"suspend";
 
 @implementation UTMQemuVirtualMachine
 
-- (UTMQemuConfiguration *)qemuConfig {
-    return (UTMQemuConfiguration *)self.config;
+- (UTMLegacyQemuConfiguration *)qemuConfig {
+    return (UTMLegacyQemuConfiguration *)self.config;
 }
 
 - (id<UTMSpiceIODelegate>)ioDelegate {
@@ -90,7 +90,7 @@ NSString *const kSuspendSnapshotName = @"suspend";
         NSAssert(self.qemuConfig != nil, @"Trying to reload when no configuration is loaded.");
         return [self.qemuConfig reloadConfigurationWithDictionary:plist name:name path:self.path];
     } else {
-        self.config = [[UTMQemuConfiguration alloc] initWithDictionary:plist name:name path:self.path];
+        self.config = [[UTMLegacyQemuConfiguration alloc] initWithDictionary:plist name:name path:self.path];
         return self.config != nil;
     }
 }
@@ -134,8 +134,8 @@ NSString *const kSuspendSnapshotName = @"suspend";
     NSFileManager *fileManager = [NSFileManager defaultManager];
     NSURL *url = [self packageURLForName:self.qemuConfig.name];
     if (!self.qemuConfig.existingPath) {
-        NSURL *dstPath = [url URLByAppendingPathComponent:[UTMQemuConfiguration diskImagesDirectory] isDirectory:YES];
-        NSURL *tmpPath = [fileManager.temporaryDirectory URLByAppendingPathComponent:[UTMQemuConfiguration diskImagesDirectory] isDirectory:YES];
+        NSURL *dstPath = [url URLByAppendingPathComponent:[UTMLegacyQemuConfiguration diskImagesDirectory] isDirectory:YES];
+        NSURL *tmpPath = [fileManager.temporaryDirectory URLByAppendingPathComponent:[UTMLegacyQemuConfiguration diskImagesDirectory] isDirectory:YES];
         
         // create images directory
         if ([fileManager fileExistsAtPath:tmpPath.path]) {
@@ -255,7 +255,7 @@ NSString *const kSuspendSnapshotName = @"suspend";
     }
     // start logging
     if (self.qemuConfig.debugLogEnabled) {
-        [self.logging logToFile:[self.path URLByAppendingPathComponent:[UTMQemuConfiguration debugLogName]]];
+        [self.logging logToFile:[self.path URLByAppendingPathComponent:[UTMLegacyQemuConfiguration debugLogName]]];
     }
     
     if (!self.system) {

+ 3 - 3
Managers/UTMSpiceIO.h

@@ -22,7 +22,7 @@
 @import CocoaSpice;
 #endif
 
-@class UTMQemuConfiguration;
+@class UTMLegacyQemuConfiguration;
 @class UTMQemuManager;
 
 typedef void (^ioConnectCompletionHandler_t)(UTMQemuManager * _Nullable, NSError * _Nullable);
@@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface UTMSpiceIO : NSObject<CSConnectionDelegate>
 
-@property (nonatomic, readonly, nonnull) UTMQemuConfiguration* configuration;
+@property (nonatomic, readonly, nonnull) UTMLegacyQemuConfiguration* configuration;
 @property (nonatomic, readonly, nullable) CSDisplay *primaryDisplay;
 @property (nonatomic, readonly, nullable) CSInput *primaryInput;
 @property (nonatomic, readonly, nullable) CSPort *primarySerial;
@@ -43,7 +43,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, readonly, nullable) CSScreenshot *screenshot;
 
 - (instancetype)init NS_UNAVAILABLE;
-- (instancetype)initWithConfiguration: (UTMQemuConfiguration*) configuration NS_DESIGNATED_INITIALIZER;
+- (instancetype)initWithConfiguration: (UTMLegacyQemuConfiguration*) configuration NS_DESIGNATED_INITIALIZER;
 - (void)changeSharedDirectory:(NSURL *)url;
 
 - (BOOL)startWithError:(NSError **)err;

+ 4 - 4
Managers/UTMSpiceIO.m

@@ -15,9 +15,9 @@
 //
 
 #import "UTMSpiceIO.h"
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Miscellaneous.h"
-#import "UTMQemuConfiguration+Sharing.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Miscellaneous.h"
+#import "UTMLegacyQemuConfiguration+Sharing.h"
 #import "UTMQemuManager.h"
 #import "UTMLogging.h"
 #import "UTMViewState.h"
@@ -49,7 +49,7 @@ extern NSString *const kUTMErrorDomain;
 
 @implementation UTMSpiceIO
 
-- (instancetype)initWithConfiguration:(UTMQemuConfiguration *)configuration {
+- (instancetype)initWithConfiguration:(UTMLegacyQemuConfiguration *)configuration {
     if (self = [super init]) {
         _configuration = configuration;
         self.connectQueue = dispatch_queue_create("SPICE Connect Attempt", NULL);

+ 1 - 1
Managers/UTMVirtualMachine.m

@@ -19,7 +19,7 @@
 #import "UTMVirtualMachine-Private.h"
 #import "UTMQemuVirtualMachine.h"
 #import "UTMConfigurable.h"
-#import "UTMQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
 #import "UTMLogging.h"
 #import "UTMViewState.h"
 #import "UTM-Swift.h"

+ 6 - 6
Managers/UTMVirtualMachineExtension.swift

@@ -22,7 +22,7 @@ extension UTMVirtualMachine: Identifiable {
             return bookmark!.base64EncodedString()
         } else if self.path != nil {
             return self.path!.path // path if we're an existing VM
-        } else if let uuid = (self.config as? UTMQemuConfiguration)?.systemUUID {
+        } else if let uuid = (self.config as? UTMLegacyQemuConfiguration)?.systemUUID {
             return uuid
         } else {
             return UUID().uuidString
@@ -43,7 +43,7 @@ extension UTMVirtualMachine: ObservableObject {
             s.append(viewState.objectWillChange.sink { [weak self] in
                 self?.objectWillChange.send()
             })
-            if let config = config as? UTMQemuConfiguration {
+            if let config = config as? UTMLegacyQemuConfiguration {
                 s.append(config.objectWillChange.sink { [weak self] in
                     self?.objectWillChange.send()
                 })
@@ -79,10 +79,10 @@ public extension UTMQemuVirtualMachine {
         guard let target = qemuConfig.systemTarget else {
             return ""
         }
-        guard let targets = UTMQemuConfiguration.supportedTargets(forArchitecture: arch) else {
+        guard let targets = UTMLegacyQemuConfiguration.supportedTargets(forArchitecture: arch) else {
             return ""
         }
-        guard let prettyTargets = UTMQemuConfiguration.supportedTargets(forArchitecturePretty: arch) else {
+        guard let prettyTargets = UTMLegacyQemuConfiguration.supportedTargets(forArchitecturePretty: arch) else {
             return ""
         }
         guard let index = targets.firstIndex(of: target) else {
@@ -92,8 +92,8 @@ public extension UTMQemuVirtualMachine {
     }
     
     override var detailsSystemArchitectureLabel: String {
-        let archs = UTMQemuConfiguration.supportedArchitectures()
-        let prettyArchs = UTMQemuConfiguration.supportedArchitecturesPretty()
+        let archs = UTMLegacyQemuConfiguration.supportedArchitectures()
+        let prettyArchs = UTMLegacyQemuConfiguration.supportedArchitecturesPretty()
         guard let arch = qemuConfig.systemArchitecture else {
             return ""
         }

+ 1 - 1
Platform/Shared/VMCardView.swift

@@ -116,6 +116,6 @@ struct Logo: View {
 @available(iOS 14, macOS 11, *)
 struct VMCardView_Previews: PreviewProvider {
     static var previews: some View {
-        VMCardView(vm: UTMVirtualMachine(configuration: UTMQemuConfiguration(), withDestinationURL: URL(fileURLWithPath: "/")))
+        VMCardView(vm: UTMVirtualMachine(configuration: UTMLegacyQemuConfiguration(), withDestinationURL: URL(fileURLWithPath: "/")))
     }
 }

+ 2 - 2
Platform/Shared/VMConfigAdvancedNetworkView.swift

@@ -19,7 +19,7 @@ import SwiftUI
 @available(macOS 11, *)
 @available(iOS, introduced: 14, unavailable)
 struct VMConfigAdvancedNetworkView: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
 
     var body: some View {
         ScrollView {
@@ -32,7 +32,7 @@ struct VMConfigAdvancedNetworkView: View {
 
 @available(iOS 14, macOS 11, *)
 struct IPConfigurationSection: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
 
     var body: some View {
         Toggle(isOn: $config.networkIsolate, label: {

+ 3 - 3
Platform/Shared/VMConfigDisplayConsoleView.swift

@@ -52,10 +52,10 @@ struct VMConfigDisplayConsoleView<Config: ObservableObject & UTMConfigurable>: V
             config.consoleFontSize = NSNumber(value: $0)
         }
         Section(header: Text("Style")) {
-            VMConfigStringPicker("Theme", selection: $config.consoleTheme, rawValues: UTMQemuConfiguration.supportedConsoleThemes(), displayValues: UTMQemuConfiguration.supportedConsoleThemes())
+            VMConfigStringPicker("Theme", selection: $config.consoleTheme, rawValues: UTMLegacyQemuConfiguration.supportedConsoleThemes(), displayValues: UTMLegacyQemuConfiguration.supportedConsoleThemes())
             ColorPicker("Text Color", selection: textColor)
             ColorPicker("Background Color", selection: backgroundColor)
-            VMConfigStringPicker("Font", selection: $config.consoleFont, rawValues: UTMQemuConfiguration.supportedConsoleFonts(), displayValues: UTMQemuConfiguration.supportedConsoleFontsPretty())
+            VMConfigStringPicker("Font", selection: $config.consoleFont, rawValues: UTMLegacyQemuConfiguration.supportedConsoleFonts(), displayValues: UTMLegacyQemuConfiguration.supportedConsoleFontsPretty())
             HStack {
                 Stepper(value: fontSizeObserver, in: 1...72) {
                         Text("Font Size")
@@ -77,7 +77,7 @@ struct VMConfigDisplayConsoleView<Config: ObservableObject & UTMConfigurable>: V
 
 @available(iOS 14, macOS 11, *)
 struct VMConfigDisplayConsoleView_Previews: PreviewProvider {
-    @ObservedObject static private var config = UTMQemuConfiguration()
+    @ObservedObject static private var config = UTMLegacyQemuConfiguration()
     
     static var previews: some View {
         VMConfigDisplayConsoleView(config: config)

+ 6 - 6
Platform/Shared/VMConfigDisplayView.swift

@@ -18,7 +18,7 @@ import SwiftUI
 
 @available(iOS 14, macOS 11, *)
 struct VMConfigDisplayView: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     
     #if os(macOS)
     let displayTypePickerStyle = RadioGroupPickerStyle()
@@ -35,7 +35,7 @@ struct VMConfigDisplayView: View {
                     Text("Full Graphics").tag(false)
                     Text("Console Only").tag(true)
                 }.pickerStyle(displayTypePickerStyle)
-                .disabled(UTMQemuConfiguration.supportedDisplayCards(forArchitecture: config.systemArchitecture)?.isEmpty ?? true)
+                .disabled(UTMLegacyQemuConfiguration.supportedDisplayCards(forArchitecture: config.systemArchitecture)?.isEmpty ?? true)
                 .onChange(of: config.displayConsoleOnly) { newConsoleOnly in
                     if newConsoleOnly {
                         if config.shareClipboardEnabled {
@@ -50,7 +50,7 @@ struct VMConfigDisplayView: View {
                     VMConfigDisplayConsoleView(config: config)
                 } else {
                     Section(header: Text("Hardware")) {
-                        VMConfigStringPicker("Emulated Display Card", selection: $config.displayCard, rawValues: UTMQemuConfiguration.supportedDisplayCards(forArchitecture: config.systemArchitecture), displayValues: UTMQemuConfiguration.supportedDisplayCards(forArchitecturePretty: config.systemArchitecture))
+                        VMConfigStringPicker("Emulated Display Card", selection: $config.displayCard, rawValues: UTMLegacyQemuConfiguration.supportedDisplayCards(forArchitecture: config.systemArchitecture), displayValues: UTMLegacyQemuConfiguration.supportedDisplayCards(forArchitecturePretty: config.systemArchitecture))
                     }
                     
                     DetailedSection("Auto Resolution", description: "Requires SPICE guest agent tools to be installed.") {
@@ -64,8 +64,8 @@ struct VMConfigDisplayView: View {
                     }
                     
                     Section(header: Text("Scaling")) {
-                        VMConfigStringPicker("Upscaling", selection: $config.displayUpscaler, rawValues: UTMQemuConfiguration.supportedScalers(), displayValues: UTMQemuConfiguration.supportedScalersPretty())
-                        VMConfigStringPicker("Downscaling", selection: $config.displayDownscaler, rawValues: UTMQemuConfiguration.supportedScalers(), displayValues: UTMQemuConfiguration.supportedScalersPretty())
+                        VMConfigStringPicker("Upscaling", selection: $config.displayUpscaler, rawValues: UTMLegacyQemuConfiguration.supportedScalers(), displayValues: UTMLegacyQemuConfiguration.supportedScalersPretty())
+                        VMConfigStringPicker("Downscaling", selection: $config.displayDownscaler, rawValues: UTMLegacyQemuConfiguration.supportedScalers(), displayValues: UTMLegacyQemuConfiguration.supportedScalersPretty())
                         Toggle(isOn: $config.displayRetina, label: {
                             Text("Retina Mode")
                         })
@@ -79,7 +79,7 @@ struct VMConfigDisplayView: View {
 
 @available(iOS 14, macOS 11, *)
 struct VMConfigDisplayView_Previews: PreviewProvider {
-    @ObservedObject static private var config = UTMQemuConfiguration()
+    @ObservedObject static private var config = UTMLegacyQemuConfiguration()
     
     static var previews: some View {
         VMConfigDisplayView(config: config)

+ 1 - 1
Platform/Shared/VMConfigDriveCreateView.swift

@@ -33,7 +33,7 @@ struct VMConfigDriveCreateView: View {
             }).onChange(of: driveImage.removable) { removable in
                 driveImage.reset(forSystemTarget: target, architecture: architecture, removable: removable)
             }.help("If checked, no drive image will be stored with the VM. Instead you can mount/unmount image while the VM is running.")
-            VMConfigStringPicker("Interface", selection: $driveImage.interface, rawValues: UTMQemuConfiguration.supportedDriveInterfaces(), displayValues: UTMQemuConfiguration.supportedDriveInterfacesPretty())
+            VMConfigStringPicker("Interface", selection: $driveImage.interface, rawValues: UTMLegacyQemuConfiguration.supportedDriveInterfaces(), displayValues: UTMLegacyQemuConfiguration.supportedDriveInterfacesPretty())
                 .help("Hardware interface on the guest used to mount this image. Different operating systems support different interfaces. The default will be the most common interface.")
             if !driveImage.removable {
                 HStack {

+ 4 - 4
Platform/Shared/VMConfigDriveDetailsView.swift

@@ -19,7 +19,7 @@ import SwiftUI
 @available(iOS 14, macOS 11, *)
 struct VMConfigDriveDetailsView: View {
     @EnvironmentObject private var data: UTMData
-    @ObservedObject private var config: UTMQemuConfiguration
+    @ObservedObject private var config: UTMLegacyQemuConfiguration
     @Binding private var removable: Bool
     @Binding private var name: String?
     @Binding private var imageTypeString: String?
@@ -40,7 +40,7 @@ struct VMConfigDriveDetailsView: View {
         }
     }
     
-    init(config: UTMQemuConfiguration, index: Int, onDelete: (() -> Void)?) {
+    init(config: UTMLegacyQemuConfiguration, index: Int, onDelete: (() -> Void)?) {
         self.onDelete = onDelete
         self.config = config // for observing updates
         self._removable = Binding<Bool> {
@@ -83,9 +83,9 @@ struct VMConfigDriveDetailsView: View {
                         .multilineTextAlignment(.trailing)
                 }
             }
-            VMConfigStringPicker("Image Type", selection: $imageTypeString, rawValues: UTMQemuConfiguration.supportedImageTypes(), displayValues: UTMQemuConfiguration.supportedImageTypesPretty())
+            VMConfigStringPicker("Image Type", selection: $imageTypeString, rawValues: UTMLegacyQemuConfiguration.supportedImageTypes(), displayValues: UTMLegacyQemuConfiguration.supportedImageTypesPretty())
             if imageType == .disk || imageType == .CD {
-                VMConfigStringPicker("Interface", selection: $interface, rawValues: UTMQemuConfiguration.supportedDriveInterfaces(), displayValues: UTMQemuConfiguration.supportedDriveInterfacesPretty())
+                VMConfigStringPicker("Interface", selection: $interface, rawValues: UTMLegacyQemuConfiguration.supportedDriveInterfaces(), displayValues: UTMLegacyQemuConfiguration.supportedDriveInterfacesPretty())
             }
             
             if let name = name, let imageUrl = config.imagesPath.appendingPathComponent(name), let fileSize = data.computeSize(for: imageUrl) {

+ 1 - 1
Platform/Shared/VMConfigInfoView.swift

@@ -288,7 +288,7 @@ private struct IconSelect: View {
 
 @available(iOS 14, macOS 11, *)
 struct VMConfigInfoView_Previews: PreviewProvider {
-    @ObservedObject static private var config = UTMQemuConfiguration()
+    @ObservedObject static private var config = UTMLegacyQemuConfiguration()
     
     static var previews: some View {
         Group {

+ 2 - 2
Platform/Shared/VMConfigInputView.swift

@@ -18,7 +18,7 @@ import SwiftUI
 
 @available(iOS 14, macOS 11, *)
 struct VMConfigInputView: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     
     private var usbSupport: Binding<UsbSupport> {
         Binding {
@@ -155,7 +155,7 @@ struct GestureSettingsSection: View {
 
 @available(iOS 14, macOS 11, *)
 struct VMConfigInputView_Previews: PreviewProvider {
-    @ObservedObject static private var config = UTMQemuConfiguration()
+    @ObservedObject static private var config = UTMLegacyQemuConfiguration()
     
     static var previews: some View {
         VMConfigInputView(config: config)

+ 7 - 7
Platform/Shared/VMConfigNetworkView.swift

@@ -18,7 +18,7 @@ import SwiftUI
 
 @available(iOS 14, macOS 11, *)
 struct VMConfigNetworkView: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     @State private var showAdvanced: Bool = false
     
     var body: some View {
@@ -39,15 +39,15 @@ struct VMConfigNetworkView: View {
                     })
                     #endif
                     if config.networkEnabled {
-                        VMConfigStringPicker("Emulated Network Card", selection: $config.networkCard, rawValues: UTMQemuConfiguration.supportedNetworkCards(forArchitecture: config.systemArchitecture), displayValues: UTMQemuConfiguration.supportedNetworkCards(forArchitecturePretty: config.systemArchitecture))
+                        VMConfigStringPicker("Emulated Network Card", selection: $config.networkCard, rawValues: UTMLegacyQemuConfiguration.supportedNetworkCards(forArchitecture: config.systemArchitecture), displayValues: UTMLegacyQemuConfiguration.supportedNetworkCards(forArchitecturePretty: config.systemArchitecture))
                     }
-                }.disabled(UTMQemuConfiguration.supportedNetworkCards(forArchitecture: config.systemArchitecture)?.isEmpty ?? true)
+                }.disabled(UTMLegacyQemuConfiguration.supportedNetworkCards(forArchitecture: config.systemArchitecture)?.isEmpty ?? true)
                 
                 if config.networkEnabled {
                     HStack {
                         DefaultTextField("MAC Address", text: $config.networkCardMac.bound, prompt: "00:00:00:00:00:00")
                         Button("Random") {
-                            config.networkCardMac = UTMQemuConfiguration.generateMacAddress()
+                            config.networkCardMac = UTMLegacyQemuConfiguration.generateMacAddress()
                         }
                     }
 
@@ -75,10 +75,10 @@ struct VMConfigNetworkView: View {
 
 @available(iOS 14, macOS 11, *)
 struct NetworkModeSection: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     
     var body: some View {
-        VMConfigStringPicker("Network Mode", selection: $config.networkMode, rawValues: UTMQemuConfiguration.supportedNetworkModes(), displayValues: UTMQemuConfiguration.supportedNetworkModesPretty())
+        VMConfigStringPicker("Network Mode", selection: $config.networkMode, rawValues: UTMLegacyQemuConfiguration.supportedNetworkModes(), displayValues: UTMLegacyQemuConfiguration.supportedNetworkModesPretty())
         if config.networkMode == "bridged" {
             DefaultTextField("Bridged Interface", text: $config.networkBridgeInterface.bound, prompt: "en0")
                 .keyboardType(.asciiCapable)
@@ -88,7 +88,7 @@ struct NetworkModeSection: View {
 
 @available(iOS 14, macOS 11, *)
 struct VMConfigNetworkingView_Previews: PreviewProvider {
-    @State static private var config = UTMQemuConfiguration()
+    @State static private var config = UTMLegacyQemuConfiguration()
     
     static var previews: some View {
         VMConfigNetworkView(config: config)

+ 4 - 4
Platform/Shared/VMConfigPortForwardForm.swift

@@ -18,7 +18,7 @@ import SwiftUI
 
 @available(iOS 14, macOS 11, *)
 struct VMConfigPortForwardForm: View {
-    @ObservedObject var configPort: UTMQemuConfigurationPortForward
+    @ObservedObject var configPort: UTMLegacyQemuConfigurationPortForward
     
     var body: some View {
         Group {
@@ -34,8 +34,8 @@ struct VMConfigPortForwardForm: View {
 
 @available(iOS 14, macOS 11, *)
 struct VMConfigPortForwardForm_Previews: PreviewProvider {
-    @State static private var config = UTMQemuConfiguration()
-    @State static private var configPort = UTMQemuConfigurationPortForward()
+    @State static private var config = UTMLegacyQemuConfiguration()
+    @State static private var configPort = UTMLegacyQemuConfigurationPortForward()
     
     static var previews: some View {
         VStack {
@@ -46,7 +46,7 @@ struct VMConfigPortForwardForm_Previews: PreviewProvider {
             }
         }.onAppear {
             if config.countPortForwards == 0 {
-                let newConfigPort = UTMQemuConfigurationPortForward()
+                let newConfigPort = UTMLegacyQemuConfigurationPortForward()
                 newConfigPort.protocol = "tcp"
                 newConfigPort.guestAddress = "1.2.3.4"
                 newConfigPort.guestPort = 1234

+ 6 - 6
Platform/Shared/VMConfigQEMUView.swift

@@ -23,7 +23,7 @@ struct VMConfigQEMUView: View {
         let string: String
     }
     
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     @State private var showExportLog: Bool = false
     @State private var showExportArgs: Bool = false
     @EnvironmentObject private var data: UTMData
@@ -32,7 +32,7 @@ struct VMConfigQEMUView: View {
         guard let path = config.existingPath else {
             return false
         }
-        let logPath = path.appendingPathComponent(UTMQemuConfiguration.debugLogName)
+        let logPath = path.appendingPathComponent(UTMLegacyQemuConfiguration.debugLogName)
         return FileManager.default.fileExists(atPath: logPath.path)
     }
     
@@ -116,7 +116,7 @@ struct VMConfigQEMUView: View {
         guard let path = config.existingPath else {
             return nil
         }
-        let srcLogPath = path.appendingPathComponent(UTMQemuConfiguration.debugLogName)
+        let srcLogPath = path.appendingPathComponent(UTMLegacyQemuConfiguration.debugLogName)
         return .debugLog(srcLogPath)
     }
     
@@ -156,7 +156,7 @@ struct VMConfigQEMUView: View {
 
 @available(iOS 14, macOS 11, *)
 struct CustomArguments: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     
     var body: some View {
         ForEach(0..<config.countArguments, id: \.self) { i in
@@ -204,7 +204,7 @@ struct CustomArguments: View {
 
 @available(iOS 14, macOS 11, *)
 struct NewArgumentTextField: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     @State private var newArg: String = ""
     
     var body: some View {
@@ -230,7 +230,7 @@ struct NewArgumentTextField: View {
 
 @available(iOS 14, macOS 11, *)
 struct VMConfigQEMUView_Previews: PreviewProvider {
-    @ObservedObject static private var config = UTMQemuConfiguration()
+    @ObservedObject static private var config = UTMLegacyQemuConfiguration()
     
     static var previews: some View {
         VMConfigQEMUView(config: config)

+ 2 - 2
Platform/Shared/VMConfigSharingView.swift

@@ -18,7 +18,7 @@ import SwiftUI
 
 @available(iOS 14, macOS 11, *)
 struct VMConfigSharingView: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     
     var body: some View {
         VStack {
@@ -52,7 +52,7 @@ struct VMConfigSharingView: View {
 
 @available(iOS 14, macOS 11, *)
 struct VMConfigSharingView_Previews: PreviewProvider {
-    @State static private var config = UTMQemuConfiguration()
+    @State static private var config = UTMLegacyQemuConfiguration()
     
     static var previews: some View {
         VMConfigSharingView(config: config)

+ 4 - 4
Platform/Shared/VMConfigSoundView.swift

@@ -18,7 +18,7 @@ import SwiftUI
 
 @available(iOS 14, macOS 11, *)
 struct VMConfigSoundView: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     
     var body: some View {
         VStack {
@@ -28,9 +28,9 @@ struct VMConfigSoundView: View {
                         Text("Enabled")
                     })
                     if config.soundEnabled {
-                        VMConfigStringPicker("Emulated Audio Card", selection: $config.soundCard, rawValues: UTMQemuConfiguration.supportedSoundCards(forArchitecture: config.systemArchitecture), displayValues: UTMQemuConfiguration.supportedSoundCards(forArchitecturePretty: config.systemArchitecture))
+                        VMConfigStringPicker("Emulated Audio Card", selection: $config.soundCard, rawValues: UTMLegacyQemuConfiguration.supportedSoundCards(forArchitecture: config.systemArchitecture), displayValues: UTMLegacyQemuConfiguration.supportedSoundCards(forArchitecturePretty: config.systemArchitecture))
                     }
-                }.disabled(UTMQemuConfiguration.supportedSoundCards(forArchitecture: config.systemArchitecture)?.isEmpty ?? true)
+                }.disabled(UTMLegacyQemuConfiguration.supportedSoundCards(forArchitecture: config.systemArchitecture)?.isEmpty ?? true)
             }
         }
     }
@@ -38,7 +38,7 @@ struct VMConfigSoundView: View {
 
 @available(iOS 14, macOS 11, *)
 struct VMConfigSoundView_Previews: PreviewProvider {
-    @State static private var config = UTMQemuConfiguration()
+    @State static private var config = UTMLegacyQemuConfiguration()
     
     static var previews: some View {
         VMConfigSoundView(config: config)

+ 14 - 14
Platform/Shared/VMConfigSystemView.swift

@@ -23,7 +23,7 @@ private let warningThreshold = 0.9
 
 @available(iOS 14, macOS 11, *)
 struct VMConfigSystemView: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     @State private var warningMessage: String? = nil
     
     var body: some View {
@@ -31,7 +31,7 @@ struct VMConfigSystemView: View {
             Form {
                 HardwareOptions(config: config, validateMemorySize: validateMemorySize)
                 Section(header: Text("CPU")) {
-                    VMConfigStringPicker(selection: $config.systemCPU.animation(), rawValues: UTMQemuConfiguration.supportedCpus(forArchitecture: config.systemArchitecture), displayValues: UTMQemuConfiguration.supportedCpus(forArchitecturePretty: config.systemArchitecture))
+                    VMConfigStringPicker(selection: $config.systemCPU.animation(), rawValues: UTMLegacyQemuConfiguration.supportedCpus(forArchitecture: config.systemArchitecture), displayValues: UTMLegacyQemuConfiguration.supportedCpus(forArchitecturePretty: config.systemArchitecture))
                 }
                 CPUFlagsOptions(config: config)
                 DetailedSection("CPU Cores", description: "Force multicore may improve speed of emulation but also might result in unstable and incorrect emulation.") {
@@ -98,26 +98,26 @@ struct VMConfigSystemView: View {
 
 @available(iOS 14, macOS 11, *)
 struct HardwareOptions: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     let validateMemorySize: (Bool) -> Void
     @EnvironmentObject private var data: UTMData
     @State private var warningMessage: String? = nil
     
     var body: some View {
         Section(header: Text("Hardware")) {
-            VMConfigStringPicker("Architecture", selection: $config.systemArchitecture, rawValues: UTMQemuConfiguration.supportedArchitectures(), displayValues: UTMQemuConfiguration.supportedArchitecturesPretty())
+            VMConfigStringPicker("Architecture", selection: $config.systemArchitecture, rawValues: UTMLegacyQemuConfiguration.supportedArchitectures(), displayValues: UTMLegacyQemuConfiguration.supportedArchitecturesPretty())
                 .onChange(of: config.systemArchitecture, perform: { value in
                     guard let arch = value else {
                         return
                     }
-                    let index = UTMQemuConfiguration.defaultTargetIndex(forArchitecture: arch)
-                    let targets = UTMQemuConfiguration.supportedTargets(forArchitecture: arch)
+                    let index = UTMLegacyQemuConfiguration.defaultTargetIndex(forArchitecture: arch)
+                    let targets = UTMLegacyQemuConfiguration.supportedTargets(forArchitecture: arch)
                     config.systemTarget = targets?[index]
                     config.loadDefaults(forTarget: config.systemTarget, architecture: arch)
                     // disable unsupported hardware
                     if let displayCard = config.displayCard {
-                        if !UTMQemuConfiguration.supportedDisplayCards(forArchitecture: arch)!.contains(where: { $0.caseInsensitiveCompare(displayCard) == .orderedSame }) {
-                            if UTMQemuConfiguration.supportedDisplayCards(forArchitecture: arch)!.contains("VGA") {
+                        if !UTMLegacyQemuConfiguration.supportedDisplayCards(forArchitecture: arch)!.contains(where: { $0.caseInsensitiveCompare(displayCard) == .orderedSame }) {
+                            if UTMLegacyQemuConfiguration.supportedDisplayCards(forArchitecture: arch)!.contains("VGA") {
                                 config.displayCard = "VGA" // most devices support VGA
                             } else {
                                 config.displayConsoleOnly = true
@@ -127,12 +127,12 @@ struct HardwareOptions: View {
                         }
                     }
                     if let networkCard = config.networkCard {
-                        if !UTMQemuConfiguration.supportedNetworkCards(forArchitecture: arch)!.contains(where: { $0.caseInsensitiveCompare(networkCard) == .orderedSame }) {
+                        if !UTMLegacyQemuConfiguration.supportedNetworkCards(forArchitecture: arch)!.contains(where: { $0.caseInsensitiveCompare(networkCard) == .orderedSame }) {
                             config.networkEnabled = false
                         }
                     }
                     if let soundCard = config.soundCard {
-                        if !UTMQemuConfiguration.supportedSoundCards(forArchitecture: arch)!.contains(where: { $0.caseInsensitiveCompare(soundCard) == .orderedSame }) {
+                        if !UTMLegacyQemuConfiguration.supportedSoundCards(forArchitecture: arch)!.contains(where: { $0.caseInsensitiveCompare(soundCard) == .orderedSame }) {
                             config.soundEnabled = false
                         }
                     }
@@ -141,7 +141,7 @@ struct HardwareOptions: View {
                 Text("The selected architecture is unsupported in this version of UTM.")
                     .foregroundColor(.red)
             }
-            VMConfigStringPicker("System", selection: $config.systemTarget, rawValues: UTMQemuConfiguration.supportedTargets(forArchitecture: config.systemArchitecture), displayValues: UTMQemuConfiguration.supportedTargets(forArchitecturePretty: config.systemArchitecture))
+            VMConfigStringPicker("System", selection: $config.systemTarget, rawValues: UTMLegacyQemuConfiguration.supportedTargets(forArchitecture: config.systemArchitecture), displayValues: UTMLegacyQemuConfiguration.supportedTargets(forArchitecturePretty: config.systemArchitecture))
                 .onChange(of: config.systemTarget, perform: { value in
                     config.loadDefaults(forTarget: value, architecture: config.systemArchitecture)
                 })
@@ -152,11 +152,11 @@ struct HardwareOptions: View {
 
 @available(iOS 14, macOS 11, *)
 struct CPUFlagsOptions: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     @State private var showAllFlags: Bool = false
     
     var body: some View {
-        let allFlags = UTMQemuConfiguration.supportedCpuFlags(forArchitecture: config.systemArchitecture) ?? []
+        let allFlags = UTMLegacyQemuConfiguration.supportedCpuFlags(forArchitecture: config.systemArchitecture) ?? []
         let activeFlags = config.systemCPUFlags ?? []
         if config.systemCPU != "default" && allFlags.count > 0 {
             Section(header: Text("CPU Flags")) {
@@ -225,7 +225,7 @@ struct OptionsList<Content>: View where Content: View {
 
 @available(iOS 14, macOS 11, *)
 struct VMConfigSystemView_Previews: PreviewProvider {
-    @ObservedObject static private var config = UTMQemuConfiguration()
+    @ObservedObject static private var config = UTMLegacyQemuConfiguration()
     
     static var previews: some View {
         VMConfigSystemView(config: config)

+ 2 - 2
Platform/Shared/VMDetailsView.swift

@@ -110,7 +110,7 @@ struct VMDetailsView: View {
                         .environmentObject(data)
                 }
                 #else
-                VMSettingsView(vm: vm as! UTMQemuVirtualMachine, config: vm.config as! UTMQemuConfiguration)
+                VMSettingsView(vm: vm as! UTMQemuVirtualMachine, config: vm.config as! UTMLegacyQemuConfiguration)
                     .environmentObject(data)
                 #endif
             }
@@ -265,7 +265,7 @@ struct DetailsLabelStyle: LabelStyle {
 
 @available(iOS 14, macOS 11, *)
 struct VMDetailsView_Previews: PreviewProvider {
-    @State static private var config = UTMQemuConfiguration()
+    @State static private var config = UTMLegacyQemuConfiguration()
     
     static var previews: some View {
         VMDetailsView(vm: UTMVirtualMachine(configuration: config, withDestinationURL: URL(fileURLWithPath: "")))

+ 2 - 2
Platform/Shared/VMDriveImage.swift

@@ -40,14 +40,14 @@ class VMDriveImage: ObservableObject {
             guard let newInterface = newInterface else {
                 return
             }
-            self.isRawImage = !UTMQemuConfiguration.shouldConvertQcow2(forInterface: newInterface)
+            self.isRawImage = !UTMLegacyQemuConfiguration.shouldConvertQcow2(forInterface: newInterface)
         })
     }
     
     func reset(forSystemTarget target: String?, architecture: String?, removable: Bool) {
         self.removable = removable
         self.imageType = removable ? .CD : .disk
-        self.interface = UTMQemuConfiguration.defaultDriveInterface(forTarget: target, architecture: architecture, type: imageType)
+        self.interface = UTMLegacyQemuConfiguration.defaultDriveInterface(forTarget: target, architecture: architecture, type: imageType)
         self.size = removable ? 0 : 10240
         self.isRawImage = false
     }

+ 1 - 1
Platform/Shared/VMRemovableDrivesView.swift

@@ -208,7 +208,7 @@ struct VMRemovableDrivesView: View {
 
 @available(iOS 14, macOS 11, *)
 struct VMRemovableDrivesView_Previews: PreviewProvider {
-    @State static private var config = UTMQemuConfiguration()
+    @State static private var config = UTMLegacyQemuConfiguration()
     
     static var previews: some View {
         VMRemovableDrivesView(vm: UTMVirtualMachine(configuration: config, withDestinationURL: URL(fileURLWithPath: "")) as! UTMQemuVirtualMachine)

+ 4 - 4
Platform/Shared/VMWizardHardwareView.swift

@@ -63,7 +63,7 @@ struct VMWizardHardwareView: View {
         List {
             if !wizardState.useVirtualization {
                 Section {
-                    VMConfigStringPicker(selection: $wizardState.systemArchitecture, rawValues: UTMQemuConfiguration.supportedArchitectures(), displayValues: UTMQemuConfiguration.supportedArchitecturesPretty())
+                    VMConfigStringPicker(selection: $wizardState.systemArchitecture, rawValues: UTMLegacyQemuConfiguration.supportedArchitectures(), displayValues: UTMLegacyQemuConfiguration.supportedArchitecturesPretty())
                         .onChange(of: wizardState.systemArchitecture) { newValue in
                             if let newValue = newValue {
                                 wizardState.systemTarget = defaultTarget(for: newValue)
@@ -76,7 +76,7 @@ struct VMWizardHardwareView: View {
                 }
                 
                 Section {
-                    VMConfigStringPicker(selection: $wizardState.systemTarget, rawValues: UTMQemuConfiguration.supportedTargets(forArchitecture: wizardState.systemArchitecture), displayValues: UTMQemuConfiguration.supportedTargets(forArchitecturePretty: wizardState.systemArchitecture))
+                    VMConfigStringPicker(selection: $wizardState.systemTarget, rawValues: UTMLegacyQemuConfiguration.supportedTargets(forArchitecture: wizardState.systemArchitecture), displayValues: UTMLegacyQemuConfiguration.supportedTargets(forArchitecturePretty: wizardState.systemArchitecture))
                 } header: {
                     Text("System")
                 }
@@ -157,8 +157,8 @@ struct VMWizardHardwareView: View {
     }
     
     private func defaultTarget(for architecture: String) -> String {
-        let targets = UTMQemuConfiguration.supportedTargets(forArchitecture: architecture)
-        let index = UTMQemuConfiguration.defaultTargetIndex(forArchitecture: architecture)
+        let targets = UTMLegacyQemuConfiguration.supportedTargets(forArchitecture: architecture)
+        let index = UTMLegacyQemuConfiguration.defaultTargetIndex(forArchitecture: architecture)
         return targets![index]
     }
 }

+ 5 - 5
Platform/Shared/VMWizardState.swift

@@ -337,8 +337,8 @@ enum VMWizardOS: String, Identifiable {
     #endif
     #endif
     
-    private func generateQemuConfig() throws -> UTMQemuConfiguration {
-        let config = UTMQemuConfiguration()
+    private func generateQemuConfig() throws -> UTMLegacyQemuConfiguration {
+        let config = UTMLegacyQemuConfiguration()
         config.name = name!
         config.systemArchitecture = systemArchitecture
         config.systemTarget = systemTarget
@@ -353,19 +353,19 @@ enum VMWizardOS: String, Identifiable {
         }
         if isGLEnabled, let displayCard = config.displayCard {
             let newCard = displayCard + "-gl"
-            let allCards = UTMQemuConfiguration.supportedDisplayCards(forArchitecture: systemArchitecture)!
+            let allCards = UTMLegacyQemuConfiguration.supportedDisplayCards(forArchitecture: systemArchitecture)!
             if allCards.contains(newCard) {
                 config.displayCard = newCard
             }
         }
         let generateRemovableDrive: () -> Void = { [self] in
-            config.newRemovableDrive("cdrom0", type: .CD, interface: UTMQemuConfiguration.defaultDriveInterface(forTarget: systemTarget, architecture: systemArchitecture, type: .CD))
+            config.newRemovableDrive("cdrom0", type: .CD, interface: UTMLegacyQemuConfiguration.defaultDriveInterface(forTarget: systemTarget, architecture: systemArchitecture, type: .CD))
         }
         let mainDriveInterface: String
         if systemArchitecture == "aarch64" && operatingSystem == .Windows {
             mainDriveInterface = "nvme"
         } else {
-           mainDriveInterface = UTMQemuConfiguration.defaultDriveInterface(forTarget: systemTarget, architecture: systemArchitecture, type: .disk)
+           mainDriveInterface = UTMLegacyQemuConfiguration.defaultDriveInterface(forTarget: systemTarget, architecture: systemArchitecture, type: .disk)
         }
         if !isSkipBootImage && bootImageURL != nil {
             generateRemovableDrive()

+ 10 - 10
Platform/Swift-Bridging-Header.h

@@ -17,16 +17,16 @@
 #include <os/proc.h>
 #include "TargetConditionals.h"
 #include "UTMConfigurable.h"
-#include "UTMQemuConfiguration.h"
-#include "UTMQemuConfiguration+Constants.h"
-#include "UTMQemuConfiguration+Defaults.h"
-#include "UTMQemuConfiguration+Display.h"
-#include "UTMQemuConfiguration+Drives.h"
-#include "UTMQemuConfiguration+Miscellaneous.h"
-#include "UTMQemuConfiguration+Networking.h"
-#include "UTMQemuConfiguration+Sharing.h"
-#include "UTMQemuConfiguration+System.h"
-#include "UTMQemuConfigurationPortForward.h"
+#include "UTMLegacyQemuConfiguration.h"
+#include "UTMLegacyQemuConfiguration+Constants.h"
+#include "UTMLegacyQemuConfiguration+Defaults.h"
+#include "UTMLegacyQemuConfiguration+Display.h"
+#include "UTMLegacyQemuConfiguration+Drives.h"
+#include "UTMLegacyQemuConfiguration+Miscellaneous.h"
+#include "UTMLegacyQemuConfiguration+Networking.h"
+#include "UTMLegacyQemuConfiguration+Sharing.h"
+#include "UTMLegacyQemuConfiguration+System.h"
+#include "UTMLegacyQemuConfigurationPortForward.h"
 #include "UTMDrive.h"
 #include "UTMQcow2.h"
 #include "UTMQemu.h"

+ 13 - 13
Platform/UTMData.swift

@@ -295,7 +295,7 @@ class UTMData: ObservableObject {
     ///   - ext: Image extension
     ///   - forConfig: UTM QEMU configuration that will hold this drive
     /// - Returns: Unique name for a non-existing item in the .utm data path
-    private func newDefaultDrivePath(type: UTMDiskImageType, extension ext: String, forConfig: UTMQemuConfiguration) -> String {
+    private func newDefaultDrivePath(type: UTMDiskImageType, extension ext: String, forConfig: UTMLegacyQemuConfiguration) -> String {
         let nameForId = { (i: Int) in "\(type.description)-\(i).\(ext)" }
         for i in 0..<1000 {
             let name = nameForId(i)
@@ -310,7 +310,7 @@ class UTMData: ObservableObject {
     /// Generate a default drive name for QEMU
     /// - Parameter config: UTM QEMU configuration that will use the drive
     /// - Returns: Unique name for the new drive
-    private func newDefaultDriveName(for config: UTMQemuConfiguration) -> String {
+    private func newDefaultDriveName(for config: UTMLegacyQemuConfiguration) -> String {
         let nameForId = { (i: Int) in "drive\(i)" }
         for i in 0..<1000 {
             let name = nameForId(i)
@@ -414,17 +414,17 @@ class UTMData: ObservableObject {
     /// Discard changes to VM configuration
     /// - Parameter vm: VM configuration to discard
     func discardChanges(for vm: UTMVirtualMachine? = nil) throws {
-        let config: UTMQemuConfiguration
+        let config: UTMLegacyQemuConfiguration
         if let vm = vm, vm.path != nil {
             try vm.reloadConfiguration()
-            guard let qemuConfig = vm.config as? UTMQemuConfiguration else {
+            guard let qemuConfig = vm.config as? UTMLegacyQemuConfiguration else {
                 // FIXME: non-qemu orphaned drives
                 return
             }
             config = qemuConfig
         } else {
             // create a tmp empty config so we can get orphanedDrives for tmp path
-            config = UTMQemuConfiguration()
+            config = UTMLegacyQemuConfiguration()
         }
         // delete unsaved drives
         for url in qemuUnsavedImages {
@@ -521,7 +521,7 @@ class UTMData: ObservableObject {
     /// - Parameter vm: VM to edit settings
     @MainActor func edit(vm: UTMVirtualMachine) {
         // show orphans for proper removal
-        if let config = vm.config as? UTMQemuConfiguration {
+        if let config = vm.config as? UTMLegacyQemuConfiguration {
             config.recoverOrphanedDrives()
         }
         listSelect(vm: vm)
@@ -533,8 +533,8 @@ class UTMData: ObservableObject {
     /// - Parameter vm: Existing VM to copy configuration from
     @MainActor func template(vm: UTMVirtualMachine) async throws {
         let copy = try await Task.detached { () -> UTMConfigurable in
-            if let qemuConfig = vm.config as? UTMQemuConfiguration {
-                let copy = qemuConfig.copy() as! UTMQemuConfiguration
+            if let qemuConfig = vm.config as? UTMLegacyQemuConfiguration {
+                let copy = qemuConfig.copy() as! UTMLegacyQemuConfiguration
                 copy.systemUUID = UUID().uuidString // re-generate UUID
                 for _ in 0..<copy.countDrives {
                     copy.removeDrive(at: 0) // remove existing drives
@@ -714,7 +714,7 @@ class UTMData: ObservableObject {
     ///   - interface: Interface to add to
     ///   - raw: If false, convert to QCOW2
     ///   - copy: Make a copy of the file (if false, file will be moved)
-    func importDrive(_ drive: URL, for config: UTMQemuConfiguration, imageType: UTMDiskImageType, on interface: String, raw: Bool, copy: Bool) async throws {
+    func importDrive(_ drive: URL, for config: UTMLegacyQemuConfiguration, imageType: UTMDiskImageType, on interface: String, raw: Bool, copy: Bool) async throws {
         _ = drive.startAccessingSecurityScopedResource()
         defer { drive.stopAccessingSecurityScopedResource() }
         
@@ -757,11 +757,11 @@ class UTMData: ObservableObject {
         }
     }
     
-    func importDrive(_ drive: URL, for config: UTMQemuConfiguration, copy: Bool = true) async throws {
+    func importDrive(_ drive: URL, for config: UTMLegacyQemuConfiguration, copy: Bool = true) async throws {
         let imageType: UTMDiskImageType = drive.pathExtension.lowercased() == "iso" ? .CD : .disk
         let interface: String
         if let target = config.systemTarget, let arch = config.systemArchitecture {
-            interface = UTMQemuConfiguration.defaultDriveInterface(forTarget: target, architecture: arch, type: imageType)
+            interface = UTMLegacyQemuConfiguration.defaultDriveInterface(forTarget: target, architecture: arch, type: imageType)
         } else {
             interface = "none"
         }
@@ -773,7 +773,7 @@ class UTMData: ObservableObject {
     ///   - drive: Create parameters
     ///   - config: QEMU configuration to add to
     ///   - driveImage: Disk image type
-    func createDrive(_ drive: VMDriveImage, for config: UTMQemuConfiguration, with driveImage: URL? = nil) async throws {
+    func createDrive(_ drive: VMDriveImage, for config: UTMLegacyQemuConfiguration, with driveImage: URL? = nil) async throws {
         var path: String = ""
         if !drive.removable {
             assert(driveImage == nil, "Cannot call createDrive with a driveImage!")
@@ -818,7 +818,7 @@ class UTMData: ObservableObject {
     /// - Parameters:
     ///   - index: Index of drive in configuration
     ///   - config: QEMU configuration
-    func removeDrive(at index: Int, for config: UTMQemuConfiguration) async throws {
+    func removeDrive(at index: Int, for config: UTMLegacyQemuConfiguration) async throws {
         if let path = config.driveImagePath(for: index) {
             let fullPath = config.imagesPath.appendingPathComponent(path);
             qemuUnsavedImages.removeAll(where: { $0 == fullPath })

+ 2 - 2
Platform/iOS/Display/VMDisplayMetalViewController+Gamepad.m

@@ -20,8 +20,8 @@
 #import "VMDisplayMetalViewController+Gamepad.h"
 #import "VMDisplayMetalViewController+Touch.h"
 #import "CSDisplay.h"
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
 #import "UTMLogging.h"
 
 const CGFloat kThumbstickSpeedMultiplier = 1000; // in points per second

+ 2 - 2
Platform/iOS/Display/VMDisplayMetalViewController+Pointer.m

@@ -14,8 +14,8 @@
 // limitations under the License.
 //
 
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Miscellaneous.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Miscellaneous.h"
 #import "VMDisplayMetalViewController.h"
 #import "VMDisplayMetalViewController+Touch.h"
 #import "VMDisplayMetalViewController+Pointer.h"

+ 2 - 2
Platform/iOS/Display/VMDisplayMetalViewController+Touch.m

@@ -21,8 +21,8 @@
 #import "VMCursor.h"
 #import "VMScroll.h"
 #import "CSDisplay.h"
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Miscellaneous.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Miscellaneous.h"
 #import "UTMSpiceIO.h"
 #import "UTMLogging.h"
 #import "UTMQemuVirtualMachine.h"

+ 2 - 2
Platform/iOS/Display/VMDisplayMetalViewController.m

@@ -23,8 +23,8 @@
 #import "VMKeyboardView.h"
 #import "UTMVirtualMachine.h"
 #import "UTMQemuManager.h"
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Display.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Display.h"
 #import "UTMLogging.h"
 #import "CSDisplay.h"
 #import "UTM-Swift.h"

+ 2 - 2
Platform/iOS/Display/VMDisplayTerminalViewController.m

@@ -16,8 +16,8 @@
 
 #import "VMDisplayTerminalViewController.h"
 #import "VMDisplayTerminalViewController+Keyboard.h"
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Display.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Display.h"
 #import "UTMLogging.h"
 #import "UTMQemuVirtualMachine.h"
 #import "UIViewController+Extensions.h"

+ 2 - 2
Platform/iOS/Display/VMDisplayViewController.h

@@ -19,7 +19,7 @@
 #import "UTMSpiceIODelegate.h"
 #import "UTMVirtualMachineDelegate.h"
 
-@class UTMQemuConfiguration;
+@class UTMLegacyQemuConfiguration;
 @class UTMQemuVirtualMachine;
 @class VMKeyboardButton;
 @class VMRemovableDrivesViewController;
@@ -43,7 +43,7 @@
 @property (weak, nonatomic) IBOutlet UIButton *resumeBigButton;
 @property (strong, nonatomic) IBOutletCollection(VMKeyboardButton) NSArray *customKeyModifierButtons;
 
-@property (nonatomic, readonly) UTMQemuConfiguration *vmQemuConfig;
+@property (nonatomic, readonly) UTMLegacyQemuConfiguration *vmQemuConfig;
 @property (nonatomic) VMToolbarActions *toolbar;
 @property (nonatomic) UIViewController *floatingToolbarViewController;
 @property (nonatomic) VMRemovableDrivesViewController *removableDrivesViewController;

+ 2 - 2
Platform/iOS/Display/VMDisplayViewController.m

@@ -25,8 +25,8 @@
 @synthesize prefersStatusBarHidden = _prefersStatusBarHidden;
 @synthesize keyboardVisible = _keyboardVisible;
 
-- (UTMQemuConfiguration *)vmQemuConfig {
-    return (UTMQemuConfiguration *)self.vm.config;
+- (UTMLegacyQemuConfiguration *)vmQemuConfig {
+    return (UTMLegacyQemuConfiguration *)self.vm.config;
 }
 
 - (BOOL)prefersHomeIndicatorAutoHidden {

+ 1 - 1
Platform/iOS/Legacy/VMConfigCreateViewController.m

@@ -15,7 +15,7 @@
 //
 
 #import "VMConfigCreateViewController.h"
-#import "UTMQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration.h"
 #import "VMConfigTextField.h"
 
 @interface VMConfigCreateViewController ()

+ 3 - 3
Platform/iOS/Legacy/VMConfigDisplayViewController.m

@@ -15,9 +15,9 @@
 //
 
 #import "VMConfigDisplayViewController.h"
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Constants.h"
-#import "UTMQemuConfiguration+Display.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration+Display.h"
 
 @interface VMConfigDisplayViewController ()
 

+ 1 - 1
Platform/iOS/Legacy/VMConfigDriveDetailViewController.h

@@ -15,7 +15,7 @@
 //
 
 #import <UIKit/UIKit.h>
-#import "UTMQemuConfiguration+Drives.h"
+#import "UTMLegacyQemuConfiguration+Drives.h"
 #import "VMConfigViewController.h"
 
 @class VMConfigTogglePickerCell;

+ 10 - 10
Platform/iOS/Legacy/VMConfigDriveDetailViewController.m

@@ -15,10 +15,10 @@
 //
 
 #import "VMConfigDriveDetailViewController.h"
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Constants.h"
-#import "UTMQemuConfiguration+Defaults.h"
-#import "UTMQemuConfiguration+System.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration+Defaults.h"
+#import "UTMLegacyQemuConfiguration+System.h"
 #import "VMConfigDrivePickerViewController.h"
 #import "VMConfigPickerView.h"
 #import "VMConfigTogglePickerCell.h"
@@ -49,7 +49,7 @@
         [self showImagePathCell:!self.removable animated:NO];
     } else {
         self.imageType = UTMDiskImageTypeDisk;
-        self.driveInterfaceType = [UTMQemuConfiguration defaultDriveInterfaceForTarget:self.configuration.systemTarget architecture:self.configuration.systemArchitecture type:UTMDiskImageTypeDisk];
+        self.driveInterfaceType = [UTMLegacyQemuConfiguration defaultDriveInterfaceForTarget:self.configuration.systemTarget architecture:self.configuration.systemArchitecture type:UTMDiskImageTypeDisk];
     }
     if (self.imageType == UTMDiskImageTypeDisk || self.imageType == UTMDiskImageTypeCD) {
         [self showDriveTypeOptions:YES animated:NO];
@@ -76,7 +76,7 @@
     if (self.existing) {
         [self.configuration setDriveImageType:imageType forIndex:self.driveIndex];
     }
-    self.imageTypePickerCell.detailTextLabel.text = [UTMQemuConfiguration supportedImageTypes][imageType];
+    self.imageTypePickerCell.detailTextLabel.text = [UTMLegacyQemuConfiguration supportedImageTypes][imageType];
 }
 
 - (void)setDriveInterfaceType:(NSString *)driveInterfaceType {
@@ -104,7 +104,7 @@
 - (void)imageTypeChanged {
     if (self.imageType == UTMDiskImageTypeDisk || self.imageType == UTMDiskImageTypeCD) {
         if (self.driveInterfaceType.length == 0) {
-            self.driveInterfaceType = [UTMQemuConfiguration defaultDriveInterfaceForTarget:self.configuration.systemTarget architecture:self.configuration.systemArchitecture type:self.imageType];
+            self.driveInterfaceType = [UTMLegacyQemuConfiguration defaultDriveInterfaceForTarget:self.configuration.systemTarget architecture:self.configuration.systemArchitecture type:self.imageType];
         }
         [self showDriveTypeOptions:YES animated:NO];
     } else {
@@ -116,7 +116,7 @@
 - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component {
     NSAssert(component == 0, @"Invalid component");
     if (pickerView == self.driveLocationPickerCell.picker) {
-        self.driveInterfaceType = [UTMQemuConfiguration supportedDriveInterfaces][row];
+        self.driveInterfaceType = [UTMLegacyQemuConfiguration supportedDriveInterfaces][row];
     } else if (pickerView == self.imageTypePickerCell.picker) {
         self.imageType = row;
         [self imageTypeChanged];
@@ -130,8 +130,8 @@
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
     if ([segue.identifier isEqualToString:@"selectDiskSegue"]) {
-        NSAssert([segue.destinationViewController conformsToProtocol:@protocol(UTMQemuConfigurationDelegate)], @"Invalid segue destination");
-        id<UTMQemuConfigurationDelegate> controller = (id<UTMQemuConfigurationDelegate>)segue.destinationViewController;
+        NSAssert([segue.destinationViewController conformsToProtocol:@protocol(UTMLegacyQemuConfigurationDelegate)], @"Invalid segue destination");
+        id<UTMLegacyQemuConfigurationDelegate> controller = (id<UTMLegacyQemuConfigurationDelegate>)segue.destinationViewController;
         controller.configuration = self.configuration;
     }
 }

+ 2 - 2
Platform/iOS/Legacy/VMConfigDrivePickerViewController.h

@@ -15,11 +15,11 @@
 //
 
 #import <UIKit/UIKit.h>
-#import "UTMQemuConfigurationDelegate.h"
+#import "UTMLegacyQemuConfigurationDelegate.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface VMConfigDrivePickerViewController : UITableViewController<UTMQemuConfigurationDelegate, UIDocumentPickerDelegate>
+@interface VMConfigDrivePickerViewController : UITableViewController<UTMLegacyQemuConfigurationDelegate, UIDocumentPickerDelegate>
 
 @property (nonatomic, strong) NSURL *imagesPath;
 @property (weak, nonatomic) IBOutlet UIBarButtonItem *addButtonItem;

+ 4 - 4
Platform/iOS/Legacy/VMConfigDrivePickerViewController.m

@@ -15,8 +15,8 @@
 //
 
 #import "VMConfigDrivePickerViewController.h"
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
 #import "VMConfigDriveCreateViewController.h"
 
 @interface VMConfigDrivePickerViewController ()
@@ -42,9 +42,9 @@
 
 - (void)refreshViewFromConfiguration {
     if (self.configuration.existingPath) {
-        self.imagesPath = [self.configuration.existingPath URLByAppendingPathComponent:[UTMQemuConfiguration diskImagesDirectory] isDirectory:YES];
+        self.imagesPath = [self.configuration.existingPath URLByAppendingPathComponent:[UTMLegacyQemuConfiguration diskImagesDirectory] isDirectory:YES];
     } else {
-        self.imagesPath = [[NSFileManager defaultManager].temporaryDirectory URLByAppendingPathComponent:[UTMQemuConfiguration diskImagesDirectory] isDirectory:YES];
+        self.imagesPath = [[NSFileManager defaultManager].temporaryDirectory URLByAppendingPathComponent:[UTMLegacyQemuConfiguration diskImagesDirectory] isDirectory:YES];
     }
 }
 

+ 2 - 2
Platform/iOS/Legacy/VMConfigDrivesViewController.h

@@ -15,11 +15,11 @@
 //
 
 #import <UIKit/UIKit.h>
-#import "UTMQemuConfigurationDelegate.h"
+#import "UTMLegacyQemuConfigurationDelegate.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface VMConfigDrivesViewController : UITableViewController<UTMQemuConfigurationDelegate>
+@interface VMConfigDrivesViewController : UITableViewController<UTMLegacyQemuConfigurationDelegate>
 
 @property (weak, nonatomic) IBOutlet UIBarButtonItem *addButtonItem;
 

+ 5 - 5
Platform/iOS/Legacy/VMConfigDrivesViewController.m

@@ -16,8 +16,8 @@
 
 #import "VMConfigDrivesViewController.h"
 #import "VMConfigDriveDetailViewController.h"
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
 
 @interface VMConfigDrivesViewController ()
 
@@ -63,7 +63,7 @@
         cell.textLabel.text = [self.configuration driveImagePathForIndex:indexPath.row];
     }
     UTMDiskImageType type = [self.configuration driveImageTypeForIndex:indexPath.row];
-    NSString *typeStr = [UTMQemuConfiguration supportedImageTypesPretty][type];
+    NSString *typeStr = [UTMLegacyQemuConfiguration supportedImageTypesPretty][type];
     NSString *interface = [self.configuration driveInterfaceTypeForIndex:indexPath.row];
     cell.detailTextLabel.text = [NSString stringWithFormat:@"%@ - %@", typeStr, interface];
     
@@ -132,9 +132,9 @@
 - (void)promptDelete:(NSString *)name {
     NSURL *path;
     if (self.configuration.existingPath) {
-        path = [self.configuration.existingPath URLByAppendingPathComponent:[UTMQemuConfiguration diskImagesDirectory] isDirectory:YES];
+        path = [self.configuration.existingPath URLByAppendingPathComponent:[UTMLegacyQemuConfiguration diskImagesDirectory] isDirectory:YES];
     } else {
-        path = [[NSFileManager defaultManager].temporaryDirectory URLByAppendingPathComponent:[UTMQemuConfiguration diskImagesDirectory] isDirectory:YES];
+        path = [[NSFileManager defaultManager].temporaryDirectory URLByAppendingPathComponent:[UTMLegacyQemuConfiguration diskImagesDirectory] isDirectory:YES];
     }
     UIAlertController *alert = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Delete Data", @"VMConfigDrivesViewController") message:NSLocalizedString(@"Do you want to also delete the disk image data? If yes, the data will be lost. Otherwise, you can create a new drive with the existing data.", @"VMConfigDrivesViewController") preferredStyle:UIAlertControllerStyleAlert];
     UIAlertAction *delete = [UIAlertAction actionWithTitle:NSLocalizedString(@"Yes", @"Yes button") style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action){

+ 4 - 4
Platform/iOS/Legacy/VMConfigExistingViewController.m

@@ -16,8 +16,8 @@
 
 #import "VMConfigExistingViewController.h"
 #import "UIViewController+Extensions.h"
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
 #import "VMConfigTextField.h"
 
 @interface VMConfigExistingViewController ()
@@ -68,13 +68,13 @@
 - (void)exportLog {
     NSURL *path;
     if (self.configuration.existingPath) {
-        path = [self.configuration.existingPath URLByAppendingPathComponent:[UTMQemuConfiguration debugLogName]];
+        path = [self.configuration.existingPath URLByAppendingPathComponent:[UTMLegacyQemuConfiguration debugLogName]];
     }
     if (![[NSFileManager defaultManager] fileExistsAtPath:path.path]) {
         [self showAlert:NSLocalizedString(@"No debug log found!", @"VMConfigExistingViewController") actions:nil completion:nil];
     } else {
         NSError *err;
-        NSURL *temp = [NSURL fileURLWithPathComponents:@[NSTemporaryDirectory(), [UTMQemuConfiguration debugLogName]]];
+        NSURL *temp = [NSURL fileURLWithPathComponents:@[NSTemporaryDirectory(), [UTMLegacyQemuConfiguration debugLogName]]];
         [[NSFileManager defaultManager] removeItemAtURL:temp error:nil];
         if ([[NSFileManager defaultManager] copyItemAtURL:path toURL:temp error:&err]) {
             UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[temp] applicationActivities:nil];

+ 1 - 1
Platform/iOS/Legacy/VMConfigInputViewController.m

@@ -15,7 +15,7 @@
 //
 
 #import "VMConfigInputViewController.h"
-#import "UTMQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration.h"
 
 @interface VMConfigInputViewController ()
 

+ 2 - 2
Platform/iOS/Legacy/VMConfigPortForwardingViewController.h

@@ -15,11 +15,11 @@
 //
 
 #import <UIKit/UIKit.h>
-#import "UTMQemuConfigurationDelegate.h"
+#import "UTMLegacyQemuConfigurationDelegate.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface VMConfigPortForwardingViewController : UITableViewController<UTMQemuConfigurationDelegate>
+@interface VMConfigPortForwardingViewController : UITableViewController<UTMLegacyQemuConfigurationDelegate>
 
 @property (weak, nonatomic) IBOutlet UIBarButtonItem *addButtonItem;
 

+ 6 - 6
Platform/iOS/Legacy/VMConfigPortForwardingViewController.m

@@ -15,8 +15,8 @@
 //
 
 #import "VMConfigPortForwardingViewController.h"
-#import "UTMQemuConfiguration+Networking.h"
-#import "UTMQemuConfigurationPortForward.h"
+#import "UTMLegacyQemuConfiguration+Networking.h"
+#import "UTMLegacyQemuConfigurationPortForward.h"
 
 @interface VMConfigPortForwardingViewController ()
 
@@ -54,7 +54,7 @@
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
     NSAssert(indexPath.section == 0, @"Invalid section");
     UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"portForwardCell" forIndexPath:indexPath];
-    UTMQemuConfigurationPortForward *portForward = [self.configuration portForwardForIndex:indexPath.row];
+    UTMLegacyQemuConfigurationPortForward *portForward = [self.configuration portForwardForIndex:indexPath.row];
     cell.textLabel.text = [NSString stringWithFormat:@"%@:%@ ➡️ %@:%@", portForward.hostAddress, portForward.hostPort, portForward.guestAddress, portForward.guestPort];
     cell.detailTextLabel.text = portForward.protocol;
     return cell;
@@ -71,7 +71,7 @@
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     NSAssert(indexPath.section == 0, @"Invalid section");
-    UTMQemuConfigurationPortForward *portForward = [self.configuration portForwardForIndex:indexPath.row];
+    UTMLegacyQemuConfigurationPortForward *portForward = [self.configuration portForwardForIndex:indexPath.row];
     if (portForward) {
         [self createPortForwardFormTCP:[portForward.protocol isEqualToString:@"tcp"]
                               existing:portForward
@@ -86,7 +86,7 @@
     [self createPortForwardFormTCP:tcp existing:nil atIndex:0];
 }
 
-- (void)createPortForwardFormTCP:(BOOL)tcp existing:(nullable UTMQemuConfigurationPortForward *)existing atIndex:(NSUInteger)index {
+- (void)createPortForwardFormTCP:(BOOL)tcp existing:(nullable UTMLegacyQemuConfigurationPortForward *)existing atIndex:(NSUInteger)index {
     UIAlertController *alertController = [UIAlertController alertControllerWithTitle:tcp ? NSLocalizedString(@"TCP Forward", @"VMConfigPortForwardingViewController") : NSLocalizedString(@"UDP Forward", @"VMConfigPortForwardingViewController")
                                                                              message:nil
                                                                       preferredStyle:UIAlertControllerStyleAlert];
@@ -116,7 +116,7 @@
     [alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"Done", @"VMConfigPortForwardingViewController")
                                                         style:UIAlertActionStyleDefault
                                                       handler:^(UIAlertAction * _Nonnull action) {
-        UTMQemuConfigurationPortForward *portForward = [[UTMQemuConfigurationPortForward alloc] init];
+        UTMLegacyQemuConfigurationPortForward *portForward = [[UTMLegacyQemuConfigurationPortForward alloc] init];
         portForward.protocol = tcp ? @"tcp" : @"udp";
         portForward.hostAddress = alertController.textFields[0].text;
         portForward.hostPort = @([alertController.textFields[1].text integerValue]);

+ 2 - 2
Platform/iOS/Legacy/VMConfigSharingViewController.m

@@ -17,8 +17,8 @@
 #import <MobileCoreServices/MobileCoreServices.h>
 #import "UIViewController+Extensions.h"
 #import "VMConfigSharingViewController.h"
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Sharing.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Sharing.h"
 #import "UTMLogging.h"
 #import "VMConfigSwitch.h"
 #import "VMConfigDirectoryPickerViewController.h"

+ 1 - 1
Platform/iOS/Legacy/VMConfigSoundViewController.m

@@ -15,7 +15,7 @@
 //
 
 #import "VMConfigSoundViewController.h"
-#import "UTMQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration.h"
 #import "VMConfigSwitch.h"
 
 @interface VMConfigSoundViewController ()

+ 3 - 3
Platform/iOS/Legacy/VMConfigSystemArgumentsViewController.h

@@ -15,18 +15,18 @@
 //
 
 #import <UIKit/UIKit.h>
-#import "UTMQemuConfigurationDelegate.h"
+#import "UTMLegacyQemuConfigurationDelegate.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface VMConfigSystemArgumentsViewController : UITableViewController<UTMQemuConfigurationDelegate>
+@interface VMConfigSystemArgumentsViewController : UITableViewController<UTMLegacyQemuConfigurationDelegate>
 
 @property (weak, nonatomic) IBOutlet UIBarButtonItem *addButtonItem;
 @property (strong, nonatomic) IBOutlet UITableView *argTableView;
 
 @end
 
-@interface VMConfigSystemArgumentsTextCell : UITableViewCell<UTMQemuConfigurationDelegate>
+@interface VMConfigSystemArgumentsTextCell : UITableViewCell<UTMLegacyQemuConfigurationDelegate>
 @property (weak, nonatomic) IBOutlet UITextField *argTextItem;
 
 @end

+ 1 - 1
Platform/iOS/Legacy/VMConfigSystemArgumentsViewController.m

@@ -16,7 +16,7 @@
 
 #import "VMConfigSystemArgumentsViewController.h"
 #import "VMConfigDriveDetailViewController.h"
-#import "UTMQemuConfiguration+System.h"
+#import "UTMLegacyQemuConfiguration+System.h"
 
 @interface VMConfigSystemArgumentsViewController ()
 

+ 7 - 7
Platform/iOS/Legacy/VMConfigSystemViewController.m

@@ -19,8 +19,8 @@
 #import <sys/sysctl.h>
 #import "UIViewController+Extensions.h"
 #import "VMConfigSystemViewController.h"
-#import "UTMQemuConfiguration+Constants.h"
-#import "UTMQemuConfiguration+System.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration+System.h"
 #import "UTMJailbreak.h"
 #import "UTMLogging.h"
 #import "VMConfigPickerView.h"
@@ -66,7 +66,7 @@ const float kMemoryWarningThreshold = 0.8;
 
 - (void)pickerCell:(VMConfigTogglePickerCell *)cell showPicker:(BOOL)visible animated:(BOOL)animated {
     if (visible && cell.picker == self.targetPicker) {
-        NSUInteger index = [[UTMQemuConfiguration supportedTargetsForArchitecture:self.configuration.systemArchitecture] indexOfObject:cell.detailTextLabel.text];
+        NSUInteger index = [[UTMLegacyQemuConfiguration supportedTargetsForArchitecture:self.configuration.systemArchitecture] indexOfObject:cell.detailTextLabel.text];
         if (index != NSNotFound) {
             [cell.picker selectRow:index inComponent:0 animated:NO];
         }
@@ -77,7 +77,7 @@ const float kMemoryWarningThreshold = 0.8;
 - (NSInteger)pickerView:(nonnull UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component {
     NSAssert(component == 0, @"Invalid component");
     if (pickerView == self.targetPicker) {
-        return [UTMQemuConfiguration supportedTargetsForArchitecture:self.configuration.systemArchitecture].count;
+        return [UTMLegacyQemuConfiguration supportedTargetsForArchitecture:self.configuration.systemArchitecture].count;
     } else {
         return [super pickerView:pickerView numberOfRowsInComponent:component];
     }
@@ -86,7 +86,7 @@ const float kMemoryWarningThreshold = 0.8;
 - (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component {
     NSAssert(component == 0, @"Invalid component");
     if (pickerView == self.targetPicker) {
-        return [UTMQemuConfiguration supportedTargetsForArchitecturePretty:self.configuration.systemArchitecture][row];
+        return [UTMLegacyQemuConfiguration supportedTargetsForArchitecturePretty:self.configuration.systemArchitecture][row];
     } else {
         return [super pickerView:pickerView titleForRow:row forComponent:component];
     }
@@ -99,7 +99,7 @@ const float kMemoryWarningThreshold = 0.8;
         [super pickerView:pickerView didSelectRow:row inComponent:component];
         // refresh system picker with default target
         if (![prev isEqualToString:self.configuration.systemArchitecture]) {
-            NSInteger index = [UTMQemuConfiguration defaultTargetIndexForArchitecture:self.configuration.systemArchitecture];
+            NSInteger index = [UTMLegacyQemuConfiguration defaultTargetIndexForArchitecture:self.configuration.systemArchitecture];
             [self.targetPicker reloadAllComponents];
             [self.targetPicker selectRow:index inComponent:0 animated:YES];
             [self pickerView:self.targetPicker didSelectRow:index inComponent:0];
@@ -107,7 +107,7 @@ const float kMemoryWarningThreshold = 0.8;
     } else if (pickerView == self.targetPicker) {
         NSAssert([pickerView isKindOfClass:[VMConfigPickerView class]], @"Invalid picker");
         VMConfigPickerView *vmPicker = (VMConfigPickerView *)pickerView;
-        NSString *selected = [UTMQemuConfiguration supportedTargetsForArchitecture:self.configuration.systemArchitecture][row];
+        NSString *selected = [UTMLegacyQemuConfiguration supportedTargetsForArchitecture:self.configuration.systemArchitecture][row];
         [self.configuration setValue:selected forKey:vmPicker.selectedOptionCell.configurationPath];
         vmPicker.selectedOptionCell.detailTextLabel.text = selected;
     } else {

+ 2 - 2
Platform/iOS/Legacy/VMConfigViewController.h

@@ -16,7 +16,7 @@
 
 #import <UIKit/UIKit.h>
 #import "StaticDataTableViewController.h"
-#import "UTMQemuConfigurationDelegate.h"
+#import "UTMLegacyQemuConfigurationDelegate.h"
 
 @class VMConfigTextField;
 @class VMConfigStepper;
@@ -25,7 +25,7 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface VMConfigViewController : StaticDataTableViewController<UTMQemuConfigurationDelegate, UITextFieldDelegate, UIPickerViewDelegate, UIPickerViewDataSource>
+@interface VMConfigViewController : StaticDataTableViewController<UTMLegacyQemuConfigurationDelegate, UITextFieldDelegate, UIPickerViewDelegate, UIPickerViewDataSource>
 
 @property (nonatomic, strong) IBOutletCollection(UIView) NSArray *configControls;
 @property (nonatomic, strong) IBOutletCollection(VMConfigTogglePickerCell) NSArray *configPickerToggles;

+ 8 - 8
Platform/iOS/Legacy/VMConfigViewController.m

@@ -21,8 +21,8 @@
 #import "VMConfigSwitch.h"
 #import "VMConfigTextField.h"
 #import "VMConfigTogglePickerCell.h"
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
 #import "UTMLogging.h"
 
 void *kVMConfigViewControllerContext = &kVMConfigViewControllerContext;
@@ -52,8 +52,8 @@ void *kVMConfigViewControllerContext = &kVMConfigViewControllerContext;
 #pragma mark - Navigation
 
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
-    if ([segue.destinationViewController conformsToProtocol:@protocol(UTMQemuConfigurationDelegate)]) {
-        id<UTMQemuConfigurationDelegate> dst = (id<UTMQemuConfigurationDelegate>)segue.destinationViewController;
+    if ([segue.destinationViewController conformsToProtocol:@protocol(UTMLegacyQemuConfigurationDelegate)]) {
+        id<UTMLegacyQemuConfigurationDelegate> dst = (id<UTMLegacyQemuConfigurationDelegate>)segue.destinationViewController;
         dst.configuration = self.configuration;
     }
 }
@@ -105,7 +105,7 @@ void *kVMConfigViewControllerContext = &kVMConfigViewControllerContext;
 
 - (void)pickerCell:(VMConfigTogglePickerCell *)cell showPicker:(BOOL)visible animated:(BOOL)animated {
     if (visible) {
-        NSUInteger index = [[UTMQemuConfiguration supportedOptions:cell.picker.supportedOptionsPath pretty:NO] indexOfObject:cell.detailTextLabel.text];
+        NSUInteger index = [[UTMLegacyQemuConfiguration supportedOptions:cell.picker.supportedOptionsPath pretty:NO] indexOfObject:cell.detailTextLabel.text];
         if (index != NSNotFound) {
             [cell.picker selectRow:index inComponent:0 animated:NO];
         }
@@ -133,21 +133,21 @@ void *kVMConfigViewControllerContext = &kVMConfigViewControllerContext;
     NSAssert(component == 0, @"Invalid component");
     NSAssert([pickerView isKindOfClass:[VMConfigPickerView class]], @"Invalid picker");
     VMConfigPickerView *vmPicker = (VMConfigPickerView *)pickerView;
-    return [UTMQemuConfiguration supportedOptions:vmPicker.supportedOptionsPath pretty:NO].count;
+    return [UTMLegacyQemuConfiguration supportedOptions:vmPicker.supportedOptionsPath pretty:NO].count;
 }
 
 - (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component {
     NSAssert(component == 0, @"Invalid component");
     NSAssert([pickerView isKindOfClass:[VMConfigPickerView class]], @"Invalid picker");
     VMConfigPickerView *vmPicker = (VMConfigPickerView *)pickerView;
-    return [UTMQemuConfiguration supportedOptions:vmPicker.supportedOptionsPath pretty:YES][row];
+    return [UTMLegacyQemuConfiguration supportedOptions:vmPicker.supportedOptionsPath pretty:YES][row];
 }
 
 - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component {
     NSAssert(component == 0, @"Invalid component");
     NSAssert([pickerView isKindOfClass:[VMConfigPickerView class]], @"Invalid picker");
     VMConfigPickerView *vmPicker = (VMConfigPickerView *)pickerView;
-    NSString *selected = [UTMQemuConfiguration supportedOptions:vmPicker.supportedOptionsPath pretty:NO][row];
+    NSString *selected = [UTMLegacyQemuConfiguration supportedOptions:vmPicker.supportedOptionsPath pretty:NO][row];
     [self.configuration setValue:selected forKey:vmPicker.selectedOptionCell.configurationPath];
     vmPicker.selectedOptionCell.detailTextLabel.text = selected;
 }

+ 9 - 9
Platform/iOS/Legacy/VMListViewController.m

@@ -17,8 +17,8 @@
 #import "VMListViewController.h"
 #import "AppDelegate.h"
 #import "VMListViewCell.h"
-#import "UTMQemuConfigurationDelegate.h"
-#import "UTMQemuConfiguration.h"
+#import "UTMLegacyQemuConfigurationDelegate.h"
+#import "UTMLegacyQemuConfiguration.h"
 #import "UTMQemuVirtualMachine.h"
 #import "UIViewController+Extensions.h"
 #import "VMDisplayMetalViewController.h"
@@ -250,8 +250,8 @@
     if ([segue.identifier isEqualToString:@"editVMConfig"]){
         NSAssert([segue.destinationViewController isKindOfClass:[UINavigationController class]], @"Destination not a navigation view");
         UINavigationController *navController = (UINavigationController *)segue.destinationViewController;
-        NSAssert([navController.topViewController conformsToProtocol:@protocol(UTMQemuConfigurationDelegate)], @"Invalid segue destination");
-        id<UTMQemuConfigurationDelegate> controller = (id<UTMQemuConfigurationDelegate>)navController.topViewController;
+        NSAssert([navController.topViewController conformsToProtocol:@protocol(UTMLegacyQemuConfigurationDelegate)], @"Invalid segue destination");
+        id<UTMLegacyQemuConfigurationDelegate> controller = (id<UTMLegacyQemuConfigurationDelegate>)navController.topViewController;
         NSAssert([sender isKindOfClass:[UIButton class]], @"Sender is not a UIButton");
         id cell = ((UIButton *)sender).superview.superview;
         self.modifyingVM = [self vmForCell:cell];
@@ -259,9 +259,9 @@
     } else if ([segue.identifier isEqualToString:@"newVM"]) {
         NSAssert([segue.destinationViewController isKindOfClass:[UINavigationController class]], @"Destination not a navigation view");
         UINavigationController *navController = (UINavigationController *)segue.destinationViewController;
-        NSAssert([navController.topViewController conformsToProtocol:@protocol(UTMQemuConfigurationDelegate)], @"Invalid segue destination");
-        id<UTMQemuConfigurationDelegate> controller = (id<UTMQemuConfigurationDelegate>)navController.topViewController;
-        controller.configuration = [[UTMQemuConfiguration alloc] init];
+        NSAssert([navController.topViewController conformsToProtocol:@protocol(UTMLegacyQemuConfigurationDelegate)], @"Invalid segue destination");
+        id<UTMLegacyQemuConfigurationDelegate> controller = (id<UTMLegacyQemuConfigurationDelegate>)navController.topViewController;
+        controller.configuration = [[UTMLegacyQemuConfiguration alloc] init];
         controller.configuration.name = [self createNewDefaultName];
     } else if ([segue.identifier isEqualToString:@"startVM"]) {
         NSAssert([segue.destinationViewController isKindOfClass:[VMDisplayMetalViewController class]], @"Destination not a metal view");
@@ -403,8 +403,8 @@
 #pragma mark - Actions
 
 - (IBAction)unwindToMainFromConfiguration:(UIStoryboardSegue*)sender {
-    NSAssert([sender.sourceViewController conformsToProtocol:@protocol(UTMQemuConfigurationDelegate)], @"Invalid source for unwind");
-    id<UTMQemuConfigurationDelegate> source = (id<UTMQemuConfigurationDelegate>)sender.sourceViewController;
+    NSAssert([sender.sourceViewController conformsToProtocol:@protocol(UTMLegacyQemuConfigurationDelegate)], @"Invalid source for unwind");
+    id<UTMLegacyQemuConfigurationDelegate> source = (id<UTMLegacyQemuConfigurationDelegate>)sender.sourceViewController;
     dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{
         [self workStartedWhenVisible:[NSString stringWithFormat:NSLocalizedString(@"Saving %@...", @"Save VM overlay"), source.configuration.name]];
         UTMQemuVirtualMachine *vm;

+ 2 - 2
Platform/iOS/VMConfigDrivesView.swift

@@ -20,7 +20,7 @@ import SwiftUI
 
 @available(iOS 14, *)
 struct VMConfigDrivesView: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     @State private var createDriveVisible: Bool = false
     @State private var attemptDelete: IndexSet?
     @State private var importDrivePresented: Bool = false
@@ -180,7 +180,7 @@ private struct CreateDrive: View {
 
 @available(iOS 14, *)
 struct VMConfigDrivesView_Previews: PreviewProvider {
-    @ObservedObject static private var config = UTMQemuConfiguration()
+    @ObservedObject static private var config = UTMLegacyQemuConfiguration()
     
     static var previews: some View {
         Group {

+ 8 - 8
Platform/iOS/VMConfigNetworkPortForwardView.swift

@@ -18,7 +18,7 @@ import SwiftUI
 
 @available(iOS 14, *)
 struct VMConfigNetworkPortForwardView: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     
     var body: some View {
         Section(header: Text("Port Forward")) {
@@ -52,19 +52,19 @@ struct VMConfigNetworkPortForwardView: View {
 
 @available(iOS 14, *)
 struct PortForwardEdit: View {
-    @StateObject private var configPort: UTMQemuConfigurationPortForward
+    @StateObject private var configPort: UTMLegacyQemuConfigurationPortForward
     private let save: () -> Void
     private let delete: (() -> Void)?
     @Environment(\.presentationMode) private var presentationMode: Binding<PresentationMode>
     
-    init(config: UTMQemuConfiguration, index: Int? = nil) {
-        var configPort: UTMQemuConfigurationPortForward
+    init(config: UTMLegacyQemuConfiguration, index: Int? = nil) {
+        var configPort: UTMLegacyQemuConfigurationPortForward
         if let i = index {
             configPort = config.portForward(for: i)!
         } else {
-            configPort = UTMQemuConfigurationPortForward()
+            configPort = UTMLegacyQemuConfigurationPortForward()
         }
-        self._configPort = StateObject<UTMQemuConfigurationPortForward>(wrappedValue: configPort)
+        self._configPort = StateObject<UTMLegacyQemuConfigurationPortForward>(wrappedValue: configPort)
         save = {
             config.updatePortForward(at: index ?? config.countPortForwards, withValue: configPort)
         }
@@ -105,14 +105,14 @@ struct PortForwardEdit: View {
 
 @available(iOS 14, *)
 struct VMConfigNetworkPortForwardView_Previews: PreviewProvider {
-    @State static private var config = UTMQemuConfiguration()
+    @State static private var config = UTMLegacyQemuConfiguration()
     static var previews: some View {
         Group {
             Form {
                 VMConfigNetworkPortForwardView(config: config)
             }.onAppear {
                 if config.countPortForwards == 0 {
-                    let newConfigPort = UTMQemuConfigurationPortForward()
+                    let newConfigPort = UTMLegacyQemuConfigurationPortForward()
                     newConfigPort.protocol = "tcp"
                     newConfigPort.guestAddress = "1.2.3.4"
                     newConfigPort.guestPort = NSNumber(value: 1234)

+ 2 - 2
Platform/iOS/VMSettingsView.swift

@@ -19,7 +19,7 @@ import SwiftUI
 @available(iOS 14, *)
 struct VMSettingsView: View {
     let vm: UTMVirtualMachine?
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     
     @EnvironmentObject private var data: UTMData
     @Environment(\.presentationMode) private var presentationMode: Binding<PresentationMode>
@@ -143,7 +143,7 @@ extension LabelStyle where Self == RoundRectIconLabelStyle {
 
 @available(iOS 14, *)
 struct VMSettingsView_Previews: PreviewProvider {
-    @State static private var config = UTMQemuConfiguration()
+    @State static private var config = UTMLegacyQemuConfiguration()
     
     static var previews: some View {
         VMSettingsView(vm: nil, config: config)

+ 9 - 9
Platform/ko.lproj/Localizable.strings

@@ -49,7 +49,7 @@
 /* No comment provided by engineer. */
 "Argument" = "구문";
 
-/* UTMQemuConfiguration */
+/* UTMLegacyQemuConfiguration */
 "BIOS" = "BIOS";
 
 /* No comment provided by engineer. */
@@ -82,7 +82,7 @@
 /* Configuration boot device */
 "CD/DVD" = "CD/DVD";
 
-/* UTMQemuConfiguration */
+/* UTMLegacyQemuConfiguration */
 "CD/DVD Image" = "CD/DVD";
 
 /* VMRemovableDrivesViewController */
@@ -159,7 +159,7 @@
 /* VMConfigDriveCreateViewController */
 "Disk creation failed." = "디스크 생성에 실패했습니다.";
 
-/* UTMQemuConfiguration */
+/* UTMLegacyQemuConfiguration */
 "Disk Image" = "Hard Drive";
 
 /* No comment provided by engineer. */
@@ -379,16 +379,16 @@
 /* No comment provided by engineer. */
 "Legacy (PS/2) Mode" = "레거시 (PS/2) 모드";
 
-/* UTMQemuConfiguration */
+/* UTMLegacyQemuConfiguration */
 "Linear" = "선형 보간법";
 
-/* UTMQemuConfiguration */
+/* UTMLegacyQemuConfiguration */
 "Linux Device Tree Binary" = "Linux Device Tree Binary";
 
-/* UTMQemuConfiguration */
+/* UTMLegacyQemuConfiguration */
 "Linux Kernel" = "Linux Kernel";
 
-/* UTMQemuConfiguration */
+/* UTMLegacyQemuConfiguration */
 "Linux RAM Disk" = "Linux RAM Disk";
 
 /* No comment provided by engineer. */
@@ -418,7 +418,7 @@
 /* VMConfigInfoView */
 "Name is an invalid filename." = "잘못된 파일이름입니다.";
 
-/* UTMQemuConfiguration */
+/* UTMLegacyQemuConfiguration */
 "Nearest Neighbor" = "최근접 이웃 보간법";
 
 /* No comment provided by engineer. */
@@ -622,7 +622,7 @@
 /* VMConfigPortForwardingViewController */
 "UDP Forward" = "UDP Forward";
 
-/* UTMQemuConfigurationExtension */
+/* UTMLegacyQemuConfigurationExtension */
 "Unknown" = "Unknown";
 
 /* No comment provided by engineer. */

+ 2 - 2
Platform/macOS/Display/VMDisplayQemuDisplayController.swift

@@ -24,8 +24,8 @@ class VMDisplayQemuWindowController: VMDisplayWindowController {
         vm as? UTMQemuVirtualMachine
     }
     
-    var vmQemuConfig: UTMQemuConfiguration! {
-        vm?.config as? UTMQemuConfiguration
+    var vmQemuConfig: UTMLegacyQemuConfiguration! {
+        vm?.config as? UTMLegacyQemuConfiguration
     }
     
     var defaultSubtitle: String {

+ 8 - 8
Platform/macOS/VMConfigDrivesButtons.swift

@@ -35,7 +35,7 @@ struct VMConfigNewDriveButton<Config: ObservableObject & UTMConfigurable>: View
         .fileImporter(isPresented: $importDrivePresented, allowedContentTypes: [.item], onCompletion: importDrive)
         .onChange(of: newDrivePopover, perform: { showPopover in
             if showPopover {
-                if let qemuConfig = config as? UTMQemuConfiguration {
+                if let qemuConfig = config as? UTMLegacyQemuConfiguration {
                     newQemuDrive.reset(forSystemTarget: qemuConfig.systemTarget, architecture: qemuConfig.systemArchitecture, removable: false)
                 } else if let _ = config as? UTMAppleConfiguration {
                     newAppleDriveSize = 10240
@@ -44,7 +44,7 @@ struct VMConfigNewDriveButton<Config: ObservableObject & UTMConfigurable>: View
         })
         .popover(isPresented: $newDrivePopover, arrowEdge: .top) {
             VStack {
-                if let qemuConfig = config as? UTMQemuConfiguration {
+                if let qemuConfig = config as? UTMLegacyQemuConfiguration {
                     VMConfigDriveCreateView(target: qemuConfig.systemTarget, architecture: qemuConfig.systemArchitecture, driveImage: newQemuDrive)
                 } else if let _ = config as? UTMAppleConfiguration {
                     VMConfigAppleDriveCreateView(driveSize: $newAppleDriveSize)
@@ -52,7 +52,7 @@ struct VMConfigNewDriveButton<Config: ObservableObject & UTMConfigurable>: View
                 HStack {
                     Spacer()
                     Button(action: { importDrivePresented.toggle() }, label: {
-                        if let _ = config as? UTMQemuConfiguration {
+                        if let _ = config as? UTMLegacyQemuConfiguration {
                             if newQemuDrive.removable {
                                 Text("Browse…")
                             } else {
@@ -74,7 +74,7 @@ struct VMConfigNewDriveButton<Config: ObservableObject & UTMConfigurable>: View
         data.busyWorkAsync {
             switch result {
             case .success(let url):
-                if let qemuConfig = await config as? UTMQemuConfiguration {
+                if let qemuConfig = await config as? UTMLegacyQemuConfiguration {
                     if await newQemuDrive.removable {
                         try await data.createDrive(newQemuDrive, for: qemuConfig, with: url)
                     } else {
@@ -102,7 +102,7 @@ struct VMConfigNewDriveButton<Config: ObservableObject & UTMConfigurable>: View
     private func addNewDrive(_ newDrive: VMDriveImage) {
         newDrivePopover = false // hide popover
         data.busyWorkAsync {
-            if let qemuConfig = await config as? UTMQemuConfiguration {
+            if let qemuConfig = await config as? UTMLegacyQemuConfiguration {
                 try await data.createDrive(newDrive, for: qemuConfig)
             } else if let appleConfig = await config as? UTMAppleConfiguration {
                 let image = await DiskImage(newSize: newAppleDriveSize)
@@ -125,7 +125,7 @@ struct VMConfigDrivesButtons<Config: ObservableObject & UTMConfigurable>: View {
     @State private var importDrivePresented: Bool = false
     
     var countDrives: Int {
-        if let qemuConfig = config as? UTMQemuConfiguration {
+        if let qemuConfig = config as? UTMLegacyQemuConfiguration {
             return qemuConfig.countDrives
         } else if let appleConfig = config as? UTMAppleConfiguration {
             return appleConfig.diskImages.count
@@ -172,7 +172,7 @@ struct VMConfigDrivesButtons<Config: ObservableObject & UTMConfigurable>: View {
     
     func moveDriveUp(fromIndex index: Int) {
         withAnimation {
-            if let qemuConfig = config as? UTMQemuConfiguration {
+            if let qemuConfig = config as? UTMLegacyQemuConfiguration {
                 qemuConfig.moveDrive(index, to: index - 1)
             } else if let appleConfig = config as? UTMAppleConfiguration {
                 appleConfig.diskImages.move(fromOffsets: IndexSet(integer: index), toOffset: index - 1)
@@ -183,7 +183,7 @@ struct VMConfigDrivesButtons<Config: ObservableObject & UTMConfigurable>: View {
     
     func moveDriveDown(fromIndex index: Int) {
         withAnimation {
-            if let qemuConfig = config as? UTMQemuConfiguration {
+            if let qemuConfig = config as? UTMLegacyQemuConfiguration {
                 qemuConfig.moveDrive(index, to: index + 1)
             } else if let appleConfig = config as? UTMAppleConfiguration {
                 appleConfig.diskImages.move(fromOffsets: IndexSet(integer: index), toOffset: index + 2)

+ 10 - 10
Platform/macOS/VMConfigNetworkPortForwardView.swift

@@ -18,8 +18,8 @@ import SwiftUI
 
 @available(macOS 11, *)
 struct VMConfigNetworkPortForwardView: View {
-    @ObservedObject var config: UTMQemuConfiguration
-    @StateObject private var newConfigPort = UTMQemuConfigurationPortForward()
+    @ObservedObject var config: UTMLegacyQemuConfiguration
+    @StateObject private var newConfigPort = UTMLegacyQemuConfigurationPortForward()
     @State private var editingNewPort = false
     @State private var selectedIndex = 0
     
@@ -62,19 +62,19 @@ struct VMConfigNetworkPortForwardView: View {
 
 @available(macOS 11, *)
 struct PortForwardEdit: View {
-    @StateObject private var configPort: UTMQemuConfigurationPortForward
+    @StateObject private var configPort: UTMLegacyQemuConfigurationPortForward
     private let save: () -> Void
     private let delete: (() -> Void)?
     @Environment(\.presentationMode) var presentationMode: Binding<PresentationMode>
     
-    init(config: UTMQemuConfiguration, index: Int? = nil) {
-        var configPort: UTMQemuConfigurationPortForward
+    init(config: UTMLegacyQemuConfiguration, index: Int? = nil) {
+        var configPort: UTMLegacyQemuConfigurationPortForward
         if let i = index {
             configPort = config.portForward(for: i)!
         } else {
-            configPort = UTMQemuConfigurationPortForward()
+            configPort = UTMLegacyQemuConfigurationPortForward()
         }
-        self._configPort = StateObject<UTMQemuConfigurationPortForward>(wrappedValue: configPort)
+        self._configPort = StateObject<UTMLegacyQemuConfigurationPortForward>(wrappedValue: configPort)
         save = {
             config.updatePortForward(at: index ?? config.countPortForwards, withValue: configPort)
         }
@@ -112,8 +112,8 @@ struct PortForwardEdit: View {
 
 @available(macOS 11, *)
 struct VMConfigNetworkPortForwardView_Previews: PreviewProvider {
-    @State static private var config = UTMQemuConfiguration()
-    @State static private var configPort = UTMQemuConfigurationPortForward()
+    @State static private var config = UTMLegacyQemuConfiguration()
+    @State static private var configPort = UTMLegacyQemuConfigurationPortForward()
     
     static var previews: some View {
         Group {
@@ -121,7 +121,7 @@ struct VMConfigNetworkPortForwardView_Previews: PreviewProvider {
                 VMConfigNetworkPortForwardView(config: config)
             }.onAppear {
                 if config.countPortForwards == 0 {
-                    let newConfigPort = UTMQemuConfigurationPortForward()
+                    let newConfigPort = UTMLegacyQemuConfigurationPortForward()
                     newConfigPort.protocol = "tcp"
                     newConfigPort.guestAddress = "1.2.3.4"
                     newConfigPort.guestPort = NSNumber(value: 1234)

+ 2 - 2
Platform/macOS/VMQEMUSettingsView.swift

@@ -18,7 +18,7 @@ import SwiftUI
 
 struct VMQEMUSettingsView: View {
     let vm: UTMVirtualMachine?
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     @Binding var selectedDriveIndex: Int?
     @EnvironmentObject private var data: UTMData
 
@@ -93,7 +93,7 @@ struct VMQEMUSettingsView: View {
 }
 
 struct VMQEMUSettingsView_Previews: PreviewProvider {
-    @State static private var config = UTMQemuConfiguration()
+    @State static private var config = UTMLegacyQemuConfiguration()
     
     static var previews: some View {
         VMQEMUSettingsView(vm: nil, config: config, selectedDriveIndex: .constant(0))

+ 2 - 2
Platform/macOS/VMSettingsView.swift

@@ -29,7 +29,7 @@ struct VMSettingsView<Config: ObservableObject & UTMConfigurable>: View {
     var body: some View {
         NavigationView {
             List {
-                if let qemuConfig = config as? UTMQemuConfiguration {
+                if let qemuConfig = config as? UTMLegacyQemuConfiguration {
                     VMQEMUSettingsView(vm: vm, config: qemuConfig, selectedDriveIndex: $selectedDriveIndex)
                 } else if let appleConfig = config as? UTMAppleConfiguration {
                     VMAppleSettingsView(vm: vm, config: appleConfig, selectedDriveIndex: $selectedDriveIndex)
@@ -92,7 +92,7 @@ extension View {
 
 @available(macOS 11, *)
 struct VMSettingsView_Previews: PreviewProvider {
-    @State static private var config = UTMQemuConfiguration()
+    @State static private var config = UTMLegacyQemuConfiguration()
     
     static var previews: some View {
         VMSettingsView(vm: nil, config: config)

+ 6 - 6
Platform/zh-Hans.lproj/Localizable.strings

@@ -64,7 +64,7 @@
 /* No comment provided by engineer. */
 "Argument" = "Argument";
 
-/* UTMQemuConfiguration */
+/* UTMLegacyQemuConfiguration */
 "BIOS" = "BIOS";
 
 /* No comment provided by engineer. */
@@ -180,7 +180,7 @@
    VMConfigDriveCreateViewController */
 "Disk creation failed." = "磁盘镜像创建失败";
 
-/* UTMQemuConfiguration */
+/* UTMLegacyQemuConfiguration */
 "Disk Image" = "磁盘镜像";
 
 /* VMDisplayMetalWindowController */
@@ -433,13 +433,13 @@
 /* UTMConfiguration */
 "Linear" = "线性";
 
-/* UTMQemuConfiguration */
+/* UTMLegacyQemuConfiguration */
 "Linux Device Tree Binary" = "Linux设备树二进制文件";
 
-/* UTMQemuConfiguration */
+/* UTMLegacyQemuConfiguration */
 "Linux Kernel" = "Linux内核";
 
-/* UTMQemuConfiguration */
+/* UTMLegacyQemuConfiguration */
 "Linux RAM Disk" = "Linux RAM 磁盘";
 
 /* No comment provided by engineer. */
@@ -472,7 +472,7 @@
 /* VMConfigInfoView */
 "Name is an invalid filename." = "名称是无效的文件名";
 
-/* UTMQemuConfiguration */
+/* UTMLegacyQemuConfiguration */
 "Nearest Neighbor" = "近邻取样";
 
 /* No comment provided by engineer. */

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác