Browse Source

Fix plugins being searched in lib/ when it should be bin/ and vice versa.

Ugh. I must have been drunk when writing this. Also, why nobody complained
until now? Interesting.
mousecapture
Vladimír Vondruš 6 years ago
parent
commit
44aed01d77
  1. 3
      doc/changelog.dox
  2. 11
      src/Magnum/Audio/AbstractImporter.cpp
  3. 7
      src/Magnum/Text/AbstractFont.cpp
  4. 11
      src/Magnum/Text/AbstractFontConverter.cpp
  5. 7
      src/Magnum/Trade/AbstractImageConverter.cpp
  6. 9
      src/Magnum/Trade/AbstractImporter.cpp

3
doc/changelog.dox

@ -237,6 +237,9 @@ See also:
@ref Corrade/Containers/StridedArrayView.h to be included *before* in order @ref Corrade/Containers/StridedArrayView.h to be included *before* in order
to use the @ref ImageView::pixels() "pixels()" function. Now it's enough to use the @ref ImageView::pixels() "pixels()" function. Now it's enough
to just include it at any point, with no order dependency anymore. to just include it at any point, with no order dependency anymore.
- Dynamic plugins on static Magnum builds on Windows were accidentally
searched for in the `lib/` directory instead of `bin/`, and in some cases
in `bin/` instead of `lib/` on Unix platforms.
@subsection changelog-latest-deprecated Deprecated APIs @subsection changelog-latest-deprecated Deprecated APIs

11
src/Magnum/Audio/AbstractImporter.cpp

