Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

666 lines
20 KiB

  1. @echo off
  2. REM init
  3. set xe_err=
  4. set xe_req_id=
  5. set xe_dll=
  6. set xe_pdb=
  7. set xe_os_str=
  8. set xe_req_id=
  9. set xe_prs_uns_path=
  10. set xe_prs_s_path=
  11. set xe_platform=
  12. set xe_lang_group=
  13. set xe_codepage=
  14. set xe_lcid=
  15. set xe_prilangid=
  16. set xe_sublangid=
  17. set xe_lang=
  18. set xe_new_token=
  19. set xe_lang_group=
  20. set xe_display_tokens=
  21. REM default to xenroll, can be used for scrdenrl
  22. set xe_target=xenroll
  23. REM default to usa
  24. set xe_def_lang=usa
  25. set xe_lang_list=%xe_def_lang%
  26. set xe_lang_group1=chs cht kor jpn ger br cs da el es fi fr hu it nl no pl pt ru sv tr
  27. set xe_lang_group2=ara heb
  28. set xe_lang_all=%xe_def_lang% %xe_lang_group1% %xe_lang_group2%
  29. set xe_prs_web=http://prslab/cs2001/createjob.asp
  30. set xe_prs_uns_prefix=\\prslab\unsigned2
  31. REM set xe_prs_uns_prefix=d:\t-unsign
  32. set xe_prs_s_prefix=\\prslab\signed2
  33. REM set xe_prs_s_prefix=d:\t-sign
  34. set xe_os_str=32-bit Windows
  35. REM wait 1 minutes
  36. set xe_wait=60
  37. set xe_test_flag=n
  38. set xe_projects_nt=xe_projects_nt
  39. set xe_platform_all=i386 ia64
  40. if /i "%1"=="-dt" (
  41. REM display new tokens only
  42. set xe_display_tokens=y
  43. set xe_rel_path=%sdxroot%\ds\security\cryptoapi\pki\activex\release\%xe_target%
  44. call :GetOrDisplayAllNewTokens
  45. REM done
  46. goto :EOF
  47. )
  48. if /i "%1"=="-gt" (
  49. REM get new tokens into local SD
  50. set xe_display_tokens=
  51. set xe_rel_path=%sdxroot%\ds\security\cryptoapi\pki\activex\release\%xe_target%
  52. set xe_token_path=%xe_rel_path%\tokens
  53. call :GetOrDisplayAllNewTokens
  54. REM done
  55. goto :EOF
  56. )
  57. REM make sure no PRS release location change
  58. if not exist %xe_prs_uns_prefix% (
  59. set xe_err=%xe_prs_uns_prefix% doesn't exist. Please contact %xe_target%.dll dev owner.
  60. goto error
  61. )
  62. if not exist %xe_prs_s_prefix% (
  63. set xe_err=%xe_prs_s_prefix% doesn't exist. Please contact %xe_target%.dll dev owner.
  64. goto error
  65. )
  66. REM make sure %xe_target%.dll and %xe_target%.pdb files exist
  67. if "%1"=="" (
  68. set xe_err=%xe_target%.dll file is missed
  69. goto error
  70. )
  71. if "%2"=="" (
  72. set xe_err=%xe_target%.pdb file is missed
  73. goto error
  74. )
  75. set xe_dll_path=%1
  76. set xe_pdb_path=%2
  77. if not "%3" == "" (
  78. call :GetNextArg %3 %4 %5 %6 %7 %8 %9
  79. REM should never be here
  80. goto :EOF
  81. )
  82. :GetStarted
  83. if "%xe_platform%"=="" (
  84. if "%BUILD_DEFAULT_TARGETS%"=="-x86" (
  85. set xe_platform=i386
  86. goto init_sd
  87. )
  88. if "%BUILD_DEFAULT_TARGETS%"=="-ia64" (
  89. set xe_platform=ia64
  90. goto init_sd
  91. )
  92. REM can't determine
  93. set xe_err=can't determine the platform. please make sure you run %0 from a razzle window with a proper platform.
  94. goto error
  95. )
  96. if not "%xe_platform%"=="" (
  97. if /i "i386"=="%xe_platform%" goto init_sd
  98. if /i "ia64"=="%xe_platform%" goto init_sd
  99. REM not supported
  100. set xe_err=%xe_platform% platform is not supported.
  101. goto error
  102. )
  103. :init_sd
  104. REM determine more variables
  105. set xe_rel_path=%sdxroot%\ds\security\cryptoapi\pki\activex\release\%xe_target%
  106. set xe_token_path=%xe_rel_path%\tokens
  107. set xe_dll=%xe_dll_path%\%xe_target%.dll
  108. set xe_pdb=%xe_pdb_path%\%xe_target%.pdb
  109. REM make sure current machine has DS enlistment
  110. if not exist %xe_rel_path% (
  111. set xe_err=%xe_target% release enlistment %sdxroot%\%xe_rel_path% not found on this machine. Please make sure you have run %0 from a razzle window or make sure you have DS enlistment on the machine.
  112. goto error
  113. )
  114. if not exist %xe_dll% (
  115. set xe_err=%xe_dll% doesn't exist
  116. goto error
  117. )
  118. if not exist %xe_pdb% (
  119. set xe_err=%xe_pdb% doesn't exist
  120. goto error
  121. )
  122. REM determine language list
  123. if "%xe_lang%"=="" set xe_lang=%xe_def_lang%
  124. set xe_lang_list=%xe_lang%
  125. if /i "%xe_lang%"=="all" set xe_lang_list=%xe_lang_all%
  126. REM scan virus here
  127. echo.
  128. echo scanning virus...
  129. echo.
  130. REM inocucmd.exe is only local command
  131. cd /d %xe_rel_path%
  132. inocucmd.exe %xe_dll%
  133. echo.
  134. echo Finished virus checking on %xe_dll%
  135. set /p xe_goon=Is virus checking OK?(y/n):
  136. if /i not "%xe_goon%"=="y" (
  137. set xe_err=VIRUS may have been detected. Please make sure your dll or symbols are OK
  138. goto error
  139. )
  140. REM display signing instruction
  141. if /i "%xe_platform%"=="ia64" set xe_os_str=Whistler 64-bit Windows
  142. echo.
  143. echo You have to sign %xe_target%.dll by going to %xe_prs_web%
  144. echo Here is the steps:
  145. echo.
  146. echo 1. Fill in or select the following:
  147. echo.
  148. echo Job Description: %xe_lang_list% %xe_target%.dll signing for %xe_platform%
  149. echo Certificate Type: Microsoft Corporation (MS Root Issued) (default)
  150. echo Virus Checker: Cheyenne (Innoculan) (default)
  151. echo Virus Checker Engine: 4.0
  152. echo.
  153. echo 2. Provide at least two MS employee email aliases who can
  154. echo sign off the request
  155. echo.
  156. echo 3. You may consider to enter %xe_dll%
  157. echo in Notes to indicate where you get your %xe_target%.dll
  158. echo.
  159. echo 4. Click [Next->] button at the bottom of the page
  160. echo.
  161. echo 5. Look at the next web page for a path to %xe_prs_uns_prefix%\^<userid#####^>
  162. echo userid is the creator alias and ##### is the SubmissionID
  163. echo.
  164. echo It is about to invoke IE at %xe_prs_web%
  165. pause
  166. start %xe_prs_web%
  167. :enter_userid
  168. echo.
  169. set /p xe_req_id= 6. After step 6, enter PRS job ^<userid#####^>:
  170. if "%xe_req_id%"=="" (
  171. set xe_err=^<userid#####^> cannot be empty
  172. goto error
  173. )
  174. set xe_prs_uns_path=%xe_prs_uns_prefix%\%xe_req_id%
  175. if not exist %xe_prs_uns_path% (
  176. echo.
  177. echo Error: %xe_prs_uns_path% not found
  178. echo Make sure you entered the correct ^<userid#####^> above.
  179. echo For example, xtan62520.
  180. set xe_req_id=
  181. echo.
  182. goto enter_userid
  183. )
  184. REM get unsigned share
  185. set xe_prs_s_path=%xe_prs_s_prefix%\%xe_req_id%
  186. REM make sure creat empty list.txt file
  187. if exist %xe_prs_uns_path%\list.txt del /f /q %xe_prs_uns_path%\list.txt
  188. REM have to set > to a variable
  189. REM detremine language group
  190. REM for %%j in (%xe_lang_group1%) do (
  191. REM if /i "%%j"=="%1" set xe_lang_group_id=1
  192. REM )
  193. REM for %%j in (%xe_lang_group2%) do (
  194. REM if /i "%%j"=="%1" set xe_lang_group_id=2
  195. REM )
  196. REM echo your group is in %xe_lang_group_id%
  197. if /i "%xe_lang%"=="%xe_def_lang%" (
  198. call :ProcessOneLanguage %xe_lang% 0
  199. goto start_sign
  200. )
  201. if /i "%xe_lang%"=="ara" (
  202. call :ProcessOneLanguage %xe_lang% 2
  203. goto start_sign
  204. )
  205. if /i "%xe_lang%"=="heb" (
  206. call :ProcessOneLanguage %xe_lang% 2
  207. goto start_sign
  208. )
  209. if /i not "%xe_lang%"=="all" (
  210. call :ProcessOneLanguage %xe_lang% 1
  211. goto start_sign
  212. )
  213. if /i "%xe_lang%"=="all" (
  214. REM unfortunately I can't use for loop here
  215. call :ProcessOneLanguage usa 0
  216. call :ProcessOneLanguage ger 1
  217. call :ProcessOneLanguage jpn 1
  218. call :ProcessOneLanguage kor 1
  219. call :ProcessOneLanguage chs 1
  220. call :ProcessOneLanguage cht 1
  221. call :ProcessOneLanguage br 1
  222. call :ProcessOneLanguage cs 1
  223. call :ProcessOneLanguage da 1
  224. call :ProcessOneLanguage el 1
  225. call :ProcessOneLanguage es 1
  226. call :ProcessOneLanguage fi 1
  227. call :ProcessOneLanguage fr 1
  228. call :ProcessOneLanguage hu 1
  229. call :ProcessOneLanguage it 1
  230. call :ProcessOneLanguage nl 1
  231. call :ProcessOneLanguage no 1
  232. call :ProcessOneLanguage pl 1
  233. call :ProcessOneLanguage pt 1
  234. call :ProcessOneLanguage ru 1
  235. call :ProcessOneLanguage sv 1
  236. call :ProcessOneLanguage tr 1
  237. call :ProcessOneLanguage ara 2
  238. call :ProcessOneLanguage heb 2
  239. )
  240. :start_sign
  241. echo.
  242. echo 7. Click [Generate File List] button
  243. echo Verify that your files show up.
  244. echo.
  245. echo 8. Click [Step 3: Submit] button at the left of the page
  246. echo.
  247. echo 9. Sign off on your request
  248. echo Note: sometimes PRSLAB can fail to notify the persons you entered for
  249. echo the request sign-off. You may consider to notify them by yourself.
  250. echo.
  251. echo 10. Hit any key to begin waiting for the files to be signed.
  252. echo.
  253. pause
  254. REM wait in a loop to check if each signed dll appears
  255. for %%i in (%xe_lang_list%) do (
  256. call :CheckSignedFile %%i %xe_wait% %xe_target% %xe_prs_s_path%
  257. )
  258. REM detremine test flag
  259. if not "%xe_target%"=="xenroll" goto chktrust
  260. if /i "%xe_platform%"=="%PROCESSOR_ARCHITECTURE%" goto check_test
  261. if /i "%xe_platform%"=="i386" (
  262. if /i "%PROCESSOR_ARCHITECTURE%"=="x86" goto check_test
  263. )
  264. echo cannot run "%PROCESSOR_ARCHITECTURE%" txenrol.exe on %xe_platform% machine
  265. goto begin_checkout
  266. :check_test
  267. REM have to try to find txenrol.exe
  268. set xe_txenrol=%sdxroot%\ds\security\cryptoapi\test\capi20\txenrol\obj\%xe_platform%\txenrol.exe
  269. if not exist %xe_txenrol% goto begin_checkout
  270. set xe_txenrol=%_NTTREE%\dump\txenrol.exe
  271. if not exist %xe_txenrol% goto begin_checkout
  272. set xe_test_flag=y
  273. :begin_checkout
  274. REM loop to check out released dll and copy new signed one
  275. for %%i in (%xe_lang_list%) do (
  276. echo.
  277. echo %xe_target%.dll for %%i language has been signed successfully.
  278. echo checking out and copying %xe_target% files...
  279. cd /d %xe_rel_path%\%%i\%xe_platform%
  280. sd edit %xe_rel_path%\%%i\%xe_platform%\%xe_target%.dll
  281. copy /v /y %xe_prs_s_path%\%%i-%xe_target%.dll %xe_rel_path%\%%i\%xe_platform%\%xe_target%.dll
  282. if /i "usa"=="%%i" (
  283. sd edit %xe_rel_path%\%%i\%xe_platform%\%xe_target%.pdb
  284. copy /v /y %xe_pdb% %xe_rel_path%\%%i\%xe_platform%\%xe_target%.pdb
  285. )
  286. )
  287. if /i "%xe_test_flag%"=="n" (
  288. echo txenrol.exe test will be skipped.
  289. goto chktrust
  290. )
  291. set xe_txenrol_trash=Original.cer RA1.cer RA1.p7s RA2.cer RA2.p7s Renewal.p7s
  292. for %%i in (%xe_lang_list%) do (
  293. echo.
  294. echo. BVT test on %xe_rel_path%\%%i\%xe_platform%\%xe_target%.dll
  295. echo.
  296. cd /d %xe_rel_path%\%%i\%xe_platform%
  297. copy /v /y %xe_txenrol% %xe_rel_path%\%%i\%xe_platform%
  298. regsvr32 /s %xe_rel_path%\%%i\%xe_platform%\%xe_target%.dll
  299. .\txenrol.exe
  300. regsvr32 /s %systemroot%\system32\%xe_target%.dll
  301. del /f /q %xe_rel_path%\%%i\%xe_platform%\txenrol.exe
  302. for %%j in (%xe_txenrol_trash%) do del /f /q %xe_rel_path%\%%i\%xe_platform%\%%j
  303. echo.
  304. echo please make sure txenrol test is passed.
  305. echo Note: you may see some failures if you are not running on whistler build
  306. echo please contact xenroll dev/test owner to confirm.
  307. pause
  308. )
  309. :chktrust
  310. for %%i in (%xe_lang_list%) do (
  311. echo.
  312. echo. Verify signature/timestamp on signed dll .\%%i\%xe_platform%\%xe_target%.dll
  313. echo.
  314. chktrust.exe -q -tswarn %xe_rel_path%\%%i\%xe_platform%\%xe_target%.dll
  315. echo.
  316. echo please make sure chktrust test is passed.
  317. pause
  318. )
  319. echo.
  320. echo Please check in the following files as guided by your VBL
  321. echo.
  322. for %%i in (%xe_lang_list%) do (
  323. echo %xe_rel_path%\%%i\%xe_platform%\%xe_target%.dll
  324. if /i "usa"=="%%i" (
  325. echo %xe_rel_path%\%%i\%xe_platform%\%xe_target%.pdb
  326. )
  327. )
  328. :cleanup
  329. REM clean up temp files
  330. for %%i in (%xe_lang_list%) do (
  331. if exist %xe_token_path%\%%i\%xe_target%.dll del /f /q %xe_token_path%\%%i\%xe_target%.dll
  332. )
  333. cd /d %xe_rel_path%
  334. set xe_err=
  335. set xe_lang=
  336. set xe_def_lang=
  337. set xe_lang_group1=
  338. set xe_lang_group2=
  339. set xe_lang_group=
  340. set xe_lang_list=
  341. set xe_lang_all=
  342. set xe_platform=
  343. set xe_platform_all=
  344. set xe_new_token=
  345. set xe_os_str=
  346. set xe_target=
  347. set xe_prs_path=
  348. set xe_prs_s_path=
  349. set xe_prs_s_prefix=
  350. set xe_prs_uns_path=
  351. set xe_prs_uns_prefix=
  352. set xe_prs_web=
  353. set xe_rel_path=
  354. set xe_req_id=
  355. set xe_uns_path_prfx=
  356. set xe_wait=
  357. set xe_dll=
  358. set xe_pdb=
  359. set xe_dll_path=
  360. set xe_pdb_path=
  361. set xe_goon=
  362. set xe_txenrol=
  363. set xe_localized=
  364. set xe_txenrol_trash=
  365. set xe_token_path=
  366. set xe_skip_test=
  367. set xe_test_flag=
  368. set xe_lang_group=
  369. set xe_codepage=
  370. set xe_lcid=
  371. set xe_prilangid=
  372. set xe_sublangid=
  373. set xe_projects_nt=
  374. set xe_display_tokens=
  375. goto end
  376. :error
  377. echo.
  378. if not "%xe_err%"=="" echo Error: %xe_err%
  379. :usage
  380. echo.
  381. echo Usage:
  382. echo.
  383. echo %0 DLLPath PDBPath [Options]
  384. echo.
  385. echo Options:
  386. echo -p Platform either i386 or ia64,
  387. echo the default is the same as the current machine
  388. echo.
  389. echo -l if -l is defined, all languages will be localized
  390. echo and signed. Otherwise only usa language is processed.
  391. REM echo -l Language any of (%xe_lang_all%) or all
  392. REM echo default is %xe_def_lang%
  393. REM echo Language can be "all" to process all languages
  394. echo.
  395. echo -t TxenrolFullPath
  396. echo if not provided, will try to find in build or
  397. echo release location by default. otherwise skip the test.
  398. echo.
  399. echo -nt if -nt is defined, will get new tokens from foreign
  400. echo depots and update local tokens cache.
  401. echo otherwise local cached tokens will be used.
  402. echo.
  403. echo -dt if -dt is defined, it will only display token checkin
  404. echo histories without localization and signing.
  405. echo.
  406. echo -gt if -gt is defined, it will fetch all new tokens
  407. echo for caching them into local SD tree.
  408. goto cleanup
  409. :end
  410. echo.
  411. echo Done
  412. goto :EOF
  413. :CheckSignedFile %1 %2 %3 %4
  414. :wait_signing
  415. echo.
  416. echo waiting in increments of %2 seconds for %1-%3.dll
  417. echo to be signed in %4
  418. if not exist %4\%1-%3.dll (
  419. sleep %2
  420. goto wait_signing
  421. )
  422. echo %1-%3.dll has been signed and released at %4
  423. REM looks signing process puts un-signed dll there first,
  424. REM some seconds sleep to help getting signed dll
  425. sleep %2
  426. goto :EOF
  427. :ProcessOneLanguage
  428. if /i "%1"=="%xe_def_lang%" (
  429. echo.
  430. echo copying your unsigned %xe_dll% files
  431. echo to %xe_prs_uns_path%\%1-%xe_target%.dll...
  432. REM note following copy rename the file with lang prefix
  433. copy /v /y %xe_dll% %xe_prs_uns_path%\%1-%xe_target%.dll
  434. REM generate list.txt file for signing
  435. echo %1-%xe_target%.dll,Microsoft Certificate Enrollment Control,http://www.microsoft.com >>%xe_prs_uns_path%\list.txt
  436. goto :EOF
  437. )
  438. REM localization start from here
  439. REM Language-specific settings for localization
  440. REM if not exist %xe_token_path%\%1\%xe_target%.dl_ (
  441. REM if not exist %xe_token_path%\%1\%xe_target%.dll.rsrc (
  442. REM set xe_err= token for %1 not found
  443. REM goto error
  444. REM )
  445. REM )
  446. for %%a in (xe_codepage xe_lcid xe_prilangid xe_sublangid) do set %%a=
  447. for /f "tokens=1,2,3,4,5 eol=;" %%a in (%sdxroot%\tools\codes.txt) do (
  448. if /i "%%a"=="%1" (
  449. set xe_codepage=%%b
  450. set xe_lcid=%%c
  451. set xe_prilangid=%%d
  452. set xe_sublangid=%%e
  453. )
  454. )
  455. set xe_lcid=%xe_lcid:0x0=%
  456. for %%a in (xe_codepage xe_lcid xe_prilangid xe_sublangid) do (
  457. if not defined %%a (
  458. set xe_err=%%a not defined in %sdxroot%\tools\codes.txt
  459. goto error
  460. )
  461. )
  462. if /i "%xe_new_token%" == "y" (
  463. call :GetOrDisplayNewTokens %1 %2
  464. )
  465. REM non-mirrored languages use bingen.exe.
  466. REM Localization contact for Redmond languages: uwesdir
  467. if /i "%2"=="1" (
  468. echo.
  469. echo bingen.exe to localize %xe_target%.dll to %1 language...
  470. echo.
  471. REM make sure no localized dll exists in token dir
  472. if exist %xe_token_path%\%1\%xe_target%.dll del /f /q %xe_token_path%\%1\%xe_target%.dll
  473. bingen.exe -n -w -v -f -p %xe_codepage% -o %xe_prilangid% %xe_sublangid% -r %xe_dll% %xe_token_path%\%1\%xe_target%.dl_ %xe_token_path%\%1\%xe_target%.dll
  474. echo.
  475. echo copying your unsigned %xe_token_path%\%1\%xe_target%.dll files
  476. echo to %xe_prs_uns_path%\%1-%xe_target%.dll...
  477. REM note following copy rename the file with lang prefix
  478. copy /v /y %xe_token_path%\%1\%xe_target%.dll %xe_prs_uns_path%\%1-%xe_target%.dll
  479. REM generate list.txt file for signing
  480. echo %1-%xe_target%.dll,Microsoft Certificate Enrollment Control,http://www.microsoft.com >>%xe_prs_uns_path%\list.txt
  481. )
  482. REM Arabic and Hebrew use rsrc.exe to localize their images;
  483. if /i "%2"=="2" (
  484. echo.
  485. echo rsrc.exe to localize %xe_target%.dll to %1 language...
  486. echo.
  487. REM rsrc replaces exe resource so copy original to token local
  488. REM make sure no local one exists
  489. if exist %xe_token_path%\%1\%xe_target%.dll del /f /q %xe_token_path%\%1\%xe_target%.dll
  490. copy /v /y %xe_dll% %xe_token_path%\%1\%xe_target%.dll
  491. rsrc.exe %xe_token_path%\%1\%xe_target%.dll -r %xe_token_path%\%1\%xe_target%.dll.rsrc -l %xe_lcid%
  492. REM if errorlevel 1 (
  493. REM set xe_err=rsrc localization failed
  494. REM goto error
  495. REM )
  496. echo.
  497. echo copying your unsigned %xe_token_path%\%1\%xe_target%.dll files
  498. echo to %xe_prs_uns_path%\%1-%xe_target%.dll...
  499. REM note following copy rename the file with lang prefix
  500. copy /v /y %xe_token_path%\%1\%xe_target%.dll %xe_prs_uns_path%\%1-%xe_target%.dll
  501. REM generate list.txt file for signing
  502. echo %1-%xe_target%.dll,Microsoft Certificate Enrollment Control,http://www.microsoft.com >>%xe_prs_uns_path%\list.txt
  503. )
  504. goto :EOF
  505. :GetOrDisplayNewTokens
  506. REM generate new local project files to get the current token sdport
  507. findstr /i _res %sdxroot%\tools\projects.nt >%xe_rel_path%\%xe_projects_nt%
  508. for %%a in (xe_token_res xe_token_int xe_token_sdport) do set %%a=
  509. for /f "tokens=1,2,3 eol=;" %%a in (%xe_rel_path%\%xe_projects_nt%) do (
  510. if /i "%%a"=="%1_res" (
  511. set xe_token_res=%%a
  512. set xe_token_int=%%b
  513. set xe_token_sdport=%%c
  514. )
  515. )
  516. for %%a in (xe_token_res xe_token_int xe_token_sdport) do (
  517. if "%%a"=="" (
  518. set xe_err=%%a not defined in %sdxroot%\tools\projects.nt
  519. REM delete temp projects file
  520. del /f /q %xe_rel_path%\%xe_projects_nt%
  521. goto error
  522. )
  523. )
  524. REM delete temp projects file
  525. del /f /q %xe_rel_path%\%xe_projects_nt%
  526. REM check out the current token
  527. if /i "%2"=="1" (
  528. if /i "%xe_display_tokens%"=="" (
  529. sd edit %xe_token_path%\%1\%xe_target%.dl_
  530. sd -p %xe_token_sdport% print -q //depot/main/%1_res/windows/tokens/premerge/%xe_target%.dl_ >%xe_token_path%\%1\%xe_target%.dl_
  531. )
  532. sd -p %xe_token_sdport% filelog -m 1 //depot/main/%1_res/windows/tokens/premerge/%xe_target%.dl_
  533. )
  534. if /i "%2"=="2" (
  535. if /i "%xe_display_tokens%"=="" (
  536. sd edit %xe_token_path%\%1\%xe_target%.dll.rsrc
  537. sd -p %xe_token_sdport% print -q //depot/main/%1_res/windows/tokens/premerge/%xe_target%.dll.rsrc >%xe_token_path%\%1\%xe_target%.dll.rsrc
  538. )
  539. sd -p %xe_token_sdport% filelog -m 1 //depot/main/%1_res/windows/tokens/premerge/%xe_target%.dll.rsrc
  540. )
  541. goto :EOF
  542. :GetOrDisplayAllNewTokens
  543. call :GetOrDisplayNewTokens ger 1
  544. call :GetOrDisplayNewTokens jpn 1
  545. call :GetOrDisplayNewTokens kor 1
  546. call :GetOrDisplayNewTokens chs 1
  547. call :GetOrDisplayNewTokens cht 1
  548. call :GetOrDisplayNewTokens br 1
  549. call :GetOrDisplayNewTokens cs 1
  550. call :GetOrDisplayNewTokens da 1
  551. call :GetOrDisplayNewTokens el 1
  552. call :GetOrDisplayNewTokens es 1
  553. call :GetOrDisplayNewTokens fi 1
  554. call :GetOrDisplayNewTokens fr 1
  555. call :GetOrDisplayNewTokens hu 1
  556. call :GetOrDisplayNewTokens it 1
  557. call :GetOrDisplayNewTokens nl 1
  558. call :GetOrDisplayNewTokens no 1
  559. call :GetOrDisplayNewTokens pl 1
  560. call :GetOrDisplayNewTokens pt 1
  561. call :GetOrDisplayNewTokens ru 1
  562. call :GetOrDisplayNewTokens sv 1
  563. call :GetOrDisplayNewTokens tr 1
  564. call :GetOrDisplayNewTokens ara 2
  565. call :GetOrDisplayNewTokens heb 2
  566. goto :EOF
  567. :GetNextArg
  568. if "%1" == "help" goto usage
  569. if "%1" == "-?" goto usage
  570. if "%1" == "/?" goto usage
  571. if "%1" == "-help" goto usage
  572. if "%1" == "/help?" goto usage
  573. if /I "%1" == "-p" (
  574. if "%2" == "" (
  575. set xe_err = missing platform define after %1
  576. goto error
  577. )
  578. set xe_platform=%2
  579. shift
  580. shift
  581. goto ArgOK
  582. )
  583. if /I "%1" == "-l" (
  584. REM if "%2" == "" (
  585. REM set xe_err = missing language define after %1
  586. REM goto error
  587. REM )
  588. REM set xe_lang=%2
  589. set xe_lang=all
  590. REM shift
  591. shift
  592. goto ArgOK
  593. )
  594. if /I "%1" == "-t" (
  595. if not "%2" == "" (
  596. set xe_txenrol=%2
  597. shift
  598. )
  599. shift
  600. goto ArgOK
  601. )
  602. if /I "%1" == "-nt" (
  603. set xe_new_token=y
  604. shift
  605. goto ArgOK
  606. )
  607. if NOT "%1" == "" (
  608. set xe_err = Unknown argument: %1
  609. goto usage
  610. )
  611. if "%1" == "" goto :GetStarted
  612. :ArgOK
  613. goto :GetNextArg