Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install data to CDOGS_DATA_DIR #835

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

reinerh
Copy link
Contributor

@reinerh reinerh commented Feb 13, 2024

utils.c is searching data files in CDOGS_DATA_DIR, so make sure that the files are also installed there (similar to CDOGS_DOC_DIR).

utils.c is searching data files in CDOGS_DATA_DIR, so make sure
that the files are also installed there (similar to CDOGS_DOC_DIR).
Copy link
Owner

@cxong cxong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DATA_INSTALL_DIR is also referred in other places - see https://github.com/search?q=repo%3Acxong%2Fcdogs-sdl%20DATA_INSTALL_DIR&type=code
I think we should just replace it with CDOGS_DATA_DIR - and move the relevant code up here

cdogs-sdl/CMakeLists.txt

Lines 138 to 145 in b8e61bb

if(NOT DEFINED CDOGS_DATA_DIR)
if(GCW0)
set(CDOGS_DATA_DIR "./")
else()
set(CDOGS_DATA_DIR "../")
endif()
endif()
message("Data dir is ${CDOGS_DATA_DIR}")

@cxong
Copy link
Owner

cxong commented Feb 13, 2024

It looks like this value can be different to CDOGS_DATA_DIR due to various packaging scenarios, but I don't remember how this works. In any case we would need to test the packaging in multiple platforms to make sure this works, so would it be easier to just set DATA_INSTALL_DIR to the right value?

@cxong
Copy link
Owner

cxong commented Feb 13, 2024

7fa536b
this change may be relevant, for setting DATA_INSTALL_DIR

@reinerh reinerh marked this pull request as draft February 26, 2024 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants