@echo off

rem --- Clean up ---
del ZenLib_Source.7z
rmdir ZenLib_Source /S /Q
mkdir ZenLib_Source


rem --- Copying : Include ---
mkdir ZenLib_Source\Include\ZenLib
copy ..\Source\ZenLib\*.h ZenLib_Source\Include\ZenLib\

rem --- Copying : Documentation ---
mkdir Doc
cd ..\Source\Doc
..\..\..\Shared\Binary\Doxygen Doxygen
cd ..\..\Release
mkdir ZenLib_Source\Doc\
copy Doc\*.* ZenLib_Source\Doc\
rmdir Doc /S /Q

@rem --- Copying : Sources ---
mkdir ZenLib_Source\Source
Copy ..\Source\Zenlib\*.h ZenLib_Source\Source\
Copy ..\Source\Zenlib\*.cpp ZenLib_Source\Source\
mkdir ZenLib_Source\Source
Copy ..\Source\Doc\Doxygen ZenLib_Source\Source\
Copy ..\Source\Doc\*.html ZenLib_Source\Source\
mkdir ZenLib_Source\Source
Copy ..\Source\Examples\*.cpp ZenLib_Source\Source\

@rem --- Copying : Projects ---
mkdir ZenLib_Source\Project\BCB\
Copy ..\Project\BCB\*.bpg ZenLib_Source\Project\BCB\
mkdir ZenLib_Source\Project\BCB\Library\
Copy ..\Project\BCB\Library\*.bpf ZenLib_Source\Project\BCB\Library\
Copy ..\Project\BCB\Library\*.bpr ZenLib_Source\Project\BCB\Library\
Copy ..\Project\BCB\Library\*.res ZenLib_Source\Project\BCB\Library\
mkdir ZenLib_Source\Project\BCB\Example\
Copy ..\Project\BCB\Example\*.bpf ZenLib_Source\Project\BCB\Example\
Copy ..\Project\BCB\Example\*.bpr ZenLib_Source\Project\BCB\Example\
Copy ..\Project\BCB\Example\*.res ZenLib_Source\Project\BCB\Example\
mkdir ZenLib_Source\Project\MSVC\
Copy ..\Project\MSVC\*.sln ZenLib_Source\Project\MSVC\
mkdir ZenLib_Source\Project\MSVC\Library\
Copy ..\Project\MSVC\Library\*.vcproj ZenLib_Source\Project\MSVC\Library\
mkdir ZenLib_Source\Project\MSVC\Example\
Copy ..\Project\MSVC\Example\*.vcproj ZenLib_Source\Project\MSVC\Example\
mkdir ZenLib_Source\Project\DevCpp\Library\
Copy ..\Project\DevCpp\Library\*.Dev ZenLib_Source\Project\DevCpp\Library\
mkdir ZenLib_Source\Project\DevCpp\Example\
Copy ..\Project\DevCpp\Example\*.Dev ZenLib_Source\Project\DevCpp\Example\
mkdir ZenLib_Source\Project\GCC\Library\
Copy ..\Project\GCC\Library\* ZenLib_Source\Project\GCC\Library\
mkdir ZenLib_Source\Project\GCC\Example\
Copy ..\Project\GCC\Example\* ZenLib_Source\Project\GCC\Example\

@rem --- Copying : Release ---
mkdir ZenLib_Source\Release\
Copy ..\Release\*.bat ZenLib_Source\Release\
mkdir ZenLib_Source\Release\BCB\Library\
Copy ..\Release\BCB\Library\Dummy.txt ZenLib_Source\Release\BCB\Library\
mkdir ZenLib_Source\Release\GCC_Linux_x86-32\Library\
Copy ..\Release\GCC_Linux_x86-32\Library\Dummy.txt ZenLib_Source\Release\GCC_Linux_x86-32\Library\
mkdir ZenLib_Source\Release\GCC_MinGW32\Library\
Copy ..\Release\GCC_MinGW32\Library\Dummy.txt ZenLib_Source\Release\GCC_MinGW32\Library\
mkdir ZenLib_Source\Release\MSVC\Library\
Copy ..\Release\MSVC\Library\Dummy.txt ZenLib_Source\Release\MSVC\Library\

rem --- Copying : Information files ---
copy ..\*.txt ZenLib_Source\

rem --- Copying : CVS files ---
copy ..\*.cvsignore ZenLib_Source\


rem --- Compressing Archive ---
cd ZenLib_Source
..\..\..\Shared\Binary\7z a -r -t7z ..\ZenLib_Source.7z *.*
cd ..

rem --- Clean up ---
rmdir ZenLib_Source /S /Q