Merge branch 'master' into jgrpp

Replace build and refit, and group collapse implementations
Fix template creation build and refit

# Conflicts:
#	Makefile.bundle.in
#	config.lib
#	src/animated_tile.cpp
#	src/blitter/32bpp_anim.hpp
#	src/blitter/32bpp_base.hpp
#	src/blitter/8bpp_base.hpp
#	src/blitter/null.hpp
#	src/build_vehicle_gui.cpp
#	src/command.cpp
#	src/command_func.h
#	src/console_gui.cpp
#	src/core/smallstack_type.hpp
#	src/date.cpp
#	src/debug.cpp
#	src/genworld_gui.cpp
#	src/ground_vehicle.hpp
#	src/group_gui.cpp
#	src/lang/korean.txt
#	src/linkgraph/linkgraph_gui.h
#	src/main_gui.cpp
#	src/misc_gui.cpp
#	src/network/core/game.h
#	src/network/core/packet.cpp
#	src/network/core/udp.cpp
#	src/network/core/udp.h
#	src/network/network_content.cpp
#	src/network/network_type.h
#	src/network/network_udp.cpp
#	src/newgrf_house.h
#	src/openttd.cpp
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/os/windows/crashlog_win.cpp
#	src/osk_gui.cpp
#	src/pathfinder/opf/opf_ship.cpp
#	src/rail_cmd.cpp
#	src/rail_gui.cpp
#	src/saveload/saveload.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/smallmap_gui.h
#	src/station_base.h
#	src/station_cmd.cpp
#	src/table/gameopt_settings.ini
#	src/table/newgrf_debug_data.h
#	src/table/settings.ini
#	src/timetable_gui.cpp
#	src/toolbar_gui.cpp
#	src/train_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_gui.cpp
#	src/vehiclelist.cpp
#	src/viewport.cpp
#	src/widgets/dropdown.cpp
#	src/window_gui.h
This commit is contained in:
Jonathan G Rennison
2019-03-27 18:12:04 +00:00
422 changed files with 4697 additions and 6619 deletions

View File

@@ -1000,10 +1000,6 @@ static bool ChangeWorkingDirectoryToExecutable(const char *exe)
char *s = strrchr(tmp, PATHSEPCHAR);
if (s != NULL) {
*s = '\0';
#if defined(__DJGPP__)
/* If we want to go to the root, we can't use cd C:, but we must use '/' */
if (s > tmp && *(s - 1) == ':') chdir("/");
#endif
if (chdir(tmp) != 0) {
DEBUG(misc, 0, "Directory with the binary does not exist?");
} else {
@@ -1056,7 +1052,7 @@ void DetermineBasePaths(const char *exe)
AppendPathSeparator(tmp, lastof(tmp));
_searchpaths[SP_PERSONAL_DIR_XDG] = stredup(tmp);
#endif
#if defined(DOS) || defined(OS2) || !defined(WITH_PERSONAL_DIR)
#if defined(OS2) || !defined(WITH_PERSONAL_DIR)
_searchpaths[SP_PERSONAL_DIR] = NULL;
#else
#ifdef __HAIKU__
@@ -1244,7 +1240,6 @@ void DeterminePaths(const char *exe)
/* If we have network we make a directory for the autodownloading of content */
_searchpaths[SP_AUTODOWNLOAD_DIR] = str_fmt("%s%s", _personal_dir, "content_download" PATHSEP);
#ifdef ENABLE_NETWORK
FioCreateDirectory(_searchpaths[SP_AUTODOWNLOAD_DIR]);
/* Create the directory for each of the types of content */
@@ -1257,14 +1252,6 @@ void DeterminePaths(const char *exe)
extern char *_log_file;
_log_file = str_fmt("%sopenttd.log", _personal_dir);
#else /* ENABLE_NETWORK */
/* If we don't have networking, we don't need to make the directory. But
* if it exists we keep it, otherwise remove it from the search paths. */
if (!FileExists(_searchpaths[SP_AUTODOWNLOAD_DIR])) {
free(_searchpaths[SP_AUTODOWNLOAD_DIR]);
_searchpaths[SP_AUTODOWNLOAD_DIR] = NULL;
}
#endif /* ENABLE_NETWORK */
}
/**