FreeCalypso > hg > leo2moko-debug
comparison gpf/initvars.bat @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 @rem ----------------------------------------------------------------------------- | |
2 @rem Project : | |
3 @rem Modul : initvars.bat | |
4 @rem ----------------------------------------------------------------------------- | |
5 @rem Copyright 2004 Texas Instruments Deutschland GmbH | |
6 @rem All rights reserved. | |
7 @rem | |
8 @rem This file is confidential and a trade secret of Texas | |
9 @rem Instruments Deutschland GmbH. | |
10 @rem The receipt of or possession of this file does not convey | |
11 @rem any rights to reproduce or disclose its contents or to | |
12 @rem manufacture, use, or sell anything it may describe, in | |
13 @rem whole, or in part, without the specific written consent of | |
14 @rem Texas Instruments Deutschland GmbH. | |
15 @rem ----------------------------------------------------------------------------- | |
16 @rem | Purpose : Setting environment variables for work on GPF, G23M, UMTS etc. | |
17 @rem ----------------------------------------------------------------------------- | |
18 | |
19 @if x%_4ver% == x goto Need4NT | |
20 | |
21 @rem At least so many parameters must be given! | |
22 @if x%4 == x goto How2Use | |
23 | |
24 @rem Set the project name! | |
25 @if x%1 == x goto How2Use | |
26 set PROST=%1 | |
27 | |
28 @rem Check if the SIDE option is given! | |
29 @if x%2 == xMS goto ParametersOK | |
30 @if x%2 == xBS goto ParametersOK | |
31 @goto How2Use | |
32 | |
33 :ParametersOK | |
34 | |
35 @rem Set the network side as mobile or base station! | |
36 set SIDE=%2 | |
37 | |
38 @rem Set the drive and directories where sources, test files, word | |
39 @rem documents, ccd table files are to find! | |
40 set TESTDRIVE=%3 | |
41 set TESTROOT=%3%4 | |
42 set GSMDIR=%3%4 | |
43 | |
44 @if not exist "C:\iar\ew23\cr16\bin\icccr16.exe" goto setDEV | |
45 @set IARDIR=C:/iar/ew23/cr16 | |
46 set PATH=%PATH%;%IARDIR%/bin; | |
47 | |
48 :setDEV | |
49 @rem Drive and Directory for local development! | |
50 set DEV=%3%4 | |
51 | |
52 @rem set path for Codecheck rules! | |
53 set CCRULES=%3%4\TOOLS\CODECHECK\RULES | |
54 | |
55 @rem PROGDIR : where application have been installed. | |
56 @if x%5 == x goto notPROGDIR | |
57 @set PROGDIR=%5 | |
58 @goto ProgDirExit | |
59 | |
60 :notPROGDIR | |
61 | |
62 @if not exist "C:\PROGRAMME\Microsoft Office" goto notPROGRAMME | |
63 @set PROGDIR=C:\PROGRAMME | |
64 @goto ProgDirExit | |
65 :notPROGRAMME | |
66 | |
67 @iff exist "C:\PROGRAM FILES\Microsoft Office" then | |
68 @set PROGDIR=C:\PROGRAM FILES | |
69 @goto ProgDirExit | |
70 | |
71 @else | |
72 @goto notPROGRAMMFILES | |
73 @endiff | |
74 | |
75 :notPROGRAMMFILES | |
76 | |
77 @echo "Error: cannot set Application Directory" | |
78 @goto How2Use | |
79 | |
80 | |
81 :ProgDirExit | |
82 | |
83 | |
84 @rem Call VCVARS! | |
85 call vcvars32 | |
86 @set ret= %_? | |
87 @if %ret% == 0 goto vcVarsOk | |
88 @rem investigating MsDev installations, descending from 7 to 5: | |
89 @iff exist "%PROGDIR%\Microsoft Visual Studio .net\vc7" then | |
90 call "%PROGDIR%\Microsoft Visual Studio .net\vc7\bin\vcvars32.bat" | |
91 @else | |
92 @iff exist "%PROGDIR%\Microsoft Visual Studio\VC98" then | |
93 call "%PROGDIR%\Microsoft Visual Studio\vc98\bin\vcvars32.bat" | |
94 @else | |
95 call "%PROGDIR%\DevStudio\vc\bin\vcvars32.bat" | |
96 @endiff | |
97 @endiff | |
98 | |
99 | |
100 :vcVarsOk | |
101 @iff exist %TESTDRIVE%\gpf then | |
102 set GPF=%TESTDRIVE%\gpf | |
103 @else | |
104 @iff exist %TESTROOT%\..\..\gpf then | |
105 set GPF=%TESTROOT%\..\..\gpf | |
106 @else | |
107 @echo Can't locate your gpf-Directory | |
108 @endiff | |
109 @endiff | |
110 | |
111 @iff "x%GPF%" != "x" then | |
112 @if %@index[%path%,%GPF%\tools\bin;]% LT 0 set PATH=%GPF%\tools\bin;%PATH%; | |
113 @if %@index[%path%,%GPF%\bin;]% LT 0 set PATH=%GPF%\bin;%PATH%; | |
114 | |
115 @endiff | |
116 | |
117 @if x%1 == xg23net goto IsG23NET | |
118 @if x%1 == xgeneric goto IsGeneric | |
119 | |
120 @rem Drive and directory for release generation! | |
121 set TDSDIR=%TESTROOT%\%SIDE%\tds | |
122 set TSTDOCDIR=%TESTROOT%\%SIDE%\doc\test | |
123 set TSTBINDIR=%TESTROOT%\int\bin | |
124 | |
125 @rem TI Software Development Environment! | |
126 set C_OPTION= | |
127 | |
128 @rem Add BIN to PATH! | |
129 @if %@index[%path%,%TSTBINDIR;]% LT 0 set PATH=%PATH%;%TSTBINDIR; | |
130 | |
131 @rem This variable will disappear when gprs makefiles do not use it any more! | |
132 set GTESTROOT=%TESTROOT% | |
133 | |
134 @rem Set paths for auto code generation! | |
135 set CDGINCDIR=%3%4\ms\CDGINC | |
136 | |
137 @goto end | |
138 | |
139 :IsG23NET | |
140 | |
141 @rem set paths for auto code generation: | |
142 set CDGINC=%3%4\CDGINC | |
143 set PRIMDIR=%3%4\TEMP | |
144 set MSGDIR=%3%4\TEMP | |
145 set SAPDOCDIR=%3%4\DOC\SAP | |
146 set MSGDOCDIR=%3%4\DOC\MSG | |
147 set TSTDOCDIR=%3%4\DOC\TEST | |
148 set TDSDIR=%3%4\TEMP | |
149 set TESTDIR=%3%4\TESTDLL | |
150 set BINDIR=%3%4\bin | |
151 | |
152 | |
153 @rem Set the directory for tools! | |
154 set TOOLS=%3%4\TOOLS | |
155 @if %@index[%path%,%TOOLS%;]% LT 0 set PATH=%PATH%;%TOOLS%; | |
156 | |
157 | |
158 :pSOS | |
159 @rem Set Envirment for pSOS2.5! | |
160 @rem ========================= | |
161 @rem : install directory of pSOS+ and board support package | |
162 @SET ISIX86=C:\ISIX86 | |
163 set PSS_ROOT=%ISIX86%/pssx86.250 | |
164 set PSS_BSP=%PSS_ROOT%/bsps/pc | |
165 set SNIFF_MAKE_CMD=snf_gnu | |
166 | |
167 set LM_LICENSE_FILE=%ISIX86%\licenses\license.dat | |
168 set PATH=%PATH%;%ISIX86%\licenses\bin\win32;%ISIX86%\cadul\bin;%PSS_ROOT%\bin\win32;%PSS_ROOT%\bin\win32\gnu;%ISIX86%\sniff\mks\mks-6.1\mksnt | |
169 | |
170 :---- WindRiver stuff --------------------------------------------- | |
171 @echos Adding WindRiver stuff.. | |
172 @set WIND_BASE= | |
173 @set WIND_HOST_TYPE=x86-win32 | |
174 @iff exist c:\tornado then | |
175 set WIND_BASE=c:\tornado | |
176 @else | |
177 @for %drive IN (d e f g h i j k l m n o p q r s t u v w x y z) do ( | |
178 @iff exist %drive%:\host\%WIND_HOST_TYPE% then | |
179 set WIND_BASE=%drive%: | |
180 echo WIND_BASE is %WIND_BASE% WIND_HOST_TYPE: %WIND_HOST_TYPE% | |
181 endiff | |
182 ) | |
183 @endiff | |
184 @iff "%WIND_BASE%"=="" then | |
185 @echo FAILED !!! | |
186 @echo Connect a network drive to the server installed TORNADO directory. | |
187 @echo Afterwards you should have e.g. T:\host\... | |
188 else | |
189 rem set PATH=%WIND_BASE%\host\%WIND_HOST_TYPE%\bin;%PATH% | |
190 set PATH=%PATH%;%WIND_BASE%\host\%WIND_HOST_TYPE%\bin | |
191 endiff | |
192 :---- End of WindRiver stuff -------------------------------------- | |
193 | |
194 @goto end | |
195 | |
196 :IsGeneric | |
197 | |
198 @rem include directotries | |
199 set PROSTINCDIR=%3%4\INC | |
200 set CDGINCDIR=%3%4\INC\CDGINC | |
201 | |
202 @rem primitive directotries | |
203 set SAPDOCDIR=%3%4\SPEC\SAP | |
204 set PRIMDIR=%3%4\OBJ\ENTITY\PDF | |
205 | |
206 @rem air message directotries | |
207 set MSGDOCDIR=%3%4\SPEC\MSG | |
208 set MSGDIR=%3%4\OBJ\ENTITY\MDF | |
209 | |
210 @rem test directotries | |
211 set TSTDOCDIR=%3%4\SPEC\TEST | |
212 set TDSDIR=%3%4\OBJ\ENTITY\TDS | |
213 set TCDIR=%3%4\BIN | |
214 | |
215 @rem those should not be needed anymore | |
216 unset GSMDIR | |
217 | |
218 @goto end | |
219 | |
220 | |
221 :Need4NT | |
222 @echo "Error: 4DOS or 4NT is needed | |
223 @goto end | |
224 | |
225 :How2Use | |
226 @echo "Usage: initvars <project> <MS|BS> <drive> <path> [<prog dir> | <path>] | |
227 @echo "Example1: initvars gsm MS D: \g23m\Condat `C:\Program Files` | |
228 @echo "Example2: initvars gprs MS Z: \g23m\Condat | |
229 @echo "Example3: initvars g23net BS V: \g23net\Dev `C:\Program Files` | |
230 @echo "Example4: initvars generic MS X: \gpf\UTIL\TESTSTACK" | |
231 | |
232 :end | |
233 quit 0 |