From 233b1677dd41fcdd52ba3c560d43e5f8153bf3e0 Mon Sep 17 00:00:00 2001 From: James Crook Date: Fri, 3 Aug 2018 19:05:52 +0100 Subject: [PATCH] Bug 1914 - Enh: Clean install needed to update effect/generate/analyze/tools menu for changed plug ins This code now does the clean out of pluginregistry.cfg. Nicer for the user would be to preserve the list of hand-added plug-ins. But a clean restart is easier. --- src/PluginManager.cpp | 13 +++++++++++-- src/effects/nyquist/LoadNyquist.cpp | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/PluginManager.cpp b/src/PluginManager.cpp index 56196ae6b..8818e2436 100644 --- a/src/PluginManager.cpp +++ b/src/PluginManager.cpp @@ -1330,7 +1330,7 @@ void PluginDescriptor::SetImporterExtensions(const wxArrayString & extensions) /////////////////////////////////////////////////////////////////////////////// #define REGVERKEY wxString(wxT("/pluginregistryversion")) -#define REGVERCUR wxString(wxT("1.0")) +#define REGVERCUR wxString(wxT("1.1")) #define REGROOT wxString(wxT("/pluginregistry/")) #define SETVERKEY wxString(wxT("/pluginsettingsversion")) @@ -1898,7 +1898,16 @@ void PluginManager::Load() { // This is where we'd put in conversion code when the // registry version changes. - // + + // For 2.3.0 the plugins we distribute have moved around. + // So we upped the registry version number to 1.1. + // Rather than elaborate code for upgraders, we start from scratch. + if (regver <= "1.0") + { + registry.DeleteAll(); + return; + } + // Should also check for a registry file that is newer than // what we can understand. } diff --git a/src/effects/nyquist/LoadNyquist.cpp b/src/effects/nyquist/LoadNyquist.cpp index 6a8f08afd..ebf3df308 100644 --- a/src/effects/nyquist/LoadNyquist.cpp +++ b/src/effects/nyquist/LoadNyquist.cpp @@ -216,7 +216,7 @@ wxArrayString NyquistEffectsModule::FindPluginPaths(PluginManagerInterface & pm) wxArrayString files; // Add the Nyquist prompt effect and tool. - files.Add(NYQUIST_EFFECTS_PROMPT_ID); + //files.Add(NYQUIST_EFFECTS_PROMPT_ID); files.Add(NYQUIST_TOOLS_PROMPT_ID); // Load .ny plug-ins