Skip to Content.
Sympa Menu

idok-commit - [idok-commit] idok commit r733 - in branches/opensource: python/generate_jnlp scripts/admin/test_server

idok-commit AT lists.psi.ch

Subject: Commit emails of the iDok project

List archive

[idok-commit] idok commit r733 - in branches/opensource: python/generate_jnlp scripts/admin/test_server


Chronological Thread 
  • From: "Apache" <apache AT savannah.psi.ch>
  • To: idok-commit AT lists.psi.ch
  • Subject: [idok-commit] idok commit r733 - in branches/opensource: python/generate_jnlp scripts/admin/test_server
  • Date: Mon, 11 Feb 2008 15:20:25 +0100
  • List-archive: <https://lists.web.psi.ch/pipermail/idok-commit/>
  • List-id: Commit emails of the iDok project <idok-commit.lists.psi.ch>

Author: geus AT PSI.CH
Date: Mon Feb 11 15:20:24 2008
New Revision: 733

Log:
Extended generate_jnlp.py to support the iDok command line tools -- currently
this cannot be used in practice, because Java webstart does not support
console applications

Modified:
branches/opensource/python/generate_jnlp/generate_jnlp.py
branches/opensource/scripts/admin/test_server/setup_test_server_ubuntu.sh

Modified: branches/opensource/python/generate_jnlp/generate_jnlp.py
==============================================================================
--- branches/opensource/python/generate_jnlp/generate_jnlp.py (original)
+++ branches/opensource/python/generate_jnlp/generate_jnlp.py Mon Feb 11
15:20:24 2008
@@ -25,6 +25,14 @@

The JNLP file is created dynamically, because the hostname of the server is
not known,
and needs to be specified in the JNLP file.
+
+If this script is called with the name idok.jnlp, it delivers a JNLP file
for starting
+the iDok command line client. However Java webstart currently does not
support console
+applications.
+
+If this script is called with the name idok_admin.jnlp, it delivers a JNLP
file for starting
+the iDok administration command line client. However Java webstart currently
does not support
+console applications.
"""

import cgi, os, sys
@@ -34,8 +42,17 @@

def main():
"Main CGI function: create JNLP file"
- host = os.environ["SERVER_NAME"]
+ head, script_name = os.path.split(sys.argv[0])
+ if script_name == "qtgui.jnlp":
+ qtgui()
+ elif script_name == "idok.jnlp":
+ idok()
+ elif script_name == "idok_admin.jnlp":
+ idok_admin()
+ else:
+ qtgui()

+def qtgui():
print "Content-Type: application/x-java-jnlp-file"
print # blank line, end of headers
print """<?xml version="1.0" encoding="utf-8"?>
@@ -99,7 +116,87 @@
</security>

