windowing/windowserver/test/scripts/wstest_config.cmd
branchRCL_3
changeset 19 ac96196b945c
parent 0 5d03bc08d59c
child 33 25f95128741d
equal deleted inserted replaced
18:5e30ef2e26cb 19:ac96196b945c
     1 @echo off
     1 @echo off
     2 rem Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 rem Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 rem All rights reserved.
     3 rem All rights reserved.
     4 rem This component and the accompanying materials are made available
     4 rem This component and the accompanying materials are made available
     5 rem under the terms of "Eclipse Public License v1.0"
     5 rem under the terms of the License "Eclipse Public License v1.0"
     6 rem which accompanies this distribution, and is available
     6 rem which accompanies this distribution, and is available
     7 rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 rem
     8 rem
     9 rem Initial Contributors:
     9 rem Initial Contributors:
    10 rem Nokia Corporation - initial contribution.
    10 rem Nokia Corporation - initial contribution.
    15 rem @internalComponent - Internal Symbian
    15 rem @internalComponent - Internal Symbian
    16 rem 
    16 rem 
    17 rem
    17 rem
    18 set nonnga=false
    18 set nonnga=false
    19 if not defined EPOC_INI set EPOC_INI=\epoc32\data\epoc.ini
    19 if not defined EPOC_INI set EPOC_INI=\epoc32\data\epoc.ini
    20 if /i "%1"=="uninstall" goto :uninstall
       
    21 if /i "%2"=="changetracking" goto :install_changetracking
       
    22 if /i "%2"=="nonnga" set nonnga=true
    20 if /i "%2"=="nonnga" set nonnga=true
    23 if /i "%3"=="nonnga" set nonnga=true
    21 if /i "%3"=="nonnga" set nonnga=true
    24 if "%nonnga%"=="true" echo Configuring for Non-NGA
    22 if "%nonnga%"=="true" echo Configuring for Non-NGA
    25 
    23 if /i "%1"=="uninstall" goto :uninstall
       
    24 if /i "%2"=="changetracking" goto :install_changetracking
    26 rem ================ install ================
    25 rem ================ install ================
    27 
    26 
    28 :install
    27 :install
    29 echo Replacing WSINI.INI files with test versions.
    28 echo Replacing WSINI.INI files with test versions.
    30 if "%EMULATOR_DATA_DIR%"=="" (
    29 if "%EMULATOR_DATA_DIR%"=="" (
    32 	call :doinstall %EPOCROOT%epoc32\release\winscw\urel multiscreen %2 %3
    31 	call :doinstall %EPOCROOT%epoc32\release\winscw\urel multiscreen %2 %3
    33 ) else (
    32 ) else (
    34 	call :doinstall %EMULATOR_DATA_DIR% multiscreen %2 %3
    33 	call :doinstall %EMULATOR_DATA_DIR% multiscreen %2 %3
    35 )
    34 )
    36 
    35 
    37 rem Restore EPOC.INI from backup
    36 echo If EPOC.INI isn't already backuped then backup EPOC.INI to EPOC.INI.bak
    38 if exist %EPOC_INI%.backup xcopy /r /y %EPOC_INI%.backup %EPOC_INI% >nul
    37 if not exist %EPOC_INI%.bak copy /y %EPOC_INI% %EPOC_INI%.bak
    39 
    38 
    40 echo Backing up EPOC.INI.
       
    41 if not exist %EPOC_INI%.backup copy %EPOC_INI% %EPOC_INI%.backup >nul
       
    42 
       
    43 echo --------------------------------------------------------------
       
    44 echo original epoc.ini: %EPOC_INI%
       
    45 type %EPOC_INI%
       
    46 echo --------------------------------------------------------------
       
    47 echo Editing EPOC.INI to use multiscreen.
    39 echo Editing EPOC.INI to use multiscreen.
    48 echo. >> %EPOC_INI%
    40 echo. >> %EPOC_INI%
    49 echo StartupMode ^7>> %EPOC_INI%
    41 echo StartupMode ^7>> %EPOC_INI%
    50 echo _NewScreen_ >> %EPOC_INI%
    42 echo _NewScreen_ >> %EPOC_INI%
    51 echo ScreenWidth 640 >> %EPOC_INI%
    43 echo ScreenWidth 640 >> %EPOC_INI%
    52 echo ScreenHeight 240 >> %EPOC_INI%
    44 echo ScreenHeight 240 >> %EPOC_INI%
    53 
       
    54 echo --------------------------------------------------------------
       
    55 echo new epoc.ini: %EPOC_INI%
       
    56 type %EPOC_INI%
       
    57 echo --------------------------------------------------------------
       
    58 
       
    59 goto :EOF
    45 goto :EOF
    60 
    46 
    61 
    47 
    62 
       
    63 :doinstall
    48 :doinstall
    64 rem Back up WSINI.INI
    49 rem If WSINI.INI(s) aren't already backuped then backup WSINI.INI(s)
    65 if not exist %1\z\system\data\wsini.bak if exist %1\z\system\data\wsini.ini copy %1\z\system\data\wsini.ini %1\z\system\data\wsini.bak >nul
    50 if not exist %1\z\system\data\wsini.bak   if exist %1\z\system\data\wsini.ini   copy /y %1\z\system\data\wsini.ini   %1\z\system\data\wsini.bak >nul
    66 if not exist %1\z\resource\data\wsini.bak if exist %1\z\resource\data\wsini.ini copy %1\z\resource\data\wsini.ini %1\z\resource\data\wsini.bak >nul
    51 if not exist %1\z\resource\data\wsini.bak if exist %1\z\resource\data\wsini.ini copy /y %1\z\resource\data\wsini.ini %1\z\resource\data\wsini.bak >nul
    67 
    52 
    68 rem Back up ECONS.DLL
    53 rem Back up ECONS.DLL
    69 if exist %1\econs.dll copy /y %1\econs.dll %1\econs-temp.dll
    54 if exist %1\econs.dll copy /y %1\econs.dll %1\econs-temp.dll
    70 
    55 
    71 rem Rename WSECONS.DLL to ECONS.DLL
    56 rem Rename WSECONS.DLL to ECONS.DLL
    72 if exist %1\wsecons.dll copy /y %1\wsecons.dll %1\econs.dll
    57 if exist %1\wsecons.dll copy /y %1\wsecons.dll %1\econs.dll
    73 
    58 
    74 rem Replace WSINI.INI with test version
    59 rem Replace WSINI.INI with test version
    75 if "%nonnga%"=="true" goto :doinstall_nonnga
    60 if "%nonnga%"=="true" goto :doinstall_nonnga
    76 if exist %1\z\system\data\wsini.ini xcopy /r /y %1\z\wstest\wservu_multiscreen.ini %1\z\system\data\wsini.ini >nul
    61 if exist %1\z\system\data\wsini.ini   copy /y %1\z\wstest\wservu_multiscreen.ini %1\z\system\data\wsini.ini
    77 if exist %1\z\resource\data\wsini.ini xcopy /r /y %1\z\wstest\wservu_multiscreen.ini %1\z\resource\data\wsini.ini >nul
    62 if exist %1\z\resource\data\wsini.ini copy /y %1\z\wstest\wservu_multiscreen.ini %1\z\resource\data\wsini.ini
    78 goto :doinstall_editwsini
    63 goto :doinstall_editwsini
    79 
    64 
    80 :doinstall_nonnga
    65 :doinstall_nonnga
    81 if exist %1\z\system\data\wsini.ini xcopy /r /y \graphics\wserv\group\wservu_multiscreen-nonnga.ini %1\z\system\data\wsini.ini >nul
    66 if exist %1\z\system\data\wsini.ini   copy /y %1\z\wstest\wservu_multiscreen-nonnga.ini %1\z\system\data\wsini.ini
    82 if exist %1\z\resource\data\wsini.ini xcopy /r /y \graphics\wserv\group\wservu_multiscreen-nonnga.ini %1\z\resource\data\wsini.ini >nul
    67 if exist %1\z\resource\data\wsini.ini copy /y %1\z\wstest\wservu_multiscreen-nonnga.ini %1\z\resource\data\wsini.ini
    83 
    68 
    84 :doinstall_editwsini
    69 :doinstall_editwsini
    85 rem Edit WSINI.INI to run tests automatically/multiscreen
    70 rem Edit WSINI.INI to run tests automatically/multiscreen
    86 if exist %1\z\system\data\wsini.ini perl %1\z\wstest\wsini-writer.pl %1\z\system\data\wsini.ini %2 %3 %4
    71 if exist %1\z\system\data\wsini.ini   perl %1\z\wstest\wsini-writer.pl %1\z\system\data\wsini.ini %2 %3 %4
    87 if exist %1\z\resource\data\wsini.ini perl %1\z\wstest\wsini-writer.pl %1\z\resource\data\wsini.ini %2 %3 %4
    72 if exist %1\z\resource\data\wsini.ini perl %1\z\wstest\wsini-writer.pl %1\z\resource\data\wsini.ini %2 %3 %4
    88 
    73 
    89 goto :EOF
    74 goto :EOF
    90 
       
    91 
       
    92 
       
    93 
    75 
    94 rem ================ install changetracking ================
    76 rem ================ install changetracking ================
    95 
    77 
    96 :install_changetracking
    78 :install_changetracking
    97 echo Replacing WSINI.INI files with test changetracking versions.
    79 echo Replacing WSINI.INI files with test changetracking versions.
   100 	call :doinstall_changetracking %EPOCROOT%epoc32\release\winscw\urel multiscreen %2 %3
    82 	call :doinstall_changetracking %EPOCROOT%epoc32\release\winscw\urel multiscreen %2 %3
   101 ) else (
    83 ) else (
   102 	call :doinstall_changetracking %EMULATOR_DATA_DIR% multiscreen %2 %3
    84 	call :doinstall_changetracking %EMULATOR_DATA_DIR% multiscreen %2 %3
   103 )
    85 )
   104 
    86 
   105 rem Restore EPOC.INI from backup
    87 echo If EPOC.INI isn't already backuped then backup EPOC.INI to EPOC.INI.bak
   106 if exist %EPOC_INI%.backup xcopy /r /y %EPOC_INI%.backup %EPOC_INI% >nul
    88 if not exist %EPOC_INI%.bak copy /y %EPOC_INI% %EPOC_INI%.bak >nul
   107 
       
   108 echo Backing up EPOC.INI.
       
   109 if not exist %EPOC_INI%.backup copy %EPOC_INI% %EPOC_INI%.backup >nul
       
   110 
       
   111 echo --------------------------------------------------------------
       
   112 echo original epoc.ini: %EPOC_INI%
       
   113 type %EPOC_INI%
       
   114 echo --------------------------------------------------------------
       
   115 
    89 
   116 echo Editing EPOC.INI to use multiscreen.
    90 echo Editing EPOC.INI to use multiscreen.
   117 echo. >> %EPOC_INI%
    91 echo. >> %EPOC_INI%
   118 echo StartupMode ^7>> %EPOC_INI%
    92 echo StartupMode ^7>> %EPOC_INI%
   119 echo _NewScreen_ >> %EPOC_INI%
    93 echo _NewScreen_ >> %EPOC_INI%
   120 echo ScreenWidth 640 >> %EPOC_INI%
    94 echo ScreenWidth 640 >> %EPOC_INI%
   121 echo ScreenHeight 240 >> %EPOC_INI%
    95 echo ScreenHeight 240 >> %EPOC_INI%
   122 echo --------------------------------------------------------------
       
   123 echo new epoc.ini: %EPOC_INI%
       
   124 type %EPOC_INI%
       
   125 echo --------------------------------------------------------------
       
   126 
       
   127 goto :EOF
    96 goto :EOF
   128 
    97 
   129 :doinstall_changetracking
    98 :doinstall_changetracking
   130 
    99 
   131 rem Back up ECONS.DLL
   100 rem Back up ECONS.DLL
   133 
   102 
   134 rem Rename WSECONS.DLL to ECONS.DLL
   103 rem Rename WSECONS.DLL to ECONS.DLL
   135 if exist %1\wsecons.dll copy /y %1\wsecons.dll %1\econs.dll
   104 if exist %1\wsecons.dll copy /y %1\wsecons.dll %1\econs.dll
   136 
   105 
   137 rem Back up WSINI.INI
   106 rem Back up WSINI.INI
   138 if not exist %1\z\system\data\wsini.bak if exist %1\z\system\data\wsini.ini copy %1\z\system\data\wsini.ini %1\z\system\data\wsini.bak >nul
   107 if not exist %1\z\system\data\wsini.bak   if exist %1\z\system\data\wsini.ini   copy /y %1\z\system\data\wsini.ini %1\z\system\data\wsini.bak >nul
   139 if not exist %1\z\resource\data\wsini.bak if exist %1\z\resource\data\wsini.ini copy %1\z\resource\data\wsini.ini %1\z\resource\data\wsini.bak >nul
   108 if not exist %1\z\resource\data\wsini.bak if exist %1\z\resource\data\wsini.ini copy /y %1\z\resource\data\wsini.ini %1\z\resource\data\wsini.bak >nul
   140 
   109 
   141 rem Replace WSINI.INI with test changetracking version
   110 rem Replace WSINI.INI with test changetracking version
   142 if exist %1\z\system\data\wsini.ini xcopy /r /y %1\z\wstest\wservu_multiscreen_changetracking.ini %1\z\system\data\wsini.ini >nul
   111 if exist %1\z\system\data\wsini.ini   copy /y %1\z\wstest\wservu_multiscreen_changetracking.ini %1\z\system\data\wsini.ini >nul
   143 if exist %1\z\resource\data\wsini.ini xcopy /r /y %1\z\wstest\wservu_multiscreen_changetracking.ini %1\z\resource\data\wsini.ini >nul
   112 if exist %1\z\resource\data\wsini.ini copy /y %1\z\wstest\wservu_multiscreen_changetracking.ini %1\z\resource\data\wsini.ini >nul
   144 
   113 
   145 rem Edit WSINI.INI to run tests automatically/multiscreen
   114 rem Edit WSINI.INI to run tests automatically/multiscreen
   146 if exist %1\z\system\data\wsini.ini perl %1\z\wstest\wsini-writer.pl %1\z\system\data\wsini.ini %2 %3 %4
   115 if exist %1\z\system\data\wsini.ini perl %1\z\wstest\wsini-writer.pl %1\z\system\data\wsini.ini %2 %3 %4
   147 if exist %1\z\resource\data\wsini.ini perl %1\z\wstest\wsini-writer.pl %1\z\resource\data\wsini.ini %2 %3 %4
   116 if exist %1\z\resource\data\wsini.ini perl %1\z\wstest\wsini-writer.pl %1\z\resource\data\wsini.ini %2 %3 %4
   148 
   117 
   157 	call :douninstall %EPOCROOT%epoc32\release\winscw\urel
   126 	call :douninstall %EPOCROOT%epoc32\release\winscw\urel
   158 ) else (
   127 ) else (
   159 	call :douninstall %EMULATOR_DATA_DIR%
   128 	call :douninstall %EMULATOR_DATA_DIR%
   160 )
   129 )
   161 
   130 
   162 echo Restoring EPOC.INI.
   131 echo If EPOC.INI was already backuped then restore EPOC.INI from EPOC.INI.bak
   163 if exist %EPOC_INI%.backup xcopy /r /y %EPOC_INI%.backup %EPOC_INI% >nul
   132 if exist %EPOC_INI%.bak (
       
   133 	echo Restore EPOC.INI from backup
       
   134 	copy /y %EPOC_INI%.bak %EPOC_INI% >nul
       
   135 	del /f /q %EPOC_INI%.bak >nul
       
   136 )
   164 goto :EOF
   137 goto :EOF
   165 
   138 
   166 
   139 
   167 :douninstall
   140 :douninstall
   168 rem Restore WSINI.INI
   141 
   169 if exist %1\z\system\data\wsini.bak   xcopy /r /y %1\z\system\data\wsini.bak   %1\z\system\data\wsini.ini >nul
   142 rem If WSINI.INI(s) were already backuped then restore WSINI.INI
   170 if exist %1\z\resource\data\wsini.bak xcopy /r /y %1\z\resource\data\wsini.bak %1\z\resource\data\wsini.ini >nul
   143 if exist %1\z\system\data\wsini.bak (
       
   144 copy /y %1\z\system\data\wsini.bak   %1\z\system\data\wsini.ini >nul
       
   145 del  /f /q %1\z\system\data\wsini.bak >nul
       
   146 )
       
   147 if exist %1\z\resource\data\wsini.bak (
       
   148 copy /y %1\z\resource\data\wsini.bak %1\z\resource\data\wsini.ini >nul
       
   149 del  /f /q %1\z\resource\data\wsini.bak >nul
       
   150 )
       
   151 
   171 echo Restoring backedup ECONS.DLL
   152 echo Restoring backedup ECONS.DLL
   172 if exist %1\econs-temp.dll copy /y %1\econs-temp.dll %1\econs.dll
   153 if exist %1\econs-temp.dll copy /y %1\econs-temp.dll %1\econs.dll
   173 goto :EOF
   154 goto :EOF
   174 
   155