Changeset 61

Show
Ignore:
Timestamp:
02/06/07 01:42:04 (2 years ago)
Author:
mike
Message:

[new] support for VM snapshots
[new] VPC7 importer: diskimages are converted to qcow2
[new] qcow replaced by qcow2
[fix] only supported diskimages (i.e. qcow2) prompt with option for saving
[fix] updated OS X Intel Patches for QEMU 0.9.0

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build_i386.sh

    r54 r61  
    3333 
    3434#Q 
    35 patch -p0 -u < ../../q/patches/q_host-cocoa_01.diff 
     35patch -p0 -u < ../../q/patches/q_host-cocoa_02.diff 
    3636 
    3737#gcc4 patches 
    38 patch -p1 -u < ../../q/patches/qemu-0.7.0-gcc4.patch 
     38patch -p1 -u < ../../q/patches/qemu-0.9.0-gcc4.patch 
    3939patch -p1 -u < ../../q/patches/qemu-0.7.2-dyngen-check-stack-clobbers.patch 
    4040patch -p1 -u < ../../q/patches/qemu-0.7.2-gcc4-opts.patch 
     
    4242 
    4343#OS X86 patches 
    44 patch -p1 -u < ../../q/patches/qemu-0.8.0-enforce-16byte-stack-boundary.patch 
    45 patch -p1 -u -f < ../../q/patches/qemu-0.8.0-i386-FORCE_RET.patch 
    46 patch -p1 -u < ../../q/patches/qemu-0.8.0-osx-intel-port.patch 
     44patch -p1 -u < ../../q/patches/qemu-0.9.0-enforce-16byte-stack-boundary.patch 
     45patch -p1 -u -f < ../../q/patches/qemu-0.9.0-i386-FORCE_RET.patch 
     46patch -p1 -u < ../../q/patches/qemu-0.9.0-osx-intel-port.patch 
    4747 
    4848patch -p1 -u < ../../q/patches/qemu-0.8.0-osx-bugfix.patch 
  • trunk/build_ppc.sh

    r53 r61  
    3535 
    3636#Q 
    37 patch -p0 -u < ../../q/patches/q_host-cocoa_01.diff 
     37patch -p0 -u < ../../q/patches/q_host-cocoa_02.diff 
    3838 
    3939#rgb support for intel 
  • trunk/changelog.txt

    r59 r61  
     1Q-0.9.0d61 
     2[new] support for VM snapshots 
     3[new] VPC7 importer: diskimages are converted to qcow2 
     4[new] qcow replaced by qcow2 
     5[fix] only supported diskimages (i.e. qcow2) prompt with option for saving 
     6[fix] updated OS X Intel Patches for QEMU 0.9.0 
     7 
     8Q-0.8.2d60 
     9[new] Localization: Polish by Krzysztof Nadzieja 
     10 
    111Q-0.8.2d59 
    212[fix] Quartz: mousegrab released while FS Toolbar is visible 
  • trunk/host-cocoa/cocoaQemu.h

    r53 r61  
    22 * QEMU Cocoa display driver 
    33 *  
    4  * Copyright (c) 2005, 2006 Pierre d'Herbemont 
    5  *                                                      Mike Kronenberg 
    6  *                                                      many code/inspiration from SDL 1.2 code (LGPL) 
     4 * Copyright (c) 2005 - 2007 Pierre d'Herbemont 
     5 *                                                      Mike Kronenberg 
     6 *                                                      many code/inspiration from SDL 1.2 code (LGPL) 
    77 *  
    88 * Permission is hereby granted, free of charge, to any person obtaining a copy 
     
    3737#import <OpenGL/CGLContext.h> 
    3838 
    39 #import "vl.h" 
     39#import "../vl.h" 
    4040#import "../../../q/qcontrol/cocoaControlDOServer.h" 
    4141#import "cocoaQemuProgressWindow.h" 
     
    6262        NSTimer *progressWindowTimer; 
    6363        id thisPC; 
     64        BOOL WMSupportsSnapshots; 
    6465        BOOL WMStopWhenInactive; 
    6566        BOOL wMPausedByUser; 
  • trunk/host-cocoa/cocoaQemu.m

    r58 r61  
    22 * QEMU Cocoa display driver 
    33 *  
    4  * Copyright (c) 2005, 2006 Pierre d'Herbemont 
    5  *                                                      Mike Kronenberg 
    6  *                                                      many code/inspiration from SDL 1.2 code (LGPL) 
     4 * Copyright (c) 2005 - 2007 Pierre d'Herbemont 
     5 *                                                      Mike Kronenberg 
     6 *                                                      many code/inspiration from SDL 1.2 code (LGPL) 
    77 *  
    88 * Permission is hereby granted, free of charge, to any person obtaining a copy 
     
    9393        if ((self = [super init])) { 
    9494                /* set allowed filetypes */ 
    95                 fileTypes = [[NSArray arrayWithObjects:@"qcow", @"raw", @"cow", @"vmdk", @"cloop", @"img", @"iso", @"dsk", @"dmg", @"cdr", @"toast", @"flp", @"fs", nil] retain]; 
     95                fileTypes = [[NSArray arrayWithObjects:@"qcow2", @"qcow", @"raw", @"cow", @"vmdk", @"cloop", @"img", @"iso", @"dsk", @"dmg", @"cdr", @"toast", @"flp", @"fs", nil] retain]; 
    9696 
    9797                /* pc */ 
     
    425425 
    426426        /* save VM */ 
    427         qemu_savevm( [[NSString stringWithFormat: @"%@/saved.vm", pcPath] cString]); 
     427//      qemu_savevm( [[NSString stringWithFormat: @"%@/saved.vm", pcPath] cString]); 
     428        do_savevm([@"kju" cString]); 
    428429         
    429430        /* hide progressWindow */ 
     
    539540                                smbPath = [[NSString alloc] initWithString:[arguments objectAtIndex:i + 1]]; 
    540541                         
     542                        if ([[arguments objectAtIndex:i] isEqual:@"-hda"]) 
     543                if ([[arguments objectAtIndex:i+1] rangeOfString:@"qcow2"].length > 0) 
     544                    WMSupportsSnapshots = TRUE; 
    541545                        asprintf(&argv2[i2], "%s", [[arguments objectAtIndex:i] cString]); 
    542546                        i2++; 
     
    787791                pcStatus = @"shutdown"; 
    788792                qemu_system_shutdown_request(); 
    789         } else if ( [pcName isEqual:@""]) { 
     793        } else if ( !WMSupportsSnapshots ) { 
    790794                NSAlert *alert = [NSAlert alertWithMessageText: NSLocalizedStringFromTable(@"shutdownPC:text:1", @"Localizable", @"cocoaQemu") 
    791795                        defaultButton: NSLocalizedStringFromTable(@"shutdownPC:defaultButton:1", @"Localizable", @"cocoaQemu") 
  • trunk/patches/q_block.c_hdled_1.diff

    r34 r61  
    33@@ -420,6 +420,8 @@ 
    44  
    5      if (!bs->inserted
    6          return -1
     5     if (!drv
     6         return -ENOMEDIUM
    77+         
    88+    bs->activityLED = 1; 
    99  
    10      while (nb_sectors > 0) { 
    11          if (sector_num == 0 && bs->boot_sector_enabled) { 
     10     if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) { 
     11             memcpy(buf, bs->boot_sector_data, 512); 
    1212@@ -454,6 +456,7 @@ 
    1313 int bdrv_write(BlockDriverState *bs, int64_t sector_num,  
     
    1515 { 
    1616+    bs->activityLED = 1; 
    17      if (!bs->inserted) 
    18          return -1; 
    19      if (bs->read_only) 
     17     BlockDriver *drv = bs->drv; 
     18     if (!bs->drv) 
     19         return -ENOMEDIUM; 
  • trunk/prepare.sh

    r53 r61  
    88#get/update QEMU 
    99export CVS_RSH="ssh" 
    10 cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/qemu co -D "2006-07-24 18:00" qemu 
     10cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/qemu co -D "2007-02-05 23:59" qemu 
    1111 
    1212#get/update [kju:] 
  • trunk/qcontrol/cocoaControlController.m

    r58 r61  
    22 * QEMU Cocoa Control Controller 
    33 *  
    4  * Copyright (c) 2005, 2006 Mike Kronenberg 
     4 * Copyright (c) 2005 - 2007 Mike Kronenberg 
    55 *  
    66 * Permission is hereby granted, free of charge, to any person obtaining a copy 
     
    840840        NSFileManager *fileManager = [NSFileManager defaultManager]; 
    841841 
    842         while ([fileManager fileExistsAtPath:[NSString stringWithFormat:@"%@/%@", path, [NSString stringWithFormat:@"Harddisk_%d.qcow", i]]]) 
     842        while ([fileManager fileExistsAtPath:[NSString stringWithFormat:@"%@/%@", path, [NSString stringWithFormat:@"Harddisk_%d.qcow2", i]]]) 
    843843                i++; 
    844         name = [NSString stringWithFormat:@"Harddisk_%d.qcow", i]; 
     844        name = [NSString stringWithFormat:@"Harddisk_%d.qcow2", i]; 
    845845         
    846846        /* convert diskImage */ 
    847         NSArray *arguments = [NSArray arrayWithObjects:@"convert", @"-c", @"-O", @"qcow", oldImagePath, [NSString stringWithFormat:@"%@/%@", path, name], nil]; 
     847        NSArray *arguments = [NSArray arrayWithObjects:@"convert", @"-c", @"-O", @"qcow2", oldImagePath, [NSString stringWithFormat:@"%@/%@", path, name], nil]; 
    848848        NSTask *task; 
    849849        task = [[NSTask alloc] init]; 
     
    13611361        if ([[[thisPC objectForKey:@"PC Data"] objectForKey:@"state"] isEqual:@"saved"]) { 
    13621362                [arguments addObject: @"-loadvm"]; 
    1363                 [arguments addObject:[NSString stringWithFormat: @"%@/saved.vm", filename]];  
     1363                [arguments addObject: @"kju"]; 
    13641364        } 
    13651365 
  • trunk/qcontrol/cocoaControlDiskImage.m

    r7 r61  
    22 * QEMU Cocoa Control Diskimage Window 
    33 *  
    4  * Copyright (c) 2005, 2006 Mike Kronenberg 
     4 * Copyright (c) 2005 - 2007 Mike Kronenberg 
    55 *  
    66 * Permission is hereby granted, free of charge, to any person obtaining a copy 
     
    105105         
    106106        if (qSender) { /* sheet for EditPCPanel */ 
    107                 [ qSender setCustomDIType:[ [ NSArray arrayWithObjects:@"raw", @"qcow", nil ] objectAtIndex:[ dIFormat indexOfSelectedItem ] ] size:[ dISize intValue ] ]; 
     107                [ qSender setCustomDIType:[ [ NSArray arrayWithObjects:@"raw", @"qcow2", nil ] objectAtIndex:[ dIFormat indexOfSelectedItem ] ] size:[ dISize intValue ] ]; 
    108108                [ self dIWindowClose:self]; 
    109109        } else { /* standalone Window */ 
    110110                NSSavePanel *sp = [ [ NSSavePanel alloc ] init ]; 
    111                 [ sp setRequiredFileType:[ [ NSArray arrayWithObjects:@"raw", @"qcow", nil ] objectAtIndex:[ dIFormat indexOfSelectedItem ] ] ]; 
     111                [ sp setRequiredFileType:[ [ NSArray arrayWithObjects:@"raw", @"qcow2", nil ] objectAtIndex:[ dIFormat indexOfSelectedItem ] ] ]; 
    112112                [ sp beginSheetForDirectory:NSHomeDirectory() 
    113                         file:[ NSString stringWithFormat: NSLocalizedStringFromTable(@"dIWindowCreate:file", @"Localizable", @"cocoaControlDiskImage"),[ [ NSArray arrayWithObjects:@"raw", @"qcow", nil ] objectAtIndex:[ dIFormat indexOfSelectedItem ] ] ] 
     113                        file:[ NSString stringWithFormat: NSLocalizedStringFromTable(@"dIWindowCreate:file", @"Localizable", @"cocoaControlDiskImage"),[ [ NSArray arrayWithObjects:@"raw", @"qcow2", nil ] objectAtIndex:[ dIFormat indexOfSelectedItem ] ] ] 
    114114                        modalForWindow:dIWindow 
    115115                        modalDelegate:self 
     
    147147                 
    148148                /* create Image */ 
    149                 NSArray *arguments = [ NSArray arrayWithObjects:@"create",@"-f",[ [ NSArray arrayWithObjects:@"raw", @"qcow", nil ] objectAtIndex:[ dIFormat indexOfSelectedItem ] ],dIFileName,[ NSString stringWithFormat:@"%@M",[ dISize stringValue ] ],nil ]; 
     149                NSArray *arguments = [ NSArray arrayWithObjects:@"create",@"-f",[ [ NSArray arrayWithObjects:@"raw", @"qcow2", nil ] objectAtIndex:[ dIFormat indexOfSelectedItem ] ],dIFileName,[ NSString stringWithFormat:@"%@M",[ dISize stringValue ] ],nil ]; 
    150150                NSTask *task; 
    151151                task = [ [ NSTask alloc ] init ]; 
  • trunk/qcontrol/cocoaControlEditPC.m

    r53 r61  
    22 * QEMU Cocoa Control PC Editor Window 
    33 *  
    4  * Copyright (c) 2005, 2006 Mike Kronenberg 
     4 * Copyright (c) 2005 - 2007 Mike Kronenberg 
    55 *  
    66 * Permission is hereby granted, free of charge, to any person obtaining a copy 
     
    3838        if ((self = [super init])) { 
    3939                userDefaults = [NSUserDefaults standardUserDefaults]; 
    40                 fileTypes = [[NSArray arrayWithObjects:@"qcow", @"raw", @"cow", @"vmdk", @"cloop", @"img", @"iso", @"dsk", @"dmg", @"cdr", @"toast", @"flp", @"fs", nil] retain]; 
     40                fileTypes = [[NSArray arrayWithObjects:@"qcow2", @"qcow", @"raw", @"cow", @"vmdk", @"cloop", @"img", @"iso", @"dsk", @"dmg", @"cdr", @"toast", @"flp", @"fs", nil] retain]; 
    4141 
    4242                return self; 
     
    249249                                [scanner scanInt:&intResult]; 
    250250                                customImagePopUpButtonTemp = popUpButtonHda; 
    251                                 [self setCustomDIType:@"qcow" size:intResult]; 
     251                                [self setCustomDIType:@"qcow2" size:intResult]; 
    252252                        } else { 
    253253                                [popUpButtonHda insertItemWithTitle:[NSString stringWithString:argument] atIndex:1]; 
     
    10041004        if ([popUpButtonHda indexOfSelectedItem] > 0) { 
    10051005                if ([popUpButtonHda indexOfSelectedItem] == [popUpButtonHda indexOfItemWithTag:200]) { 
    1006                         [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hda %@", [self createDI:@"qcow" withSize:10]]]; 
     1006                        [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hda %@", [self createDI:@"qcow2" withSize:10]]]; 
    10071007                } else if ([popUpButtonHda indexOfSelectedItem] == [popUpButtonHda indexOfItemWithTag:201]) { 
    1008                         [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hda %@", [self createDI:@"qcow" withSize:100]]]; 
     1008                        [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hda %@", [self createDI:@"qcow2" withSize:100]]]; 
    10091009                } else if ([popUpButtonHda indexOfSelectedItem] == [popUpButtonHda indexOfItemWithTag:202]) { 
    1010                         [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hda %@", [self createDI:@"qcow" withSize:4000]]]; 
     1010                        [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hda %@", [self createDI:@"qcow2" withSize:4000]]]; 
    10111011                } else if ([popUpButtonHda indexOfSelectedItem] == [popUpButtonHda indexOfItemWithTag:203]) { 
    10121012                        [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hda %@", [self createDI:@"raw" withSize:4000]]]; 
     
    10211021        if ([popUpButtonHdb indexOfSelectedItem] > 0) { 
    10221022                if ([popUpButtonHdb indexOfSelectedItem] == [popUpButtonHdb indexOfItemWithTag:200]) { 
    1023                         [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdb %@", [self createDI:@"qcow" withSize:10]]]; 
     1023                        [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdb %@", [self createDI:@"qcow2" withSize:10]]]; 
    10241024                } else if ([popUpButtonHdb indexOfSelectedItem] == [popUpButtonHdb indexOfItemWithTag:201]) { 
    1025                         [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdb %@", [self createDI:@"qcow" withSize:100]]]; 
     1025                        [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdb %@", [self createDI:@"qcow2" withSize:100]]]; 
    10261026                } else if ([popUpButtonHdb indexOfSelectedItem] == [popUpButtonHdb indexOfItemWithTag:202]) { 
    1027                         [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdb %@", [self createDI:@"qcow" withSize:4000]]]; 
     1027                        [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdb %@", [self createDI:@"qcow2" withSize:4000]]]; 
    10281028                } else if ([popUpButtonHdb indexOfSelectedItem] == [popUpButtonHdb indexOfItemWithTag:203]) { 
    10291029                        [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdb %@", [self createDI:@"raw" withSize:4000]]]; 
     
    10381038        if ([popUpButtonHdc indexOfSelectedItem] > 0) { 
    10391039                if ([popUpButtonHdc indexOfSelectedItem] == [popUpButtonHdb indexOfItemWithTag:200]) { 
    1040                         [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdc %@", [self createDI:@"qcow" withSize:10]]]; 
     1040                        [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdc %@", [self createDI:@"qcow2" withSize:10]]]; 
    10411041                } else if ([popUpButtonHdc indexOfSelectedItem] == [popUpButtonHdb indexOfItemWithTag:201]) { 
    1042                         [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdc %@", [self createDI:@"qcow" withSize:100]]]; 
     1042                        [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdc %@", [self createDI:@"qcow2" withSize:100]]]; 
    10431043                } else if ([popUpButtonHdc indexOfSelectedItem] == [popUpButtonHdb indexOfItemWithTag:202]) { 
    1044                         [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdc %@", [self createDI:@"qcow" withSize:4000]]]; 
     1044                        [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdc %@", [self createDI:@"qcow2" withSize:4000]]]; 
    10451045                } else if ([popUpButtonHdc indexOfSelectedItem] == [popUpButtonHdb indexOfItemWithTag:203]) { 
    10461046                        [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdc %@", [self createDI:@"raw" withSize:4000]]]; 
     
    10551055        if ([popUpButtonHdd indexOfSelectedItem] > 0) { 
    10561056                if ([popUpButtonHdd indexOfSelectedItem] == [popUpButtonHdb indexOfItemWithTag:200]) { 
    1057                         [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdd %@", [self createDI:@"qcow" withSize:10]]]; 
     1057                        [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdd %@", [self createDI:@"qcow2" withSize:10]]]; 
    10581058                } else if ([popUpButtonHdd indexOfSelectedItem] == [popUpButtonHdb indexOfItemWithTag:201]) { 
    1059                         [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdd %@", [self createDI:@"qcow" withSize:100]]]; 
     1059                        [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdd %@", [self createDI:@"qcow2" withSize:100]]]; 
    10601060                } else if ([popUpButtonHdd indexOfSelectedItem] == [popUpButtonHdb indexOfItemWithTag:202]) { 
    1061                         [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdd %@", [self createDI:@"qcow" withSize:4000]]]; 
     1061                        [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdd %@", [self createDI:@"qcow2" withSize:4000]]]; 
    10621062                } else if ([popUpButtonHdd indexOfSelectedItem] == [popUpButtonHdb indexOfItemWithTag:203]) { 
    10631063                        [[thisPC objectForKey:@"Arguments"] appendFormat:[NSString stringWithFormat:@" -hdd %@", [self createDI:@"raw" withSize:4000]]];