Browse Source

Change user dir to Rack2. Remove "-v2" from user subdirs.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
c50cafb271
5 changed files with 12 additions and 28 deletions
  1. +5
    -5
      plugin.mk
  2. +3
    -3
      src/asset.cpp
  3. +2
    -8
      src/patch.cpp
  4. +1
    -6
      src/plugin.cpp
  5. +1
    -6
      src/settings.cpp

+ 5
- 5
plugin.mk View File

@@ -30,19 +30,19 @@ ifdef ARCH_LIN
LDFLAGS += -Wl,-rpath=.
# Since the compiler we're using could have a newer version than the minimum supported libstdc++ version, link it statically.
LDFLAGS += -static-libstdc++
RACK_USER_DIR ?= $(HOME)/.Rack
RACK_USER_DIR ?= $(HOME)/.Rack2
endif

ifdef ARCH_MAC
TARGET := plugin.dylib
LDFLAGS += -undefined dynamic_lookup
RACK_USER_DIR ?= $(HOME)/Documents/Rack
RACK_USER_DIR ?= $(HOME)/Documents/Rack2
endif

ifdef ARCH_WIN
TARGET := plugin.dll
LDFLAGS += -static-libstdc++
RACK_USER_DIR ?= $(USERPROFILE)/Documents/Rack
RACK_USER_DIR ?= $(USERPROFILE)/Documents/Rack2
endif


@@ -82,8 +82,8 @@ endif
cd dist && tar -c $(SLUG) | zstd -$(ZSTD_COMPRESSION_LEVEL) -o "$(SLUG)"-"$(VERSION)"-$(ARCH).vcvplugin

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
.DEFAULT_GOAL := all

+ 3
- 3
src/asset.cpp View File

@@ -90,13 +90,13 @@ static void initUserDir() {
wchar_t documentsBufW[MAX_PATH] = L".";
HRESULT result = SHGetFolderPathW(NULL, CSIDL_MYDOCUMENTS, NULL, SHGFP_TYPE_CURRENT, documentsBufW);
assert(result == S_OK);
userDir = system::join(string::UTF16toUTF8(documentsBufW), "Rack");
userDir = system::join(string::UTF16toUTF8(documentsBufW), "Rack" + APP_VERSION_MAJOR);
#endif
#if defined ARCH_MAC
// Get home directory
struct passwd* pw = getpwuid(getuid());
assert(pw);
userDir = system::join(pw->pw_dir, "Documents/Rack");
userDir = system::join(pw->pw_dir, "Documents", "Rack" + APP_VERSION_MAJOR);
#endif
#if defined ARCH_LIN
// Get home directory
@@ -106,7 +106,7 @@ static void initUserDir() {
assert(pw);
homeBuf = pw->pw_dir;
}
userDir = system::join(homeBuf, ".Rack");
userDir = system::join(homeBuf, ".Rack" + APP_VERSION_MAJOR);
#endif
}



+ 2
- 8
src/patch.cpp View File

@@ -22,14 +22,8 @@ static const char PATCH_FILTERS[] = "VCV Rack patch (.vcv):vcv";


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");
}



+ 1
- 6
src/plugin.cpp View File

@@ -218,12 +218,7 @@ void init() {
// Load Core
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
system::createDirectory(pluginsPath);


+ 1
- 6
src/settings.cpp View File

@@ -78,12 +78,7 @@ ModuleInfo* getModuleInfo(const std::string& pluginSlug, const std::string& modu


void init() {
if (devMode) {
settingsPath = asset::user("settings.json");
}
else {
settingsPath = asset::user("settings-v" + APP_VERSION_MAJOR + ".json");
}
settingsPath = asset::user("settings.json");
}




Loading…
Cancel
Save