Martin, Great ideas... I will try to follow up on some of them. I am actually heading out a town for a week and a half, but will try to play with this while I am gone.
As far as the plugins go, I am not sure the direction to go there. Initially I was just trying to strip down some other apps I had done into the common code so that I could re-use it again on new projects easily. Adding the capability for plugins (even QGIS plugins) is interesting and I will give that some thought. Right now I was just shooting for a basic app that has everything needed to use as the basis for your own app. There are plenty of plugin examples out there, but not many stand alone apps that take a user through the whole sequence of app dev... all the way through win installers etc. The bootstrap script sounds great and is probably the next thing I will work on. I think standardizing on an environment var for the QGIS install would be a good way to go moving forward as well. Something like GISBASE or something similar that would be easily read from the startup of the program or the bootstrap script on all systems. Maybe have this environment var automatically set upon the install of QGIS on a system? INNO has turned out to be an easy way to deploy on Win as well, but I think I would like to create an NSIS option as well as NSIS has much more flexibility for creating more complex installers. I guess I need to start filing TRAC tickets for my self ;-) Anyway, I only just started this and think your ideas will help me direct the development a bit more in the coming weeks. Thanks again for the comments... more to come soon! A +----------------------------------------+ Aaron Racicot - GIS Programmer [EMAIL PROTECTED] +----------------------------------------+ z - p u l l e y pobox 1614 langley wa 98260 www.reprojected.com +----------------------------------------+ > -----Original Message----- > From: Martin Dobias [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 29, 2008 8:58 AM > To: Aaron Racicot > Cc: Tim Michelsen; [email protected] > Subject: Re: [Qgis-user] error using the stand alone app Oceanmap > > On Jan 29, 2008 4:51 PM, Aaron Racicot <[EMAIL PROTECTED]> wrote: > > > > 3) You can play with a new project I am starting to develop called > QGISLite. > > It can be found here: > > > > > > > > http://trac.reprojected.com/qgislite/ > > > > > > > > The intention of this project is to create a very minimal GIS app based > on > > the python bindings to QGIS that stand alone apps can be built against. > I > > just started that one, but look forward to adding to it. The SVN for > that > > one is: > > > > > > > > http://svn.reprojected.com/qgislite/trunk/ > > Aaron, > > QGISLite looks nice :-) What will be the way to build standalone apps > against QGISLite? Are you going to implement QgisInterface so that > regular python plugins for QGIS could be used or use some other way? > > Btw. it has been crashing for me when exiting (on linux) - the reason > is that garbage collection first deletes QApplication instance and > later before destruction of something related to QgsMapCanvas (don't > know what so far) wants to paint to QPixmap and that's not possible > anymore. This behaviour was happening also in the tutorials ported to > python. This may be caused by the merge of incremental rendering > support but I'm not sure. Anyway, it's possible to workaround it by > creating application in one function and then doing the rest of > initialization in other fuction so that first python will collect all > gui-related stuff and at last the application, i.e.: > > def doInit(): > app = QApplication(sys.argv) > initApp(app) > > def initApp(app): > # ... stuff ... > > At last one thought: > What sucks about custom qgis-based application is the need to find out > the QGIS installation and set the paths to PyQGIS, QGIS libs and QGIS > resources. It comes to my mind that we could possibly do a simple > "bootstrap" python script that application could use. The bootstrap > script could work as follows: > 1. check availability of PyQt4. if not available, quit gracefully and > tell the user about the problem in a way that they can understand it > 2. try to find QGIS in some default paths (/usr, /usr/local on linux > or "${PROGRAM_FILES}/Quantum GIS" on windows etc.) or try to use a > previously saved path to QGIS installation from QSettings > 3. if no installation has been found, fire up a simple UI in PyQt and > let the user select the installation directory. If the user doesn't > have QGIS installed at all, it could guide him to download and install > it for his platform - or even just download the necessary files like > libraries, providers and some resources like SRS database. > 4. check whether the QGIS version is compatible (i.e. >= 0.9) > 5. if everything is correct, let's set path to the bindings (modify > sys.path), path to the libraries (os.environ['LD_LIBRARY_PATH'] on > linux) and path to the resources (QgsApplication.setPrefixPath) > 6. everything is ready :) > > What do you think about that? Such script could be included in QGIS > sources so any project could copy it and use for bootstrapping. > > Bye > Martin _______________________________________________ Qgis-user mailing list [email protected] http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
