text stringlengths 0 834k |
|---|
rem ******************************** |
:Usage |
echo Usage: %PROG% source-file helpid-out-file helpstr-out-file helpstr-resource [-NoIncludePath] |
echo Converts an .ID file to three output files: 1) a help |
echo context number .H file, 2) a help string .H file, and |
echo 3) a resource .RC file |
echo. |
echo -NoIncludePath prevents the path of helpid-out-file from being added to |
echo the #include statement at the beginning of helpstr-resource |
goto end |
rem ******************************** |
:Start |
set FILE_ID=%1 |
set FILE_DEST1=%2 |
set FILE_DEST2=%3 |
set FILE_DEST3=%4 |
if ""%FILE_ID%""=="""" goto Usage |
if ""%FILE_DEST1%""=="""" goto Usage |
if ""%FILE_DEST2%""=="""" goto Usage |
if ""%FILE_DEST3%""=="""" goto Usage |
if ""%5"" == ""-NoIncludePath"" ( |
set IncludedFile=%~n2%~x2 |
) else if ""%5""=="""" ( |
set IncludedFile=%2 |
) else ( |
goto Usage |
) |
if not exist %FILE_ID% goto NoSource |
rem Check for required tools |
set SED=%THUNDER55%\%TOOLS%\bin\SED.EXE |
set GREP=%THUNDER55%\%TOOLS%\bin\GREP.EXE |
if not exist %SED% goto NoTool |
if not exist %GREP% goto NoTool |
rem Delete the destination file |
if exist %FILE_DEST1% del %FILE_DEST1% |
if exist %FILE_DEST1% goto ReadOnly1 |
if exist %FILE_DEST2% del %FILE_DEST2% |
if exist %FILE_DEST2% goto ReadOnly2 |
if exist %FILE_DEST3% del %FILE_DEST3% |
if exist %FILE_DEST3% goto ReadOnly3 |
set FILE_TMP1=%PROG%.T1 |
set FILE_TMP2=%PROG%.T2 |
if exist %FILE_TMP1% del %FILE_TMP1% |
if exist %FILE_TMP2% del %FILE_TMP2% |
rem ------------------------------- |
rem Add a warning to the first |
rem temporary file that the file |
rem is auto generated. |
echo //******************************* >> %FILE_TMP1% |
echo //******************************* >> %FILE_TMP1% |
echo //* >> %FILE_TMP1% |
echo //* THIS FILE IS AUTOMATICALLY GENERATED! >> %FILE_TMP1% |
echo //* DO NOT EDIT! DO NOT EDIT! DO NOT EDIT! >> %FILE_TMP1% |
echo //* >> %FILE_TMP1% |
echo //* >> %FILE_TMP1% |
echo //* This file was generated by processing >> %FILE_TMP1% |
echo //* the following file: >> %FILE_TMP1% |
echo //* >> %FILE_TMP1% |
echo //* %FILE_ID% >> %FILE_TMP1% |
echo //* >> %FILE_TMP1% |
echo //* Please look there for possible instructions. >> %FILE_TMP1% |
echo //* >> %FILE_TMP1% |
echo //* DO NOT EDIT! DO NOT EDIT! DO NOT EDIT! >> %FILE_TMP1% |
echo //* THIS FILE IS AUTOMATICALLY GENERATED! >> %FILE_TMP1% |
echo //* >> %FILE_TMP1% |
echo //******************************* >> %FILE_TMP1% |
echo //******************************* >> %FILE_TMP1% |
rem Now copy that warning to the second |
rem temporary file |
copy %FILE_TMP1% %FILE_TMP2% |
rem ------------------------------- |
rem Set up the pattern. We are |
rem expecting a file in the format: |
rem |
rem devstring devcontext# helpstring |
rem |
rem For example, |
rem |
rem comctls 2000001 ""Microsoft Windows Common Controls"" |
rem |
rem Blank lines are acceptable, as |
rem are lines beginning with the C++ |
rem single-line comment characters (//) |
set ALPHANUM=[A-Za-z_0-9] |
set ALPHA=[A-Za-z_] |
set IDENTIFIER=%ALPHA%%ALPHANUM%* |
set INTEGER=[0-9][0-9]* |
set WS=[ ][ ]* |
set WSOKAY=[ ]* |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.