os/graphics/egl/egltest/endpointtestsuite/automated/res/endpoint_autotest_ini_config.bat
First public contribution.
4 REM Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
5 REM All rights reserved.
6 REM This component and the accompanying materials are made available
7 REM under the terms of "Eclipse Public License v1.0"
8 REM which accompanies this distribution, and is available
9 REM at the URL "http://www.eclipse.org/legal/epl-v10.html".
11 REM Initial Contributors:
12 REM Nokia Corporation - initial contribution.
19 REM Batch file used for installing the correct environment (epoc.ini, wsini.ini,
20 REM testexecute.ini) for running the automatic egl endpoint tests that require the
21 REM automated test renderstage in wserv. This file does the correct thing in mistral.
24 REM endpoint_autotest_ini_config.bat install
25 REM endpoint_autotest_ini_config.bat uninstall
29 set WS_FILENAME=wsini.ini
30 set WS_ALT_FILENAME=wsini_minigui.ini
31 set WS_ALT2_FILENAME=mingui_wsini.ini
32 set WS_REPLACEMENT=endpoint_autotest_wsini.ini
34 set EMULATOR_PATH_UDEB=%EPOCROOT%epoc32\release\winscw\udeb
35 set EMULATOR_PATH_UREL=%EPOCROOT%epoc32\release\winscw\urel
36 set HARDWARE_PATH=%EPOCROOT%epoc32\data
39 if /i "%1"=="uninstall" goto :uninstall
40 if /i "%1"=="install" goto :install
41 if /i "%1"=="help" goto :help
47 echo This script installs the correct environment (epoc.ini, wsini.ini, testexecute.ini) for the automatic egl endpoint tests.
48 echo.It takes the argument "install or "uninstall"
55 if exist %SRC% copy %SRC% %DST% >NUL
56 if exist %SRC% del %SRC% >NUL
63 if exist %SRC% copy %SRC% %DST% >NUL
67 :backupAndInstallWsini
69 REM Save original and copy the modified wsini file to the specified location.
70 call :copy %ORIGINAL_FILE% %ORIGINAL_FILE%.backup
71 if defined EMULATOR_DATA_DIR (
72 call :copy %EMULATOR_DATA_DIR%\z\egltest\%WS_REPLACEMENT% %ORIGINAL_FILE%
74 REM We assume that the file is in the same directory as this batch file.
75 call :copy %~dp0\%WS_REPLACEMENT% %ORIGINAL_FILE%
82 REM Save original and add minigui to epoc.ini
83 perl -p -i.backup -e "s/^.*SYMBIAN_(GRAPHICS|BASE)_USE_GCE.*$//i" %ORIGINAL_FILE%
84 echo. >> %ORIGINAL_FILE%
85 echo SYMBIAN_GRAPHICS_USE_GCE ON >> %ORIGINAL_FILE%
86 echo SYMBIAN_BASE_USE_GCE ON >> %ORIGINAL_FILE%
87 echo ScreenWidth 320 >> %ORIGINAL_FILE%
88 echo ScreenHeight 480 >> %ORIGINAL_FILE%
89 echo ScreenOffsetX 0 >> %ORIGINAL_FILE%
90 echo ScreenOffsetY 0 >> %ORIGINAL_FILE%
91 echo FasciaBitmap null >> %ORIGINAL_FILE%
92 echo minigui >> %ORIGINAL_FILE%
93 echo. >> %ORIGINAL_FILE%
97 :backupAndInstallTestexecute
99 REM Disable SystemStarter in testexecute.ini
100 perl -p -i.backup -e "s/SystemStarter.*ON.*$/SystemStarter = OFF/i" %ORIGINAL_FILE%
105 REM Start with the original files if we previously missed an uninstall.
108 REM Install epoc.ini.
109 if defined EPOC_INI (
110 call :backupAndInstallEpoc %EPOC_INI%
112 call :backupAndInstallEpoc %EPOCROOT%epoc32\data\epoc.ini
115 REM Install testexecute.ini.
116 if defined EMULATOR_C_DIR (
117 call :backupAndInstallTestexecute %EMULATOR_C_DIR%\system\data\testexecute.ini
119 call :backupAndInstallTestexecute %EPOCROOT%epoc32\winscw\c\system\data\testexecute.ini
120 call :backupAndInstallTestexecute %EPOCROOT%epoc32\data\z\system\data\testexecute.ini
123 REM Must use different paths if running on Mistral (indicated by EMULATOR_DATA_DIR).
124 REM If not Mistral, change emulator urel and udeb variants and hardware locations.
125 if defined EMULATOR_DATA_DIR (
126 call :backupAndInstallWsini %EMULATOR_DATA_DIR%\z\system\data\%WS_FILENAME%
128 call :backupAndInstallWsini %EMULATOR_PATH_UDEB%\z\system\data\%WS_FILENAME%
129 call :backupAndInstallWsini %EMULATOR_PATH_UREL%\z\system\data\%WS_FILENAME%
130 call :backupAndInstallWsini %HARDWARE_PATH%\z\system\data\%WS_FILENAME%
131 call :backupAndInstallWsini %HARDWARE_PATH%\z\%WS_ALT_FILENAME%
132 call :backupAndInstallWsini %HARDWARE_PATH%\z\system\data\%WS_ALT2_FILENAME%
139 REM Uninstall epoc.ini.
140 if defined EPOC_INI (
141 call :move %EPOC_INI%.backup %EPOC_INI%
143 call :move %EPOCROOT%epoc32\data\epoc.ini.backup %EPOCROOT%epoc32\data\epoc.ini
146 REM Uninstall testexecute.ini.
147 if defined EMULATOR_C_DIR (
148 call :move %EMULATOR_C_DIR%\system\data\testexecute.ini.backup %EMULATOR_C_DIR%\system\data\testexecute.ini
150 call :move %EPOCROOT%epoc32\winscw\c\system\data\testexecute.ini.backup %EPOCROOT%epoc32\winscw\c\system\data\testexecute.ini
151 call :move %EPOCROOT%epoc32\data\z\system\data\testexecute.ini.backup %EPOCROOT%epoc32\data\z\system\data\testexecute.ini
154 REM Must use different paths if running on Mistral (indicated by EMULATOR_DATA_DIR).
155 REM If not Mistral, change urel and udeb variants.
156 if defined EMULATOR_DATA_DIR (
157 REM Restore the backed up files.
158 call :move %EMULATOR_DATA_DIR%\z\system\data\%WS_FILENAME%.backup %EMULATOR_DATA_DIR%\z\system\data\%WS_FILENAME%
160 REM Restore the backed up files.
161 call :move %EMULATOR_PATH_UDEB%\z\system\data\%WS_FILENAME%.backup %EMULATOR_PATH_UDEB%\z\system\data\%WS_FILENAME%
162 call :move %EMULATOR_PATH_UREL%\z\system\data\%WS_FILENAME%.backup %EMULATOR_PATH_UREL%\z\system\data\%WS_FILENAME%
163 call :move %HARDWARE_PATH%\z\system\data\%WS_FILENAME%.backup %HARDWARE_PATH%\z\system\data\%WS_FILENAME%
164 call :move %HARDWARE_PATH%\z\%WS_ALT_FILENAME%.backup %HARDWARE_PATH%\z\%WS_ALT_FILENAME%
165 call :move %HARDWARE_PATH%\z\system\data\%WS_ALT2_FILENAME%.backup %HARDWARE_PATH%\z\system\data\%WS_ALT2_FILENAME%