sl@0: @echo off sl@0: rem sl@0: rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: rem All rights reserved. sl@0: rem This component and the accompanying materials are made available sl@0: rem under the terms of the License "Eclipse Public License v1.0" sl@0: rem which accompanies this distribution, and is available sl@0: rem at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: rem sl@0: rem Initial Contributors: sl@0: rem Nokia Corporation - initial contribution. sl@0: rem sl@0: rem Contributors: sl@0: rem sl@0: rem Description: sl@0: rem sl@0: sl@0: REM Check argument to see if epoc.ini should be created sl@0: @if "%1" equ "btb" ( sl@0: @set BTB_BUILD=@rem sl@0: ) else ( sl@0: @set BTB_BUILD= sl@0: ) sl@0: sl@0: setlocal sl@0: sl@0: REM Get path to F32TEST directory sl@0: call :GetParentDirPath F32TEST_PATH sl@0: echo F32TEST_PATH = %F32TEST_PATH% sl@0: set EPOC32_DIR=%EPOCROOT%EPOC32\ sl@0: echo EPOC32_DIR = %EPOC32_DIR% sl@0: set EMUL_MEDIA_PATH=%EPOC32_DIR%DATA\MEDIA\ sl@0: echo EMUL_MEDIA_PATH = %EMUL_MEDIA_PATH% sl@0: set RELEASE_PATH=%EPOC32_DIR%RELEASE\ sl@0: echo RELEASE_PATH = %RELEASE_PATH% sl@0: sl@0: REM If BASEPATH not set by basedoit.bat, because this is not a BTB build, then assume \os\ sl@0: if "%BASEPATH%" == "" ( sl@0: set BASEPATH=\os\ sl@0: ) sl@0: echo BASEPATH = %BASEPATH% sl@0: sl@0: call :DoSporadic sl@0: call :ClearEmulMedia sl@0: call :SetupCDrive wins sl@0: call :SetupCDrive winscw sl@0: call :SetupZDrive wins udeb sl@0: call :SetupZDrive wins urel sl@0: call :SetupZDrive winscw udeb sl@0: call :SetupZDrive winscw urel sl@0: %BTB_BUILD% call :SetupEpocDotIni sl@0: sl@0: endlocal sl@0: goto :eof sl@0: sl@0: :GetParentDirPath sl@0: call :GetPath %1 %~p0. sl@0: goto :eof sl@0: sl@0: :GetPath sl@0: set %1=%~p2 sl@0: goto :eof sl@0: sl@0: :DoSporadic sl@0: if exist \asdfasdf rmdir /s /q \asdfasdf sl@0: if exist \red rmdir /s /q \red sl@0: if exist \f32-tst rmdir /s /q \f32-tst sl@0: if exist \ford rmdir /s /q \ford sl@0: if exist \session_test rmdir /s /q \session_test sl@0: if exist \tmisc rmdir /s /q \tmisc sl@0: if exist \volvo rmdir /s /q \volvo sl@0: if exist \blue del /q \blue sl@0: goto :eof sl@0: sl@0: :ClearEmulMedia sl@0: if exist %EMUL_MEDIA_PATH% del /q %EMUL_MEDIA_PATH%*.bin sl@0: cd %EPOCROOT% sl@0: if exist %BASEPATH%emulator\wins\emuldrives.zip ( sl@0: Call unZip %BASEPATH%emulator\wins\emuldrives.zip sl@0: ) else ( sl@0: Call unZip %BASEPATH%boardsupport\emulator\emulatorbsp\emuldrives.zip sl@0: ) sl@0: goto :eof sl@0: sl@0: :SetupCDrive sl@0: if exist %EPOC32_DIR%%1\C rmdir /s /q %EPOC32_DIR%%1\C 2>NUL sl@0: if not exist %EPOC32_DIR%%1\C\F32 mkdir %EPOC32_DIR%%1\C\F32 sl@0: goto :eof sl@0: sl@0: :SetupZDrive sl@0: setlocal sl@0: set REL_DIR=%RELEASE_PATH%%1\%2 sl@0: set EMUL_Z=%REL_DIR%\Z sl@0: echo REL_DIR = %REL_DIR% sl@0: echo EMUL_Z = %EMUL_Z% sl@0: sl@0: if exist %EMUL_Z% rmdir /s /q %EMUL_Z% 2>NUL sl@0: if not exist %EMUL_Z%\NOTINPATH mkdir %EMUL_Z%\NOTINPATH sl@0: if not exist %EMUL_Z%\TEST mkdir %EMUL_Z%\TEST sl@0: copy %F32TEST_PATH%\SERVER\T_FILE.CPP %EMUL_Z%\TEST\T_FILE.CPP sl@0: copy %F32TEST_PATH%\SERVER\T_FSRV.CPP %EMUL_Z%\TEST\T_FSRV.CPP sl@0: copy %F32TEST_PATH%\SERVER\T_RDSECT.TXT %EMUL_Z%\TEST\T_RDSECT.TXT sl@0: copy %EPOC32_DIR%BUILD%F32TEST_PATH%\GROUP\%1.AUTO.BAT %EMUL_Z%\TEST\%1.AUTO.BAT sl@0: copy %REL_DIR%\T_CHKUID.EXE %EMUL_Z%\TEST\T_CHKUID.EXE sl@0: sl@0: REM Use both Sys and System directories until the switch has been made sl@0: sl@0: if not exist %EMUL_Z%\SYS\LIBS mkdir %EMUL_Z%\SYS\LIBS sl@0: if not exist %EMUL_Z%\SYS\BIN mkdir %EMUL_Z%\SYS\BIN sl@0: copy %REL_DIR%\ESHELL.EXE %EMUL_Z%\SYS\BIN\ESHELL.EXE sl@0: copy %REL_DIR%\T_PREL.DLL %EMUL_Z%\SYS\BIN\T_PREL.DLL sl@0: if not exist %EMUL_Z%\SYS\DATA mkdir %EMUL_Z%\SYS\DATA sl@0: copy %F32TEST_PATH%\SERVER\PRELOAD.LST %EMUL_Z%\SYS\DATA\PRELOAD.LST sl@0: if exist %F32TEST_PATH%\..\EMULATOR\WINS_RESTRICTED\UNISTORE2\ESTART\ESTARTXSR.TXT ( sl@0: copy %F32TEST_PATH%\..\EMULATOR\WINS_RESTRICTED\UNISTORE2\ESTART\ESTARTXSR.TXT %EMUL_Z%\SYS\DATA\ESTART.TXT sl@0: ) else ( sl@0: copy %BASEPATH%boardsupport\emulator\unistore2emulatorsupport\estart\estartxsr.txt %EMUL_Z%\SYS\DATA\ESTART.TXT sl@0: ) sl@0: sl@0: if not exist %EMUL_Z%\SYSTEM\LIBS mkdir %EMUL_Z%\SYSTEM\LIBS sl@0: if not exist %EMUL_Z%\SYSTEM\BIN mkdir %EMUL_Z%\SYSTEM\BIN sl@0: copy %REL_DIR%\ESHELL.EXE %EMUL_Z%\SYSTEM\BIN\ESHELL.EXE sl@0: copy %REL_DIR%\T_PREL.DLL %EMUL_Z%\SYSTEM\BIN\T_PREL.DLL sl@0: if not exist %EMUL_Z%\SYSTEM\DATA mkdir %EMUL_Z%\SYSTEM\DATA sl@0: copy %F32TEST_PATH%\SERVER\PRELOAD.LST %EMUL_Z%\SYSTEM\DATA\PRELOAD.LST sl@0: copy %F32TEST_PATH%\SERVER\corruptTest\CorruptFileNames.lst %EMUL_Z%\SYSTEM\DATA\CorruptFileNames.lst sl@0: copy %F32TEST_PATH%\SERVER\corruptTest\BadFile1.txt %EMUL_Z%\SYSTEM\DATA\BadFile1.txt sl@0: copy %F32TEST_PATH%\SERVER\corruptTest\BadFile2.txt %EMUL_Z%\SYSTEM\DATA\BadFile2.txt sl@0: sl@0: REM for T_SYSBIN sl@0: copy %REL_DIR%\T_SYSBIN.EXE %EMUL_Z%\SYS\BIN\T_SYSBINa.EXE sl@0: if not exist %EMUL_Z%\SYSTEM\PROGRAMS mkdir %EMUL_Z%\SYSTEM\PROGRAMS sl@0: copy %REL_DIR%\T_SYSBIN.EXE %EMUL_Z%\SYSTEM\PROGRAMS\T_SYSBINb.EXE sl@0: copy %REL_DIR%\T_SYSBIN_DLL.DLL %EMUL_Z%\SYS\BIN\T_SYSBIN_DLLa.DLL sl@0: copy %REL_DIR%\T_SYSBIN_DLL.DLL %EMUL_Z%\SYS\BIN\T_SYSBIN_DLL_RAM.DLL sl@0: if not exist %EMUL_Z%\SYSTEM\LIBS mkdir %EMUL_Z%\SYSTEM\LIBS sl@0: copy %REL_DIR%\T_SYSBIN_DLL.DLL %EMUL_Z%\SYSTEM\LIBS\T_SYSBIN_DLLb.DLL sl@0: sl@0: REM for T_VIRUS sl@0: copy %REL_DIR%\t_vshook.pxt %EMUL_Z%\Test\t_vshook.pxt sl@0: copy %F32TEST_PATH%\plugins\version_1\virus\virusdef.txt %EMUL_Z%\Test\virusdef.txt sl@0: copy %F32TEST_PATH%\plugins\version_1\virus\virus1.txt %EMUL_Z%\Test\virus1.txt sl@0: copy %F32TEST_PATH%\plugins\version_1\virus\virus2.txt %EMUL_Z%\Test\virus2.txt sl@0: copy %F32TEST_PATH%\plugins\version_1\virus\clean.txt %EMUL_Z%\Test\clean.txt sl@0: sl@0: REM for t_findcapall and t_findcapnone sl@0: copy %F32TEST_PATH%\SERVER\t_findcaptestfile.txt %EMUL_Z%\SYS\BIN\t_findcaptestfile.txt sl@0: sl@0: REM for T_PLUGIN_V2BETA sl@0: copy %REL_DIR%\t_enchook.pxt %EMUL_Z%\Test\t_enchook.pxt sl@0: copy %REL_DIR%\t_hexhook.pxt %EMUL_Z%\Test\t_hexhook.pxt sl@0: copy %REL_DIR%\t_formathook.pxt %EMUL_Z%\Test\t_formathook.pxt sl@0: sl@0: endlocal sl@0: goto :eof sl@0: sl@0: :SetupEpocDotIni sl@0: if exist %EPOCROOT%epoc32\data\epoc.ini ( sl@0: echo epoc.ini already exists and hasn't been overwritten sl@0: echo epoc.ini may not contain build-and-test-system settings sl@0: ) sl@0: if not exist %EPOCROOT%epoc32\data\epoc.ini ( sl@0: REM these settings should replicate those settings sl@0: REM used for the build-and-test-system see how sl@0: REM basetests.ini gets configured in sl@0: REM //EPOC/development/base/tools/master/common/basedoit.bat sl@0: echo textshell >%EPOCROOT%epoc32\data\epoc.ini sl@0: echo timerresolution 1 >>%EPOCROOT%epoc32\data\epoc.ini sl@0: echo _epoc_drive_t %EPOCROOT%epoc32\build>>%EPOCROOT%epoc32\data\epoc.ini sl@0: echo justintime none>>%EPOCROOT%epoc32\data\epoc.ini sl@0: echo debugmask panic>>%EPOCROOT%epoc32\data\epoc.ini sl@0: echo logtimestamp 0 >>%EPOCROOT%epoc32\data\epoc.ini sl@0: echo logthreadid 0 >>%EPOCROOT%epoc32\data\epoc.ini sl@0: echo FlashEraseTime 50000 >>%EPOCROOT%epoc32\data\epoc.ini sl@0: echo FlashResumeTime 0 >>%EPOCROOT%epoc32\data\epoc.ini sl@0: echo FlashWriteTime 0 >>%EPOCROOT%epoc32\data\epoc.ini sl@0: echo NandDriverType=XSR >>%EPOCROOT%epoc32\data\epoc.ini sl@0: if exist %BASEPATH%e32\rombuild\platsec.settings ( sl@0: type %BASEPATH%e32\rombuild\platsec.settings >>%EPOCROOT%epoc32\data\epoc.ini sl@0: ) else ( sl@0: type %BASEPATH%kernelhwsrv\kernel\eka\rombuild\platsec.settings >>%EPOCROOT%epoc32\data\epoc.ini sl@0: ) sl@0: ) sl@0: goto :eof