mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-08-06 22:30:20 +00:00
Intial support for package paths (as suggested by smls).
This commit is mainly intended to ease packaging for linux. Unless environment variable AQUARIA_DATA_PATH is set, there are two directories which are checked by the game: If AQUARIA_DEFAULT_DATA_DIR is defined, it will chdir there for main operation. If it's not defined, it chdirs into the directory where the executable is located. Then, if AQUARIA_EXTRA_DATA_DIR is defined, it will mount this directory and all contents into the working path, so that the files present there will override those from the working directory when accessed by the game. Setting the environment variable AQUARIA_DATA_PATH will disable this behavior altogether and use *only* AQUARIA_DATA_PATH as working dir.
This commit is contained in:
parent
8fbed64db3
commit
13eca9785f
6 changed files with 47 additions and 7 deletions
|
@ -211,6 +211,19 @@ if (NOT(AQUARIA_CUSTOM_BUILD_ID STREQUAL ""))
|
|||
ADD_DEFINITIONS("-DAQUARIA_CUSTOM_BUILD_ID=\"${AQUARIA_CUSTOM_BUILD_ID}\"")
|
||||
endif (NOT(AQUARIA_CUSTOM_BUILD_ID STREQUAL ""))
|
||||
|
||||
# Custom data directories
|
||||
SET(AQUARIA_DEFAULT_DATA_DIR "" CACHE STRING
|
||||
"Default data directory (for package maintainers only)")
|
||||
if(NOT(AQUARIA_DEFAULT_DATA_DIR STREQUAL ""))
|
||||
ADD_DEFINITIONS("-DAQUARIA_DEFAULT_DATA_DIR=\"${AQUARIA_DEFAULT_DATA_DIR}\"")
|
||||
endif(NOT(AQUARIA_DEFAULT_DATA_DIR STREQUAL ""))
|
||||
|
||||
SET(AQUARIA_EXTRA_DATA_DIR "" CACHE STRING
|
||||
"Extra data directory, overrides files from default datadir (for package maintainers only)")
|
||||
if(NOT(AQUARIA_EXTRA_DATA_DIR STREQUAL ""))
|
||||
ADD_DEFINITIONS("-DAQUARIA_EXTRA_DATA_DIR=\"${AQUARIA_EXTRA_DATA_DIR}\"")
|
||||
endif(NOT(AQUARIA_EXTRA_DATA_DIR STREQUAL ""))
|
||||
|
||||
# Aquaria/BBGE specific defines...
|
||||
|
||||
ADD_DEFINITIONS(-DGL_GLEXT_LEGACY=1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue