@echo off
set DefDrive=A:
for %%x in (ARABIC arabic HEBREW hebrew) do IF (%1) == (%%x) goto common
goto badinv

:common

ver | find /i "95" > NUL
if errorlevel 1 goto WinNT
goto Win_95_NT

:WinNT
ver | find /i "NT" > NUL
if errorlevel 1 goto WIN16

rem Windows 95 or Windows NT

:Win_95_NT

if %2.==. goto skip1
set DefDrive=%2
goto skip2

:skip1

@echo *
@echo ********************************************************************
@echo * Make sure Personal Communications diskette #2 is in %DefDrive%
@echo ********************************************************************
@echo *
pause

:skip2
@echo *
@echo ********************************************************************
@echo *                                                                  *
@echo *        Copying the font file, please wait ...                    *
@echo *                                                                  *
@echo ********************************************************************
@echo *
IF %1 == ARABIC goto arabicC
IF %1 == arabic goto arabicC
IF %1 == HEBREW goto hebrewC
IF %1 == hebrew goto hebrewC

:arabicC
IF not EXIST %DefDrive%\pcsansia.fon goto skip1
copy %DefDrive%\pcsansia.fon
goto finish

:hebrewC
IF not EXIST %DefDrive%\pcsansih.fon goto skip1
copy %DefDrive%\pcsansih.fon
goto finish

rem Windows 16

:WIN16

if %2.==. goto Win16_2
set DefDrive=%2
goto Win16_3

:Win16_2

@echo *
@echo ********************************************************************
@echo *   Make sure Personal Communications diskette #5 is in %DefDrive%
@echo * ( If using Chinese or Korean packages, use diskette #6. )
@echo ********************************************************************
@echo *
pause

:Win16_3

@echo *
@echo ********************************************************************
@echo *                                                                  *
@echo *        Copying the font file, please wait ...                    *
@echo *                                                                  *
@echo ********************************************************************
@echo *
IF %1 == ARABIC goto arabicf
IF %1 == arabic goto arabicf
IF %1 == HEBREW goto hebrewf
IF %1 == hebrew goto hebrewf

:arabicf
IF not EXIST %DefDrive%\pcsansia.fo_ goto Win16_2
decomp %DefDrive%\pcsansia.fo_ pcsansia.fon
goto finish

:hebrewf
IF not EXIST %DefDrive%\pcsansih.fo_ goto Win16_2
decomp %DefDrive%\pcsansih.fo_ pcsansih.fon
goto finish

:badinv
@echo *ÿ
@echo ********************************************************************
@echo *                                                                  *
@echo *                                                                  *
@echo *     The correct syntax is:                                       *
@echo *    ÿ                                                             *
@echo *            BIDIFONT  LanguageID [ Drive:\Directory ]             *
@echo *                                                                  *
@echo *                                                                  *
@echo *     LanguageID = ARABIC or HEBREW                                *
@echo *                                                                  *
@echo *     Drive:\Directory is optional and defaults to A:              *
@echo *                                                                  *
@echo *                                                                  *
@echo ********************************************************************
@echo *ÿ
goto Xit

:finish
@echo *ÿ
@echo ********************************************************************
@echo *     BIDI Font installed.                                         *
@echo ********************************************************************
goto Xit

:Xit
