@echo off
rem Modifier au besoin QTDIR et VCID
rem Suppose un "static build" de Qt5.4.1 (activer la ligne #CONFIG += static dans ..\WinCaml.pro en enlevant le #)

set VCID=11

set QTDIR=C:\Qt\Qt5.4.1\5.4\Src\qtbase
set PATH=%QTDIR%\bin;%PATH%

call "C:\Program Files (x86)\Microsoft Visual Studio %VCID%.0\VC\vcvarsall.bat" x86_amd64

qmake ..\WinCaml.pro
set /P v=continuer
nmake -f Makefile.release
nmake -f Makefile.release clean

xcopy /q /s /y /i ..\..\caml\ocaml\windows WinCaml5\ocaml\windows\
move /y release\WinCaml.exe WinCaml5
copy a\unlock.exe WinCaml5
copy ..\..\sources\Win\WinCamlInit.bat WinCaml5
xcopy /q /s /y /i ..\..\caml\ocaml\htmlman WinCaml5\ocaml\htmlman\
xcopy /q /s /y /i ..\..\caml\"caml-light"  WinCaml5\"caml-light"\
del WinCaml5\"caml-light"\bin\lin*
del WinCaml5\caml-light"\bin\mac*
xcopy /q /s /y /i ..\..\caml\exemples WinCaml5\exemples\

rmdir debug
del release\*
rmdir release
del Makefile*