extended version information from Mapserver

Kralidis,Tom [Burlington] Tom.Kralidis at EC.GC.CA
Thu Feb 23 11:18:05 EST 2006


This is a good idea.  I think it would be nice to do for all libs
MapServer has been built with (i.e. name/version).

> -----Original Message-----
> From: UMN MapServer Developers List 
> [mailto:MAPSERVER-DEV at LISTS.UMN.EDU] On Behalf Of Brent Fraser
> Sent: Thursday, February 23, 2006 11:06 AM
> To: MAPSERVER-DEV at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-DEV] extended version information 
> from Mapserver
> 
> 
> Frank,
> 
>   One of the posts to the Mapserver Users list last nite 
> involved a question about how to get ECW files working with 
> Mapserver.  It would be nice to have a way to check the 
> capabilities of the GDAL (and other options?) linked to 
> MapServer.  Last month I had a similar need and wrote a 
> function (for v4.8) to include in maperror.c:
> 
> /* 
> --------------------------------------------------------------
> ------ */
> /*      Detailed information about the various options 
> compiled in:     */
> /* 
> --------------------------------------------------------------
> ------ */ char *msGetVersionDetailed() {
>   static char version[2048];
>   long iDr=0;
> 
>   strcat(version, "Version Details:\n");
> 
> #ifdef USE_GDAL
>     strcat(version, "    " );
>     strcat(version, GDALVersionInfo( "--version" ) );
>     strcat(version, ":\n" );
> 
>     GDALAllRegister();
>     for( iDr = 0; iDr < GDALGetDriverCount(); iDr++ )
>     {
>         GDALDriverH hDriver = GDALGetDriver(iDr);
> 
>         strcat(version, "        " );
>         strcat(version, GDALGetDriverShortName( hDriver ) );
>         strcat(version, ": ");
>         strcat(version, GDALGetDriverLongName( hDriver ) );
>         strcat(version, "\n" );
>     }
>    GDALDestroyDriverManager();
> #endif
> 
>   return(version);
> }
> ====================
> 
> I also added (to my version only) a new command line 
> parameter to the arg processing of mapserv.c:
> 
>         if( strcmp(argv[iArg],"-d") == 0 ) {
>             printf("%s\n", msGetVersionDetailed());
>             fflush(stdout);
>             exit(0);
>         }
> 
> This would prevent the "details" from being written to every 
> web page as the "-v" results are now.
> 
> So now the questions:
> 1. Could you check the code in (if you think it's 
> reasonable)?  I'll file a bug report to track the change. 2. 
> Are there any immediate ramifications with respect to the 
> plug-in architecture (RFC 8)?
> 
> Thanks!
> Brent Fraser
> GeoAnalytic Inc.
> Calgary, Alberta
> 



More information about the mapserver-dev mailing list