File:  [OS/2 SDKs] / os2sdk / os2doc / instsdk.cmd
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Thu Aug 9 12:25:13 2018 UTC (7 years, 9 months ago) by root
Branches: msft, MAIN
CVS tags: os2sdk-1987, HEAD
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 environment clean).
cls
if "%1" == "os2_install" goto next
    set XYZ=00SDK.CMD

    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 next>> %XYZ%
    echo echo Wrong disk, friend!>> %XYZ%
    echo goto loop>> %XYZ%
    echo :next>> %XYZ%
    echo xcopy %%srcdrive%%\ %%sdkdest%% /s /e>> %XYZ%
    echo :exit>> %XYZ%

    cmd/c %0 os2_install

    del %XYZ% > nul
    set XYZ=
    call c:\os2init.cmd
    goto exit

:next

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

    call %XYZ%  TOOLKIT
    call %XYZ%  EXAMPLES
    call %XYZ%  UTILITY
    call %XYZ%  CBIN
    call %XYZ%  CLIB
    call %XYZ%  MASM
    call %XYZ%  NETWORK
    goto patch

:psdisk
    call %XYZ%  TOOLKIT1
    call %XYZ%  TOOLKIT2
    call %XYZ%  EXAMPLE1
    call %XYZ%  EXAMPLE2
    call %XYZ%  UTILITY1
    call %XYZ%  UTILITY2
    call %XYZ%  CBIN1
    call %XYZ%  CBIN2
    call %XYZ%  CLIB1
    call %XYZ%  CLIB2
    call %XYZ%  MASM
    call %XYZ%  NETWORK
    goto patch

:patch
    echo Adjusting OS2INIT.CMD and building C libraries
    set xyz=c:\os2init.cmd

    echo rem>> %xyz%
    echo rem   The following lines brought to you by MS OS/2 SDK>> %xyz%
    echo rem   installation program...>> %xyz%
    echo rem>> %xyz%
    echo set LIB=%sdkdest%\lib>> %xyz%
    echo set INCLUDE=%sdkdest%\include>> %xyz%
    echo set USER=%sdkdest%\init>> %xyz%
    echo set TMP=%sdkdest%\tmp>> %xyz%
    echo path=%path%;%sdkdest%\tools\bin;%sdkdest%\tools\pbin>> %xyz%

    call %xyz%
    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

unix.superglobalmegacorp.com

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