@echo off
rem copyright 2001, Essam Ahmed
if "%1"=="-clean" goto del_files
md Bin
echo Generating proxy code...
wsdl /nologo /l:js /namespace:jsNetProgQOD /out:QuoteOfTheDay.js http://localhost/qod/qod.asmx
echo Compiling proxy...
jsc /nologo /debug /t:library /out:Bin\QuoteOfTheDay.dll QuoteOfTheDay.js
copy /y Bin\QuoteOfTheDay.dll . > nul
echo Compiling Windows Forms consumer...
jsc /nologo /debug /t:winexe /r:QuoteOfTheDay.dll consumeQOD.js
goto end
:del_files
echo Removing intermediate files...
if exist *.sln del *.sln
if exist QuoteOfTheDay.js del /q QuoteOfTheDay.js
if exist QuoteOfTheDay.dll del /q QuoteOfTheDay.dll
if exist QuoteOfTheDay.pdb del /q QuoteOfTheDay.pdb
if exist Bin\QuoteOfTheDay.dll del /q Bin\QuoteOfTheDay.dll
if exist Bin\QuoteOfTheDay.pdb del /q Bin\QuoteOfTheDay.pdb
if exist Bin rd /q Bin
if exist consumeQOD.exe del /q consumeQOD.exe
if exist consumeQOD.pdb del /q consumeQOD.pdb
echo Command completed.
:end

