// Author: Jean GAUTIER
// <jga@cobrax>
-#ifdef WNT
-#include <io.h>
-#else
#include <unistd.h>
-#endif
#include <fstream.h>
#include <TCollection_HAsciiString.hxx>
#include <OSD_Protection.hxx>
#include <OSD_File.hxx>
+//---> EUG4YAN
+Standard_IMPORT Standard_Boolean g_fCompOrLnk;
+//<--- EUG4YAN
+
//=======================================================================
//function : WOKStep_Compile
//purpose :
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;
} // 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);
<< "-----------------------------------------------------------------" << endm;
}
- if ( !str -> IsEmpty () ) {
+ if ( g_fCompOrLnk && !str -> IsEmpty () ) {
Handle( TCollection_HAsciiString ) s = new TCollection_HAsciiString ( Unit () -> Name () );
s -> AssignCat ( ".comp" );
} // end if
+ return;
+
} // end if
if(fails->Length() && succeeds->Length())
#include <WOKMake_HSequenceOfInputFile.hxx>
#include <WOKStep_DynamicLibrary.ixx>
-
+//---> EUG4YAN
+Standard_IMPORT Standard_Boolean g_fCompOrLnk;
+//<--- EUG4YAN
//=======================================================================
//function : WOKStep_DynamicLibrary
//purpose :
Unit()->Params());
Handle(WOKUtils_Shell) ashell = Shell();
-
//--> EUG4YAN
bidname = new TCollection_HAsciiString ( Unit () -> Name () );
bidname -> AssignCat ( ".lnk" );
<< 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);
// 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);
InfoMsg << "WOKStep_DynamicLibrary::Execute"
<< "Succeeded : " << libname << endm;
SetSucceeded();
+//---> EUG4YAN
+ } // end if
+//<--- EUG4YAN
break;
case WOKBuilder_Failed:
ErrorMsg << "WOKStep_DynamicLibrary::Execute"
#include <WOKMake_HSequenceOfOutputFile.hxx>
#include <WOKStep_ExecLink.ixx>
-
+//---> EUG4YAN
+Standard_IMPORT Standard_Boolean g_fCompOrLnk;
+//<--- EUG4YAN
//=======================================================================
//function : WOKStep_ExecLink
//purpose :
switch(status)
{
case WOKMake_Success:
- if(!outfiles.IsNull())
+ if ( !g_fCompOrLnk && !outfiles.IsNull () )
{
for(i=1; i<=execlist->Length(); i++)
{
#include <WOKMake_HSequenceOfOutputFile.hxx>
#include <WOKStep_LibLink.ixx>
-
+//---> EUG4YAN
+Standard_IMPORT Standard_Boolean g_fCompOrLnk;
+//<--- EUG4YAN
//=======================================================================
//function : WOKStep_LibLink
//purpose :
switch(status)
{
case WOKMake_Success:
- if(!outfiles.IsNull())
+ if ( !g_fCompOrLnk && !outfiles.IsNull () )
{
for(i=1; i<=execlist->Length(); i++)
{
#include <WOKMake_AdmFileTypes.hxx>
#include <WOKStep_Link.ixx>
-
+//---> EUG4YAN
+Standard_IMPORT Standard_Boolean g_fCompOrLnk;
+//<--- EUG4YAN
//=======================================================================
//function : WOKStep_Link
//purpose :
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();
switch(mylinker->Execute())
{
case WOKBuilder_Success:
+//---> EUG4YAN
+ if ( !g_fCompOrLnk )
+//<--- EUG4YAN
{
Handle(WOKBuilder_Entity) outent;
for(i=1; i<=mylinker->Produces()->Length(); i++)
}
ashell->UnsetEcho();
- ashell->NoLog();
ashell->UnLock();
return Status();
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 ();
#include <WOKStep_WNTLink.ixx>
// ###### REFERENCER LE STORAGE MANAGER DES COLLECTIONS ######
-//extern Standard_IMPORT MMgt_StorageManager aStorageManager;
-//Standard_IMPORT MMgt_StorageManager aStorageManager;
+//extern MMgt_StorageManager aStorageManager;
#ifdef WNT
#include <windows.h>
#endif // WNT
+//---> EUG4YAN
+Standard_IMPORT Standard_Boolean g_fCompOrLnk;
+//<--- EUG4YAN
+
//=======================================================================
//function : WOKStep_WNTLink
//purpose :
if(!anItem->File().IsNull())
{
path = anItem->File()->Path();
-
+doHandle:
switch(path->Extension())
{
case WOKUtils_RESFile:
}
else if (!anItem->IsPhysic())
return Standard_True;
+ else {
+
+ path = new WOKUtils_Path ( anItem -> ID () );
+ goto doHandle;
+ } // end else
return Standard_False;
}
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();
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);
}
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);
switch(tool->Execute())
{
case WOKBuilder_Success:
+//---> EUG4YAN
+ if ( !g_fCompOrLnk )
+//<--- EUG4YAN
{
Handle(WOKernel_File ) libPath;
Handle(WOKBuilder_Entity) outEnt;
SetFailed();
break;
}
-
+//---> EUG4YAN
+ if ( !g_fCompOrLnk )
+//<--- EUG4YAN
InfoMsg << "WOKStep_WNTLink::Execute"
<< "------------" << endm << "" << endm;