"Fossies" - the Fresh Open Source Software Archive

Member "edict/wininstall.bat" (30 May 2010, 2298 Bytes) of package /linux/privat/old/edict-2.6.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) MS DOS Batch source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 @ECHO OFF
    2 REM *******************************************************************
    3 REM wininstall.bat
    4 REM
    5 REM Batch file to install edict on windows.
    6 REM
    7 REM Author: Vishal Verma <vermavee@users.sf.net>
    8 REM Created:    Fri Dec 27 10:58:54 PST 2002
    9 REM *******************************************************************
   10 
   11 SET TARGETDIR=c:\windows\system32
   12 IF EXIST %TARGETDIR% GOTO parseargs
   13 SET TARGETDIR=c:\winnt\system32
   14 
   15 
   16 :parseargs
   17 REM If a target dir wasn't specified, start installing in default dir
   18 IF "%1"=="" GOTO installit
   19 
   20 REM target dir was specified, take it into account
   21 SET TARGETDIR=%1
   22 
   23 REM See if target dir is an absolute path
   24 ECHO %TARGETDIR% | FIND ":\" > NUL
   25 IF %ERRORLEVEL%==1 GOTO absolutepatherror
   26 
   27 REM See if the target dir exists
   28 IF EXIST %TARGETDIR% GOTO installit
   29 
   30 
   31 
   32 :askcreatedir
   33 REM Create the dir
   34 yn yn The directory %TARGETDIR% doesn't exist. Do you want to create it? 
   35 IF %ERRORLEVEL%==0 GOTO ynerror
   36 IF %ERRORLEVEL%==2 GOTO exit
   37 mkdir %TARGETDIR% > NUL
   38 IF NOT %ERRORLEVEL%==0 GOTO exit
   39 
   40 
   41 
   42 :installit
   43 ECHO Installing edict in %TARGETDIR%
   44 COPY /Y edict %TARGETDIR% > NUL
   45 COPY /Y edict %TARGETDIR%\ethes > NUL
   46 IF NOT %ERRORLEVEL%==0 GOTO exit
   47 ECHO @perl %TARGETDIR%\edict %%1 > %TARGETDIR%\edict.bat
   48 ECHO @perl %TARGETDIR%\ethes %%1 > %TARGETDIR%\ethes.bat
   49 ECHO edict successfully installed in %TARGETDIR%
   50 
   51 PATH | FIND /I "%TARGETDIR%" > NUL
   52 IF %ERRORLEVEL%==0 GOTO checkperlexist
   53 ECHO You should now modify your PATH to include the dir "%TARGETDIR%".
   54 ECHO Click on the System icon in Control Panel and go to the Advanced tab.
   55 ECHO Click on "Environment Variables..." to edit your PATH.
   56 
   57 
   58 :checkperlexist
   59 IF EXIST C:\Perl\BIN\Perl.EXE GOTO exit
   60 
   61 ECHO+
   62 ECHO Looks like you don't have Perl installed on your system. You can
   63 ECHO download Perl from 
   64 ECHO http://www.activestate.com/activeperl/downloads
   65 GOTO exit
   66 
   67 
   68 
   69 :ynerror
   70 REM Invalid option error
   71 ECHO ERROR: Invalid option chosen. Please try again.
   72 GOTO askcreatedir
   73 
   74 
   75 
   76 :absolutepatherror
   77 REM The path specified wasn't absolute
   78 ECHO ERROR: The target path should be absolute path e.g. C:\MY\DIR
   79 GOTO exit
   80 
   81 
   82 
   83 :exit
   84 ECHO You can run edict as:
   85 ECHO     edict ^<word^>
   86 ECHO which will show the meaning(s) of ^<word^>
   87 ECHO You can also run:
   88 ECHO     ethes ^<word^>
   89 ECHO which will show the synonym(s)/antonym(s) for ^<word^>