Compiler examples

For compiler setting details see stand-alone chapter

Green text is to be replace by real values based on your compiler settings.


Assembler 8051

Compiler:

drive:\path\cass51.bat

Parameters:

drive:\path\asm51 %Dir% %Name% %Ext%

Content of auxiliary file cass51.bat:

@Echo Off
cd %1
copy %2%3%4 %1%3%4
cass51 %3%4
del %3%4
copy %3.* %2%3.*
del %3.*

Assembler x86 with TurboAssembler

Compiler:

drive:\path\Tasm.bat

Parameters:

drive:\path\tasm\%Dir%%Name%

Run After Compilation:

%Dir%%Name%

Content of auxiliary file Tasm.bat:

@ECHO OFF
REM %1 = filepath
REM %2 = FileName without extension
REM Better do add path to directory with tasm.exe and tlink.exe to system %PATH% variable
CD %1
IF EXIST %2.exe DEL %2.exe
tasm %2.asm
tlink %2.obj
DEL %2.obj
DEL %2.map

AutoIT3

Compiler:

drive:\path\Aut2Exe.exe

Parameters:

/in %File%

Run After Compilation:

%Dir%%Name%.exe

Borland C++ Builder

Compiler:

drive:\path\bcc32.exe

Parameters:

%Name%%Ext%

LOG File:

%Name%.LOG

Run After Compilation:

%Name%.exe

[X] Capture Program Output Window

LOG parser:

* * %F %L:

GNU/Cygwin gcc/make

Compiler:

cmd.exe

Parameters:

/C "set PATH=%PATH%;C:\Cygwin\bin\; & make"

Default Directory:

C:\Cygwin\home

[X] Capture Program Output Window

[X] Hide Output window

LOG parser:

%F:%L:*

Java SDK

Compiler:

drive:\path\javac.exe

Parameters:

%Name%.java

LOG File:

%Name%.log

Run After Compilation:

cmd /k Java %Name%

[X] Capture Program Output Window

LOG parser:

F:%L

Kix32 - Debug

Compiler:

drive:\path\Kix32.exe "%File%" /d

Kix32 - Run

Compiler:

drive:\path\Kix32.exe "%File%"

LaTeX

Compiler:

drive:\path\CSLatex.bat

Parameters:

%Name%.tex

LOG File:

%Name%.log

Run After Compilation:

windvi %Name%.dvi

Content of auxiliary file CSLatex.bat (distribution of TeXLive is supposed):

@echo off 
kpsewhich cslatex.fmt > nul 
if errorlevel 1 goto genformat 
if errorlevel 0 goto okay 
:genformat 
fmtutil --byfmt cslatex 
:okay 
latex -translate-file=cp1250cs %1 %2 %3 %4 %5 %6 %7 %8 %9

LaTeX to PDF

Compiler:

drive:\path\PDFLatex.bat

Parameters:

%Name%.tex

LOG File:

%Name%.log

Run After Compilation:

path_to_Acrobat_Reader\AcroRd32 %Name%.pdf

Content of auxiliary file PDFLatex.bat (distribution of TeXLive is supposed):

@echo off
kpsewhich pdfcslatex.fmt > nul
if errorlevel 1 goto genformat
if errorlevel 0 goto okay
:genformat
fmtutil --byfmt pdfcslatex
:okay
pdftex -translate-file=cp1250cs %1 %2 %3 %4 %5 %6 %7 %8 %9

MS-Dos Batch language

Compiler:

drive:\path\system32\cmd.exe

Parameters:

/K "%File%"

LOG File:

drive:\path\%Name%.log

Note:
External application example.


MS_SQL

Compiler:

drive:\path\osql

Parameters:

-S server_name -U login_name -P password -d database_name -n -w1000 -i"%File%" -o"%Dir%%Name%.log"

LOG File:

%Dir%%Name%.log

Run After Compilation:

path_to_Acrobat_Reader\AcroRd32 %Name%.pdf

ORACLE

Compiler:

drive:\path\PLUS80.EXE

Parameters:

-s jmeno/heslo@db @ drive:\path\RunSQL "%Dir%%Name%.Log" "%File%"

LOG File:

%Dir%%Name%.Log

Content of auxiliary file RunSQL.SQL:

spool &1
set term off
@&2
spool off
exit

Note:
Don't forget to finish command by " ; " char!


PHP

Compiler:

drive:\path\php.exe

Parameters:

%File%

[X] Capture Program Output Window

LOG parser:

*on line b%L

Perl

Compiler:

drive:\path\perl.exe

Parameters:

%File%

[X] Capture Program Output Window

LOG parser:

*on line b%L

TiDy - HTML check

LOG parser:

line %L

Turbo pascal

Compiler:

drive:\path\tpc.bat

Parameters:

%Dir% %Name%

Run After Compilation:

%Dir%%Name%

Content of auxiliary file tpc.bat:

@ECHO OFF
CD %1
IF EXIST %2.exe DEL %2.exe
tpc %2 -uD:\Programy\PASCAL\tpu -m

VisualBasic Script

Compiler:

drive:\path\system32\wscript.exe

Parameters:

"%File%"

LOG File:

drive:\path\%Name%.log

Note:
External application example.


XMLlint - XML document check

Compiler:

drive:\path\xmllint.exe

Parameters:

--valid %File%

[X] Capture Program Output Window

LOG parser:

*:F:%L

Note:
You need Windows binaries of LibXML package (GPL licence) from LibXML page
Download package include utilities, you need utility XMLlint.EXE