1 @echo off |
1 @rem |
2 rem |
2 @rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 @rem All rights reserved. |
4 rem All rights reserved. |
4 @rem This component and the accompanying materials are made available |
5 rem This component and the accompanying materials are made available |
5 @rem under the terms of the License "Eclipse Public License v1.0" |
6 rem under the terms of the License "Eclipse Public License v1.0" |
6 @rem which accompanies this distribution, and is available |
7 rem which accompanies this distribution, and is available |
7 @rem at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 rem at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 @rem |
9 rem |
9 @rem Initial Contributors: |
10 rem Initial Contributors: |
10 @rem Nokia Corporation - initial contribution. |
11 rem Nokia Corporation - initial contribution. |
11 @rem |
12 rem |
12 @rem Contributors: |
13 rem Contributors: |
13 @rem |
14 rem |
14 @rem Description: iMaker wrapper for Windows |
15 rem Description: iMaker wrapper for Windows |
15 @rem |
16 rem |
|
17 |
16 |
18 |
17 |
|
18 @echo off |
19 setlocal |
19 setlocal |
20 set MAKE= |
|
21 set IMAKER_CMDARG=%* |
20 set IMAKER_CMDARG=%* |
22 if "%EPOCROOT%"=="" set EPOCROOT=\ |
21 if "%IMAKER_DIR%"=="" ( |
23 if "%CONFIGROOT%"=="" set CONFIGROOT=%EPOCROOT%epoc32\rom\config |
22 set IMAKER_DIR=%~dp0rom\imaker |
24 if "%ITOOL_DIR%"=="" set ITOOL_DIR=%EPOCROOT%epoc32\tools\rom |
23 if exist %~dp0imaker.pl set IMAKER_DIR=%~dp0 |
25 if "%IMAKER_DIR%"=="" set IMAKER_DIR=%ITOOL_DIR%\imaker |
24 ) |
26 if "%IMAKER_MAKE%"=="" set IMAKER_MAKE=%IMAKER_DIR%\mingw_make.exe |
25 set IMAKER_TOOL=%~f0 |
27 if "%IMAKER_MAKESHELL%"=="" set IMAKER_MAKESHELL=%COMSPEC% |
26 |
28 if "%IMAKER_MAKESHELL%"=="" set IMAKER_MAKESHELL=cmd.exe |
27 if "%PERL%"=="" set PERL=perl |
29 if "%IMAKER_CYGWIN%"=="" set IMAKER_CYGWIN=0 |
|
30 if "%PERL%"=="" set PERL=perl |
|
31 call %PERL% -x %IMAKER_DIR%\imaker.pl |
28 call %PERL% -x %IMAKER_DIR%\imaker.pl |
32 set IMAKER_ERROR=%errorlevel% |
29 set IMAKER_ERROR=%errorlevel% |
33 if %IMAKER_ERROR% geq 1 ( |
30 |
|
31 if %IMAKER_ERROR% neq 0 ( |
34 call %PERL% -v >nul 2>&1 |
32 call %PERL% -v >nul 2>&1 |
35 if errorlevel 1 echo Perl is not properly installed! Environment variable PERL can be used to set the Perl exe. |
33 if errorlevel 1 ( |
|
34 echo Perl is not properly installed! Environment variable PERL can be used to set the Perl exe. |
|
35 ) |
36 ) |
36 ) |
|
37 |
37 if 0%IMAKER_EXITSHELL% equ 0 exit /b %IMAKER_ERROR% |
38 if 0%IMAKER_EXITSHELL% equ 0 exit /b %IMAKER_ERROR% |
38 exit %IMAKER_ERROR% |
39 exit %IMAKER_ERROR% |
39 endlocal |
40 endlocal |
40 |
41 |
41 :: END OF IMAKER.CMD |
42 :: END OF IMAKER.CMD |