</jnlp>
-""" % {"host": host}
+""" % {"host": os.environ["SERVER_NAME"]}
+
+def idok():
+ print "Content-Type: application/x-java-jnlp-file"
+ print # blank line, end of headers
+ print """<?xml version="1.0" encoding="utf-8"?>
+
+<jnlp codebase="http://%(host)s/" href="cgi-bin/idok.jnlp">
+
+ <information>
+ <title>iDok command line client</title>
+ <vendor>iDok opensource project</vendor>
+ <homepage>http://www.idok.ch</homepage>
+ <description>Document management made easy: iDok Application based on Qt
Jambi Technology</description>
+ <description kind="short">iDok is made freely available under GPL
v2</description>
+ </information>
+
+ <resources>
+ <j2se version="1.5+"/>
+ <jar href="/ant_dist/idok.jar main="true"/>
+ <jar href="/lib/svnkit.jar"/>
+ <jar href="/lib/avalon-framework.jar"/>
+ <jar href="/lib/jacorb.jar"/>
+ <jar href="/lib/logkit.jar"/>commons-cli.jar
+ <jar href="/lib/commons-cli.jar"/>
+ <property name="org.omg.CORBA.ORBClass" value="org.jacorb.orb.ORB"/>
+ <property name="org.omg.CORBA.ORBSingletonClass"
value="org.jacorb.orb.ORBSingleton"/>
+ <property
name="org.omg.PortableInterceptor.ORBInitializerClass.bidir_init"
value="org.jacorb.orb.giop.BiDirConnectionInitializer"/>
+ <property name="ORBInitRef.NameService"
value="corbaloc::%(host)s:1050/NameService"/>
+ <property name="ch.idok.service.client.provider"
value="ch.idok.service.client.corba.ClientProvider"/>
+ <property name="ch.idok.service.common.keypass"
value="P7GXtm6rPr5pT988N4Gm" />
+ </resources>
+
+ <application-desc main-class="ch.idok.cli.DMS"/>
+
+ <security>
+ <all-permissions/>
+ </security>
+
+</jnlp>
+""" % {"host": os.environ["SERVER_NAME"]}
+
+def idok_admin():
+ print "Content-Type: application/x-java-jnlp-file"
+ print # blank line, end of headers
+ print """<?xml version="1.0" encoding="utf-8"?>
+
+<jnlp codebase="http://%(host)s/" href="cgi-bin/idok_admin.jnlp">
+
+ <information>
+ <title>iDok command line administration client</title>
+ <vendor>iDok opensource project</vendor>
+ <homepage>http://www.idok.ch</homepage>
+ <description>Document management made easy: iDok Application based on Qt
Jambi Technology</description>
+ <description kind="short">iDok is made freely available under GPL
v2</description>
+ </information>
+
+ <resources>
+ <j2se version="1.5+"/>
+ <jar href="/ant_dist/idok.jar main="true"/>
+ <jar href="/lib/svnkit.jar"/>
+ <jar href="/lib/avalon-framework.jar"/>
+ <jar href="/lib/jacorb.jar"/>
+ <jar href="/lib/logkit.jar"/>
+ <jar href="/lib/commons-cli.jar"/>
+ <property name="org.omg.CORBA.ORBClass" value="org.jacorb.orb.ORB"/>
+ <property name="org.omg.CORBA.ORBSingletonClass"
value="org.jacorb.orb.ORBSingleton"/>
+ <property
name="org.omg.PortableInterceptor.ORBInitializerClass.bidir_init"
value="org.jacorb.orb.giop.BiDirConnectionInitializer"/>
+ <property name="ORBInitRef.NameService"
value="corbaloc::%(host)s:1050/NameService"/>
+ <property name="ch.idok.service.client.provider"
value="ch.idok.service.client.corba.ClientProvider"/>
+ <property name="ch.idok.service.common.keypass"
value="P7GXtm6rPr5pT988N4Gm" />
+ </resources>
+
+ <application-desc main-class="ch.idok.cli.DMSAdmin"/>
+
+ <security>
+ <all-permissions/>
+ </security>
+
+</jnlp>
+""" % {"host": os.environ["SERVER_NAME"]}

if __name__ == "__main__":
main()

Modified:
branches/opensource/scripts/admin/test_server/setup_test_server_ubuntu.sh
==============================================================================
--- branches/opensource/scripts/admin/test_server/setup_test_server_ubuntu.sh
(original)
+++ branches/opensource/scripts/admin/test_server/setup_test_server_ubuntu.sh
Mon Feb 11 15:20:24 2008
@@ -122,6 +122,8 @@
# CGI script
cp generate_jnlp/generate_jnlp.py /usr/lib/cgi-bin/qtgui.jnlp
chmod a+x /usr/lib/cgi-bin/qtgui.jnlp
+# ln -s /usr/lib/cgi-bin/qtgui.jnlp /usr/lib/cgi-bin/idok.jnlp
+# ln -s /usr/lib/cgi-bin/qtgui.jnlp /usr/lib/cgi-bin/idok_admin.jnlp

#
# Startup scripts



  • [idok-commit] idok commit r733 - in branches/opensource: python/generate_jnlp scripts/admin/test_server, Apache, 02/11/2008

Archive powered by MHonArc 2.6.19.

Top of Page