os/graphics/windowing/windowserver/test/tscreenconstruct/data/batch/tscreenconstruct.bat
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/windowing/windowserver/test/tscreenconstruct/data/batch/tscreenconstruct.bat Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,120 @@
1.4 +REM tscreenconstruct.bat
1.5 +REM Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +REM All rights reserved.
1.7 +REM This component and the accompanying materials are made available
1.8 +REM under the terms of "Eclipse Public License v1.0"
1.9 +REM which accompanies this distribution, and is available
1.10 +REM at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +REM
1.12 +REM Initial Contributors:
1.13 +REM Nokia Corporation - initial contribution.
1.14 +REM
1.15 +REM Contributors:
1.16 +REM
1.17 +REM Description:
1.18 +REM
1.19 +@echo off
1.20 +setlocal
1.21 +
1.22 +
1.23 +set WSINI_ARM=%EPOCROOT%epoc32\data\z\system\data\wsini.ini
1.24 +set WSINI_WINSCW=z\system\data\wsini.ini
1.25 +
1.26 +if /i "%1"=="uninstall" goto :uninstall
1.27 +if /i "%1"=="install" goto :install
1.28 +
1.29 +:help
1.30 + echo.
1.31 + echo Description:
1.32 + echo This script modifies epoc ini and substitutes in the correct window server ini file for the test
1.33 + echo Usage:
1.34 + echo tscreenconstruct.bat install/uninstall [color] [nga] [changetracking]
1.35 + echo
1.36 + echo arg1: is either install or uninstall
1.37 + echo arg2: is one of "color4k" "color64k" "color16m" "screenconstruct" "scrmodes"
1.38 + echo arg3: optional indicator for configuration, either nonnga, which is default or nga
1.39 + echo arg4: optional argument to use changetracking mode in wserv, the default mode is non changetracking
1.40 + echo.
1.41 + goto :done
1.42 +
1.43 +rem *** START STANDARD FILE-REPLACEMENT FUNCTIONS ***
1.44 +:replace
1.45 + set DST=%1
1.46 + set SRC=%2
1.47 + echo INFO: Replacing %DST% with %SRC%
1.48 + copy /y %DST% %DST%.original >NUL
1.49 + if defined SRC copy /y %SRC% %DST% >NUL
1.50 + goto :EOF
1.51 +:restore
1.52 + echo INFO: Restoring %1
1.53 + if not exist %1.original echo ERROR: %1.original does not exist
1.54 + copy /y %1.original %1 >NUL
1.55 + del %1.original >NUL
1.56 + goto :EOF
1.57 +:replace_em
1.58 + if defined EMULATOR_DATA_DIR (
1.59 + call :replace %EMULATOR_DATA_DIR%\%1 %2
1.60 + ) else (
1.61 + call :replace %EPOCROOT%epoc32\release\winscw\udeb\%1 %2
1.62 + call :replace %EPOCROOT%epoc32\release\winscw\urel\%1 %2
1.63 + )
1.64 + goto :EOF
1.65 +:replace_em2
1.66 + if defined EMULATOR_DATA_DIR (
1.67 + call :replace %EMULATOR_DATA_DIR%\%1 %EMULATOR_DATA_DIR%\%2
1.68 + ) else (
1.69 + call :replace %EPOCROOT%epoc32\release\winscw\udeb\%1 %EPOCROOT%epoc32\release\winscw\udeb\%2
1.70 + call :replace %EPOCROOT%epoc32\release\winscw\urel\%1 %EPOCROOT%epoc32\release\winscw\urel\%2
1.71 + )
1.72 + goto :EOF
1.73 +:restore_em
1.74 + if defined EMULATOR_DATA_DIR (
1.75 + call :restore %EMULATOR_DATA_DIR%\%1
1.76 + ) else (
1.77 + call :restore %EPOCROOT%epoc32\release\winscw\udeb\%1
1.78 + call :restore %EPOCROOT%epoc32\release\winscw\urel\%1
1.79 + )
1.80 + goto :EOF
1.81 +rem *** END STANDARD FILE-REPLACEMENT FUNCTIONS ***
1.82 +
1.83 +
1.84 +:install
1.85 + set OPT_CT=
1.86 + if /i "%3"=="changetracking" set OPT_CT=_changetracking
1.87 + if /i "%4"=="changetracking" set OPT_CT=_changetracking
1.88 + set OPT_NGA=
1.89 + if /i "%3"=="nga" set OPT_NGA=1
1.90 +
1.91 + set WSINI_TEST=wsini%OPT_CT%.ini
1.92 + if /i "%2"=="screenconstruct" set WSINI_TEST=wsini_screenconstruct%OPT_CT%.ini
1.93 + if /i "%2"=="scrmodes" set WSINI_TEST=wsini_scrmodes%OPT_CT%.ini
1.94 + set WSINI_TEST=%EPOCROOT%epoc32\data\z\wstest\screenconstruct\%WSINI_TEST%
1.95 +
1.96 + set EPOC_COLORDEPTH=color16m
1.97 + if /i "%2"=="color4k" set EPOC_COLORDEPTH=color4k
1.98 + if /i "%2"=="color64k" set EPOC_COLORDEPTH=color64k
1.99 + if /i "%2"=="color16m" set EPOC_COLORDEPTH=color16m
1.100 +
1.101 + echo Replacing files with test versions.
1.102 + call :replace %EPOC_INI%
1.103 + if defined OPT_NGA (
1.104 + echo SYMBIAN_GRAPHICS_USE_GCE on >> %EPOC_INI%
1.105 + echo SYMBIAN_BASE_USE_GCE on >> %EPOC_INI%
1.106 + )
1.107 + echo COLORDEPTH %EPOC_COLORDEPTH% >> %EPOC_INI%
1.108 + echo _NewScreen_ >> %EPOC_INI%
1.109 + echo ScreenHeight 640 >> %EPOC_INI%
1.110 + echo ScreenWidth 320 >> %EPOC_INI%
1.111 +
1.112 + call :replace %WSINI_ARM% %WSINI_TEST%
1.113 + call :replace_em %WSINI_WINSCW% %WSINI_TEST%
1.114 + goto :done
1.115 +
1.116 +:uninstall
1.117 + echo Restoring files
1.118 + call :restore %EPOC_INI%
1.119 + call :restore %WSINI_ARM%
1.120 + call :restore_em %WSINI_WINSCW%
1.121 +
1.122 +:done
1.123 +endlocal
1.124 \ No newline at end of file