Backed out changeset: c3fc1ee1ec8c

Nicolas Hake 2011-11-10 02:17:00 +01:00
parent d5c075ade8
commit 74620be240
3 changed files with 13 additions and 21 deletions

View File

@ -1257,18 +1257,6 @@ if (NOT APPLE)
add_custom_target(groups ALL DEPENDS ${OC_C4GROUPS})
endif()
if (NOT APPLE)
# Convert forward spaces to backspaces. "mklink" is very picky with its input
file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/planet" CLONK_DATA_DIR)
file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/data" CLONK_DATA_LINK_DIR)
if (WIN32)
add_custom_command(TARGET clonk POST_BUILD COMMAND "rmdir" "${CLONK_DATA_LINK_DIR}")
add_custom_command(TARGET clonk POST_BUILD COMMAND "mklink" "/J" "${CLONK_DATA_LINK_DIR}" "${CLONK_DATA_DIR}")
else()
add_custom_command(TARGET clonk POST_BUILD COMMAND "ln" "-sf" "${CLONK_DATA_DIR}" "${CLONK_DATA_LINK_DIR}")
endif()
endif()
# Install new files
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/clonk.desktop DESTINATION share/applications)

View File

@ -26,8 +26,6 @@
//========================= Component File Names ============================================
#define C4CFN_DataFolder "data"
#define C4CFN_Engine "Clonk.exe"
#define C4CFN_Material "Material.ocg"

View File

@ -27,13 +27,19 @@ void C4Reloc::Init()
{
Paths.clear();
// Check for system group at EXE path - only add if found
if (FileExists(Config.AtExePath(C4CFN_System)))
AddPath(Config.General.ExePath.getData());
// Or a dedicated data folder directly below
else if (FileExists(Config.AtExePath(C4CFN_DataFolder DirSep C4CFN_System)))
AddPath(Config.AtExePath(C4CFN_DataFolder));
#ifndef __APPLE__
StdCopyStrBuf planet(Config.General.ExePath);
planet.AppendBackslash();
#ifdef CMAKE_INTDIR
if (!SEqual(CMAKE_INTDIR, "."))
{
planet.Append("..");
planet.AppendBackslash();
}
#endif
planet.Append("planet");
AddPath(planet.getData());
#endif
AddPath(Config.General.UserDataPath);
AddPath(Config.General.SystemDataPath);