Compare commits

..

No commits in common. "017fd64d2fd6cf25acd5c05dbad4be59c54935ab" and "300aec6d85128931fd38e25fb925b26103796c4a" have entirely different histories.

17 changed files with 41 additions and 54 deletions

35
.vscode/tasks.json vendored
View file

@ -3,41 +3,28 @@
// for the documentation about the tasks.json format // for the documentation about the tasks.json format
"version": "2.0.0", "version": "2.0.0",
"tasks": [ "tasks": [
{
"label": "Flash hwb1",
"type": "shell",
"command": "${workspaceFolder}/hwb1/scripts/flash.cmd",
"problemMatcher": []
},
{ {
"label": "List Applets", "label": "List Applets",
"type": "shell", "type": "shell",
"command": "${workspaceFolder}/scripts/list.cmd", "command": "${workspaceFolder}/hwb1/scripts/list.cmd",
"problemMatcher": [] "problemMatcher": []
}, },
{ {
"label": "Flash MyApplet", "label": "Test hwb1 Applet",
"type": "shell", "type": "shell",
"command": "${workspaceFolder}/scripts/flash.cmd", "command": "${workspaceFolder}/hwb1/scripts/test.cmd",
"options": {
"env": {
"PACKAGE": "hwb1",
"APPLET": "MyApplet",
"PARAMS": "31323334"
}
},
"problemMatcher": [] "problemMatcher": []
}, },
{ {
"label": "Test MyApplet", "label": "Delete hwb1 Applet",
"type": "shell", "type": "shell",
"command": "${workspaceFolder}/scripts/test.cmd", "command": "${workspaceFolder}/hwb1/scripts/delete.cmd",
"options": {
"env": {
"PACKAGE": "hwb1",
"APPLET": "MyApplet"
}
},
"problemMatcher": []
},
{
"label": "Delete Applet",
"type": "shell",
"command": "${workspaceFolder}/scripts/delete.cmd",
"problemMatcher": [] "problemMatcher": []
} }
] ]

View file

@ -1,4 +1,3 @@
:: compile applet with JcDK 2.2.2 @rem compile applet with JcDK 2.2.2
CALL %~dp0setup.cmd javac -g -target 1.1 -source 1.2 -cp %JC_HOME%\lib\api.jar -d . %~dp0../src/%PACKAGE%/*.java
javac -g -target 1.1 -source 1.2 -cp %JC_HOME%\lib\api.jar -d . %~dp0../%PACKAGE%/src/%PACKAGE%/*.java
converter -exportpath "%JC_HOME%\api_export_files" -applet 0x01:0x02:0x03:0x04:0x5:0x6:0x8:0x9 %PACKAGE%.%APPLET% %PACKAGE% 0x01:0x02:0x03:0x04:0x5:0x6:0x8 1.0 converter -exportpath "%JC_HOME%\api_export_files" -applet 0x01:0x02:0x03:0x04:0x5:0x6:0x8:0x9 %PACKAGE%.%APPLET% %PACKAGE% 0x01:0x02:0x03:0x04:0x5:0x6:0x8 1.0

1
hwb1/card/delete.cmd Normal file
View file

@ -0,0 +1 @@
gp --delete 01020304050608

5
hwb1/card/e222.cmd Normal file
View file

@ -0,0 +1,5 @@
@echo off
set PACKAGE=hwb1
set APPLET=MyApplet
set "JAVA_HOME=%JAVA8_HOME%"
set "path=%JAVA_HOME%\bin;%JC_HOME%\bin;%JC_HOME%\..;%JC_HOME%\..\GPShell-1.4.4;%path%"

4
hwb1/card/install.cmd Normal file
View file

@ -0,0 +1,4 @@
SET PIN=31323334
@rem -f to force install over old version
gp --install %~dp0..\javacard\%PACKAGE%.cap --params %PIN% -f

1
hwb1/card/list.cmd Normal file
View file

@ -0,0 +1 @@
gp --list

1
hwb1/card/test.cmd Normal file
View file

@ -0,0 +1 @@
gpshell %~dp0test.txt

3
hwb1/scripts/delete.cmd Normal file
View file

@ -0,0 +1,3 @@
SET CARD_ROOT=%~dp0..\card
call %CARD_ROOT%\e222.cmd
call %CARD_ROOT%\delete.cmd

5
hwb1/scripts/flash.cmd Normal file
View file

@ -0,0 +1,5 @@
@echo off
SET CARD_ROOT=%~dp0..\card
call %CARD_ROOT%\e222.cmd
call %CARD_ROOT%\c222.cmd
call %CARD_ROOT%\install.cmd

4
hwb1/scripts/list.cmd Normal file
View file

@ -0,0 +1,4 @@
@echo off
SET CARD_ROOT=%~dp0..\card
call %CARD_ROOT%\e222.cmd
call %CARD_ROOT%\list.cmd

4
hwb1/scripts/test.cmd Normal file
View file

@ -0,0 +1,4 @@
@echo off
SET CARD_ROOT=%~dp0..\card
call %CARD_ROOT%\e222.cmd
call %CARD_ROOT%\test.cmd

View file

@ -1,2 +0,0 @@
CALL %~dp0setup.cmd
gp --delete %ID%

View file

@ -1,5 +0,0 @@
CALL %~dp0setup.cmd
CALL %~dp0compile.cmd
:: "-f" forces overwriting old versions of the package
gp --install %~dp0..\%PACKAGE%\javacard\%PACKAGE%.cap --params %PARAMS% -f

View file

@ -1,2 +0,0 @@
CALL %~dp0setup.cmd
gp --list

View file

@ -1,16 +0,0 @@
:: Common Environment Variables
@echo off
:: To be defined externally
SET "PACKAGE=%PACKAGE%"
SET "APPLET=%APPLET%"
SET "PARAMS=%PARAMS%"
SET "JAVA8_HOME=%JAVA8_HOME%"
SET "JC_HOME=%JC_HOME%"
SET HEXID=0x01:0x02:0x03:0x04:0x5:0x6:0x8:0x9
SET ID=%HEXID:0x0=0%
SET ID=%ID:0x=0%
SET ID=%ID::=%
SET "JAVA_HOME=%JAVA8_HOME%"
SET "PATH=%JAVA_HOME%\bin;%JC_HOME%\bin;%JC_HOME%\..;%JC_HOME%\..\GPShell-1.4.4;%PATH%"

View file

@ -1,2 +0,0 @@
CALL %~dp0setup.cmd
gpshell %~dp0..\%PACKAGE%\tests\%APPLET%.txt