Annotation of os2sdk/os2doc/instsdk.bat, revision 1.1.1.1

1.1       root        1: echo off
                      2: rem
                      3: rem     MS OS/2 SDK install script.  It automates the install process
                      4: rem     described in the installation guide for the December update.
                      5: rem
                      6: rem
                      7: rem     Create a sub-script, then exec another copy of this script
                      8: rem     to do the actual work (keeps the evironment clean).
                      9: cls
                     10: set XYZ=00SDK.BAT
                     11: 
                     12: echo echo off                                               >  %XYZ%
                     13: echo :loop                                                  >> %XYZ%
                     14: echo echo Insert %%1 diskette into the %%srcdrive%% drive   >> %XYZ%
                     15: echo input yc Ready?                                        >> %XYZ%
                     16: echo if errorlevel 1 goto exit                              >> %XYZ%
                     17: echo if exist %%srcdrive%%\%%1.CTL goto fred                >> %XYZ%
                     18: echo echo Wrong disk, friend!                               >> %XYZ%
                     19: echo goto loop                                              >> %XYZ%
                     20: echo :fred                                                  >> %XYZ%
                     21: echo xcopy %%srcdrive%%\ %%sdkdest%% /s /e                  >> %XYZ%
                     22: echo :exit                                                  >> %XYZ%
                     23: 
                     24: echo Microsoft OS/2 Software Development Kit (SDK) installation aid.
                     25: 
                     26: set PSDISKS=yes
                     27: input yn Are you installing MS OS/2 SDK on a PS/2 machine
                     28:     if errorlevel 1 set PSDISKS=no
                     29: 
                     30: if not "%srcdrive%" == "" goto proc0
                     31:     echo 1 - A:
                     32:     echo 2 - B:
                     33:     echo 3 - Other
                     34:     input 123 Select source drive
                     35:     if errorlevel 2 goto error1
                     36:     if errorlevel 1 goto proc0a
                     37:     set srcdrive=A:
                     38:     goto proc0
                     39: :proc0a
                     40:     set srcdrive=B:
                     41: :proc0
                     42: 
                     43: if not "%destdrive%" == "" goto proc1
                     44:     echo 1 - C:
                     45:     echo 2 - D:
                     46:     echo 3 - Other
                     47:     input 123 Select destination drive
                     48:     if errorlevel 2 goto error1
                     49:     if errorlevel 1 goto proc1a
                     50:     set destdrive=C:
                     51:     goto proc0
                     52: :proc1a
                     53:     set destdrive=D:
                     54: :proc1
                     55: 
                     56: if not "%root%" == "" goto proc2
                     57:     echo 1 - \
                     58:     echo 2 - \os2sdk
                     59:     echo 3 - Other
                     60:     input 123 Select root directory
                     61:     if errorlevel 2 goto error1
                     62:     if errorlevel 1 set root=\os2sdk
                     63: :proc2
                     64: 
                     65: set SDKDEST=%destdrive%%root%
                     66: 
                     67: echo MS OS/2 SDK will be installed in %sdkdest% from drive %srcdrive%
                     68: input yn Is this what you want?
                     69: if errorlevel 1 goto exit
                     70: 
                     71: rem
                     72: rem     Make all directories needed by the SDK (this will shut up xcopy)
                     73: rem
                     74: echo Making directories for the SDK...
                     75: 
                     76: if not "%root%" == "" mkdir %sdkdest%
                     77: mkdir %sdkdest%\tools
                     78: mkdir %sdkdest%\init
                     79: mkdir %sdkdest%\demos
                     80: mkdir %sdkdest%\lib
                     81: mkdir %sdkdest%\include
                     82: mkdir %sdkdest%\startup
                     83: mkdir %sdkdest%\network
                     84: mkdir %sdkdest%\os2doc
                     85: mkdir %sdkdest%\tmp
                     86: 
                     87: if %PSDISKS% == yes goto psdisk
                     88: 
                     89:     %comspec%/c %XYZ%  TOOLKIT
                     90:     %comspec%/c %XYZ%  EXAMPLES
                     91:     %comspec%/c %XYZ%  UTILITY
                     92:     %comspec%/c %XYZ%  CBIN
                     93:     %comspec%/c %XYZ%  CLIB
                     94:     %comspec%/c %XYZ%  MASM
                     95:     %comspec%/c %XYZ%  NETWORK
                     96:     goto patch
                     97: 
                     98: :psdisk
                     99:     %comspec%/c %XYZ%  TOOLKIT1
                    100:     %comspec%/c %XYZ%  TOOLKIT2
                    101:     %comspec%/c %XYZ%  EXAMPLE1
                    102:     %comspec%/c %XYZ%  EXAMPLE2
                    103:     %comspec%/c %XYZ%  UTILITY1
                    104:     %comspec%/c %XYZ%  UTILITY2
                    105:     %comspec%/c %XYZ%  CBIN1
                    106:     %comspec%/c %XYZ%  CBIN2
                    107:     %comspec%/c %XYZ%  CLIB1
                    108:     %comspec%/c %XYZ%  CLIB2
                    109:     %comspec%/c %XYZ%  MASM
                    110:     %comspec%/c %XYZ%  NETWORK
                    111:     goto patch
                    112: 
                    113: :patch
                    114:     echo Adjusting OS2INIT.CMD and building C libraries
                    115:     set xxx=\os2init.cmd
                    116:     echo rem                                                         >> %xxx%
                    117:     echo rem   The following lines brought to you by MS OS/2 SDK     >> %xxx%
                    118:     echo rem   installation program...                               >> %xxx%
                    119:     echo rem                                                         >> %xxx%
                    120:     echo set LIB=%sdkdest%\lib                                       >> %xxx%
                    121:     echo set INCLUDE=%sdkdest%\include                               >> %xxx%
                    122:     echo set USER=%sdkdest%\init                                     >> %xxx%
                    123:     echo set TMP=%sdkdest%\tmp                                       >> %xxx%
                    124:     echo path=%path%;%sdkdest%\tools\bin;%sdkdest%\tools\pbin      >> %xxx%
                    125: 
                    126:     set LIB=%sdkdest%\lib
                    127:     set INCLUDE=%sdkdest%\include
                    128:     set USER=%sdkdest%\init
                    129:     set TMP=%sdkdest%\tmp
                    130:     path=%path%;%sdkdest%\tools\bin;%sdkdest%\tools\pbin
                    131: 
                    132:     for %%i in (s m c l) do libbuild %%i em %LIB% > nul
                    133:     goto exit
                    134: 
                    135: :error1
                    136:     echo !
                    137:     echo !  Please set environment variable ROOT and/or DRIVE to the
                    138:     echo !  path and drive of your choice then run this program again.
                    139:     echo !
                    140:     echo !  e.g. set root=\MYOS2
                    141:     echo !       set DESTDRIVE=Q:
                    142:     echo !       set SRCDRIVE=P:
                    143: 
                    144: :exit
                    145:     del %XYZ%
                    146:     set XXX=
                    147:     set PSDISKS=
                    148:     set DESTDRIVE=
                    149:     set SRCDRIVE=
                    150:     set ROOT=
                    151:     set SDKDEST=
                    152:     set XYZ=

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.