mirror of
https://github.com/LizardByte/Sunshine.git
synced 2024-11-17 17:10:02 +00:00
Fix setting default SUNSHINE_DEFAULT_DIR
This commit is contained in:
parent
da3ed5ff79
commit
9a5d23ebde
@ -231,11 +231,11 @@ if(NOT SUNSHINE_ASSETS_DIR)
|
||||
endif()
|
||||
|
||||
if(NOT SUNSHINE_CONFIG_DIR)
|
||||
set(SUNSHINE_CONFIG_DIR SUNSHINE_ASSETS_DIR)
|
||||
set(SUNSHINE_CONFIG_DIR "${SUNSHINE_ASSETS_DIR}")
|
||||
endif()
|
||||
|
||||
if(NOT SUNSHINE_DEFAULT_DIR)
|
||||
set(SUNSHINE_DEFAULT_DIR SUNSHINE_ASSETS_DIR)
|
||||
set(SUNSHINE_DEFAULT_DIR "${SUNSHINE_ASSETS_DIR}")
|
||||
endif()
|
||||
|
||||
list(APPEND CBS_EXTERNAL_LIBRARIES
|
||||
|
@ -578,7 +578,7 @@ int apply_flags(const char *line) {
|
||||
|
||||
void apply_config(std::unordered_map<std::string, std::string> &&vars) {
|
||||
if(!fs::exists(stream.file_apps.c_str())) {
|
||||
fs::copy_file(SUNSHINE_DEFAULT_DIR "/" APPS_JSON, stream.file_apps);
|
||||
fs::copy_file(SUNSHINE_DEFAULT_DIR "/" APPS_JSON, stream.file_apps);
|
||||
}
|
||||
|
||||
for(auto &[name, val] : vars) {
|
||||
@ -763,8 +763,8 @@ int parse(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
if(!fs::exists(sunshine.config_file.c_str())) {
|
||||
fs::copy_file(SUNSHINE_DEFAULT_DIR "/sunshine.conf", sunshine.config_file);
|
||||
if(!fs::exists(sunshine.config_file)) {
|
||||
fs::copy_file(SUNSHINE_DEFAULT_DIR "/sunshine.conf", sunshine.config_file);
|
||||
}
|
||||
|
||||
auto vars = parse_config(read_file(sunshine.config_file.c_str()));
|
||||
|
Loading…
Reference in New Issue
Block a user