
::!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
:: Первы1 параметр %1% = "\vc8" для 2008 или пустой для 6.0
::!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

::@mode con cp select=1251 >NULL

::@echo off

::set VC=%1
set VC=\vc8
set BUILD_DIR=D:\_SWH
set SRC_DIR=.\..\..

@echo * >%BUILD_DIR%\rebuild.log

rmdir /q /s %BUILD_DIR%\__debug
rmdir /q /s %BUILD_DIR%\__release
rmdir /q /s %BUILD_DIR%\__unicode_debug
rmdir /q /s %BUILD_DIR%\__unicode_release

mkdir %BUILD_DIR%\__debug
mkdir %BUILD_DIR%\__release
mkdir %BUILD_DIR%\__debug%VC%
mkdir %BUILD_DIR%\__release%VC%
mkdir %BUILD_DIR%\__debug%VC%\SQL
mkdir %BUILD_DIR%\__release%VC%\SQL
mkdir %BUILD_DIR%\__debug%VC%\aplACAD2005
mkdir %BUILD_DIR%\__release%VC%\aplACAD2005
mkdir %BUILD_DIR%\__debug%VC%\aplACAD2005\resource
mkdir %BUILD_DIR%\__release%VC%\aplACAD2005\resource
mkdir %BUILD_DIR%\__debug%VC%\WEB_FILES
mkdir %BUILD_DIR%\__release%VC%\WEB_FILES
mkdir %BUILD_DIR%\__debug%VC%\WEB_FILES\IMAGES
mkdir %BUILD_DIR%\__release%VC%\WEB_FILES\IMAGES

attrib -r %BUILD_DIR%\__debug%VC%\*.* 
attrib -r %BUILD_DIR%\__release%VC%\*.*

mkdir %BUILD_DIR%\__unicode_debug
mkdir %BUILD_DIR%\__unicode_release

copy /y %SRC_DIR%\_const\_debug\*.* %BUILD_DIR%\__debug%VC%\
copy /y %SRC_DIR%\_const\_release\*.* %BUILD_DIR%\__release%VC%\ 

attrib -r %BUILD_DIR%\__debug%VC%\*.* 
attrib -r %BUILD_DIR%\__release%VC%\*.*


copy /y %SRC_DIR%\_const\_Unicode_Debug\*.* %BUILD_DIR%\__unicode_debug\
copy /y %SRC_DIR%\_const\_Unicode_Release\*.* %BUILD_DIR%\__unicode_release\ 

attrib -r %BUILD_DIR%\__unicode_debug\*.* 
attrib -r %BUILD_DIR%\__unicode_release\*.*

pause


:end

