Widelands searches system paths for its data files by default.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Critical
|
Unassigned |
Bug Description
Related to bug 615891.
Widelands is configured at compile time where it looks for its files. By default on Linux it looks in /usr/share something…
Before it checked in each datadir it could find if the VERSION file was the same as the binary and would prefer that. I removed the check in http://
I think the correct approach is to hardcode CMAKE_SRC_DIR as the datadir (the read only directory for data) until explicitly overwritten by CMAKE options on build. This will keep all flexibility for the various installation options people like through CMAKE parameters, but makes also more sense for development. Are there other opinions?
Could anybody who knows something about Linux look into how this should be done, so that our PPA do not break?
Related branches
- SirVer: Approve
-
Diff: 71 lines (+8/-26)3 files modifiedCMakeLists.txt (+6/-11)
compile.sh (+0/-2)
po/CMakeLists.txt (+2/-13)
- SirVer: Needs Resubmitting
-
Diff: 168 lines (+11/-100)2 files modifiedsrc/wlapplication.cc (+9/-95)
src/wlapplication.h (+2/-5)
Changed in widelands: | |
status: | New → Incomplete |
tags: | added: cmake |
tags: | added: buildsystem |
Changed in widelands: | |
milestone: | none → build19-rc1 |
importance: | Undecided → Critical |
tags: | removed: cmake |
Changed in widelands: | |
status: | Fix Committed → Fix Released |
I can possibly look into that.
One thing though: WL_PORTABLE can not work with CMAKE_SOURCE_DIR but needs . for the data directory. Same on Windows.
On Linux without WL_PORTABLE, we should stick to the CMAKE defaults regarding CMAKE_INSTALL_ PREFIX (/usr/local) and code the locations as such (if not defined when calling cmake).
On Debian/Ubuntu (which also means our PPA) we have to take care about the locations but as you said this should be doable.