1
Fork 0
cardinal/src/override/common.cpp

75 lines
2.0 KiB
C++
Raw Normal View History

/*
* DISTRHO Cardinal Plugin
* Copyright (C) 2021-2022 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 3 of
* the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the LICENSE file.
*/
/**
* This file is an edited version of VCVRack's common.cpp
* Copyright (C) 2016-2021 VCV.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 3 of
* the License, or (at your option) any later version.
*/
#include <common.hpp>
#include <string.hpp>
#ifdef NDEBUG
# undef DEBUG
#endif
#include "DistrhoPluginUtils.hpp"
#if defined ARCH_WIN
#include <windows.h>
FILE* fopen_u8(const char* filename, const char* mode) {
return _wfopen(rack::string::UTF8toUTF16(filename).c_str(), rack::string::UTF8toUTF16(mode).c_str());
}
#endif
namespace rack {
const std::string APP_NAME = "Cardinal";
const std::string APP_EDITION = getPluginFormatName();
const std::string APP_EDITION_NAME = "Audio Plugin";
const std::string APP_VERSION_MAJOR = "2";
const std::string APP_VERSION = "2.1";
#if defined ARCH_WIN
const std::string APP_OS = "win";
Packaging fixes (#192) * Start cleanup for improved packaging Signed-off-by: falkTX <falktx@falktx.com> * Use the same folder for VST2 plugins Signed-off-by: falkTX <falktx@falktx.com> * Fix static build Signed-off-by: falkTX <falktx@falktx.com> * Do not set source-dir in CI builds Signed-off-by: falkTX <falktx@falktx.com> * Set a custom fallback systemdir per OS Signed-off-by: falkTX <falktx@falktx.com> * CI tweaks Signed-off-by: falkTX <falktx@falktx.com> * Build the whole pyqt on windows Signed-off-by: falkTX <falktx@falktx.com> * Mention AU in readme and differences docs Signed-off-by: falkTX <falktx@falktx.com> * Add specialized utils for macOS packaging Signed-off-by: falkTX <falktx@falktx.com> * Fix plugin-validation build Signed-off-by: falkTX <falktx@falktx.com> * Fix build Signed-off-by: falkTX <falktx@falktx.com> * Do not create window for lv2lint tests * Start enabling AU builds * Copy over mod.lv2 specs for validation * Skip main cardinal lv2lint, the custom CVPorts are not supported * au build needs carla * More CI tweaks * Build headless version for plugin validation * Fix typo * Only show missing resources error message once Signed-off-by: falkTX <falktx@falktx.com> * Fallback to system path even if using a plugin bundle Signed-off-by: falkTX <falktx@falktx.com> * CI fixes, build full carla on Windows Signed-off-by: falkTX <falktx@falktx.com> * Rename script Signed-off-by: falkTX <falktx@falktx.com> * Silly typo Signed-off-by: falkTX <falktx@falktx.com> * More CI tweaks, add windows installer Signed-off-by: falkTX <falktx@falktx.com> * Setup Carla paths for Windows Signed-off-by: falkTX <falktx@falktx.com> * Yet more tweaks Signed-off-by: falkTX <falktx@falktx.com> * Package carla on windows, use xvfb-run Signed-off-by: falkTX <falktx@falktx.com> * Test win32 build too Signed-off-by: falkTX <falktx@falktx.com> * Finalize rework Signed-off-by: falkTX <falktx@falktx.com>
2022-03-13 00:12:22 +02:00
#elif defined ARCH_MAC
const std::string APP_OS = "mac";
#elif defined ARCH_LIN
const std::string APP_OS = "lin";
#else
#error ARCH_LIN undefined
#endif
const std::string API_URL = "";
Exception::Exception(const char* format, ...) {
va_list args;
va_start(args, format);
msg = string::fV(format, args);
va_end(args);
}
} // namespace rack