@ -44,17 +44,28 @@ std::string AbstractImporter::pluginInterface() {
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT #ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
std::vector<std::string> AbstractImporter::pluginSearchPaths() { std::vector<std::string> AbstractImporter::pluginSearchPaths() {
return { return {
/* Debug build */
#ifdef CORRADE_IS_DEBUG_BUILD #ifdef CORRADE_IS_DEBUG_BUILD
#ifndef MAGNUM_BUILD_STATIC #ifndef MAGNUM_BUILD_STATIC
Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum-d/audioimporters"), Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum-d/audioimporters"),
#else #else
#ifndef CORRADE_TARGET_WINDOWS
/* On Windows, the plugin DLLs are next to the executable, so the one
below works. Elsewhere the plugins are in the lib dir instead */
"../lib/magnum-d/audioimporters",
#endif
"magnum-d/audioimporters", "magnum-d/audioimporters",
#endif #endif
Utility::Directory::join(MAGNUM_PLUGINS_DEBUG_DIR, "audioimporters") Utility::Directory::join(MAGNUM_PLUGINS_DEBUG_DIR, "audioimporters")
/* Release build */
#else #else
#ifndef MAGNUM_BUILD_STATIC #ifndef MAGNUM_BUILD_STATIC
Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum/audioimporters"), Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum/audioimporters"),
#else #else
#ifndef CORRADE_TARGET_WINDOWS
"../lib/magnum/audioimporters",
#endif
"magnum/audioimporters", "magnum/audioimporters",
#endif #endif
Utility::Directory::join(MAGNUM_PLUGINS_DIR, "audioimporters") Utility::Directory::join(MAGNUM_PLUGINS_DIR, "audioimporters")

7
src/Magnum/Text/AbstractFont.cpp

@ -49,11 +49,12 @@ std::string AbstractFont::pluginInterface() {
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT #ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
std::vector<std::string> AbstractFont::pluginSearchPaths() { std::vector<std::string> AbstractFont::pluginSearchPaths() {
return { return {
/* Debug build */
#ifdef CORRADE_IS_DEBUG_BUILD #ifdef CORRADE_IS_DEBUG_BUILD
#ifndef MAGNUM_BUILD_STATIC #ifndef MAGNUM_BUILD_STATIC
Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum-d/fonts"), Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum-d/fonts"),
#else #else
#ifndef MAGNUM_TARGET_WINDOWS #ifndef CORRADE_TARGET_WINDOWS
/* On Windows, the plugin DLLs are next to the executable, so the one /* On Windows, the plugin DLLs are next to the executable, so the one
below works. Elsewhere the plugins are in the lib dir instead */ below works. Elsewhere the plugins are in the lib dir instead */
"../lib/magnum-d/fonts", "../lib/magnum-d/fonts",
@ -61,11 +62,13 @@ std::vector<std::string> AbstractFont::pluginSearchPaths() {
"magnum-d/fonts", "magnum-d/fonts",
#endif #endif
Utility::Directory::join(MAGNUM_PLUGINS_DEBUG_DIR, "fonts") Utility::Directory::join(MAGNUM_PLUGINS_DEBUG_DIR, "fonts")
/* Release build */
#else #else
#ifndef MAGNUM_BUILD_STATIC #ifndef MAGNUM_BUILD_STATIC
Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum/fonts"), Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum/fonts"),
#else #else
#ifndef MAGNUM_TARGET_WINDOWS #ifndef CORRADE_TARGET_WINDOWS
"../lib/magnum/fonts", "../lib/magnum/fonts",
#endif #endif
"magnum/fonts", "magnum/fonts",

11
src/Magnum/Text/AbstractFontConverter.cpp

@ -63,17 +63,28 @@ std::string AbstractFontConverter::pluginInterface() {
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT #ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
std::vector<std::string> AbstractFontConverter::pluginSearchPaths() { std::vector<std::string> AbstractFontConverter::pluginSearchPaths() {
return { return {
/* Debug build */
#ifdef CORRADE_IS_DEBUG_BUILD #ifdef CORRADE_IS_DEBUG_BUILD
#ifndef MAGNUM_BUILD_STATIC #ifndef MAGNUM_BUILD_STATIC
Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum-d/fontconverters"), Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum-d/fontconverters"),
#else #else
#ifndef CORRADE_TARGET_WINDOWS
/* On Windows, the plugin DLLs are next to the executable, so the one
below works. Elsewhere the plugins are in the lib dir instead */
"../lib/magnum-d/fontconverters",
#endif
"magnum-d/fontconverters", "magnum-d/fontconverters",
#endif #endif
Utility::Directory::join(MAGNUM_PLUGINS_DEBUG_DIR, "fontconverters") Utility::Directory::join(MAGNUM_PLUGINS_DEBUG_DIR, "fontconverters")
/* Release build */
#else #else
#ifndef MAGNUM_BUILD_STATIC #ifndef MAGNUM_BUILD_STATIC
Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum/fontconverters"), Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum/fontconverters"),
#else #else
#ifndef CORRADE_TARGET_WINDOWS
"../lib/magnum/fontconverters",
#endif
"magnum/fontconverters", "magnum/fontconverters",
#endif #endif
Utility::Directory::join(MAGNUM_PLUGINS_DIR, "fontconverters") Utility::Directory::join(MAGNUM_PLUGINS_DIR, "fontconverters")

7
src/Magnum/Trade/AbstractImageConverter.cpp

@ -49,11 +49,12 @@ std::string AbstractImageConverter::pluginInterface() {
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT #ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
std::vector<std::string> AbstractImageConverter::pluginSearchPaths() { std::vector<std::string> AbstractImageConverter::pluginSearchPaths() {
return { return {
/* Debug build */
#ifdef CORRADE_IS_DEBUG_BUILD #ifdef CORRADE_IS_DEBUG_BUILD
#ifndef MAGNUM_BUILD_STATIC #ifndef MAGNUM_BUILD_STATIC
Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum-d/imageconverters"), Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum-d/imageconverters"),
#else #else
#ifndef MAGNUM_TARGET_WINDOWS #ifndef CORRADE_TARGET_WINDOWS
/* On Windows, the plugin DLLs are next to the executable, so the one /* On Windows, the plugin DLLs are next to the executable, so the one
below works. Elsewhere the plugins are in the lib dir instead */ below works. Elsewhere the plugins are in the lib dir instead */
"../lib/magnum-d/imageconverters", "../lib/magnum-d/imageconverters",
@ -61,11 +62,13 @@ std::vector<std::string> AbstractImageConverter::pluginSearchPaths() {
"magnum-d/imageconverters", "magnum-d/imageconverters",
#endif #endif
Utility::Directory::join(MAGNUM_PLUGINS_DEBUG_DIR, "imageconverters") Utility::Directory::join(MAGNUM_PLUGINS_DEBUG_DIR, "imageconverters")
/* Release build */
#else #else
#ifndef MAGNUM_BUILD_STATIC #ifndef MAGNUM_BUILD_STATIC
Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum/imageconverters"), Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum/imageconverters"),
#else #else
#ifndef MAGNUM_TARGET_WINDOWS #ifndef CORRADE_TARGET_WINDOWS
"../lib/magnum/imageconverters", "../lib/magnum/imageconverters",
#endif #endif
"magnum/imageconverters", "magnum/imageconverters",

9
src/Magnum/Trade/AbstractImporter.cpp

@ -58,11 +58,12 @@ std::string AbstractImporter::pluginInterface() {
#ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT #ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
std::vector<std::string> AbstractImporter::pluginSearchPaths() { std::vector<std::string> AbstractImporter::pluginSearchPaths() {
return { return {
/* Debug build */
#ifdef CORRADE_IS_DEBUG_BUILD #ifdef CORRADE_IS_DEBUG_BUILD
#ifndef MAGNUM_BUILD_STATIC #ifndef MAGNUM_BUILD_STATIC
Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum-d/importers"), Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum-d/importers"),
#else #else
#ifndef MAGNUM_TARGET_WINDOWS #ifndef CORRADE_TARGET_WINDOWS
/* On Windows, the plugin DLLs are next to the executable, so the one /* On Windows, the plugin DLLs are next to the executable, so the one
below works. Elsewhere the plugins are in the lib dir instead */ below works. Elsewhere the plugins are in the lib dir instead */
"../lib/magnum-d/importers", "../lib/magnum-d/importers",
@ -70,13 +71,13 @@ std::vector<std::string> AbstractImporter::pluginSearchPaths() {
"magnum-d/importers", "magnum-d/importers",
#endif #endif
Utility::Directory::join(MAGNUM_PLUGINS_DEBUG_DIR, "importers") Utility::Directory::join(MAGNUM_PLUGINS_DEBUG_DIR, "importers")
#ifdef CORRADE_TARGET_WINDOWS
#endif /* Release build */
#else #else
#ifndef MAGNUM_BUILD_STATIC #ifndef MAGNUM_BUILD_STATIC
Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum/importers"), Utility::Directory::join(Utility::Directory::path(Utility::Directory::libraryLocation(&pluginInterface)), "magnum/importers"),
#else #else
#ifndef MAGNUM_TARGET_WINDOWS #ifndef CORRADE_TARGET_WINDOWS
"../lib/magnum/importers", "../lib/magnum/importers",
#endif #endif
"magnum/importers", "magnum/importers",

Loading…
Cancel
Save