Skip to content

Commit

Permalink
Small datadirs improvement (#77)
Browse files Browse the repository at this point in the history
* CMakeLists.txt: better use of name variables

* rt_datadir.c: save shareware data in "huntbgin"
  • Loading branch information
erysdren authored Jul 12, 2024
1 parent 14d889e commit 2ab3463
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions rott/rt_datadir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2ab3463

Please sign in to comment.