home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Multimedia Development Kit 0.9 beta / MDKBeta_Release3_ISO9660.iso / mdk / mmswitch.bat < prev    next >
Encoding:
DOS Batch File  |  1991-06-16  |  3.2 KB  |  129 lines

  1. @echo off
  2.  
  3. set WinPath=<<WindowsSystemDir>>
  4. set DbgPath=<<MDKDebugDir>>
  5. set NoDPath=<<MDKNoDebugDir>>
  6.  
  7. if (%NoDPath%)==(<<MDKNoDebugDir>>) goto ErrorChecking
  8.     rem -----------------------------------
  9.     rem  Display Out of Env. Space Message 
  10.     rem -----------------------------------
  11.  
  12.     echo:
  13.     echo: Error: Out of Environment Space !!
  14.     echo:
  15.     echo:        Increase the size of your environment using the 
  16.     echo:        '/e' switch on COMMAND.COM.
  17.     echo:
  18.     goto Done
  19.  
  20. :ErrorChecking
  21.     if (%WinPath%)==() goto NoWinPath
  22.     if (%1)==(N) goto NoDebug
  23.     if (%1)==(D) goto Debug
  24.     goto Usage
  25.  
  26. :NoWinPath
  27.     rem -----------------------------
  28.     rem  Display Set WinPath Message
  29.     rem -----------------------------
  30.  
  31.     echo:
  32.     echo: Error: Windows System Path not set !!
  33.     echo:
  34.     echo:    Set the "WinPath" environment variable in
  35.     echo:    %0.BAT to your Windows System Directory.
  36.     echo:    Also make sure you have copied NoDebug DLLs
  37.     echo:    to your NoDebug directory (see readme.txt)
  38.     echo:
  39.     goto Done
  40.  
  41. :Usage
  42.     rem --------------------------
  43.     rem  Display MMSWITCH.BAT Usage
  44.     rem --------------------------
  45.  
  46.     echo:
  47.     echo: Usage:
  48.     echo:        %0 {N or D}
  49.     echo:
  50.     echo: where  N = switch to nodebug version of Multimedia Windows
  51.     echo:        D = switch to debug version of Multimedia Windows
  52.     echo:
  53.     echo: NOTE: %0 is normally called by MMN2D & MMD2N -- please use one of these
  54.     echo:
  55.     goto Done
  56.  
  57. :Debug
  58.     rem ------------------------
  59.     rem   Debug Initialization
  60.     rem ------------------------
  61.  
  62.     echo Switching to Debug .DLLs and .SYMs
  63.     set NoDPath=
  64.     set ToDir=%DbgPath%
  65.     set DbgPath=
  66.     set From=N
  67.     goto SwitchFiles
  68.  
  69. :NoDebug
  70.     rem ------------------------
  71.     rem  NoDebug Initialization
  72.     rem ------------------------
  73.  
  74.     echo Switching to NoDebug .DLLs and .SYMs
  75.     set DbgPath=
  76.     set ToDir=%NoDPath%
  77.     set NoDPath=
  78.     set From=D
  79.  
  80. :SwitchFiles
  81.     rem ------------------------------------
  82.     rem  Group Loop Variable Initialization
  83.     rem ------------------------------------
  84.  
  85.     set Grp=MMSYSTEM
  86.  
  87. :GroupLoop
  88.         rem -----------------------------------
  89.         rem  Type Loop Variable Initialization
  90.         rem -----------------------------------
  91.  
  92.         set Type=DLL
  93.  
  94.     :TypeLoop
  95.         echo     %Grp%.%Type%:
  96.  
  97.             rem -----------------------------------
  98.             rem  Copy file directly to destination 
  99.             rem -----------------------------------
  100.  
  101.             echo         %ToDir%\%Grp%.%Type%  to  %WinPath%\%Grp%.%Type%
  102.             copy %ToDir%\%Grp%.%Type% %WinPath%
  103.  
  104.             rem ----------------------------
  105.             rem  Advance Type Loop Variable
  106.             rem ----------------------------
  107.  
  108.             if %Type%==SYM goto DoneGroupLoop
  109.             if %Type%==DLL set Type=SYM
  110.             goto TypeLoop
  111.  
  112.     :DoneGroupLoop
  113.         rem -----------------------------
  114.         rem  Advance Group Loop Variable
  115.         rem -----------------------------
  116.  
  117.         if %Grp%==MMSYSTEM goto Done
  118.         goto GroupLoop
  119.  
  120. :Done
  121.  
  122. set DbgPath=
  123. set From=
  124. set Grp=
  125. set NoDPath=
  126. set ToDir=
  127. set Type=
  128. set WinPath=
  129.