From: cas Date: Wed, 19 Jan 2000 18:04:47 +0000 (+0000) Subject: No comments X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=10f2928570ba60b3e18e83fe534095ca2a28711b;p=occt-wok.git No comments --- diff --git a/src/WOKStep/WOKStep_Compile.cxx b/src/WOKStep/WOKStep_Compile.cxx index 919b146..5eaa108 100755 --- a/src/WOKStep/WOKStep_Compile.cxx +++ b/src/WOKStep/WOKStep_Compile.cxx @@ -3,11 +3,7 @@ // Author: Jean GAUTIER // -#ifdef WNT -#include -#else #include -#endif #include #include @@ -59,6 +55,10 @@ #include #include +//---> EUG4YAN +Standard_IMPORT Standard_Boolean g_fCompOrLnk; +//<--- EUG4YAN + //======================================================================= //function : WOKStep_Compile //purpose : @@ -206,7 +206,9 @@ _TEST_BREAK(); infile = execlist->Value(j); Handle(WOKBuilder_Compilable) compilable = Handle(WOKBuilder_Compilable)::DownCast(infile->BuilderEntity()); - +//---> EUG4YAN + if ( !g_fCompOrLnk ) +//<--- EUG4YAN if(infile->File()->Nesting()->IsSameString(Unit()->FullName())) { InfoMsg << "WOKStep_Compile::Execute" << "-------> " << infile->File()->Name() << endm; @@ -273,10 +275,15 @@ _TEST_BREAK(); } // end if } // end if - +//---> EUG4YAN + if ( !g_fCompOrLnk ) { +//<--- EUG4YAN TreatOutput(infile,myiterator.Produces()); succeeds->Append(infile); +//---> EUG4YAN + } // end if +//<--- EUG4YAN break; case WOKBuilder_Failed: fails->Append(infile); @@ -308,7 +315,7 @@ _TEST_BREAK(); << "-----------------------------------------------------------------" << endm; } - if ( !str -> IsEmpty () ) { + if ( g_fCompOrLnk && !str -> IsEmpty () ) { Handle( TCollection_HAsciiString ) s = new TCollection_HAsciiString ( Unit () -> Name () ); s -> AssignCat ( ".comp" ); @@ -346,6 +353,8 @@ _TEST_BREAK(); } // end if + return; + } // end if if(fails->Length() && succeeds->Length()) diff --git a/src/WOKStep/WOKStep_DynamicLibrary.cxx b/src/WOKStep/WOKStep_DynamicLibrary.cxx index 2d2d253..09097de 100755 --- a/src/WOKStep/WOKStep_DynamicLibrary.cxx +++ b/src/WOKStep/WOKStep_DynamicLibrary.cxx @@ -31,7 +31,9 @@ #include #include - +//---> EUG4YAN +Standard_IMPORT Standard_Boolean g_fCompOrLnk; +//<--- EUG4YAN //======================================================================= //function : WOKStep_DynamicLibrary //purpose : @@ -137,7 +139,6 @@ void WOKStep_DynamicLibrary::Execute(const Handle(WOKMake_HSequenceOfInputFile)& Unit()->Params()); Handle(WOKUtils_Shell) ashell = Shell(); - //--> EUG4YAN bidname = new TCollection_HAsciiString ( Unit () -> Name () ); bidname -> AssignCat ( ".lnk" ); @@ -154,10 +155,9 @@ void WOKStep_DynamicLibrary::Execute(const Handle(WOKMake_HSequenceOfInputFile)& << lnkfile -> Path () -> Name () -> ToCString () << "'" << endm; //<-- EUG4YAN - ashell->Lock(); //--> EUG4YAN - ashell -> LogInFile ( lnkfile -> Path () ); + Unit () -> Params ().Set ( "%LnkFileName", lnkfile -> Path () -> Name () -> ToCString () ); //<-- EUG4YAN ldshr->SetShell(ashell); @@ -204,14 +204,18 @@ void WOKStep_DynamicLibrary::Execute(const Handle(WOKMake_HSequenceOfInputFile)& // Externals is Empty in this Step ldshr->SetExternals(new TColStd_HSequenceOfHAsciiString); - +//---> EUG4YAN + if ( !g_fCompOrLnk ) +//<--- EUG4YAN InfoMsg << "WOKStep_DynamicLibrary::Execute" << "Creating : " << libname << endm; - switch(ldshr->Execute()) { case WOKBuilder_Success: +//---> EUG4YAN + if ( !g_fCompOrLnk ) { +//<--- EUG4YAN for(i=1; i<=ldshr->Produces()->Length(); i++) { Handle(WOKBuilder_Entity) outent = ldshr->Produces()->Value(i); @@ -256,6 +260,9 @@ void WOKStep_DynamicLibrary::Execute(const Handle(WOKMake_HSequenceOfInputFile)& InfoMsg << "WOKStep_DynamicLibrary::Execute" << "Succeeded : " << libname << endm; SetSucceeded(); +//---> EUG4YAN + } // end if +//<--- EUG4YAN break; case WOKBuilder_Failed: ErrorMsg << "WOKStep_DynamicLibrary::Execute" diff --git a/src/WOKStep/WOKStep_ExecLink.cxx b/src/WOKStep/WOKStep_ExecLink.cxx index c0213f5..b964b19 100755 --- a/src/WOKStep/WOKStep_ExecLink.cxx +++ b/src/WOKStep/WOKStep_ExecLink.cxx @@ -23,7 +23,9 @@ #include #include - +//---> EUG4YAN +Standard_IMPORT Standard_Boolean g_fCompOrLnk; +//<--- EUG4YAN //======================================================================= //function : WOKStep_ExecLink //purpose : @@ -97,7 +99,7 @@ void WOKStep_ExecLink::Execute(const Handle(WOKMake_HSequenceOfInputFile)& execl switch(status) { case WOKMake_Success: - if(!outfiles.IsNull()) + if ( !g_fCompOrLnk && !outfiles.IsNull () ) { for(i=1; i<=execlist->Length(); i++) { diff --git a/src/WOKStep/WOKStep_LibLink.cxx b/src/WOKStep/WOKStep_LibLink.cxx index 178e3ed..2b592d6 100755 --- a/src/WOKStep/WOKStep_LibLink.cxx +++ b/src/WOKStep/WOKStep_LibLink.cxx @@ -23,7 +23,9 @@ #include #include - +//---> EUG4YAN +Standard_IMPORT Standard_Boolean g_fCompOrLnk; +//<--- EUG4YAN //======================================================================= //function : WOKStep_LibLink //purpose : @@ -111,7 +113,7 @@ void WOKStep_LibLink::Execute(const Handle(WOKMake_HSequenceOfInputFile)& execli switch(status) { case WOKMake_Success: - if(!outfiles.IsNull()) + if ( !g_fCompOrLnk && !outfiles.IsNull () ) { for(i=1; i<=execlist->Length(); i++) { diff --git a/src/WOKStep/WOKStep_Link.cxx b/src/WOKStep/WOKStep_Link.cxx index 5ba1b73..bf2f994 100755 --- a/src/WOKStep/WOKStep_Link.cxx +++ b/src/WOKStep/WOKStep_Link.cxx @@ -42,7 +42,9 @@ #include #include - +//---> EUG4YAN +Standard_IMPORT Standard_Boolean g_fCompOrLnk; +//<--- EUG4YAN //======================================================================= //function : WOKStep_Link //purpose : @@ -428,13 +430,14 @@ WOKMake_Status WOKStep_Link::ExecuteLink(Handle(WOKMake_HSequenceOfOutputFile)& if(lnkfile->Path()->Exists()) lnkfile->Path()->RemoveFile(); if (!lnkfile->Path()->CreateFile()) { ErrorMsg << "WOKStep_Link::ExecuteLink" - << "Enable to create link file " << lnkfile->Path()->Name()->ToCString() << endm; + << "Unable to create link file " << lnkfile->Path()->Name()->ToCString() << endm; } Handle(WOKUtils_Shell) ashell = Shell(); ashell->Lock(); ashell->SetEcho(); - ashell->LogInFile(lnkfile->Path()); + + Unit () -> Params ().Set ( "%LnkFileName", lnkfile -> Path() -> Name () -> ToCString () ); if(!ashell->IsLaunched()) ashell->Launch(); @@ -443,6 +446,9 @@ WOKMake_Status WOKStep_Link::ExecuteLink(Handle(WOKMake_HSequenceOfOutputFile)& switch(mylinker->Execute()) { case WOKBuilder_Success: +//---> EUG4YAN + if ( !g_fCompOrLnk ) +//<--- EUG4YAN { Handle(WOKBuilder_Entity) outent; for(i=1; i<=mylinker->Produces()->Length(); i++) @@ -498,7 +504,6 @@ WOKMake_Status WOKStep_Link::ExecuteLink(Handle(WOKMake_HSequenceOfOutputFile)& } ashell->UnsetEcho(); - ashell->NoLog(); ashell->UnLock(); return Status(); diff --git a/src/WOKStep/WOKStep_WNTLibrary.cxx b/src/WOKStep/WOKStep_WNTLibrary.cxx index da73b95..37c1604 100755 --- a/src/WOKStep/WOKStep_WNTLibrary.cxx +++ b/src/WOKStep/WOKStep_WNTLibrary.cxx @@ -69,6 +69,17 @@ void WOKStep_WNTLibrary::Execute (const Handle(WOKMake_HSequenceOfInputFile)& an tool->SetTargetName(target); + Handle( WOKernel_FileType ) stadmtype = Unit () -> GetFileType ( "stadmfile" ); + Handle( TCollection_HAsciiString ) name = + new TCollection_HAsciiString ( Unit () -> Name () ); + + name -> AssignCat ( tool -> EvalCFExt () ); + + Handle( WOKernel_File ) cmdFile = new WOKernel_File ( name, Unit (), stadmtype ); + + cmdFile -> GetPath (); + Unit () -> Params ().Set ( "%CmdFileName", cmdFile -> Path () -> Name () -> ToCString () ); + if(!tool->OpenCommandFile()) { SetFailed (); diff --git a/src/WOKStep/WOKStep_WNTLink.cxx b/src/WOKStep/WOKStep_WNTLink.cxx index 342ba1a..82c155a 100755 --- a/src/WOKStep/WOKStep_WNTLink.cxx +++ b/src/WOKStep/WOKStep_WNTLink.cxx @@ -31,13 +31,16 @@ #include // ###### REFERENCER LE STORAGE MANAGER DES COLLECTIONS ###### -//extern Standard_IMPORT MMgt_StorageManager aStorageManager; -//Standard_IMPORT MMgt_StorageManager aStorageManager; +//extern MMgt_StorageManager aStorageManager; #ifdef WNT #include #endif // WNT +//---> EUG4YAN +Standard_IMPORT Standard_Boolean g_fCompOrLnk; +//<--- EUG4YAN + //======================================================================= //function : WOKStep_WNTLink //purpose : @@ -64,7 +67,7 @@ Standard_Boolean WOKStep_WNTLink::HandleInputFile(const Handle(WOKMake_InputFile if(!anItem->File().IsNull()) { path = anItem->File()->Path(); - +doHandle: switch(path->Extension()) { case WOKUtils_RESFile: @@ -100,6 +103,11 @@ Standard_Boolean WOKStep_WNTLink::HandleInputFile(const Handle(WOKMake_InputFile } else if (!anItem->IsPhysic()) return Standard_True; + else { + + path = new WOKUtils_Path ( anItem -> ID () ); + goto doHandle; + } // end else return Standard_False; } @@ -193,6 +201,18 @@ void WOKStep_WNTLink::Execute(const Handle(WOKMake_HSequenceOfInputFile)& anExec Unit()->Params().Set("%LinkSubsystem", exetype->ToCString()); } + + Handle( WOKernel_FileType ) stadmtype = Unit () -> GetFileType ( "stadmfile" ); + Handle( TCollection_HAsciiString ) name = + new TCollection_HAsciiString ( Unit () -> Name () ); + + name -> AssignCat ( tool -> EvalCFExt () ); + + Handle( WOKernel_File ) cmdFile = new WOKernel_File ( name, Unit (), stadmtype ); + + cmdFile -> GetPath (); + Unit () -> Params ().Set ( "%CmdFileName", cmdFile -> Path () -> Name () -> ToCString () ); + if(!tool->OpenCommandFile()) { SetFailed(); @@ -246,13 +266,19 @@ void WOKStep_WNTLink::Execute(const Handle(WOKMake_HSequenceOfInputFile)& anExec stubName = Unit()->Params().Eval(WOKernel_IsToolkit(Unit()) ? "%STUBS_tkMain" : "%STUBS_uMain"); dwLen = ExpandEnvironmentStrings(stubName->ToCString(), NULL, 0); - char* buffer = (char *) Standard::Allocate(dwLen+1); + char* buffer = (char *) aStorageManager.Allocate(dwLen+1); memset(buffer, 0, dwLen+1); ExpandEnvironmentStrings(stubName->ToCString(), buffer, dwLen); + + if ( buffer[ 0 ] == '/' && buffer[ 1 ] == '/' ) + + buffer[ 0 ] = buffer[ 1 ] = '\\'; + + buff = new TCollection_HAsciiString(buffer); - Standard::Free((void*&)buffer,dwLen+1); + aStorageManager.Free((void*&)buffer,dwLen+1); seq->Append(buff); } @@ -261,13 +287,17 @@ void WOKStep_WNTLink::Execute(const Handle(WOKMake_HSequenceOfInputFile)& anExec dwLen = ExpandEnvironmentStrings(stubName->ToCString(), NULL, 0); - char* buffer = (char *) Standard::Allocate(dwLen+1); + char* buffer = (char *) aStorageManager.Allocate(dwLen+1); memset(buffer, 0, dwLen+1); ExpandEnvironmentStrings(stubName->ToCString(), buffer, dwLen); + if ( buffer[ 0 ] == '/' && buffer[ 1 ] == '/' ) + + buffer[ 0 ] = buffer[ 1 ] = '\\'; + buff = new TCollection_HAsciiString(buffer); - Standard::Free((void*&)buffer,dwLen+1); + aStorageManager.Free((void*&)buffer,dwLen+1); seq->Append(buff); @@ -303,6 +333,9 @@ void WOKStep_WNTLink::Execute(const Handle(WOKMake_HSequenceOfInputFile)& anExec switch(tool->Execute()) { case WOKBuilder_Success: +//---> EUG4YAN + if ( !g_fCompOrLnk ) +//<--- EUG4YAN { Handle(WOKernel_File ) libPath; Handle(WOKBuilder_Entity) outEnt; @@ -349,7 +382,9 @@ dummyStepFile: SetFailed(); break; } - +//---> EUG4YAN + if ( !g_fCompOrLnk ) +//<--- EUG4YAN InfoMsg << "WOKStep_WNTLink::Execute" << "------------" << endm << "" << endm;