Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Third-Party Plugin Support Deprecation Warning #265

Merged
merged 4 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "exportaction_admsource-admvst.h"
#include "exportaction_admsource-earvst.h"
#include "plugin_deprecation_warning.h"

void AdmExportHandler::repopulate(ReaperAPI const & api)
{
Expand Down Expand Up @@ -67,6 +68,10 @@ std::vector<std::string> AdmExportHandler::generateExportWarningStrings()
auto admExportSources = getAdmExportSources();
std::vector<std::string> msgs;

if (admExportVstSources && admExportVstSources->getAllFoundVsts()->size() > 0) {
msgs.push_back(pluginDeprecationMessage);
}

if(earSceneMasterVstSources && earSceneMasterVstSources->validForExport() && admExportVstSources && admExportVstSources->validForExport()) {
msgs.push_back(std::string("Multiple Types of Export Source!"));
}
Expand Down
17 changes: 17 additions & 0 deletions reaper-adm-extension/src/reaper_adm/plugin_deprecation_warning.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#pragma once

#include "reaperapi.h"
#include "pluginsuite.h"
#include <string>
#include <map>

const std::string pluginDeprecationMessage{
"Support for FB360 and VISR plugin suites will be dropped in future versions of the EAR Production Suite." };

inline void pluginDeprecationWarning(const std::pair<std::string, std::shared_ptr<PluginSuite>>& pluginSuite, ReaperAPI& api) {
if (pluginSuite.first != std::string("EAR")) { // a bit hacky, but this won't be in long-term so meh
std::string msgboxText{ "Please note:\n" };
msgboxText += pluginDeprecationMessage;
api.ShowMessageBox(msgboxText.c_str(), "ADM Open", 0);
}
}
5 changes: 5 additions & 0 deletions reaper-adm-extension/src/reaper_adm/pluginmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "pluginsuite.h"
#include "pluginregistry.h"
#include "pluginsuite_ear.h"
#include "plugin_deprecation_warning.h"
#include <update_check.h>
#include <version/eps_version.h>
#include <helper/native_message_box.hpp>
Expand Down Expand Up @@ -296,6 +297,8 @@ extern "C" {
std::make_unique<ImportAction>(hInstance, rec->hwnd_main, pluginSuite.second),
[pluginSuite](ReaperAPI& api, ImportAction& importer) {

pluginDeprecationWarning(pluginSuite, api);

api.Main_openProject("template:"); // This will TRY to start a blank project, but it will replace the current project if successful, so the user is prompted with the save dialog: yes, no, CANCEL
auto res = api.IsProjectDirty(nullptr); // If the project is still dirty (1), the user must have canceled! (yes/no would save/not save and start a new clean project)
if(res == 0) {
Expand Down Expand Up @@ -351,6 +354,8 @@ extern "C" {
std::make_unique<ImportAction>(hInstance, rec->hwnd_main, pluginSuite.second),
[pluginSuite](ReaperAPI& api, ImportAction& importer) {

pluginDeprecationWarning(pluginSuite, api);

char filename[4096];
api.GetProjectPath(filename, 4096);
auto filenameStr = std::string(filename);
Expand Down
Loading