@REM @echo off
@REM -- First make map file from Microsoft Visual C++
@REM generated DvResS.h
@makehm 2> nul
@if ERRORLEVEL 9009 goto NOMAKE
@REM if ERRORLEVEL 1 goto ERR1
@REM echo NO ERROR
@REM goto DN1
@REM :ERR1
@REM echo Got ERRORLEVEL %ERRORLEVEL%
@REM goto DN1
@REM :DN1

@echo	Writing DV32.HM used by DV32.HPJ ...
@echo // MAKEHELP.BAT generated Help Map file.  Used by DV32.HPJ. >"Dv32.hm"
@echo. >>"Dv32.hm"
@echo // Commands (ID_* and IDM_*) >>"Dv32.hm"
@makehm ID_,HID_,0x10000 IDM_,HIDM_,0x10000 DvResS.h >>"Dv32.hm"
@echo. >>"Dv32.hm"
@echo // Prompts (IDP_*) >>"Dv32.hm"
@makehm IDP_,HIDP_,0x30000 DvResS.h >>"Dv32.hm"
@echo. >>"Dv32.hm"
@echo // Resources (IDR_*) >>"Dv32.hm"
@makehm IDR_,HIDR_,0x20000 DvResS.h >>"Dv32.hm"
@echo. >>"Dv32.hm"
@echo // Dialogs (IDD_*) >>"Dv32.hm"
@makehm IDD_,HIDD_,0x20000 DvResS.h >>"Dv32.hm"
@echo. >>"Dv32.hm"
@echo // Frame Controls (IDW_*) >>"Dv32.hm"
@makehm IDW_,HIDW_,0x50000 DvResS.h >>"Dv32.hm"
@REM -- Make help for Project Dv32

@echo	Now building Win32 Help file
@if EXIST Dv32.hlp del Dv32.hlp > nul
start /wait hcw /C /E /M "Dv32.hpj"
if errorlevel 1 goto Err1
if not exist "Dv32.hlp" goto Err2
@REM if not exist "Dv32.cnt" goto :Error
@REM echo.
@REM @if NOT EXIST Debug\nul goto DnDbg
@REM @echo	Copying to DEBUG
@REM @copy "hlp\Dlg.hlp" Debug\. > nul
@REM @copy "hlp\Dlg.cnt" Debug\. > nul
@REM :DnDbg
@REM @if NOT EXIST Release\nul goto DnRel
@REM @echo	Copying to RELEASE
@REM @copy "hlp\Dlg.hlp" Release\. > nul
@REM @copy "hlp\Dlg.cnt" Release\.
@REM :DnRel

goto :done

:Err1
@echo ERROR: Dv32.hpj(1) : hcw exited with errorlevel!
@goto done

:Err2
@echo ERROR: Dv32.hpj(2) : hcw did NOT generate HLP file!
@goto done

:NOMAKE
@echo ERROR %ERRORLEVEL% - makehm.exe NOT FOUND ...
@goto done

:done
