Refactored ROOT_PATH to be a subfolder in the current user's home directory (configs and settings will not need to be manually moved between updates)

This commit is contained in:
2023-11-18 15:24:07 -06:00
parent f98edc1744
commit 4bdc12ce46
22 changed files with 113 additions and 99 deletions

View File

@@ -1,7 +1,13 @@
module TAC
ROOT_PATH = File.expand_path("../..", __FILE__)
if ARGV.join.include?("--dev")
ROOT_PATH = File.expand_path("../..", __FILE__)
else
ROOT_PATH = "#{Dir.home}/TimeCrafters_Configuration_Tool"
end
CONFIGS_PATH = "#{ROOT_PATH}/data/configs"
SETTINGS_PATH = "#{ROOT_PATH}/data/settings.json"
MEDIA_PATH = "#{File.expand_path("../..", __FILE__)}/media"
CONFIG_SPEC_VERSION = 2
end