// Home made CCLinterpretor (ADN 18/9/98)
Handle(TCollection_HAsciiString) namenewscript = new TCollection_HAsciiString("CCL");
+ Handle(TCollection_HAsciiString) namenewbinscript = new TCollection_HAsciiString("CCL");
namenewscript->AssignCat(SubCode()->ToCString());
+ namenewbinscript->AssignCat(SubCode()->ToCString());
+ namenewbinscript->AssignCat("bin");
#ifdef WNT
-
namenewscript->AssignCat(".cmd");
-
+ namenewbinscript->AssignCat(".cmd");
#endif
filescript = new WOKernel_File(namenewscript,
outfile->SetLocateFlag(Standard_True);
AddExecDepItem(infileCOMPONENTS,outfile,Standard_True);
}
+
+
+ filescript = new WOKernel_File(namenewbinscript,
+ parcelunit,
+ parcelunit->GetFileType("executable"));
+
+ filescript->GetPath();
+
+ Handle(TCollection_HAsciiString) bineval = Unit()->Params().Eval("WOKDeliv_BINScript");
+
+ anapi->AddVariable("%MYVAR",bineval->ToCString());
+
+ if (anapi->OpenFile("MYFILEBIN",filescript->Path()->Name()->ToCString()) != EDL_NORMAL) {
+ ErrorMsg << "WOKDeliv_DeliveryDATA::Execute"
+ << "Cannot open file " << filescript->Path()->Name() << endm;
+ okexec = Standard_False;
+ }
+ else {
+
+ anapi->WriteFile("MYFILEBIN","%MYVAR");
+ anapi->CloseFile("MYFILEBIN");
+ Handle(WOKMake_OutputFile) outfile =
+ new WOKMake_OutputFile(filescript->LocatorName(),
+ filescript,
+ bidon,
+ filescript->Path());
+ outfile->SetReference();
+ outfile->SetExtern();
+ outfile->SetLocateFlag(Standard_True);
+ AddExecDepItem(infileCOMPONENTS,outfile,Standard_True);
+ }
Handle(WOKernel_File) theinfile = thefiles->Value(i)->File();
if (!theinfile.IsNull()) {
if (!theinfile->Name()->IsSameString(thesourceunit->Name())
- && !theinfile->Name()->IsSameString(namenewscript)) { // avoid scripts
+ && !theinfile->Name()->IsSameString(namenewscript)
+ && !theinfile->Name()->IsSameString(namenewbinscript)) { // avoid scripts
Handle(WOKernel_FileType) outtype = parcelunit->FileTypeBase()->Type(theinfile->TypeName()->ToCString());
Handle(WOKernel_File) theoutfile = new WOKernel_File(theinfile->Name(),
$endif
@end;
+
+
+
+@template WOKDeliv_BINScript(%DeliveryHomeName,%UnitName) is
+$#!/bin/csh -f
+$## this is a template file for Frontal Building
+$## lines built by umake :
+$#
+$setenv CSF_VERBOSE 0
+$set CCL_DEBUGGER="exec"
+$set LOGFILE=0
+$set BIN_FILE=$%DeliveryHomeName/${STATION}/bin/CCL%UnitName.bin
+$
+$set i = 1
+$set opts = ""
+$while ($i <= $#argv)
+$ set c = $argv[$i]
+$ set i = `expr $i + 1`
+$ set treated = 0
+$ if (`expr $c = -h`) then
+$ echo "-play <file> : play a record session"
+$ echo "-record <file> <comment> : record a session"
+$ echo "-reference <dir> : set reference directory for record session"
+$ echo "-result <dir> : set result directory for record session"
+$ echo "-f <file> : load a file"
+$ echo "-v : set verbose mode"
+$ echo "-w : print stack on error"
+$ echo "-d : start a debug session on error"
+$ echo "-spy : trace macros, commands and all engine requests"
+$ echo "-call <macro> : call the macro (start is default)"
+$ echo "-trace : outputs shareable images loading and diagnostics"
+$ echo "-log <file> : outputs in a file"
+$ echo "-debug : start CCL with debugger"
+$ echo "<f1> ... <fn> : load these files"
+$ exit(0)
+$ endif
+$ if (`expr $c = -record`) then
+$ setenv TR_Status record
+$ setenv TR_File $argv[$i]
+$ set i = `expr $i + 1`
+$ setenv TR_Comment $argv[$i]
+$ set i = `expr $i + 1`
+$ set treated = 1
+$ endif
+$ if (`expr $c = -play`) then
+$ setenv TR_Status play
+$ setenv TR_File $argv[$i]
+$ set i = `expr $i + 1`
+$ set treated = 1
+$ endif
+$ if (`expr $c = -reference`) then
+$ setenv TR_RefDir $argv[$i]
+$ set i = `expr $i + 1`
+$ set treated = 1
+$ endif
+$ if (`expr $c = -result`) then
+$ setenv TR_ResDir $argv[$i]
+$ set i = `expr $i + 1`
+$ set treated = 1
+$ endif
+$ if (`expr $c = -f`) then
+$ set treated = 1
+$ endif
+$ if (`expr $c = -trace`) then
+$ setenv CSF_VERBOSE 1
+$ set treated = 1
+$ endif
+$ if (`expr $c = -log`) then
+$ set LOGFILE=$argv[$i]
+$ set i = `expr $i + 1`
+$ set treated = 1
+$ endif
+$ if (`expr $c = -debug`) then
+$ set treated = 1
+$ set CCL_DEBUGGER="dbx"
+$ if (`expr $STATION = ao1`) then
+$ set CCL_DEBUGGER="decladebug"
+$ endif
+$ if (`expr $STATION = sil`) then
+$ set CCL_DEBUGGER="cvd"
+$ setenv TRAP_FPE "UNDERFL=FLUSH_ZERO;OVERFL=DEFAULT;DIVZERO=DEFAULT;INT_OVERFL=DEFAULT"
+$ endif
+$ if (`expr $STATION = hp`) then
+$ set CCL_DEBUGGER="dde"
+$ endif
+$ endif
+$ if ($treated == 0) then
+$ set opts = "$opts $c"
+$ endif
+$end
+$
+$if ( ! $?CSF_MESSAGE ) then
+$ if (-x $%DeliveryHomeName/${STATION}/bin/%UnitName_Cmp.us) then
+$ setenv CSF_MESSAGE $%DeliveryHomeName/${STATION}/bin/%UnitName_Cmp.us
+$ else
+$ setenv CSF_MESSAGE $%DeliveryHomeName/etc/locale/%UnitName.us
+$ endif
+$endif
+$
+$if (`expr $CCL_DEBUGGER = exec`) then
+$ if (`expr $LOGFILE = 0`) then
+$ CCLinterpretor -session $BIN_FILE $opts -call start
+$ else
+$ CCLinterpretor -session $BIN_FILE $opts -call start >$LOGFILE
+$ endif
+$else
+$ echo " -session $BIN_FILE $opts -call start"
+$ $CCL_DEBUGGER `which CCLinterpretor`
+$endif
+@end;
+
+
@endif;