comparison gpf/BIN/pco_install.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 @echo off
2 setlocal
3 rem -----------------------------------------------------------------------------
4 rem Project : PCO
5 rem Modul :
6 rem -----------------------------------------------------------------------------
7 rem Copyright 2005 Texas Instruments Deutschland GmbH
8 rem All rights reserved.
9 rem
10 rem This file is confidential and a trade secret of Texas
11 rem Instruments Berlin, AG
12 rem The receipt of or possession of this file does not convey
13 rem any rights to reproduce or disclose its contents or to
14 rem manufacture, use, or sell anything it may describe, in
15 rem whole, or in part, without the specific written consent of
16 rem Texas Instruments Berlin, AG.
17 rem -----------------------------------------------------------------------------
18 rem | Purpose : PCO installer
19 rem -----------------------------------------------------------------------------
20
21 @if x%1 == x-h goto usage
22
23 set PATH=%PATH%;..\tools\bin;..\..\tools\bin
24 pushd .
25 cd \GPF\assist
26
27 set CP=\GPF\tools\bin\cp.exe
28 set MKLNK=\GPF\BIN\mklnk.exe
29
30 set inst_dir=%1
31 @if x%1 == x set inst_dir=c:\Programme\pco
32
33 rem check other params
34 set official=0
35 @if x%2 == xofficial set official=1 && shift
36 set slim=0
37 @if x%2 == xslim set slim=1 && shift
38 set delivery=0
39 @if x%2 == xdelivery set delivery=1
40 rem echo official=%official%
41 rem echo slim=%slim%
42 rem echo delivery=%delivery%
43
44 if EXIST %inst_dir% goto update
45 @echo Installing into %inst_dir% ...
46 mkdir %inst_dir% 2>nul
47 set xtra_dir=%inst_dir%
48 @if %delivery% == 1 set xtra_dir=%inst_dir%\xtra
49 mkdir %xtra_dir% 2>nul
50 set gentle_dir=%inst_dir%
51 @if %delivery% == 1 set gentle_dir=%inst_dir%\gentle
52 mkdir %gentle_dir% 2>nul
53 set tcgen_dir=%inst_dir%
54 @if %delivery% == 1 set tcgen_dir=%inst_dir%\tcgen
55 mkdir %tcgen_dir% 2>nul
56 set tap_dir=%inst_dir%
57 @if %delivery% == 1 set tap_dir=%inst_dir%\tap
58 mkdir %tap_dir% 2>nul
59 goto copy
60
61 :update
62 @echo Updating %inst_dir% ...
63
64 :copy
65
66 @rem copy pco
67 if EXIST %inst_dir%\BIN attrib /S -R %inst_dir%\*.* 2> nul
68 call files_pco B "%CP% -f -P -R" %inst_dir%
69 call files_pco N "%CP% -f -P -R" %inst_dir%
70 %CP% -f \gpfdoc\components\readme_pco.txt %inst_dir%
71
72 @rem copy xpanel
73 attrib /S -R %inst_dir%\*.* 2> nul 2> nul
74 call files_xpan B "%CP% -f -P -R" %inst_dir%
75 call files_xpan N "%CP% -f -P -R" %inst_dir%
76 %CP% -f \gpfdoc\components\readme_xpan.txt %inst_dir%
77
78 @if %delivery% == 1 goto no_links
79 @rem create win32 links
80 %MKLNK% %inst_dir%\bin\pco2.bat "%inst_dir%\Start PCO.lnk" %inst_dir%\bin "" %inst_dir%\bin\pco_srv.exe
81 %MKLNK% %inst_dir%\doc\pco\pco_intro.pps "%inst_dir%\PCO introduction.lnk" %inst_dir%\doc ""
82
83 :no_links
84 @if %official% == 1 goto official
85
86 @rem copy moanbtn
87 attrib /S -R %inst_dir%\*.* 2> nul
88 call files_mbtn B "%CP% -f -P -R" %inst_dir%
89
90 rem copy tcgen ...
91 @rem copy tcgen
92 call files_tcgen B "%CP% -f -P -R" %tcgen_dir%
93
94 rem copy tap ...
95 @rem copy tap
96 call files_tap B "%CP% -f -P -R" %tap_dir%
97 call files_tapcaller B "%CP% -f -P -R" %tap_dir%
98
99 :official
100 rem copy gentle ...
101 @rem copy gentle
102 call files_gentle B "%CP% -f -P -R" %gentle_dir%
103 %CP% -f \gpf\util\pco\cfg\gentle* %gentle_dir%\cfg
104
105 rem create ccddata-dir
106 mkdir %inst_dir%\ccddata
107 echo "" > %inst_dir%\ccddata\ccddata_example.dll
108 %CP% -f \gpf\BIN\ccddata_dll.dll %inst_dir%\ccddata\ccddata_example.dll
109
110 @if %slim% == 1 goto slim_xtra
111
112 rem copy ccddata prebuilds
113 %CP% -f \gpf\BIN\ccddata\*.dll %inst_dir%\ccddata
114
115 :slim_xtra
116 rem copy xtra tools ...
117 if EXIST %xtra_dir%\BIN attrib /S -R %xtra_dir%\*.* 2> nul
118
119 @rem copy mscview
120 call files_mscview B "%CP% -f -P -R" %xtra_dir%
121
122 @if %slim% == 1 goto slim
123
124 if EXIST cond_decoder.exe %CP% -f cond_decoder.exe %xtra_dir%\BIN
125 if NOT EXIST %xtra_dir%\BIN\cond_decoder.exe %CP% -f \\dbgs2\deveng\cc\gpf\projects\pco\delivery\L1_trace_decoder\cond_decoder.exe %xtra_dir%\BIN
126
127 call files_emw B "%CP% -f -P -R" %xtra_dir%
128 call files_emw N "%CP% -f -P -R" %xtra_dir%
129
130 :slim
131 popd
132 @rem copy ccddata and multiplexer (if existing)
133 attrib /S -R %inst_dir%\*.* 2> nul
134 if EXIST %inst_dir%\BIN\ccddata_dll.dll goto noccddata
135 if EXIST ccddata_dll.dll %CP% -f ccddata_dll.dll %inst_dir%\BIN
136 :noccddata
137
138 @if %delivery% == 1 goto end
139 @echo.
140 @echo Installation/Update finished ;-)
141 if NOT EXIST %inst_dir%\BIN\ccddata_dll.dll @echo You still need a ccddata_dll.dll in %inst_dir%\bin ! (use \GPF\BIN\xm.bat after "makcdg ... ARM")
142 @echo.
143 @echo To start with default config just run pco2.bat in %inst_dir%\bin ...
144 @echo (call "pco2 -h" from command line for more options)
145 @echo.
146 @echo Please find some preconfigured win32-links in %inst_dir% for your convenience ;-)
147 @echo.
148 @echo Have fun !
149 pause
150
151 goto end
152
153 :usage
154 @echo usage:
155 @echo "pco_install [-h|"
156 @echo " <install directory> [official]]"
157
158 :end
159 endlocal