Changes between Version 12 and Version 13 of WikiStart
- Timestamp:
- 07/27/21 13:37:27 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiStart
v12 v13 119 119 120 120 === Preparing the jar file 121 In order to put your party on the [https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWebP artiesServer partiesserver] for running, you need a jarfile of your party.121 In order to put your party on the [https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWebPythonPartiesServer pypartiesserver] for running, you need a tar.gz file of your party. 122 122 123 Normally the party includes all dependencies. The jar files are loaded with an isolated jar class loader that should avoid collisions with possibly identically named but possibly different packages in other jar files. 123 In contrast with java, python tar.gz files do not contain their dependent libraries. References to the dependent libraries are stored in the setup.py program inside the tar.gz file. The pypartiesserver runs a standard {{{pip install <your.tar.gz>}}} to install your party for use. 124 124 125 Your tar.gz file must contain a {{{party.py}}} program in the root of the project, defining a function party() that returns your main class, like this: 125 126 126 Party jar files must have a Main-Class set in the MANIFEST.MF file. This main-class must implement Party and have a no-arg constructor. 127 {{{ 128 from randomparty.RandomParty import RandomParty 129 def party(): 130 return RandomParty 131 }}} 127 132 128 The example randomparty does this from the maven build script. 129 130 We recommend to do initialization of the party only in the init() and not in the constructor or static code. 131 This because instances of your class can be made both for extracting general info as getDescription(), or to really run your class. 132 133 Of course you should replace RandomParty with your party's main class name but the file name must stay {{{party.py}}}. 133 134 134 135 == GeniusWeb sources