From 2ab34636d566176cf604fc7ae0ede6b464e3a79d Mon Sep 17 00:00:00 2001 From: erysdren Date: Fri, 12 Jul 2024 08:25:25 -0500 Subject: [PATCH] Small datadirs improvement (#77) * CMakeLists.txt: better use of name variables * rt_datadir.c: save shareware data in "huntbgin" --- CMakeLists.txt | 4 ++-- rott/rt_datadir.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 829e9eb..d4540f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,8 +39,8 @@ endif() add_executable(${TARADINO_EXEC} ${TARADINO_SOURCES}) target_link_libraries(${TARADINO_EXEC} PRIVATE SDL2::Main SDL2::Mixer) -target_compile_definitions(${TARADINO_EXEC} PRIVATE PACKAGE_STRING="${TARADINO_EXEC} ${CMAKE_PROJECT_VERSION}") -target_compile_definitions(${TARADINO_EXEC} PRIVATE PACKAGE_TARNAME="${TARADINO_EXEC}") +target_compile_definitions(${TARADINO_EXEC} PRIVATE PACKAGE_STRING="${TARADINO_TITLE} ${CMAKE_PROJECT_VERSION}") +target_compile_definitions(${TARADINO_EXEC} PRIVATE PACKAGE_TARNAME="${CMAKE_PROJECT_NAME}") if(${TARADINO_SHAREWARE}) target_compile_definitions(${TARADINO_EXEC} PRIVATE SHAREWARE=1) diff --git a/rott/rt_datadir.c b/rott/rt_datadir.c index c846891..d55f562 100644 --- a/rott/rt_datadir.c +++ b/rott/rt_datadir.c @@ -68,13 +68,15 @@ char *GetPrefDir (void) M_MakeDirectory(dir); -#if !(SHAREWARE == 1) result = dir; +#if !(SHAREWARE == 1) dir = M_StringJoin(result, "darkwar", PATH_SEP_STR, NULL); +#else + dir = M_StringJoin(result, "huntbgin", PATH_SEP_STR, NULL); +#endif free(result); M_MakeDirectory(dir); -#endif } return dir;