source: gs2-extensions/video-and-audio/trunk/src/setup.bat@ 23655

Last change on this file since 23655 was 23655, checked in by ak19, 13 years ago

Sam had discovered that env variables in Win Batch files that occur inside round brackets of if-else stmts need to be using setdelayedexpansion (where exclamation marks replace percent signs). Updated this for 3 setup.bat files in the extensions folder.

  • Property svn:executable set to *
File size: 1.4 KB
Line 
1@echo off
2pushd "%CD%"
3CD /D "%~dp0"
4set GSDLLANG=en
5set extdesc="the Video and Audio Extension"
6
7if "%OS%" == "Windows_NT" goto WinNT
8if "%OS%" == "" goto Win95
9if "%GSDLLANG%" == "en" echo Setup failed - your PATH has not been set
10if "%GSDLLANG%" == "es" echo No se pudo realizar la configuraci¢n - no se ha establecido la RUTA.
11if "%GSDLLANG%" == "fr" echo Ech‚c de l'installation - votre variable PATH n'a pas ‚t‚ ajust‚e
12if "%GSDLLANG%" == "ru" echo “áâ ­®¢ª  ­¥ 〠« áì - “’œ ­¥ ¡ë« ãáâ ­®¢«¥­
13goto End
14
15:WinNT
16set GEXTVIDEO=%CD%
17set GEXTVIDEO_INSTALLED=%GEXTVIDEO%\windows
18
19set PATH=%GEXTVIDEO_INSTALLED%\bin;%PATH%
20set GS_CP_SET=yes
21goto Success
22
23:Win95
24if "%1" == "SetEnv" goto Win95Env
25REM We'll invoke a second copy of the command processor to make
26REM sure there's enough environment space
27COMMAND /E:2048 /K %0 SetEnv
28goto End
29
30:Win95Env
31set GEXTVIDEO=%CD%
32set PATH="%GEXTVIDEO_INSTALLED%\bin";"%PATH%"
33set GS_CP_SET=yes
34goto Success
35
36:Success
37
38set fulldir=%~dp0
39
40:: strip off everything up to (and including) ext dir
41set extdir=%fulldir:*ext\=%
42
43:: remove trailing slash
44set extdir=%extdir:\=%
45
46
47setlocal enabledelayedexpansion
48if "x%GSDLEXTS%" == "x" (
49 set GSDLEXTS=!extdir!
50) else (
51 set GSDLEXTS=!GSDLEXTS!:!extdir!
52)
53endlocal & set GSDLEXTS=%GSDLEXTS%
54
55echo +Your environment is now setup for %extdesc%
56
57:End
58
59popd
Note: See TracBrowser for help on using the repository browser.