home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c221 / 1.ddi / BIN / ADSDB.BAT next >
Encoding:
DOS Batch File  |  1992-07-06  |  4.0 KB  |  105 lines

  1. @echo off
  2. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  3. :: ADSDB.BAT: Script for Debugging AutoCAD ADS applications.            ::
  4. :: version 1.02                                ::
  5. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  6.  
  7. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  8. :: IMPORTANT: This file is for debugging AutoCAD ADS applications.  If  ::
  9. ::            you are using AutoCAD Release 11 or earlier, you must     ::
  10. ::            set HCDIR in your environment.                            ::
  11. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  12.  
  13. if not "%1x" == "x" goto exists
  14.     echo syntax is:    adsdb program
  15.     goto over
  16.  
  17. :exists
  18. if exist %1.exp goto ok 
  19.     echo NO APPLICATION  "%1.exp"  FOUND IN THE CURRENT DIRECTORY
  20.     goto over
  21.  
  22. :ok
  23. set EXPDEBUG=ADS
  24.  
  25. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  26. :: Set next line to 12 if using AutoCAD Release 12 or later; otherwise, ::
  27. :: set it to 11.                                                        ::
  28. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  29. ::    set ADS_VERSION=11
  30.  
  31. if not "%ADS_VERSION%x" == "x" goto cont1
  32.     echo PLEASE SET THE VALUE OF ENVIRONMENT VARIABLE ADS_VERSION IN THIS BATCH FILE
  33.     goto over
  34.  
  35. :cont1
  36.  
  37. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  38. :: Set next line to the full pathname of ACAD.EXE; for example:         ::
  39. ::    set ACADPATH=c:\ACAD11                                            ::
  40. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  41. ::    set ACADPATH=c:\ACAD11
  42.  
  43. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  44. :: Save old ACAD environment variable
  45. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  46.     set oldacad=%ACAD%
  47.     set ACAD=%oldacad%;%ACADPATH%
  48.  
  49. if not "%ACADPATH%x" == "x" goto journal
  50.     echo PLEASE SET THE VALUE OF ENVIRONMENT VARIABLE ACADPATH IN THIS BATCH FILE
  51.     goto over
  52.  
  53. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  54. :: Create Journal file to set up proper debugger environment.              ::
  55. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  56. :journal
  57.     countapp %1 %ADS_VERSION% > %1.jou
  58.     if errorlevel 1 goto over
  59.  
  60.     if "%ADS_VERSION%x" == "12x" goto ver12
  61.     if "%ADS_VERSION%x" == "11x" goto ver11
  62.     echo PLEASE SET THE VALUE OF ENVIRONMENT VARIABLE ADS_VERSION IN THIS BATCH FILE
  63.     goto over
  64.  
  65. :ver11
  66. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  67. ::  Execute AutoLISP code to get to _mwINIT before the control is passed to::
  68. ::  the application you are debugging                       ::
  69. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  70.     echo @^step\ in\ +013 >> %1.jou
  71.     echo @^step\ in\ +013 >> %1.jou
  72. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  73.  
  74.     echo @^go\ main\ +013 >> %1.jou
  75.     set R386=-priv
  76.     echo mdb @@%1.jou %ACADPATH%\acad.exe
  77.     mdb @@%1.jou %ACADPATH%\acad
  78.     set R386=
  79.     goto over
  80.  
  81. :ver12
  82. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  83. ::  Execute AutoLISP code to get to _mwINIT before the control is passed to::
  84. ::  the application you are debugging                       ::
  85. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  86.     echo @^go\ til\ call+013 >> %1.jou
  87.     echo @^go\ til\ call+013 >> %1.jou
  88.     echo @^step\ in+013      >> %1.jou
  89.     echo @^step\ in+013      >> %1.jou
  90. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  91.  
  92.     echo @^go\ main+013      >> %1.jou
  93.     set R386=-callbufs 2 -nistack 10
  94.     echo mdb @@%1.jou %ACADPATH%\acad.exe
  95.     mdb @@%1.jou %ACADPATH%\acad
  96.     set R386=
  97.  
  98. :over
  99.     if exist %1.jou del %1.jou
  100.     set ACADPATH=
  101.     set ADS_VERSION=
  102.     set EXPDEBUG=
  103.     set ACAD=%oldacad%
  104.     set oldacad=
  105.