Jelajahi Sumber

config: rename UTMQemuConfiguration -> UTMLegacyQemuConfiguration

osy 3 tahun lalu
induk
melakukan
bdb5cb4ebb
100 mengubah file dengan 530 tambahan dan 411 penghapusan
  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.
 // limitations under the License.
 //
 //
 
 
-#import "UTMQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration.h"
 
 
 NS_ASSUME_NONNULL_BEGIN
 NS_ASSUME_NONNULL_BEGIN
 
 
-@interface UTMQemuConfiguration (Constants)
+@interface UTMLegacyQemuConfiguration (Constants)
 
 
 @property (class, nonatomic, readonly) NSString *diskImagesDirectory;
 @property (class, nonatomic, readonly) NSString *diskImagesDirectory;
 @property (class, nonatomic, readonly) NSString *debugLogName;
 @property (class, nonatomic, readonly) NSString *debugLogName;
@@ -42,7 +42,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 
 @end
 @end
 
 
-@interface UTMQemuConfiguration (ConstantsGenerated)
+@interface UTMLegacyQemuConfiguration (ConstantsGenerated)
 
 
 + (NSArray<NSString *>*)supportedArchitectures;
 + (NSArray<NSString *>*)supportedArchitectures;
 + (NSArray<NSString *>*)supportedArchitecturesPretty;
 + (NSArray<NSString *>*)supportedArchitecturesPretty;

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

@@ -20,9 +20,9 @@
 #else
 #else
 #import <AppKit/AppKit.h>
 #import <AppKit/AppKit.h>
 #endif
 #endif
