Rev Author Line No. Line
3091 miho 1 @echo off
2 rem Finds installation of Xilinx tools and makes necessary env settings
3  
4 rem ----- Set 32/64 bit
5 if Defined PROCESSOR_ARCHITEW6432 (
6 Set ProcArch=%PROCESSOR_ARCHITEW6432%
7 ) else (
8 Set ProcArch=%PROCESSOR_ARCHITECTURE%
9 )
10 if "%ProcArch%" == "AMD64" Set ProcArch=x64
11 rem echo %ProcArch%
12 if "%ProcArch%" == "x64" (
13 set fileXilinxSet=settings64.bat
14 ) else (
15 set fileXilinxSet=settings32.bat
16 )
17  
18 rem ----- Find Xilinx directory
19 echo Find Xilinx Tools
20 for %%i in (C:\SW32\Xilinx C:\Xilinx) do (
21 rem Take the last directory
22 for /F %%j in ('dir %%i\*.* /AD /B /O-N') do (
23 for %%k in (%%i\%%j\ISE_DS) do (
24 rem echo %%j\%fileXilinxSet%
25 if exist %%k\%fileXilinxSet% (
26 echo Found at %%k\%fileXilinxSet%
27 call %%k\%fileXilinxSet%
28 set XILINX_VERSION=%%j
29 if not "%1"=="" (
30 rem Call script
31 call %1
32 ) else (
33 rem Just set env
34 goto Label1
35 )
36 )
37 )
38 )
39 )
40 :Label1