Esempio n. 1
0
void WEXPORT MProject::readSelf( WObjectFile& p )
{
    if( !_recursing ) {
        if( p.version() < 26 ) {
            p.readObject( &_filename );
        }
        _filename = p.filename();
//        _filename.toLower();
        setMakefile();
        if( p.version() > 26 ) {
            p.readObject( &_before );
            p.readObject( &_after );
        }
        int icount;
        p.readObject( &icount );
        for( int i=0; i<icount; i++ ) {
            WFileName tgtFilename;
            p.readObject( &tgtFilename );
            if( p.version() < 35 ) {
                tgtFilename.relativeTo( _filename );
            }
            if( !attachComponent( tgtFilename ) ) {
                //this line won't work; no view attached yet!
                //sayf( SayWarning, SayOk, "IDE Error: Unable to read target file '%s'", (const char*)tgtFilename );
            }
        }
        _dirty = false;
        _needsMake = true;
    }
}
Esempio n. 2
0
void WEXPORT MComponent::readSelf( WObjectFile& p )
{
    WObject::readSelf( p );
    if( p.version() < 26 ) {
        p.readObject( &_filename );
    }
    _filename = p.filename();
//    _filename.toLower();
    if( p.version() < 33 ) {
        p.readObject( _target );
    }
    if( p.version() < 32 ) {
        p.readObject( &_items );
    }
    if( p.version() > 23 ) {
        p.readObject( &_mask );
        if( _config->version() > 0 ) {
            if( _mask.size() == 3 ) {
                _config->setKludge( 3 );
            } else if( _mask.size() == 4 ) {
                _config->setKludge( 4 );
            }
        }
        _config->kludgeMask( _mask );
        _config->zapMask( _mask );
    }
    p.readObject( &_autodepend );
    if( p.version() > 36 ) {
        p.readObject( &_autotrack );
    }
    if( p.version() > 27 ) {
        p.readObject( &_mode );
    }
    if( p.version() > 29 ) {
        p.readObject( &_before );
        p.readObject( &_after );
    }
    if( p.version() > 32 ) {
        p.readObject( _target );
    }
    if( p.version() > 31 ) {
        p.readObject( &_items );
    }
    if( _mask[1] == 'v' ) {
        //turn VP targets into MFC targets - VP targets no longer exist
        _mask.setChar( 1, 'm' );
        WFileName fn;
        _filename.noPath( fn );
        WString ruletag;
        if( _mask[0] == 'w' ) {
            ruletag = "WEXE";
        } else {
            ruletag = "NEXE";
        }
        WFileName       tmp_fn( filename() );
        MRule* tmp_rule = _config->findRule( ruletag );
        target()->setRule( tmp_rule );
    }
}