@echo off
echo VC6.0 UDP Server Build Script
echo ==============================
set "VC6_DIR=D:\software\vc6.0\Microsoft Visual Studio"
set "VCVARS_BAT=%VC6_DIR%\VC98\Bin\VCVARS32.BAT"
if not exist "%VCVARS_BAT%" (
echo ERROR: VCVARS32.BAT not found at the specified path.
echo Please update the VC6_DIR variable in this script.
pause
exit /b 1
)
call "%VCVARS_BAT%"
set "MSDEV_EXE=%VC6_DIR%\Common\msdev98\Bin\MSDEV.EXE"
set "CL_EXE=%VC6_DIR%\VC98\Bin\CL.EXE"
echo Compiling UDP Server...
"%MSDEV_EXE%" VC6_UDPServer.dsp /MAKE "VC6_UDPServer - Win32 Release"
if %ERRORLEVEL% EQU 0 (
echo.
echo Server compiled successfully!
echo.
echo How to run:
echo Console mode: Release\VC6_UDPServer.exe
echo Install service: Release\VC6_UDPServer.exe -install
echo Uninstall service: Release\VC6_UDPServer.exe -uninstall
echo.
echo Compiling test client...
"%CL_EXE%" UDPTestClient.cpp ws2_32.lib
if %ERRORLEVEL% EQU 0 (
echo Test client compiled successfully! (UDPTestClient.exe)
) else (
echo Test client compilation failed!
)
) else (
echo.
echo Server compilation failed!
)
pause