#!/bin/sh

# Modifier au besoin QtDIR et QtPATH
QtDIR=/c/Qt/2010.05
QtPATH=$QtDIR/qt/bin:$QtDIR/bin:$QtDIR/mingw/bin

export PATH=/bin:$QtPATH:/c/Windows/System32

qmake ../WinCaml.pro
make
mkdir WinCaml5
mv release/WinCaml.exe WinCaml5
cp a/unlock.exe WinCaml5
rm -rf debug
rm -rf release
rm Makefile*
rm object_script*
mkdir WinCaml5/ocaml
cp -R ../../caml/ocaml/windows WinCaml5/ocaml
cp -R ../../caml/ocaml/htmlman WinCaml5/ocaml
cp -R ../../caml/caml-light  WinCaml5
rm -f WinCaml5/caml-light/bin/lin*
rm -f WinCaml5/caml-light/bin/mac*
cp -R ../../caml/exemples WinCaml5
cp ../../sources/Win/WinCamlInit.bat WinCaml5
cp $QtDIR/qt/bin/libgcc_s_dw2-1.dll WinCaml5
cp $QtDIR/qt/bin/mingwm10.dll WinCaml5
cp $QtDIR/qt/bin/QtCore4.dll WinCaml5
cp $QtDIR/qt/bin/QtGui4.dll WinCaml5
 
