|
1 @rem |
|
2 @rem Copyright (c) 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 |
|
16 |
|
17 @ECHO OFF |
|
18 set JDK=C:\j2sdk1.4.2_09\ |
|
19 set WTK=C:\WTK23\ |
|
20 set JKEY_STORE=.\ |
|
21 set JAD_NAME=%1 |
|
22 set JAR_NAME=%2 |
|
23 |
|
24 if "%1"=="" goto :HELP |
|
25 if "%2"=="" goto :HELP |
|
26 if not exist %JDK%bin\java.exe goto :JDK_HELP |
|
27 if not exist %WTK%bin\JADTool.jar goto :WTK_HELP |
|
28 if not exist %JKEY_STORE% goto :JKEY_STORE_HELP |
|
29 |
|
30 @ECHO ON |
|
31 %JDK%bin\java.exe -jar %WTK%bin\JADTool.jar -addcert -keystore %JKEY_STORE%test_keystore.ks -alias JP_Third_Party_Trusted -storepass jperformance -certnum 1 -chainnum 1 -inputjad %JAD_NAME% -outputjad %JAD_NAME% |
|
32 %JDK%bin\java.exe -jar %WTK%bin\JADTool.jar -addjarsig -jarfile %JAR_NAME% -keystore %JKEY_STORE%test_keystore.ks -alias JP_Third_Party_Trusted -storepass jperformance -keypass R_and_D_Party_Trusted -inputjad %JAD_NAME% -outputjad %JAD_NAME% |
|
33 |
|
34 @ECHO OFF |
|
35 goto END |
|
36 |
|
37 ::::::::::::::: JDK is missing :::::::::::::::::::::: |
|
38 :JDK_HELP |
|
39 @ECHO OFF |
|
40 ECHO "%JDK%" does NOT exist. Please set the path of the JDK environment into this script's JDK variable and try again. |
|
41 goto END |
|
42 |
|
43 ::::::::::::::: WTK is missing :::::::::::::::::::::: |
|
44 :WTK_HELP |
|
45 @ECHO OFF |
|
46 ECHO "%WTK%" does NOT exist. Please set the path of the Wireless Toolkit into this script's WTK variable and try again. |
|
47 goto END |
|
48 |
|
49 ::::::::::::::: S60 env is missing :::::::::::::::::::::: |
|
50 :JKEY_STORE_HELP |
|
51 @ECHO OFF |
|
52 ECHO "%JKEY_STORE%" does NOT exist. Please make sure that you run this script from the substituted drive corresponding to the S60 environment and try again. |
|
53 goto END |
|
54 |
|
55 :HELP |
|
56 @ECHO OFF |
|
57 ECHO Input parameters jad, jar or both missing |
|
58 ECHO sigMidlet_Third_Party_Trusted.cmd "JAD_FILE.JAD" "JAR_FILE.JAR" |
|
59 |
|
60 :END |
|
61 |
|
62 @ECHO OFF |
|
63 set JAD_NAME= |
|
64 set JAR_NAME= |
|
65 set WTK= |
|
66 set JKEY_STORE= |
|
67 set JDK= |