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

unix.superglobalmegacorp.com

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