Opened 14 years ago
Closed 14 years ago
#2961 closed bug (fixed)
mapserver hardwires absolute install path
Reported by: | kyngchaos | Owned by: | nobody |
---|---|---|---|
Priority: | critical: causes crash or data corruption | Milestone: | Version 1.6.0 |
Component: | Build/Install | Version: | Trunk |
Keywords: | mapserver | Cc: | |
Must Fix for Release: | No | Platform: | All |
Platform Version: | Awaiting user input: | no |
Description
The new mapserver component hardwires CMAKE_INSTALL_PREFIX in the executable. This locks down the user install location of Qgis, which on OS X (maybe Windows also?) can change from the compiled CMAKE_INSTALL_PREFIX.
But, I realize it could be tricky with the mapserv executable, since I think it wants the QGIS install path to be able to find Qgis resources.
A couple similar options I can think of:
- how the help app handles this: for the OS X build, it backtracks from prefixPath() to the Qgis executable (mapserv could use known QGIS_CGIBIN_SUBDIR values for different systems), then goes from there with the relative QGIS_*_SUBDIR vars. Still a bit fragile, if the QGIS_CGIBIN_SUBDIR is configured different from default.
- configure a matching QGIS_CGIBIN_SUBDIR_REV that backtracks (I use this in the OS X Xcode project in QGIS_LIBEXEC_SUBDIR_REV for other executables). So, mapserv prefixPath() + "/" + QGIS_CGIBIN_SUBDIR_REV = Qgis prefixPath(). I don't know if the relative subdir vars are meant to be user-configurable, if so, this could be tricky to generate an inverse subdir during cmake configuration.
ie, if QGIS_CGIBIN_SUBDIR = bin (unix, Mac), QGIS_CGIBIN_SUBDIR_REV = ..
Change History (2)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
It is now (r14303) possible to set the prefix path with the environment variable QGIS_PREFIX_PATH. If not set, it defaults to the cmake install prefix.
Somewhat related:
I don't think it's a good idea to default to bin for the CGI files for safety reasons. Besides that, there are also 2 non-binary files that go into the same directory, which also shouldn't be done for bin.