|
|
Microsoft OS/2 SDK 12-15-1987
echo off
rem
rem MS OS/2 SDK install script. It automates the install process
rem described in the installation guide for the December update.
rem
rem
rem Create a sub-script, then exec another copy of this script
rem to do the actual work (keeps the evironment clean).
cls
set XYZ=00SDK.BAT
echo echo off > %XYZ%
echo :loop >> %XYZ%
echo echo Insert %%1 diskette into the %%srcdrive%% drive >> %XYZ%
echo input yc Ready? >> %XYZ%
echo if errorlevel 1 goto exit >> %XYZ%
echo if exist %%srcdrive%%\%%1.CTL goto fred >> %XYZ%
echo echo Wrong disk, friend! >> %XYZ%
echo goto loop >> %XYZ%
echo :fred >> %XYZ%
echo xcopy %%srcdrive%%\ %%sdkdest%% /s /e >> %XYZ%
echo :exit >> %XYZ%
echo Microsoft OS/2 Software Development Kit (SDK) installation aid.
set PSDISKS=yes
input yn Are you installing MS OS/2 SDK on a PS/2 machine
if errorlevel 1 set PSDISKS=no
if not "%srcdrive%" == "" goto proc0
echo 1 - A:
echo 2 - B:
echo 3 - Other
input 123 Select source drive
if errorlevel 2 goto error1
if errorlevel 1 goto proc0a
set srcdrive=A:
goto proc0
:proc0a
set srcdrive=B:
:proc0
if not "%destdrive%" == "" goto proc1
echo 1 - C:
echo 2 - D:
echo 3 - Other
input 123 Select destination drive
if errorlevel 2 goto error1
if errorlevel 1 goto proc1a
set destdrive=C:
goto proc0
:proc1a
set destdrive=D:
:proc1
if not "%root%" == "" goto proc2
echo 1 - \
echo 2 - \os2sdk
echo 3 - Other
input 123 Select root directory
if errorlevel 2 goto error1
if errorlevel 1 set root=\os2sdk
:proc2
set SDKDEST=%destdrive%%root%
echo MS OS/2 SDK will be installed in %sdkdest% from drive %srcdrive%
input yn Is this what you want?
if errorlevel 1 goto exit
rem
rem Make all directories needed by the SDK (this will shut up xcopy)
rem
echo Making directories for the SDK...
if not "%root%" == "" mkdir %sdkdest%
mkdir %sdkdest%\tools
mkdir %sdkdest%\init
mkdir %sdkdest%\demos
mkdir %sdkdest%\lib
mkdir %sdkdest%\include
mkdir %sdkdest%\startup
mkdir %sdkdest%\network
mkdir %sdkdest%\os2doc
mkdir %sdkdest%\tmp
if %PSDISKS% == yes goto psdisk
%comspec%/c %XYZ% TOOLKIT
%comspec%/c %XYZ% EXAMPLES
%comspec%/c %XYZ% UTILITY
%comspec%/c %XYZ% CBIN
%comspec%/c %XYZ% CLIB
%comspec%/c %XYZ% MASM
%comspec%/c %XYZ% NETWORK
goto patch
:psdisk
%comspec%/c %XYZ% TOOLKIT1
%comspec%/c %XYZ% TOOLKIT2
%comspec%/c %XYZ% EXAMPLE1
%comspec%/c %XYZ% EXAMPLE2
%comspec%/c %XYZ% UTILITY1
%comspec%/c %XYZ% UTILITY2
%comspec%/c %XYZ% CBIN1
%comspec%/c %XYZ% CBIN2
%comspec%/c %XYZ% CLIB1
%comspec%/c %XYZ% CLIB2
%comspec%/c %XYZ% MASM
%comspec%/c %XYZ% NETWORK
goto patch
:patch
echo Adjusting OS2INIT.CMD and building C libraries
set xxx=\os2init.cmd
echo rem >> %xxx%
echo rem The following lines brought to you by MS OS/2 SDK >> %xxx%
echo rem installation program... >> %xxx%
echo rem >> %xxx%
echo set LIB=%sdkdest%\lib >> %xxx%
echo set INCLUDE=%sdkdest%\include >> %xxx%
echo set USER=%sdkdest%\init >> %xxx%
echo set TMP=%sdkdest%\tmp >> %xxx%
echo path=%path%;%sdkdest%\tools\bin;%sdkdest%\tools\pbin >> %xxx%
set LIB=%sdkdest%\lib
set INCLUDE=%sdkdest%\include
set USER=%sdkdest%\init
set TMP=%sdkdest%\tmp
path=%path%;%sdkdest%\tools\bin;%sdkdest%\tools\pbin
for %%i in (s m c l) do libbuild %%i em %LIB% > nul
goto exit
:error1
echo !
echo ! Please set environment variable ROOT and/or DRIVE to the
echo ! path and drive of your choice then run this program again.
echo !
echo ! e.g. set root=\MYOS2
echo ! set DESTDRIVE=Q:
echo ! set SRCDRIVE=P:
:exit
del %XYZ%
set XXX=
set PSDISKS=
set DESTDRIVE=
set SRCDRIVE=
set ROOT=
set SDKDEST=
set XYZ=
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.