-#import "UTMQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
 
 
-@implementation UTMQemuConfiguration (Constants)
+@implementation UTMLegacyQemuConfiguration (Constants)
 
 
 + (NSString *)diskImagesDirectory {
 + (NSString *)diskImagesDirectory {
     return @"Images";
     return @"Images";
@@ -109,13 +109,13 @@
 
 
 + (NSArray<NSString *>*)supportedImageTypesPretty {
 + (NSArray<NSString *>*)supportedImageTypesPretty {
     return @[
     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 {
 + (NSArray<NSString *>*)supportedScalersPretty {
     return @[
     return @[
-        NSLocalizedString(@"Linear", "UTMQemuConfiguration"),
-        NSLocalizedString(@"Nearest Neighbor", "UTMQemuConfiguration"),
+        NSLocalizedString(@"Linear", "UTMLegacyQemuConfiguration"),
+        NSLocalizedString(@"Nearest Neighbor", "UTMLegacyQemuConfiguration"),
     ];
     ];
 }
 }
 
 
@@ -219,19 +219,19 @@
     static NSMutableArray<NSString *> *fonts;
     static NSMutableArray<NSString *> *fonts;
     if (!fonts) {
     if (!fonts) {
         fonts = [NSMutableArray new];
         fonts = [NSMutableArray new];
-        for (NSString *fontName in [UTMQemuConfiguration supportedConsoleFonts]) {
+        for (NSString *fontName in [UTMLegacyQemuConfiguration supportedConsoleFonts]) {
             UIFont *font = [UIFont fontWithName:fontName size:1];
             UIFont *font = [UIFont fontWithName:fontName size:1];
             UIFontDescriptorSymbolicTraits traits = font.fontDescriptor.symbolicTraits;
             UIFontDescriptorSymbolicTraits traits = font.fontDescriptor.symbolicTraits;
             NSString *description;
             NSString *description;
             if ((traits & (UIFontDescriptorTraitItalic | UIFontDescriptorTraitBold)) ==
             if ((traits & (UIFontDescriptorTraitItalic | UIFontDescriptorTraitBold)) ==
                 (UIFontDescriptorTraitItalic | UIFontDescriptorTraitBold)) {
                 (UIFontDescriptorTraitItalic | UIFontDescriptorTraitBold)) {
-                description = NSLocalizedString(@"Italic, Bold", @"UTMQemuConfiguration+Constants");
+                description = NSLocalizedString(@"Italic, Bold", @"UTMLegacyQemuConfiguration+Constants");
             } else if ((traits & UIFontDescriptorTraitItalic) != 0) {
             } else if ((traits & UIFontDescriptorTraitItalic) != 0) {
-                description = NSLocalizedString(@"Italic", @"UTMQemuConfiguration+Constants");
+                description = NSLocalizedString(@"Italic", @"UTMLegacyQemuConfiguration+Constants");
             } else if ((traits & UIFontDescriptorTraitBold) != 0) {
             } else if ((traits & UIFontDescriptorTraitBold) != 0) {
-                description = NSLocalizedString(@"Bold", @"UTMQemuConfiguration+Constants");
+                description = NSLocalizedString(@"Bold", @"UTMLegacyQemuConfiguration+Constants");
             } else {
             } else {
-                description = NSLocalizedString(@"Regular", @"UTMQemuConfiguration+Constants");
+                description = NSLocalizedString(@"Regular", @"UTMLegacyQemuConfiguration+Constants");
             }
             }
             NSString *label = [NSString stringWithFormat:@"%@ (%@)", font.familyName, description];
             NSString *label = [NSString stringWithFormat:@"%@ (%@)", font.familyName, description];
             [fonts addObject:label];
             [fonts addObject:label];
@@ -255,7 +255,7 @@
     static NSMutableArray<NSString *> *fonts;
     static NSMutableArray<NSString *> *fonts;
     if (!fonts) {
     if (!fonts) {
         fonts = [NSMutableArray new];
         fonts = [NSMutableArray new];
-        for (NSString *fontName in [UTMQemuConfiguration supportedConsoleFonts]) {
+        for (NSString *fontName in [UTMLegacyQemuConfiguration supportedConsoleFonts]) {
             NSFont *font = [NSFont fontWithName:fontName size:1];
             NSFont *font = [NSFont fontWithName:fontName size:1];
             [fonts addObject:font.displayName];
             [fonts addObject:font.displayName];
         }
         }
@@ -276,11 +276,11 @@
 
 
 + (NSArray<NSString *> *)supportedNetworkModesPretty {
 + (NSArray<NSString *> *)supportedNetworkModesPretty {
     return @[
     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 !!
 // !! 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 {
 + (NSArray<NSString *>*)supportedArchitectures {
     return @[
     return @[

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

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

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

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

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

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

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

@@ -14,8 +14,8 @@
 // limitations under the License.
 // limitations under the License.
 //
 //
 
 
-#import "UTMQemuConfiguration+Constants.h"
-#import "UTMQemuConfiguration+Drives.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration+Drives.h"
 #import "UTM-Swift.h"
 #import "UTM-Swift.h"
 
 
 extern const NSString *const kUTMConfigDrivesKey;
 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 kUTMConfigRemovableKey = @"Removable";
 static const NSString *const kUTMConfigCdromKey = @"Cdrom";
 static const NSString *const kUTMConfigCdromKey = @"Cdrom";
 
 
-@interface UTMQemuConfiguration ()
+@interface UTMLegacyQemuConfiguration ()
 
 
 @property (nonatomic, readonly) NSMutableDictionary *rootDict;
 @property (nonatomic, readonly) NSMutableDictionary *rootDict;
 
 
 @end
 @end
 
 
-@implementation UTMQemuConfiguration (Drives)
+@implementation UTMLegacyQemuConfiguration (Drives)
 
 
 #pragma mark - Images Path
 #pragma mark - Images Path
 
 
 - (NSURL *)imagesPath {
 - (NSURL *)imagesPath {
     if (self.existingPath) {
     if (self.existingPath) {
-        return [self.existingPath URLByAppendingPathComponent:[UTMQemuConfiguration diskImagesDirectory] isDirectory:YES];
+        return [self.existingPath URLByAppendingPathComponent:[UTMLegacyQemuConfiguration diskImagesDirectory] isDirectory:YES];
     } else {
     } 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)newDrive:(NSString *)name path:(NSString *)path type:(UTMDiskImageType)type interface:(NSString *)interface {
     NSInteger index = [self countDrives];
     NSInteger index = [self countDrives];
-    NSString *strType = [UTMQemuConfiguration supportedImageTypes][type];
+    NSString *strType = [UTMLegacyQemuConfiguration supportedImageTypes][type];
     NSMutableDictionary *drive = [[NSMutableDictionary alloc] initWithDictionary:@{
     NSMutableDictionary *drive = [[NSMutableDictionary alloc] initWithDictionary:@{
         kUTMConfigDriveNameKey: name,
         kUTMConfigDriveNameKey: name,
         kUTMConfigImagePathKey: path,
         kUTMConfigImagePathKey: path,
@@ -146,7 +146,7 @@ static BOOL ValidQemuIdentifier(NSString *name) {
 
 
 - (NSInteger)newRemovableDrive:(NSString *)name type:(UTMDiskImageType)type interface:(NSString *)interface {
 - (NSInteger)newRemovableDrive:(NSString *)name type:(UTMDiskImageType)type interface:(NSString *)interface {
     NSInteger index = [self countDrives];
     NSInteger index = [self countDrives];
-    NSString *strType = [UTMQemuConfiguration supportedImageTypes][type];
+    NSString *strType = [UTMLegacyQemuConfiguration supportedImageTypes][type];
     NSMutableDictionary *drive = [[NSMutableDictionary alloc] initWithDictionary:@{
     NSMutableDictionary *drive = [[NSMutableDictionary alloc] initWithDictionary:@{
         kUTMConfigDriveNameKey: name,
         kUTMConfigDriveNameKey: name,
         kUTMConfigRemovableKey: @(YES),
         kUTMConfigRemovableKey: @(YES),
@@ -202,7 +202,7 @@ static BOOL ValidQemuIdentifier(NSString *name) {
         return UTMDiskImageTypeDisk;
         return UTMDiskImageTypeDisk;
     }
     }
     NSString *strType = self.rootDict[kUTMConfigDrivesKey][index][kUTMConfigImageTypeKey];
     NSString *strType = self.rootDict[kUTMConfigDrivesKey][index][kUTMConfigImageTypeKey];
-    NSInteger type = [[UTMQemuConfiguration supportedImageTypes] indexOfObject:strType];
+    NSInteger type = [[UTMLegacyQemuConfiguration supportedImageTypes] indexOfObject:strType];
     if (type == NSNotFound || type >= UTMDiskImageTypeMax) {
     if (type == NSNotFound || type >= UTMDiskImageTypeMax) {
         return UTMDiskImageTypeDisk;
         return UTMDiskImageTypeDisk;
     } else {
     } else {
@@ -211,7 +211,7 @@ static BOOL ValidQemuIdentifier(NSString *name) {
 }
 }
 
 
 - (void)setDriveImageType:(UTMDiskImageType)type forIndex:(NSInteger)index {
 - (void)setDriveImageType:(UTMDiskImageType)type forIndex:(NSInteger)index {
-    NSString *strType = [UTMQemuConfiguration supportedImageTypes][type];
+    NSString *strType = [UTMLegacyQemuConfiguration supportedImageTypes][type];
     [self propertyWillChange];
     [self propertyWillChange];
     self.rootDict[kUTMConfigDrivesKey][index][kUTMConfigImageTypeKey] = strType;
     self.rootDict[kUTMConfigDrivesKey][index][kUTMConfigImageTypeKey] = strType;
 }
 }
@@ -245,8 +245,8 @@ static BOOL ValidQemuIdentifier(NSString *name) {
 }
 }
 
 
 - (NSString *)driveLabelForIndex:(NSInteger)index {
 - (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 *interface = [self driveInterfaceTypeForIndex:index];
     NSString *path = [self driveImagePathForIndex:index];
     NSString *path = [self driveImagePathForIndex:index];
     NSInteger interfaceIndex = NSNotFound;
     NSInteger interfaceIndex = NSNotFound;
@@ -258,10 +258,10 @@ static BOOL ValidQemuIdentifier(NSString *name) {
     if (interfaceIndex == NSNotFound) {
     if (interfaceIndex == NSNotFound) {
         interfaceIndex = interfacesPretty.count - 1;
         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 {
     } 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.
 // limitations under the License.
 //
 //
 
 
-#import "UTMQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration.h"
 
 
 NS_ASSUME_NONNULL_BEGIN
 NS_ASSUME_NONNULL_BEGIN
 
 
-@interface UTMQemuConfiguration (Miscellaneous)
+@interface UTMLegacyQemuConfiguration (Miscellaneous)
 
 
 @property (nonatomic, assign) BOOL inputLegacy;
 @property (nonatomic, assign) BOOL inputLegacy;
 @property (nonatomic, assign) BOOL inputScrollInvert;
 @property (nonatomic, assign) BOOL inputScrollInvert;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -14,15 +14,15 @@
 // limitations under the License.
 // 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 "UTM-Swift.h"
 #import <CommonCrypto/CommonDigest.h>
 #import <CommonCrypto/CommonDigest.h>
 #import <TargetConditionals.h>
 #import <TargetConditionals.h>
@@ -43,13 +43,13 @@ const NSInteger kCurrentConfigurationVersion = 2;
 
 
 const NSString *const kUTMConfigAppleVirtualizationKey = @"isAppleVirtualization";
 const NSString *const kUTMConfigAppleVirtualizationKey = @"isAppleVirtualization";
 
 
-@interface UTMQemuConfiguration ()
+@interface UTMLegacyQemuConfiguration ()
 
 
 @property (nonatomic, readonly) NSMutableDictionary *rootDict;
 @property (nonatomic, readonly) NSMutableDictionary *rootDict;
 
 
 @end
 @end
 
 
-@implementation UTMQemuConfiguration {
+@implementation UTMLegacyQemuConfiguration {
     NSMutableDictionary *_rootDict;
     NSMutableDictionary *_rootDict;
 }
 }
 
 
@@ -189,7 +189,7 @@ const NSString *const kUTMConfigAppleVirtualizationKey = @"isAppleVirtualization
 #pragma mark - NSCopying
 #pragma mark - NSCopying
 
 
 - (id)copyWithZone:(NSZone *)zone {
 - (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
 #pragma mark - Settings

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

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

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

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

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

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

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

@@ -14,10 +14,10 @@
 // limitations under the License.
 // limitations under the License.
 //
 //
 
 
-#import "UTMQemuConfigurationPortForward.h"
+#import "UTMLegacyQemuConfigurationPortForward.h"
 #import "UTM-Swift.h"
 #import "UTM-Swift.h"
 
 
-@implementation UTMQemuConfigurationPortForward
+@implementation UTMLegacyQemuConfigurationPortForward
 
 
 @synthesize protocol = _protocol;
 @synthesize protocol = _protocol;
 @synthesize hostAddress = _hostAddress;
 @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 <Foundation/Foundation.h>
-#import "UTMQemuConfiguration+Drives.h"
+#import "UTMLegacyQemuConfiguration+Drives.h"
 
 
 typedef NS_ENUM(NSInteger, UTMDriveStatus) {
 typedef NS_ENUM(NSInteger, UTMDriveStatus) {
     UTMDriveStatusFixed,
     UTMDriveStatusFixed,

+ 2 - 2
Managers/UTMDrive.m

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

+ 1 - 1
Managers/UTMQemu.h

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

+ 2 - 2
Managers/UTMQemuSystem.h

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

+ 13 - 13
Managers/UTMQemuSystem.m

@@ -18,15 +18,15 @@
 #import <sys/sysctl.h>
 #import <sys/sysctl.h>
 #import <TargetConditionals.h>
 #import <TargetConditionals.h>
 #import "UTMQemuSystem.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 "UTMJailbreak.h"
 #import "UTMLogging.h"
 #import "UTMLogging.h"
 
 
@@ -88,7 +88,7 @@ static size_t sysctl_read(const char *name) {
     return ncpu;
     return ncpu;
 }
 }
 
 
-- (instancetype)initWithConfiguration:(UTMQemuConfiguration *)configuration imgPath:(nonnull NSURL *)imgPath {
+- (instancetype)initWithConfiguration:(UTMLegacyQemuConfiguration *)configuration imgPath:(nonnull NSURL *)imgPath {
     self = [self init];
     self = [self init];
     if (self) {
     if (self) {
         self.configuration = configuration;
         self.configuration = configuration;
@@ -296,7 +296,7 @@ static size_t sysctl_read(const char *name) {
             if ([path characterAtIndex:0] == '/') {
             if ([path characterAtIndex:0] == '/') {
                 fullPathURL = [NSURL fileURLWithPath:path isDirectory:NO];
                 fullPathURL = [NSURL fileURLWithPath:path isDirectory:NO];
             } else {
             } 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
             [self accessDataWithBookmark:[fullPathURL bookmarkDataWithOptions:0
                                                includingResourceValuesForKeys:nil
                                                includingResourceValuesForKeys:nil
@@ -428,7 +428,7 @@ static size_t sysctl_read(const char *name) {
         }
         }
         if (!useVMnet) {
         if (!useVMnet) {
             for (NSUInteger i = 0; i < [self.configuration countPortForwards]; i++) {
             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];
                 [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 {
 - (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`
 /// 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 "UTMQemuVirtualMachine+SPICE.h"
-#import "UTMQemuConfiguration+Display.h"
-#import "UTMQemuConfiguration+Sharing.h"
+#import "UTMLegacyQemuConfiguration+Display.h"
+#import "UTMLegacyQemuConfiguration+Sharing.h"
 #import "UTMLogging.h"
 #import "UTMLogging.h"
 #import "UTMQemuManager.h"
 #import "UTMQemuManager.h"
 #import "UTMSpiceIO.h"
 #import "UTMSpiceIO.h"

+ 2 - 2
Managers/UTMQemuVirtualMachine.h

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

+ 11 - 11
Managers/UTMQemuVirtualMachine.m

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

+ 3 - 3
Managers/UTMSpiceIO.h

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

+ 4 - 4
Managers/UTMSpiceIO.m

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

+ 1 - 1
Managers/UTMVirtualMachine.m

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

+ 6 - 6
Managers/UTMVirtualMachineExtension.swift

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

+ 1 - 1
Platform/Shared/VMCardView.swift

@@ -116,6 +116,6 @@ struct Logo: View {
 @available(iOS 14, macOS 11, *)
 @available(iOS 14, macOS 11, *)
 struct VMCardView_Previews: PreviewProvider {
 struct VMCardView_Previews: PreviewProvider {
     static var previews: some View {
     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(macOS 11, *)
 @available(iOS, introduced: 14, unavailable)
 @available(iOS, introduced: 14, unavailable)
 struct VMConfigAdvancedNetworkView: View {
 struct VMConfigAdvancedNetworkView: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
 
 
     var body: some View {
     var body: some View {
         ScrollView {
         ScrollView {
@@ -32,7 +32,7 @@ struct VMConfigAdvancedNetworkView: View {
 
 
 @available(iOS 14, macOS 11, *)
 @available(iOS 14, macOS 11, *)
 struct IPConfigurationSection: View {
 struct IPConfigurationSection: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
 
 
     var body: some View {
     var body: some View {
         Toggle(isOn: $config.networkIsolate, label: {
         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)
             config.consoleFontSize = NSNumber(value: $0)
         }
         }
         Section(header: Text("Style")) {
         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("Text Color", selection: textColor)
             ColorPicker("Background Color", selection: backgroundColor)
             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 {
             HStack {
                 Stepper(value: fontSizeObserver, in: 1...72) {
                 Stepper(value: fontSizeObserver, in: 1...72) {
                         Text("Font Size")
                         Text("Font Size")
@@ -77,7 +77,7 @@ struct VMConfigDisplayConsoleView<Config: ObservableObject & UTMConfigurable>: V
 
 
 @available(iOS 14, macOS 11, *)
 @available(iOS 14, macOS 11, *)
 struct VMConfigDisplayConsoleView_Previews: PreviewProvider {
 struct VMConfigDisplayConsoleView_Previews: PreviewProvider {
-    @ObservedObject static private var config = UTMQemuConfiguration()
+    @ObservedObject static private var config = UTMLegacyQemuConfiguration()
     
     
     static var previews: some View {
     static var previews: some View {
         VMConfigDisplayConsoleView(config: config)
         VMConfigDisplayConsoleView(config: config)

+ 6 - 6
Platform/Shared/VMConfigDisplayView.swift

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

+ 1 - 1
Platform/Shared/VMConfigDriveCreateView.swift

@@ -33,7 +33,7 @@ struct VMConfigDriveCreateView: View {
             }).onChange(of: driveImage.removable) { removable in
             }).onChange(of: driveImage.removable) { removable in
                 driveImage.reset(forSystemTarget: target, architecture: architecture, removable: removable)
                 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.")
             }.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.")
                 .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 {
             if !driveImage.removable {
                 HStack {
                 HStack {

+ 4 - 4
Platform/Shared/VMConfigDriveDetailsView.swift

@@ -19,7 +19,7 @@ import SwiftUI
 @available(iOS 14, macOS 11, *)
 @available(iOS 14, macOS 11, *)
 struct VMConfigDriveDetailsView: View {
 struct VMConfigDriveDetailsView: View {
     @EnvironmentObject private var data: UTMData
     @EnvironmentObject private var data: UTMData
-    @ObservedObject private var config: UTMQemuConfiguration
+    @ObservedObject private var config: UTMLegacyQemuConfiguration
     @Binding private var removable: Bool
     @Binding private var removable: Bool
     @Binding private var name: String?
     @Binding private var name: String?
     @Binding private var imageTypeString: 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.onDelete = onDelete
         self.config = config // for observing updates
         self.config = config // for observing updates
         self._removable = Binding<Bool> {
         self._removable = Binding<Bool> {
@@ -83,9 +83,9 @@ struct VMConfigDriveDetailsView: View {
                         .multilineTextAlignment(.trailing)
                         .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 {
             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) {
             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, *)
 @available(iOS 14, macOS 11, *)
 struct VMConfigInfoView_Previews: PreviewProvider {
 struct VMConfigInfoView_Previews: PreviewProvider {
-    @ObservedObject static private var config = UTMQemuConfiguration()
+    @ObservedObject static private var config = UTMLegacyQemuConfiguration()
     
     
     static var previews: some View {
     static var previews: some View {
         Group {
         Group {

+ 2 - 2
Platform/Shared/VMConfigInputView.swift

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

+ 7 - 7
Platform/Shared/VMConfigNetworkView.swift

@@ -18,7 +18,7 @@ import SwiftUI
 
 
 @available(iOS 14, macOS 11, *)
 @available(iOS 14, macOS 11, *)
 struct VMConfigNetworkView: View {
 struct VMConfigNetworkView: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     @State private var showAdvanced: Bool = false
     @State private var showAdvanced: Bool = false
     
     
     var body: some View {
     var body: some View {
@@ -39,15 +39,15 @@ struct VMConfigNetworkView: View {
                     })
                     })
                     #endif
                     #endif
                     if config.networkEnabled {
                     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 {
                 if config.networkEnabled {
                     HStack {
                     HStack {
                         DefaultTextField("MAC Address", text: $config.networkCardMac.bound, prompt: "00:00:00:00:00:00")
                         DefaultTextField("MAC Address", text: $config.networkCardMac.bound, prompt: "00:00:00:00:00:00")
                         Button("Random") {
                         Button("Random") {
-                            config.networkCardMac = UTMQemuConfiguration.generateMacAddress()
+                            config.networkCardMac = UTMLegacyQemuConfiguration.generateMacAddress()
                         }
                         }
                     }
                     }
 
 
@@ -75,10 +75,10 @@ struct VMConfigNetworkView: View {
 
 
 @available(iOS 14, macOS 11, *)
 @available(iOS 14, macOS 11, *)
 struct NetworkModeSection: View {
 struct NetworkModeSection: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     
     
     var body: some View {
     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" {
         if config.networkMode == "bridged" {
             DefaultTextField("Bridged Interface", text: $config.networkBridgeInterface.bound, prompt: "en0")
             DefaultTextField("Bridged Interface", text: $config.networkBridgeInterface.bound, prompt: "en0")
                 .keyboardType(.asciiCapable)
                 .keyboardType(.asciiCapable)
@@ -88,7 +88,7 @@ struct NetworkModeSection: View {
 
 
 @available(iOS 14, macOS 11, *)
 @available(iOS 14, macOS 11, *)
 struct VMConfigNetworkingView_Previews: PreviewProvider {
 struct VMConfigNetworkingView_Previews: PreviewProvider {
-    @State static private var config = UTMQemuConfiguration()
+    @State static private var config = UTMLegacyQemuConfiguration()
     
     
     static var previews: some View {
     static var previews: some View {
         VMConfigNetworkView(config: config)
         VMConfigNetworkView(config: config)

+ 4 - 4
Platform/Shared/VMConfigPortForwardForm.swift

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

+ 6 - 6
Platform/Shared/VMConfigQEMUView.swift

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

+ 2 - 2
Platform/Shared/VMConfigSharingView.swift

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

+ 4 - 4
Platform/Shared/VMConfigSoundView.swift

@@ -18,7 +18,7 @@ import SwiftUI
 
 
 @available(iOS 14, macOS 11, *)
 @available(iOS 14, macOS 11, *)
 struct VMConfigSoundView: View {
 struct VMConfigSoundView: View {
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     
     
     var body: some View {
     var body: some View {
         VStack {
         VStack {
@@ -28,9 +28,9 @@ struct VMConfigSoundView: View {
                         Text("Enabled")
                         Text("Enabled")
                     })
                     })
                     if config.soundEnabled {
                     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, *)
 @available(iOS 14, macOS 11, *)
 struct VMConfigSoundView_Previews: PreviewProvider {
 struct VMConfigSoundView_Previews: PreviewProvider {
-    @State static private var config = UTMQemuConfiguration()
+    @State static private var config = UTMLegacyQemuConfiguration()
     
     
     static var previews: some View {
     static var previews: some View {
         VMConfigSoundView(config: config)
         VMConfigSoundView(config: config)

+ 14 - 14
Platform/Shared/VMConfigSystemView.swift

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

+ 2 - 2
Platform/Shared/VMDetailsView.swift

@@ -110,7 +110,7 @@ struct VMDetailsView: View {
                         .environmentObject(data)
                         .environmentObject(data)
                 }
                 }
                 #else
                 #else
-                VMSettingsView(vm: vm as! UTMQemuVirtualMachine, config: vm.config as! UTMQemuConfiguration)
+                VMSettingsView(vm: vm as! UTMQemuVirtualMachine, config: vm.config as! UTMLegacyQemuConfiguration)
                     .environmentObject(data)
                     .environmentObject(data)
                 #endif
                 #endif
             }
             }
@@ -265,7 +265,7 @@ struct DetailsLabelStyle: LabelStyle {
 
 
 @available(iOS 14, macOS 11, *)
 @available(iOS 14, macOS 11, *)
 struct VMDetailsView_Previews: PreviewProvider {
 struct VMDetailsView_Previews: PreviewProvider {
-    @State static private var config = UTMQemuConfiguration()
+    @State static private var config = UTMLegacyQemuConfiguration()
     
     
     static var previews: some View {
     static var previews: some View {
         VMDetailsView(vm: UTMVirtualMachine(configuration: config, withDestinationURL: URL(fileURLWithPath: "")))
         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 {
             guard let newInterface = newInterface else {
                 return
                 return
             }
             }
-            self.isRawImage = !UTMQemuConfiguration.shouldConvertQcow2(forInterface: newInterface)
+            self.isRawImage = !UTMLegacyQemuConfiguration.shouldConvertQcow2(forInterface: newInterface)
         })
         })
     }
     }
     
     
     func reset(forSystemTarget target: String?, architecture: String?, removable: Bool) {
     func reset(forSystemTarget target: String?, architecture: String?, removable: Bool) {
         self.removable = removable
         self.removable = removable
         self.imageType = removable ? .CD : .disk
         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.size = removable ? 0 : 10240
         self.isRawImage = false
         self.isRawImage = false
     }
     }

+ 1 - 1
Platform/Shared/VMRemovableDrivesView.swift

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

+ 4 - 4
Platform/Shared/VMWizardHardwareView.swift

@@ -63,7 +63,7 @@ struct VMWizardHardwareView: View {
         List {
         List {
             if !wizardState.useVirtualization {
             if !wizardState.useVirtualization {
                 Section {
                 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
                         .onChange(of: wizardState.systemArchitecture) { newValue in
                             if let newValue = newValue {
                             if let newValue = newValue {
                                 wizardState.systemTarget = defaultTarget(for: newValue)
                                 wizardState.systemTarget = defaultTarget(for: newValue)
@@ -76,7 +76,7 @@ struct VMWizardHardwareView: View {
                 }
                 }
                 
                 
                 Section {
                 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: {
                 } header: {
                     Text("System")
                     Text("System")
                 }
                 }
@@ -157,8 +157,8 @@ struct VMWizardHardwareView: View {
     }
     }
     
     
     private func defaultTarget(for architecture: String) -> String {
     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]
         return targets![index]
     }
     }
 }
 }

+ 5 - 5
Platform/Shared/VMWizardState.swift

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

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

@@ -17,16 +17,16 @@
 #include <os/proc.h>
 #include <os/proc.h>
 #include "TargetConditionals.h"
 #include "TargetConditionals.h"
 #include "UTMConfigurable.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 "UTMDrive.h"
 #include "UTMQcow2.h"
 #include "UTMQcow2.h"
 #include "UTMQemu.h"
 #include "UTMQemu.h"

+ 13 - 13
Platform/UTMData.swift

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -15,9 +15,9 @@
 //
 //
 
 
 #import "VMConfigDisplayViewController.h"
 #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 ()
 @interface VMConfigDisplayViewController ()
 
 

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

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

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

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

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

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

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

@@ -15,8 +15,8 @@
 //
 //
 
 
 #import "VMConfigDrivePickerViewController.h"
 #import "VMConfigDrivePickerViewController.h"
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
 #import "VMConfigDriveCreateViewController.h"
 #import "VMConfigDriveCreateViewController.h"
 
 
 @interface VMConfigDrivePickerViewController ()
 @interface VMConfigDrivePickerViewController ()
@@ -42,9 +42,9 @@
 
 
 - (void)refreshViewFromConfiguration {
 - (void)refreshViewFromConfiguration {
     if (self.configuration.existingPath) {
     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 {
     } 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 <UIKit/UIKit.h>
-#import "UTMQemuConfigurationDelegate.h"
+#import "UTMLegacyQemuConfigurationDelegate.h"
 
 
 NS_ASSUME_NONNULL_BEGIN
 NS_ASSUME_NONNULL_BEGIN
 
 
-@interface VMConfigDrivesViewController : UITableViewController<UTMQemuConfigurationDelegate>
+@interface VMConfigDrivesViewController : UITableViewController<UTMLegacyQemuConfigurationDelegate>
 
 
 @property (weak, nonatomic) IBOutlet UIBarButtonItem *addButtonItem;
 @property (weak, nonatomic) IBOutlet UIBarButtonItem *addButtonItem;
 
 

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

@@ -16,8 +16,8 @@
 
 
 #import "VMConfigDrivesViewController.h"
 #import "VMConfigDrivesViewController.h"
 #import "VMConfigDriveDetailViewController.h"
 #import "VMConfigDriveDetailViewController.h"
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
 
 
 @interface VMConfigDrivesViewController ()
 @interface VMConfigDrivesViewController ()
 
 
@@ -63,7 +63,7 @@
         cell.textLabel.text = [self.configuration driveImagePathForIndex:indexPath.row];
         cell.textLabel.text = [self.configuration driveImagePathForIndex:indexPath.row];
     }
     }
     UTMDiskImageType type = [self.configuration driveImageTypeForIndex: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];
     NSString *interface = [self.configuration driveInterfaceTypeForIndex:indexPath.row];
     cell.detailTextLabel.text = [NSString stringWithFormat:@"%@ - %@", typeStr, interface];
     cell.detailTextLabel.text = [NSString stringWithFormat:@"%@ - %@", typeStr, interface];
     
     
@@ -132,9 +132,9 @@
 - (void)promptDelete:(NSString *)name {
 - (void)promptDelete:(NSString *)name {
     NSURL *path;
     NSURL *path;
     if (self.configuration.existingPath) {
     if (self.configuration.existingPath) {
-        path = [self.configuration.existingPath URLByAppendingPathComponent:[UTMQemuConfiguration diskImagesDirectory] isDirectory:YES];
+        path = [self.configuration.existingPath URLByAppendingPathComponent:[UTMLegacyQemuConfiguration diskImagesDirectory] isDirectory:YES];
     } else {
     } 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];
     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){
     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 "VMConfigExistingViewController.h"
 #import "UIViewController+Extensions.h"
 #import "UIViewController+Extensions.h"
-#import "UTMQemuConfiguration.h"
-#import "UTMQemuConfiguration+Constants.h"
+#import "UTMLegacyQemuConfiguration.h"
+#import "UTMLegacyQemuConfiguration+Constants.h"
 #import "VMConfigTextField.h"
 #import "VMConfigTextField.h"
 
 
 @interface VMConfigExistingViewController ()
 @interface VMConfigExistingViewController ()
@@ -68,13 +68,13 @@
 - (void)exportLog {
 - (void)exportLog {
     NSURL *path;
     NSURL *path;
     if (self.configuration.existingPath) {
     if (self.configuration.existingPath) {
-        path = [self.configuration.existingPath URLByAppendingPathComponent:[UTMQemuConfiguration debugLogName]];
+        path = [self.configuration.existingPath URLByAppendingPathComponent:[UTMLegacyQemuConfiguration debugLogName]];
     }
     }
     if (![[NSFileManager defaultManager] fileExistsAtPath:path.path]) {
     if (![[NSFileManager defaultManager] fileExistsAtPath:path.path]) {
         [self showAlert:NSLocalizedString(@"No debug log found!", @"VMConfigExistingViewController") actions:nil completion:nil];
         [self showAlert:NSLocalizedString(@"No debug log found!", @"VMConfigExistingViewController") actions:nil completion:nil];
     } else {
     } else {
         NSError *err;
         NSError *err;
-        NSURL *temp = [NSURL fileURLWithPathComponents:@[NSTemporaryDirectory(), [UTMQemuConfiguration debugLogName]]];
+        NSURL *temp = [NSURL fileURLWithPathComponents:@[NSTemporaryDirectory(), [UTMLegacyQemuConfiguration debugLogName]]];
         [[NSFileManager defaultManager] removeItemAtURL:temp error:nil];
         [[NSFileManager defaultManager] removeItemAtURL:temp error:nil];
         if ([[NSFileManager defaultManager] copyItemAtURL:path toURL:temp error:&err]) {
         if ([[NSFileManager defaultManager] copyItemAtURL:path toURL:temp error:&err]) {
             UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[temp] applicationActivities:nil];
             UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[temp] applicationActivities:nil];

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -16,7 +16,7 @@
 
 
 #import <UIKit/UIKit.h>
 #import <UIKit/UIKit.h>
 #import "StaticDataTableViewController.h"
 #import "StaticDataTableViewController.h"
-#import "UTMQemuConfigurationDelegate.h"
+#import "UTMLegacyQemuConfigurationDelegate.h"
 
 
 @class VMConfigTextField;
 @class VMConfigTextField;
 @class VMConfigStepper;
 @class VMConfigStepper;
@@ -25,7 +25,7 @@
 
 
 NS_ASSUME_NONNULL_BEGIN
 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(UIView) NSArray *configControls;
 @property (nonatomic, strong) IBOutletCollection(VMConfigTogglePickerCell) NSArray *configPickerToggles;
 @property (nonatomic, strong) IBOutletCollection(VMConfigTogglePickerCell) NSArray *configPickerToggles;

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

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

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

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

+ 2 - 2
Platform/iOS/VMConfigDrivesView.swift

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

+ 8 - 8
Platform/iOS/VMConfigNetworkPortForwardView.swift

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

+ 2 - 2
Platform/iOS/VMSettingsView.swift

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

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

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

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

@@ -24,8 +24,8 @@ class VMDisplayQemuWindowController: VMDisplayWindowController {
         vm as? UTMQemuVirtualMachine
         vm as? UTMQemuVirtualMachine
     }
     }
     
     
-    var vmQemuConfig: UTMQemuConfiguration! {
-        vm?.config as? UTMQemuConfiguration
+    var vmQemuConfig: UTMLegacyQemuConfiguration! {
+        vm?.config as? UTMLegacyQemuConfiguration
     }
     }
     
     
     var defaultSubtitle: String {
     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)
         .fileImporter(isPresented: $importDrivePresented, allowedContentTypes: [.item], onCompletion: importDrive)
         .onChange(of: newDrivePopover, perform: { showPopover in
         .onChange(of: newDrivePopover, perform: { showPopover in
             if showPopover {
             if showPopover {
-                if let qemuConfig = config as? UTMQemuConfiguration {
+                if let qemuConfig = config as? UTMLegacyQemuConfiguration {
                     newQemuDrive.reset(forSystemTarget: qemuConfig.systemTarget, architecture: qemuConfig.systemArchitecture, removable: false)
                     newQemuDrive.reset(forSystemTarget: qemuConfig.systemTarget, architecture: qemuConfig.systemArchitecture, removable: false)
                 } else if let _ = config as? UTMAppleConfiguration {
                 } else if let _ = config as? UTMAppleConfiguration {
                     newAppleDriveSize = 10240
                     newAppleDriveSize = 10240
@@ -44,7 +44,7 @@ struct VMConfigNewDriveButton<Config: ObservableObject & UTMConfigurable>: View
         })
         })
         .popover(isPresented: $newDrivePopover, arrowEdge: .top) {
         .popover(isPresented: $newDrivePopover, arrowEdge: .top) {
             VStack {
             VStack {
-                if let qemuConfig = config as? UTMQemuConfiguration {
+                if let qemuConfig = config as? UTMLegacyQemuConfiguration {
                     VMConfigDriveCreateView(target: qemuConfig.systemTarget, architecture: qemuConfig.systemArchitecture, driveImage: newQemuDrive)
                     VMConfigDriveCreateView(target: qemuConfig.systemTarget, architecture: qemuConfig.systemArchitecture, driveImage: newQemuDrive)
                 } else if let _ = config as? UTMAppleConfiguration {
                 } else if let _ = config as? UTMAppleConfiguration {
                     VMConfigAppleDriveCreateView(driveSize: $newAppleDriveSize)
                     VMConfigAppleDriveCreateView(driveSize: $newAppleDriveSize)
@@ -52,7 +52,7 @@ struct VMConfigNewDriveButton<Config: ObservableObject & UTMConfigurable>: View
                 HStack {
                 HStack {
                     Spacer()
                     Spacer()
                     Button(action: { importDrivePresented.toggle() }, label: {
                     Button(action: { importDrivePresented.toggle() }, label: {
-                        if let _ = config as? UTMQemuConfiguration {
+                        if let _ = config as? UTMLegacyQemuConfiguration {
                             if newQemuDrive.removable {
                             if newQemuDrive.removable {
                                 Text("Browse…")
                                 Text("Browse…")
                             } else {
                             } else {
@@ -74,7 +74,7 @@ struct VMConfigNewDriveButton<Config: ObservableObject & UTMConfigurable>: View
         data.busyWorkAsync {
         data.busyWorkAsync {
             switch result {
             switch result {
             case .success(let url):
             case .success(let url):
-                if let qemuConfig = await config as? UTMQemuConfiguration {
+                if let qemuConfig = await config as? UTMLegacyQemuConfiguration {
                     if await newQemuDrive.removable {
                     if await newQemuDrive.removable {
                         try await data.createDrive(newQemuDrive, for: qemuConfig, with: url)
                         try await data.createDrive(newQemuDrive, for: qemuConfig, with: url)
                     } else {
                     } else {
@@ -102,7 +102,7 @@ struct VMConfigNewDriveButton<Config: ObservableObject & UTMConfigurable>: View
     private func addNewDrive(_ newDrive: VMDriveImage) {
     private func addNewDrive(_ newDrive: VMDriveImage) {
         newDrivePopover = false // hide popover
         newDrivePopover = false // hide popover
         data.busyWorkAsync {
         data.busyWorkAsync {
-            if let qemuConfig = await config as? UTMQemuConfiguration {
+            if let qemuConfig = await config as? UTMLegacyQemuConfiguration {
                 try await data.createDrive(newDrive, for: qemuConfig)
                 try await data.createDrive(newDrive, for: qemuConfig)
             } else if let appleConfig = await config as? UTMAppleConfiguration {
             } else if let appleConfig = await config as? UTMAppleConfiguration {
                 let image = await DiskImage(newSize: newAppleDriveSize)
                 let image = await DiskImage(newSize: newAppleDriveSize)
@@ -125,7 +125,7 @@ struct VMConfigDrivesButtons<Config: ObservableObject & UTMConfigurable>: View {
     @State private var importDrivePresented: Bool = false
     @State private var importDrivePresented: Bool = false
     
     
     var countDrives: Int {
     var countDrives: Int {
-        if let qemuConfig = config as? UTMQemuConfiguration {
+        if let qemuConfig = config as? UTMLegacyQemuConfiguration {
             return qemuConfig.countDrives
             return qemuConfig.countDrives
         } else if let appleConfig = config as? UTMAppleConfiguration {
         } else if let appleConfig = config as? UTMAppleConfiguration {
             return appleConfig.diskImages.count
             return appleConfig.diskImages.count
@@ -172,7 +172,7 @@ struct VMConfigDrivesButtons<Config: ObservableObject & UTMConfigurable>: View {
     
     
     func moveDriveUp(fromIndex index: Int) {
     func moveDriveUp(fromIndex index: Int) {
         withAnimation {
         withAnimation {
-            if let qemuConfig = config as? UTMQemuConfiguration {
+            if let qemuConfig = config as? UTMLegacyQemuConfiguration {
                 qemuConfig.moveDrive(index, to: index - 1)
                 qemuConfig.moveDrive(index, to: index - 1)
             } else if let appleConfig = config as? UTMAppleConfiguration {
             } else if let appleConfig = config as? UTMAppleConfiguration {
                 appleConfig.diskImages.move(fromOffsets: IndexSet(integer: index), toOffset: index - 1)
                 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) {
     func moveDriveDown(fromIndex index: Int) {
         withAnimation {
         withAnimation {
-            if let qemuConfig = config as? UTMQemuConfiguration {
+            if let qemuConfig = config as? UTMLegacyQemuConfiguration {
                 qemuConfig.moveDrive(index, to: index + 1)
                 qemuConfig.moveDrive(index, to: index + 1)
             } else if let appleConfig = config as? UTMAppleConfiguration {
             } else if let appleConfig = config as? UTMAppleConfiguration {
                 appleConfig.diskImages.move(fromOffsets: IndexSet(integer: index), toOffset: index + 2)
                 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, *)
 @available(macOS 11, *)
 struct VMConfigNetworkPortForwardView: View {
 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 editingNewPort = false
     @State private var selectedIndex = 0
     @State private var selectedIndex = 0
     
     
@@ -62,19 +62,19 @@ struct VMConfigNetworkPortForwardView: View {
 
 
 @available(macOS 11, *)
 @available(macOS 11, *)
 struct PortForwardEdit: View {
 struct PortForwardEdit: View {
-    @StateObject private var configPort: UTMQemuConfigurationPortForward
+    @StateObject private var configPort: UTMLegacyQemuConfigurationPortForward
     private let save: () -> Void
     private let save: () -> Void
     private let delete: (() -> Void)?
     private let delete: (() -> Void)?
     @Environment(\.presentationMode) var presentationMode: Binding<PresentationMode>
     @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 {
         if let i = index {
             configPort = config.portForward(for: i)!
             configPort = config.portForward(for: i)!
         } else {
         } else {
-            configPort = UTMQemuConfigurationPortForward()
+            configPort = UTMLegacyQemuConfigurationPortForward()
         }
         }
-        self._configPort = StateObject<UTMQemuConfigurationPortForward>(wrappedValue: configPort)
+        self._configPort = StateObject<UTMLegacyQemuConfigurationPortForward>(wrappedValue: configPort)
         save = {
         save = {
             config.updatePortForward(at: index ?? config.countPortForwards, withValue: configPort)
             config.updatePortForward(at: index ?? config.countPortForwards, withValue: configPort)
         }
         }
@@ -112,8 +112,8 @@ struct PortForwardEdit: View {
 
 
 @available(macOS 11, *)
 @available(macOS 11, *)
 struct VMConfigNetworkPortForwardView_Previews: PreviewProvider {
 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 {
     static var previews: some View {
         Group {
         Group {
@@ -121,7 +121,7 @@ struct VMConfigNetworkPortForwardView_Previews: PreviewProvider {
                 VMConfigNetworkPortForwardView(config: config)
                 VMConfigNetworkPortForwardView(config: config)
             }.onAppear {
             }.onAppear {
                 if config.countPortForwards == 0 {
                 if config.countPortForwards == 0 {
-                    let newConfigPort = UTMQemuConfigurationPortForward()
+                    let newConfigPort = UTMLegacyQemuConfigurationPortForward()
                     newConfigPort.protocol = "tcp"
                     newConfigPort.protocol = "tcp"
                     newConfigPort.guestAddress = "1.2.3.4"
                     newConfigPort.guestAddress = "1.2.3.4"
                     newConfigPort.guestPort = NSNumber(value: 1234)
                     newConfigPort.guestPort = NSNumber(value: 1234)

+ 2 - 2
Platform/macOS/VMQEMUSettingsView.swift

@@ -18,7 +18,7 @@ import SwiftUI
 
 
 struct VMQEMUSettingsView: View {
 struct VMQEMUSettingsView: View {
     let vm: UTMVirtualMachine?
     let vm: UTMVirtualMachine?
-    @ObservedObject var config: UTMQemuConfiguration
+    @ObservedObject var config: UTMLegacyQemuConfiguration
     @Binding var selectedDriveIndex: Int?
     @Binding var selectedDriveIndex: Int?
     @EnvironmentObject private var data: UTMData
     @EnvironmentObject private var data: UTMData
 
 
@@ -93,7 +93,7 @@ struct VMQEMUSettingsView: View {
 }
 }
 
 
 struct VMQEMUSettingsView_Previews: PreviewProvider {
 struct VMQEMUSettingsView_Previews: PreviewProvider {
-    @State static private var config = UTMQemuConfiguration()
+    @State static private var config = UTMLegacyQemuConfiguration()
     
     
     static var previews: some View {
     static var previews: some View {
         VMQEMUSettingsView(vm: nil, config: config, selectedDriveIndex: .constant(0))
         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 {
     var body: some View {
         NavigationView {
         NavigationView {
             List {
             List {
-                if let qemuConfig = config as? UTMQemuConfiguration {
+                if let qemuConfig = config as? UTMLegacyQemuConfiguration {
                     VMQEMUSettingsView(vm: vm, config: qemuConfig, selectedDriveIndex: $selectedDriveIndex)
                     VMQEMUSettingsView(vm: vm, config: qemuConfig, selectedDriveIndex: $selectedDriveIndex)
                 } else if let appleConfig = config as? UTMAppleConfiguration {
                 } else if let appleConfig = config as? UTMAppleConfiguration {
                     VMAppleSettingsView(vm: vm, config: appleConfig, selectedDriveIndex: $selectedDriveIndex)
                     VMAppleSettingsView(vm: vm, config: appleConfig, selectedDriveIndex: $selectedDriveIndex)
@@ -92,7 +92,7 @@ extension View {
 
 
 @available(macOS 11, *)
 @available(macOS 11, *)
 struct VMSettingsView_Previews: PreviewProvider {
 struct VMSettingsView_Previews: PreviewProvider {
-    @State static private var config = UTMQemuConfiguration()
+    @State static private var config = UTMLegacyQemuConfiguration()
     
     
     static var previews: some View {
     static var previews: some View {
         VMSettingsView(vm: nil, config: config)
         VMSettingsView(vm: nil, config: config)

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

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

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini