Changeset 110

Show
Ignore:
Timestamp:
02/05/08 20:31:10 (10 months ago)
Author:
mike
Message:

[new] target to build qemu right as part of the project
[fix] QDocumentOpenGLView initial window size
[fix] QApplication added missing header

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Q.xcodeproj/project.pbxproj

    r108 r110  
    66        objectVersion = 42; 
    77        objects = { 
     8 
     9/* Begin PBXAggregateTarget section */ 
     10                2796F6680D58E9E8006DA3A0 /* qemu */ = { 
     11                        isa = PBXAggregateTarget; 
     12                        buildConfigurationList = 2796F66B0D58EA06006DA3A0 /* Build configuration list for PBXAggregateTarget "qemu" */; 
     13                        buildPhases = ( 
     14                                2796F6670D58E9E8006DA3A0 /* ShellScript */, 
     15                        ); 
     16                        dependencies = ( 
     17                        ); 
     18                        name = qemu; 
     19                        productName = qemu; 
     20                }; 
     21/* End PBXAggregateTarget section */ 
    822 
    923/* Begin PBXBuildFile section */ 
     
    6882                8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; }; 
    6983/* End PBXBuildFile section */ 
     84 
     85/* Begin PBXContainerItemProxy section */ 
     86                2796F66C0D58EA50006DA3A0 /* PBXContainerItemProxy */ = { 
     87                        isa = PBXContainerItemProxy; 
     88                        containerPortal = 2A37F4A9FDCFA73011CA2CEA /* Project object */; 
     89                        proxyType = 1; 
     90                        remoteGlobalIDString = 2796F6680D58E9E8006DA3A0 /* qemu */; 
     91                        remoteInfo = qemu; 
     92                }; 
     93/* End PBXContainerItemProxy section */ 
    7094 
    7195/* Begin PBXCopyFilesBuildPhase section */ 
     
    385409                        ); 
    386410                        dependencies = ( 
     411                                2796F66D0D58EA50006DA3A0 /* PBXTargetDependency */, 
    387412                        ); 
    388413                        name = Q; 
     
    405430                        targets = ( 
    406431                                8D15AC270486D014006FF6A4 /* Q */, 
     432                                2796F6680D58E9E8006DA3A0 /* qemu */, 
    407433                        ); 
    408434                }; 
     
    454480/* End PBXResourcesBuildPhase section */ 
    455481 
     482/* Begin PBXShellScriptBuildPhase section */ 
     483                2796F6670D58E9E8006DA3A0 /* ShellScript */ = { 
     484                        isa = PBXShellScriptBuildPhase; 
     485                        buildActionMask = 2147483647; 
     486                        files = ( 
     487                        ); 
     488                        inputPaths = ( 
     489                        ); 
     490                        outputPaths = ( 
     491                        ); 
     492                        runOnlyForDeploymentPostprocessing = 0; 
     493                        shellPath = /bin/sh; 
     494                        shellScript = "#I would preffer this in \"build\", but XCode 3 does not allow Makefiles inside \"build\" so we go with /tmp and clean it up\nQEMUPATCHDIRECTORY=\"/tmp\"\nQEMUROOT=\"$SRCROOT/qemu\"\n\n#check if a built version already exists, else copy, patch, build and cleanup sources\ntest -e \"$TARGET_TEMP_DIR/i386-softmmu/qemu\" || {\n\trm -rf \"$QEMUPATCHDIRECTORY/qemu\" > /dev/null\n\tmkdir -p \"$QEMUPATCHDIRECTORY\"\n\tcp -r \"qemu/qemu\" \"$QEMUPATCHDIRECTORY\"\n\tcd \"$QEMUPATCHDIRECTORY/qemu\"\n\n\tif test $(echo $MACHTYPE | grep powerpc); then\n\t\t# add patches for PPC\n\t\techo \"PPC\" > /dev/null\n\telse\n\t\t# add patches for Intel\n\t\tpatch -p1 -u < \"$QEMUROOT/patches/qemu-0.9.1-gcc4.patch\"\n\t\tpatch -p1 -u < \"$QEMUROOT/patches/qemu-0.7.2-dyngen-check-stack-clobbers.patch\"\n\t\tpatch -p1 -u < \"$QEMUROOT/patches/qemu-0.9.1-gcc4-opts.patch\"\n\t\tpatch -p1 -u < \"$QEMUROOT/patches/qemu-0.9.1-gcc4-hacks.patch\"\n\t\tpatch -p1 -u < \"$QEMUROOT/patches/qemu-0.9.1-enforce-16byte-stack-boundary.patch\"\n\t\tpatch -p1 -u -f < \"$QEMUROOT/patches/qemu-0.9.0-i386-FORCE_RET.patch\"\n\t\tpatch -p1 -u < \"$QEMUROOT/patches/qemu-0.9.1-osx-intel-port.patch\"\n\t\tpatch -p1 -u < \"$QEMUROOT/patches/qemu-0.9.1-osx-bugfix.patch\"\n\tfi\n\n\t# Q ***** Leopard patches\n\tpatch -p0 -u < \"$QEMUROOT/patches/Leopard-dyngen.dSYM.diff\"\n\tpatch -p0 -u < \"$QEMUROOT/patches/qemu-img-CF+IO.diff\"\n\tpatch -p1 -u < \"$QEMUROOT/patches/qemu-0.9.1-always_inline.patch\"\n\n\t# Q ***** add 2nd Bootdevice\n\t#patch -p0 -u <   \"$QEMUROOT/patches/qemu-2ndbootdevice_04.diff\"\n\n\t# Q ***** use custom cocoa.m\n\tcp \"$QEMUROOT/patches/cocoa.m\" \"$QEMUPATCHDIRECTORY/qemu/cocoa.m\"\n\n\tpatch -p0 -u < \"$QEMUROOT/patches/q_block_int.h_hdled_1.diff\"\n\tpatch -p0 -u < \"$QEMUROOT/patches/q_block.c_hdled_1.diff\"\n\n\tmkdir -p \"$TARGET_TEMP_DIR\"\n\tcd \"$TARGET_TEMP_DIR\"\n\n\t# build only for i386 by default\n\t\"$QEMUPATCHDIRECTORY/qemu/./configure\" --prefix=.. --enable-cocoa --enable-adlib --disable-gcc-check --target-list=i386-softmmu\n\n\t# uncomment if you want to build all targets\n\t#\"$QEMUPATCHDIRECTORY/qemu/./configure\" --prefix=../products/i386 --enable-cocoa --enable-adlib --disable-gcc-check --target-list=i386-softmmu,ppc-softmmu,sparc-softmmu,mips-softmmu,arm-softmmu\n\n\t#make\n\tmake\n\n\t#backup bios files\n\tmkdir -p \"$TARGET_TEMP_DIR/pc-bios/\"\n\tcd \"$QEMUPATCHDIRECTORY/qemu/pc-bios/\"\n\tcp *.bin \"$TARGET_TEMP_DIR/pc-bios/\"\n\tcd -\n\n\t#cleanup\n\trm -rf \"$QEMUPATCHDIRECTORY/qemu\" > /dev/null\n}\n\n#create and copy qemu bins\nrm -rf   \"$BUILD_DIR/$CONFIGURATION/Q.app/Contents/Resources/bin/*-softmmu\" > /dev/null\nmkdir -p \"$BUILD_DIR/$CONFIGURATION/Q.app/Contents/Resources/bin/\"\ncp \"$TARGET_TEMP_DIR/i386-softmmu/qemu\" \"$BUILD_DIR/$CONFIGURATION/Q.app/Contents/Resources/bin/i386-softmmu\"\n\n#create and copy bios\nrm -rf   \"$BUILD_DIR/$CONFIGURATION/Q.app/Contents/Resources/share/qemu\" > /dev/null\nmkdir -p \"$BUILD_DIR/$CONFIGURATION/Q.app/Contents/Resources/share/qemu/\"\ncd \"$TARGET_TEMP_DIR/pc-bios/\"\ncp *.bin \"$BUILD_DIR/$CONFIGURATION/Q.app/Contents/Resources/share/qemu/\"\n"; 
     495                }; 
     496/* End PBXShellScriptBuildPhase section */ 
     497 
    456498/* Begin PBXSourcesBuildPhase section */ 
    457499                8D15AC300486D014006FF6A4 /* Sources */ = { 
     
    483525/* End PBXSourcesBuildPhase section */ 
    484526 
     527/* Begin PBXTargetDependency section */ 
     528                2796F66D0D58EA50006DA3A0 /* PBXTargetDependency */ = { 
     529                        isa = PBXTargetDependency; 
     530                        target = 2796F6680D58E9E8006DA3A0 /* qemu */; 
     531                        targetProxy = 2796F66C0D58EA50006DA3A0 /* PBXContainerItemProxy */; 
     532                }; 
     533/* End PBXTargetDependency section */ 
     534 
    485535/* Begin PBXVariantGroup section */ 
    486536                089C165FFE840EACC02AAC07 /* InfoPlist.strings */ = { 
     
    535585 
    536586/* Begin XCBuildConfiguration section */ 
     587                2796F6690D58E9E8006DA3A0 /* Debug */ = { 
     588                        isa = XCBuildConfiguration; 
     589                        buildSettings = { 
     590                                COPY_PHASE_STRIP = NO; 
     591                                GCC_DYNAMIC_NO_PIC = NO; 
     592                                GCC_OPTIMIZATION_LEVEL = 0; 
     593                                PRODUCT_NAME = qemu; 
     594                        }; 
     595                        name = Debug; 
     596                }; 
     597                2796F66A0D58E9E8006DA3A0 /* Release */ = { 
     598                        isa = XCBuildConfiguration; 
     599                        buildSettings = { 
     600                                COPY_PHASE_STRIP = YES; 
     601                                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 
     602                                GCC_ENABLE_FIX_AND_CONTINUE = NO; 
     603                                PRODUCT_NAME = qemu; 
     604                                ZERO_LINK = NO; 
     605                        }; 
     606                        name = Release; 
     607                }; 
    537608                C05733C808A9546B00998B17 /* Debug */ = { 
    538609                        isa = XCBuildConfiguration; 
     
    611682 
    612683/* Begin XCConfigurationList section */ 
     684                2796F66B0D58EA06006DA3A0 /* Build configuration list for PBXAggregateTarget "qemu" */ = { 
     685                        isa = XCConfigurationList; 
     686                        buildConfigurations = ( 
     687                                2796F6690D58E9E8006DA3A0 /* Debug */, 
     688                                2796F66A0D58E9E8006DA3A0 /* Release */, 
     689                        ); 
     690                        defaultConfigurationIsVisible = 0; 
     691                        defaultConfigurationName = Release; 
     692                }; 
    613693                C05733C708A9546B00998B17 /* Build configuration list for PBXNativeTarget "Q" */ = { 
    614694                        isa = XCConfigurationList; 
  • trunk/QApplication/QApplication.m

    r108 r110  
    2626 
    2727#import "../QDocument/QDocument.h" 
     28#import "../QDocument/QDocumentOpenGLView.h" 
    2829#import "../FSControls/FSController.h" 
    2930 
     
    7172            // fullscreen toolbar 
    7273            case 11: // cmd+b 
    73                 if ([[document screenView] fullscreen]) { 
     74                if ([[document screenView] isFullscreen]) { 
    7475                    [[[document screenView] fullscreenController] toggleToolbar]; 
    7576                } 
  • trunk/QDocument/QDocumentOpenGLView.m

    r109 r110  
    258258} 
    259259 
     260- (void)reshape 
     261{ 
     262        Q_DEBUG(@"reshape"); 
     263         
     264        [[self openGLContext] makeCurrentContext]; 
     265        [self setFrame:NSMakeRect(displayProperties.x, displayProperties.y, displayProperties.width, displayProperties.height)]; 
     266    glViewport(0.0, 0.0, displayProperties.width, displayProperties.height); 
     267} 
     268 
    260269- (void)awakeFromNib 
    261270{ 
     
    511520- (void) updateSavedImage:(id)sender 
    512521{ 
    513         Q_DEBUG(@"loadTextures"); 
    514          
    515          
     522        Q_DEBUG(@"updateSavedImage"); 
     523 
     524 
    516525        [[self openGLContext] makeCurrentContext]; 
    517          
     526 
    518527        // remove old texture 
    519528        if( textures[QDocumentOpenGLTextureSavedImage] != 0) { 
     
    533542{ 
    534543        Q_DEBUG(@"screenshot NSSize(%f,  %f)", size.width, size.height); 
     544 
     545        // if no size is set, make fullsize shot */  
     546        if (size.width == 0 || !size.height == 0)  
     547                size = [self bounds].size; 
    535548 
    536549        NSBitmapImageRep* sBitmapImageRep = [[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL 
     
    648661                displayProperties.y = ICON_BAR_HEIGHT;//([self bounds].size.height - ch) / 2.0; 
    649662        } 
    650         [self setFrame:NSMakeRect(displayProperties.x, displayProperties.y, displayProperties.width, displayProperties.height)]; 
    651  
    652     [[self openGLContext] makeCurrentContext]; 
    653     glViewport(0.0, 0.0, displayProperties.width, displayProperties.height); 
    654     [self display]; 
     663 
     664    [self update]; 
    655665} 
    656666