Remove juce completely, cleanup
[carla.git] / source / backend / utils / Information.cpp
blobe6cb52d50313f1ef830c2bc11d3d16a58800e8c0
1 // SPDX-FileCopyrightText: 2011-2024 Filipe Coelho <falktx@falktx.com>
2 // SPDX-License-Identifier: GPL-2.0-or-later
4 #include "CarlaUtils.h"
5 #include "CarlaString.hpp"
7 #if defined(HAVE_FLUIDSYNTH) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH)
8 # include <fluidsynth.h>
9 #endif
11 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
12 # pragma GCC diagnostic push
13 # pragma GCC diagnostic ignored "-Wconversion"
14 # pragma GCC diagnostic ignored "-Weffc++"
15 # pragma GCC diagnostic ignored "-Wsign-conversion"
16 # pragma GCC diagnostic ignored "-Wundef"
17 # pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
18 #endif
20 #ifdef USING_RTAUDIO
21 # include "rtaudio/RtAudio.h"
22 # include "rtmidi/RtMidi.h"
23 #endif
25 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
26 # pragma GCC diagnostic pop
27 #endif
29 #include "water/files/File.h"
31 // -------------------------------------------------------------------------------------------------------------------
33 const char* carla_get_complete_license_text()
35 carla_debug("carla_get_complete_license_text()");
37 static CarlaString retText;
39 if (retText.isEmpty())
41 retText =
42 "<p>This current Carla build is using the following features and 3rd-party code:</p>"
43 "<ul>"
45 // Plugin formats
46 "<li>LADSPA plugin support</li>"
47 "<li>DSSI plugin support</li>"
48 "<li>LV2 plugin support</li>"
49 "<li>VST2 plugin support (using VeSTige header by Javier Serrano Polo)</li>"
50 "<li>VST3 plugin support (using Travesty header files)</li>"
51 #ifdef CARLA_OS_MAC
52 "<li>AU plugin support (discovery only)</li>"
53 #endif
54 #ifdef HAVE_YSFX
55 "<li>JSFX plugin support (using ysfx)</li>"
56 #endif
58 // Sample kit libraries
59 #if defined(HAVE_FLUIDSYNTH) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH)
60 "<li>FluidSynth library v" FLUIDSYNTH_VERSION " for SF2/3 support</li>"
61 #endif
62 "<li>SFZero module for SFZ support</li>"
64 // misc libs
65 "<li>base64 utilities based on code by Ren\u00E9 Nyffenegger</li>"
66 "<li>dr_mp3 for mp3 file support</li>"
67 #ifdef HAVE_LIBLO
68 "<li>liblo library for OSC support</li>"
69 #endif
70 #ifdef HAVE_SNDFILE
71 "<li>libsndfile library for base audio file support</li>"
72 #endif
73 "<li>rtmempool library by Nedko Arnaudov</li>"
74 "<li>serd, sord, sratom and lilv libraries for LV2 discovery</li>"
75 #ifdef USING_RTAUDIO
76 "<li>RtAudio v" RTAUDIO_VERSION " and RtMidi v" RTMIDI_VERSION " for native Audio and MIDI support</li>"
77 #endif
78 "<li>zita-resampler for audio file sample rate resampling</li>"
80 // Internal plugins
81 "<li>MIDI Sequencer UI code by Perry Nguyen</li>"
83 // External plugins
84 #ifdef HAVE_EXTERNAL_PLUGINS
85 "<li>Nekobi plugin code based on nekobee by Sean Bolton and others</li>"
86 "<li>VectorJuice and WobbleJuice plugin code by Andre Sklenar</li>"
87 #ifdef HAVE_ZYN_DEPS
88 "<li>ZynAddSubFX plugin code by Mark McCurry and Nasca Octavian Paul</li>"
89 #endif
90 #endif
92 // end
93 "</ul>";
96 return retText;
99 const char* const* carla_get_supported_file_extensions()
101 carla_debug("carla_get_supported_file_extensions()");
103 // NOTE: please keep in sync with CarlaEngine::loadFile!!
104 static const char* const extensions[] = {
105 // Base types
106 "carxp", "carxs",
108 // plugin files and resources
109 #ifdef HAVE_FLUIDSYNTH
110 "sf2", "sf3",
111 #endif
112 #ifdef HAVE_FLUIDSYNTH_INSTPATCH
113 "dls", "gig",
114 #endif
115 #ifdef HAVE_ZYN_DEPS
116 "xmz", "xiz",
117 #endif
118 #ifdef CARLA_OS_MAC
119 "vst",
120 #else
121 "dll",
122 "so",
123 #endif
124 "vst3",
125 "clap",
127 // Audio files
128 #ifdef HAVE_SNDFILE
129 "aif", "aifc", "aiff", "au", "bwf", "flac", "htk", "iff", "mat4", "mat5", "oga", "ogg", "opus",
130 "paf", "pvf", "pvf5", "sd2", "sf", "snd", "svx", "vcc", "w64", "wav", "xi",
131 #endif
132 #ifdef HAVE_FFMPEG
133 "3g2", "3gp", "aac", "ac3", "amr", "ape", "mp2", "mp3", "mpc", "wma",
134 #ifndef HAVE_SNDFILE
135 // FFmpeg without sndfile
136 "flac", "oga", "ogg", "w64", "wav",
137 #endif
138 #else
139 // dr_mp3
140 "mp3",
141 #endif
143 // MIDI files
144 "mid", "midi",
146 // SFZ
147 "sfz",
149 #ifdef HAVE_YSFX
150 // JSFX
151 "jsfx",
152 #endif
154 // terminator
155 nullptr
158 return extensions;
161 const char* const* carla_get_supported_features()
163 carla_debug("carla_get_supported_features()");
165 static const char* const features[] = {
166 #ifdef HAVE_FLUIDSYNTH
167 "sf2",
168 #endif
169 #ifdef HAVE_FLUIDSYNTH_INSTPATCH
170 "dls", "gig",
171 #endif
172 #ifdef HAVE_HYLIA
173 "link",
174 #endif
175 #ifdef HAVE_LIBLO
176 "osc",
177 #endif
178 #if defined(HAVE_LIBMAGIC) || defined(CARLA_OS_WIN)
179 "bridges",
180 #endif
181 #ifdef HAVE_PYQT
182 "gui",
183 #endif
184 #ifdef HAVE_YSFX
185 "jsfx",
186 #endif
187 nullptr
190 return features;
193 // -------------------------------------------------------------------------------------------------------------------
195 const char* carla_get_library_filename()
197 carla_debug("carla_get_library_filename()");
199 static CarlaString ret;
201 if (ret.isEmpty())
203 using water::File;
204 ret = File(File::getSpecialLocation(File::currentExecutableFile)).getFullPathName().toRawUTF8();
207 return ret;
210 const char* carla_get_library_folder()
212 carla_debug("carla_get_library_folder()");
214 static CarlaString ret;
216 if (ret.isEmpty())
218 using water::File;
219 ret = File(File::getSpecialLocation(File::currentExecutableFile).getParentDirectory()).getFullPathName().toRawUTF8();
222 return ret;
225 // -------------------------------------------------------------------------------------------------------------------