mtpfws/mtpfw/group/centrep_compile.cmd
changeset 0 d0791faffa3f
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 @ECHO OFF
       
     2 rem Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 rem All rights reserved.
       
     4 rem This component and the accompanying materials are made available
       
     5 rem under the terms of "Eclipse Public License v1.0"
       
     6 rem which accompanies this distribution, and is available
       
     7 rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 rem
       
     9 rem Initial Contributors:
       
    10 rem Nokia Corporation - initial contribution.
       
    11 rem
       
    12 rem Contributors:
       
    13 rem
       
    14 rem Description:
       
    15 rem Script to convert a central repository text file to a binary format. The 
       
    16 rem source file should be located in the current default directory, and should 
       
    17 rem be named as follows:
       
    18 rem <UID>_<platform>.txt (e.g 10282FCC_ARMV5.txt).
       
    19 rem The binary format target file is created in the current default directory.
       
    20 rem 
       
    21 rem
       
    22 
       
    23 SET RETURNCODE=0
       
    24 
       
    25 SET _UID=%1
       
    26 SET _PLATFORM=%2
       
    27 
       
    28 IF "%_UID%"=="" GOTO HELP
       
    29 IF "%_PLATFORM%"=="" SET _PLATFORM=BOTH
       
    30 
       
    31 IF /I "%_PLATFORM%"=="ARMV5" GOTO ARMV5
       
    32 IF /I "%_PLATFORM%"=="WINSCW" GOTO WINSCW
       
    33 IF /I "%_PLATFORM%"=="BOTH" GOTO WINSCW
       
    34 GOTO DONE
       
    35 
       
    36 :WINSCW
       
    37 SET _SOURCE=%_UID%_winscw.txt
       
    38 SET _TARGET=%_UID%_winscw.cre
       
    39 IF EXIST %_SOURCE% GOTO WINSCW_COMPILE
       
    40 ECHO %_SOURCE% not found
       
    41 GOTO WINSCW_DONE
       
    42 
       
    43 :WINSCW_COMPILE
       
    44 ECHO Compiling %_SOURCE% as %_TARGET%
       
    45 COPY %_SOURCE% %EPOCROOT%epoc32\winscw\c\%_UID%.txt
       
    46 CALL %EPOCROOT%epoc32\release\winscw\udeb\CentRepConv -nowait -o C:\%_UID%.cre C:\%_UID%.txt
       
    47 COPY %EPOCROOT%epoc32\winscw\c\%_UID%.cre %_TARGET% 
       
    48 ERASE %EPOCROOT%epoc32\winscw\c\%_UID%.cre
       
    49 ERASE %EPOCROOT%epoc32\winscw\c\%_UID%.txt
       
    50 
       
    51 :WINSCW_DONE
       
    52 IF /I NOT "%_PLATFORM%"=="BOTH" GOTO DONE
       
    53 
       
    54 :ARMV5
       
    55 SET _SOURCE=%_UID%_armv5.txt
       
    56 SET _TARGET=%_UID%_armv5.cre
       
    57 IF EXIST %_SOURCE% GOTO ARMV5_COMPILE
       
    58 ECHO %_SOURCE% not found
       
    59 GOTO ARMV5_DONE
       
    60 
       
    61 :ARMV5_COMPILE
       
    62 ECHO Compiling %_SOURCE% as %_TARGET%
       
    63 COPY %_SOURCE% %EPOCROOT%epoc32\winscw\c\%_UID%.txt
       
    64 CALL %EPOCROOT%epoc32\release\winscw\udeb\CentRepConv -nowait -o C:\%_UID%.cre C:\%_UID%.txt
       
    65 COPY %EPOCROOT%epoc32\winscw\c\%_UID%.cre %_TARGET% 
       
    66 ERASE %EPOCROOT%epoc32\winscw\c\%_UID%.cre
       
    67 ERASE %EPOCROOT%epoc32\winscw\c\%_UID%.txt
       
    68 
       
    69 :ARMV5_DONE
       
    70 GOTO DONE
       
    71 
       
    72 :HELP
       
    73 SET _SYNTAX="%0% <UID> [WINSCW|ARMV5]"
       
    74 ECHO Syntax: %_SYNTAX%
       
    75 GOTO DONE
       
    76 
       
    77 :DONE
       
    78 EXIT /B %RETURNCODE%