@echo off
echo a
del /s/q/f build-msvc
rmdir /s/q build-msvc
mkdir build-msvc
cd build-msvc
cmake -G "NMake Makefiles" -DCUSTOM_INCLUDE_PATH="c:/usr/include" -DCMAKE_C_FLAGS="-DLOCALEDIR" ..
nmake

mkdir src\locale
mkdir src\locale\ru
mkdir src\locale\ru\LC_MESSAGES
mkdir src\locale\it
mkdir src\locale\it\LC_MESSAGES
copy po\ru\gettextex2.gmo src\locale\ru\LC_MESSAGES\gettextex2.mo
copy po\it\gettextex2.gmo src\locale\it\LC_MESSAGES\gettextex2.mo

mkdir run\locale
mkdir run\locale\ru
mkdir run\locale\ru\LC_MESSAGES
mkdir run\locale\it
mkdir run\locale\it\LC_MESSAGES
copy po\ru\gettextex2.gmo run\locale\ru\LC_MESSAGES\gettextex2.mo
copy po\it\gettextex2.gmo run\locale\it\LC_MESSAGES\gettextex2.mo

cd run
gettextex2_test.exe
cd ..\..
