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-b9f4589650da
unstable
natron 2010-01-27 23:15:36 +00:00
parent 7c4d7c3d71
commit 9891d60dfc
1 changed files with 27 additions and 25 deletions

View File

@ -372,11 +372,6 @@ public class #{datastore['APPLETNAME']} extends Applet
end end
end end
# 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) appletcode = get_code(cli)
print_status "Compiling applet classes..." print_status "Compiling applet classes..."
@ -385,7 +380,7 @@ public class #{datastore['APPLETNAME']} extends Applet
print_status "Compile completed. Building jar file..." print_status "Compile completed. Building jar file..."
unsignedjar = "unsigned_#{datastore['APPLETNAME']}.jar" unsignedjar = "unsigned_#{datastore['APPLETNAME']}.jar"
signedjar = "#{datastore['APPLETNAME']}.jar" @signedjar = "#{datastore['APPLETNAME']}.jar"
build_jar( unsignedjar, build_jar( unsignedjar,
[ # Applet [ # Applet
@ -397,11 +392,18 @@ public class #{datastore['APPLETNAME']} extends Applet
print_status "Jar built. Signing..." print_status "Jar built. Signing..."
sign_jar( datastore['CERTCN'], unsignedjar, signedjar ) 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
# load the jar file # load the jar file
if File.exists? File.join( datastore['JAVACACHE'], signedjar ) if File.exists? File.join( datastore['JAVACACHE'], @signedjar )
path = File.join( datastore['JAVACACHE'], signedjar ) path = File.join( datastore['JAVACACHE'], @signedjar )
fd = File.open( path, "rb" ) fd = File.open( path, "rb" )
@jar_data = fd.read(fd.stat.size) @jar_data = fd.read(fd.stat.size)
fd.close fd.close