widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #02599
[Merge] lp:~qcumber-some/widelands/bug1342228 into lp:widelands
Jens Beyer has proposed merging lp:~qcumber-some/widelands/bug1342228 into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
For more details, see:
https://code.launchpad.net/~qcumber-some/widelands/bug1342228/+merge/229829
Ok this is a start.
Now the build always builds locales (not depending on release type anymore).
Also, . is the default directory for data, also on Linux. This works with compile.sh.
For packagers it will be necessary to use WL_INSTALL_PREFIX,WL_INSTALL_DATADIR,WL_INSTALL_LOCALEDIR and WL_INSTALL_BINDIR when building.
It is possible to do a staged install with that (like Gentoo Portage does):
-DCMAKE_INSTALL_PREFIX=/tmp/wlinstall -DWL_INSTALL_PREFIX=/usr -DWL_INSTALL_DATADIR=share/games/widelands -DWL_INSTALL_LOCALEDIR=/usr/share/games/widelands/locale -DWL_INSTALL_BINDIR=games/bin
(then make install and mv /tmp/wlinstall/* /usr/)
The only thing I do not really know: Should we also get rid of the stuff in wlapplication.cc (WLApplication::setup_searchpaths)? I guess we should... (otherwise it would use the standard path on Linux and may pick up a wrong data dir there...)
--
https://code.launchpad.net/~qcumber-some/widelands/bug1342228/+merge/229829
Your team Widelands Developers is requested to review the proposed merge of lp:~qcumber-some/widelands/bug1342228 into lp:widelands.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2014-07-26 20:06:46 +0000
+++ CMakeLists.txt 2014-08-06 16:43:52 +0000
@@ -10,17 +10,12 @@
# Define the directory structure for installation - will be hardcoded in WL bin
# (through config.h).
-if(WIN32 OR APPLE OR WL_PORTABLE)
- wl_set_if_unset(WL_INSTALL_PREFIX ".")
- wl_set_if_unset(WL_INSTALL_DATADIR ".")
- wl_set_if_unset(WL_INSTALL_LOCALEDIR "locale")
- wl_set_if_unset(WL_INSTALL_BINDIR ".")
-else()
- wl_set_if_unset(WL_INSTALL_PREFIX "/usr/local")
- wl_set_if_unset(WL_INSTALL_DATADIR "share/games/widelands")
- wl_set_if_unset(WL_INSTALL_LOCALEDIR "${WL_INSTALL_PREFIX}/${WL_INSTALL_DATADIR}/locale")
- wl_set_if_unset(WL_INSTALL_BINDIR "games")
-endif()
+# If not specified, we are going to use the current directory. Also on Linux.
+# Packagers (or people using make install) have to set those variables.
+wl_set_if_unset(WL_INSTALL_PREFIX ".")
+wl_set_if_unset(WL_INSTALL_DATADIR ".")
+wl_set_if_unset(WL_INSTALL_LOCALEDIR "locale")
+wl_set_if_unset(WL_INSTALL_BINDIR ".")
if (CMAKE_INSTALL_PREFIX STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "Build directory and install directory must not be the same.")
=== modified file 'compile.sh'
--- compile.sh 2014-07-26 12:38:31 +0000
+++ compile.sh 2014-08-06 16:43:52 +0000
@@ -79,7 +79,6 @@
fi
$buildtool
- $buildtool lang
return 0
}
@@ -119,7 +118,6 @@
cd build
cmake ..
$buildtool
-$buildtool lang
rm ../VERSION || true
rm ../widelands || true
mv VERSION ../VERSION
=== modified file 'po/CMakeLists.txt'
--- po/CMakeLists.txt 2011-10-13 18:39:38 +0000
+++ po/CMakeLists.txt 2014-08-06 16:43:52 +0000
@@ -1,17 +1,6 @@
-if (${CMAKE_BUILD_TYPE} STREQUAL Release)
- add_custom_target (
+add_custom_target (
lang ALL
- )
-else (${CMAKE_BUILD_TYPE} STREQUAL Release)
- add_custom_target (
- lang_dummy ALL
- COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/locale
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- )
- add_custom_target (
- lang
- )
-endif (${CMAKE_BUILD_TYPE} STREQUAL Release)
+)
macro(CreateLocale locale_name)
set (commands "")
Follow ups