@@ -30,19 +30,19 @@ ifdef ARCH_LIN | |||||
LDFLAGS += -Wl,-rpath=. | LDFLAGS += -Wl,-rpath=. | ||||
# Since the compiler we're using could have a newer version than the minimum supported libstdc++ version, link it statically. | # Since the compiler we're using could have a newer version than the minimum supported libstdc++ version, link it statically. | ||||
LDFLAGS += -static-libstdc++ | LDFLAGS += -static-libstdc++ | ||||
RACK_USER_DIR ?= $(HOME)/.Rack | |||||
RACK_USER_DIR ?= $(HOME)/.Rack2 | |||||
endif | endif | ||||
ifdef ARCH_MAC | ifdef ARCH_MAC | ||||
TARGET := plugin.dylib | TARGET := plugin.dylib | ||||
LDFLAGS += -undefined dynamic_lookup | LDFLAGS += -undefined dynamic_lookup | ||||
RACK_USER_DIR ?= $(HOME)/Documents/Rack | |||||
RACK_USER_DIR ?= $(HOME)/Documents/Rack2 | |||||
endif | endif | ||||
ifdef ARCH_WIN | ifdef ARCH_WIN | ||||
TARGET := plugin.dll | TARGET := plugin.dll | ||||
LDFLAGS += -static-libstdc++ | LDFLAGS += -static-libstdc++ | ||||
RACK_USER_DIR ?= $(USERPROFILE)/Documents/Rack | |||||
RACK_USER_DIR ?= $(USERPROFILE)/Documents/Rack2 | |||||
endif | endif | ||||
@@ -82,8 +82,8 @@ endif | |||||
cd dist && tar -c $(SLUG) | zstd -$(ZSTD_COMPRESSION_LEVEL) -o "$(SLUG)"-"$(VERSION)"-$(ARCH).vcvplugin | cd dist && tar -c $(SLUG) | zstd -$(ZSTD_COMPRESSION_LEVEL) -o "$(SLUG)"-"$(VERSION)"-$(ARCH).vcvplugin | ||||
install: dist | install: dist | ||||
mkdir -p "$(RACK_USER_DIR)"/plugins-v2/ | |||||
cp dist/*.vcvplugin "$(RACK_USER_DIR)"/plugins-v2/ | |||||
mkdir -p "$(RACK_USER_DIR)"/plugins/ | |||||
cp dist/*.vcvplugin "$(RACK_USER_DIR)"/plugins/ | |||||
.PHONY: clean dist | .PHONY: clean dist | ||||
.DEFAULT_GOAL := all | .DEFAULT_GOAL := all |
@@ -90,13 +90,13 @@ static void initUserDir() { | |||||
wchar_t documentsBufW[MAX_PATH] = L"."; | wchar_t documentsBufW[MAX_PATH] = L"."; | ||||
HRESULT result = SHGetFolderPathW(NULL, CSIDL_MYDOCUMENTS, NULL, SHGFP_TYPE_CURRENT, documentsBufW); | HRESULT result = SHGetFolderPathW(NULL, CSIDL_MYDOCUMENTS, NULL, SHGFP_TYPE_CURRENT, documentsBufW); | ||||
assert(result == S_OK); | assert(result == S_OK); | ||||
userDir = system::join(string::UTF16toUTF8(documentsBufW), "Rack"); | |||||
userDir = system::join(string::UTF16toUTF8(documentsBufW), "Rack" + APP_VERSION_MAJOR); | |||||
#endif | #endif | ||||
#if defined ARCH_MAC | #if defined ARCH_MAC | ||||
// Get home directory | // Get home directory | ||||
struct passwd* pw = getpwuid(getuid()); | struct passwd* pw = getpwuid(getuid()); | ||||
assert(pw); | assert(pw); | ||||
userDir = system::join(pw->pw_dir, "Documents/Rack"); | |||||
userDir = system::join(pw->pw_dir, "Documents", "Rack" + APP_VERSION_MAJOR); | |||||
#endif | #endif | ||||
#if defined ARCH_LIN | #if defined ARCH_LIN | ||||
// Get home directory | // Get home directory | ||||
@@ -106,7 +106,7 @@ static void initUserDir() { | |||||
assert(pw); | assert(pw); | ||||
homeBuf = pw->pw_dir; | homeBuf = pw->pw_dir; | ||||
} | } | ||||
userDir = system::join(homeBuf, ".Rack"); | |||||
userDir = system::join(homeBuf, ".Rack" + APP_VERSION_MAJOR); | |||||
#endif | #endif | ||||
} | } | ||||
@@ -22,14 +22,8 @@ static const char PATCH_FILTERS[] = "VCV Rack patch (.vcv):vcv"; | |||||
PatchManager::PatchManager() { | PatchManager::PatchManager() { | ||||
if (settings::devMode) { | |||||
autosavePath = asset::user("autosave"); | |||||
templatePath = asset::user("template.vcv"); | |||||
} | |||||
else { | |||||
autosavePath = asset::user("autosave-v" + APP_VERSION_MAJOR); | |||||
templatePath = asset::user("template-v" + APP_VERSION_MAJOR + ".vcv"); | |||||
} | |||||
autosavePath = asset::user("autosave"); | |||||
templatePath = asset::user("template.vcv"); | |||||
factoryTemplatePath = asset::system("template.vcv"); | factoryTemplatePath = asset::system("template.vcv"); | ||||
} | } | ||||
@@ -218,12 +218,7 @@ void init() { | |||||
// Load Core | // Load Core | ||||
loadPlugin(""); | loadPlugin(""); | ||||
if (settings::devMode) { | |||||
pluginsPath = asset::user("plugins"); | |||||
} | |||||
else { | |||||
pluginsPath = asset::user("plugins-v" + APP_VERSION_MAJOR); | |||||
} | |||||
pluginsPath = asset::user("plugins"); | |||||
// Get user plugins directory | // Get user plugins directory | ||||
system::createDirectory(pluginsPath); | system::createDirectory(pluginsPath); | ||||
@@ -78,12 +78,7 @@ ModuleInfo* getModuleInfo(const std::string& pluginSlug, const std::string& modu | |||||
void init() { | void init() { | ||||
if (devMode) { | |||||
settingsPath = asset::user("settings.json"); | |||||
} | |||||
else { | |||||
settingsPath = asset::user("settings-v" + APP_VERSION_MAJOR + ".json"); | |||||
} | |||||
settingsPath = asset::user("settings.json"); | |||||
} | } | ||||