Skip to content

Commit

Permalink
Ensure archive directory presence if running Windows front end in place
Browse files Browse the repository at this point in the history
Also ensures lib/user/archive is set up for self-contained installs via CMake.
  • Loading branch information
backwardsEric authored and NickMcConnell committed Nov 10, 2024
1 parent 9ece8ce commit 28b6245
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@ IF(SC_INSTALL)
"${CMAKE_CURRENT_SOURCE_DIR}/lib"
"Makefile"
".deps"
".gitignore"
COMMENT "Copying needed files"
VERBATIM
)
Expand Down
8 changes: 8 additions & 0 deletions lib/user/archive/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This directory is used for randart files and borg dumps if running the
# game from where it was built and using the Windows front end (main-win.c)
# or a front end that uses main.c but was compiled without PRIVATE_USER_PATH
# set. Front ends using main.c would create this directory if needed, but
# main-win.c does not.
# For git, ignore everything here except for this file.
*
!.gitignore
1 change: 1 addition & 0 deletions src/main-win.c
Original file line number Diff line number Diff line change
Expand Up @@ -5110,6 +5110,7 @@ static void init_stuff(void)
validate_dir(ANGBAND_DIR_SAVE);
validate_dir(ANGBAND_DIR_PANIC);
validate_dir(ANGBAND_DIR_SCORES);
validate_dir(ANGBAND_DIR_ARCHIVE);

/* Build the filename */
path_build(path, sizeof(path), ANGBAND_DIR_SCREENS, "news.txt");
Expand Down

0 comments on commit 28b6245

Please sign in to comment.