@echo off

echo Running qmake ...
qmake psi.pro
if errorlevel 1 goto ERROR1
echo Compiling ...
nmake
if errorlevel 1 goto ERROR2

mkdir psiwin
copy src\psi.exe psiwin\Psi.exe
copy %QTDIR%\bin\qt-mt*.dll psiwin
copy ..\qca\qca*.dll psiwin
copy src\tools\idle\win32\idleui.dll psiwin
xcopy /e certs psiwin\certs\
xcopy /e iconsets psiwin\iconsets\
xcopy /e sound psiwin\sound\
copy COPYING psiwin
win32\tod README psiwin\Readme.txt
win32\tod INSTALL psiwin\Install.txt

echo 'psiwin' created successfully
goto END

:ERROR1
echo Error running qmake..  Are you sure you have Qt set up?
goto END

:ERROR2
echo Compile failed, stopping.
goto END

:END

