| Making Thuban an independant application |
|
|
|
|
How i've have updated Thuban so that we can create a independant application of it. I used cx Freeze 3.0.3 to do it.
This is a draft and will be update soon (for win32).
Update (2007-05-10) : i've made interesting test with pyinstaller 1.3 under win32. It seems to work fine and embeds all the needed libraries
Code modifications
Update all the Python code using __path__ or __file__ for managing the frozen state of the new application. For example, Thuban/Model/resources.py has been updated in the following way : if hasattr(sys, 'frozen'):
Freezing the app under linux:
A single command line : FreezePython --install-dir ~/tmp/dist/ --include-path=current/thuban:current/thuban/Lib/ --include-modules=Extensions.svgexport,Extensions.umn_mapserver, Extensions.mouseposition,Extensions.importAPR,Extensions.ogr, Extensions.bboxdump,Extensions.export_shapefile,Extensions.gns2shp,Extensions.profiling, Extensions.wms,pyexpat,xml.sax.drivers2.drv_pyexpat current/thuban/thuban.py All the not directly used modules have to be added to the --include-modules option to be integrated in the application. Finally, you only have to add the needed missing resources by copying the directories to the new dist : cp -r current/thuban/Resources /home/did/tmp/dist/ Launching /home/did/tmp/dist/thuban just works fine.
|
|
| Last Updated ( jeudi, 10 mai 2007 ) |
| Next > |
|---|
| Newsflash | ||
|---|---|---|
|
||
| Popular |
|---|


