diff --git a/CMakeLists.txt b/CMakeLists.txt index b809b3c556a..bddd063dbbd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9) PROJECT(lmms) @@ -456,17 +456,6 @@ FILE(REMOVE include/lmmsconfig.h) FILE(GLOB LMMS_INCLUDES "${CMAKE_SOURCE_DIR}/include/*.h") LIST(SORT LMMS_INCLUDES) -# embedded resources stuff -IF(WIN32 OR WIN64) - # compile buildtools native - SET(BIN2RES_CPP "${CMAKE_SOURCE_DIR}/buildtools/bin2res.cpp") - SET(BIN2RES "${CMAKE_BINARY_DIR}/bin2res") - ADD_CUSTOM_TARGET(bin2res COMMAND g++ "\"${BIN2RES_CPP}\"" -o "\"${BIN2RES}\"" DEPENDS "${BIN2RES_CPP}") -ELSE(WIN32 OR WIN64) - ADD_EXECUTABLE(bin2res buildtools/bin2res.cpp) - GET_TARGET_PROPERTY(BIN2RES bin2res LOCATION) -ENDIF(WIN32 OR WIN64) - # we somehow have to make LMMS-binary depend on MOC-files ADD_FILE_DEPENDENCIES("${CMAKE_BINARY_DIR}/lmmsconfig.h") diff --git a/buildtools/bin2res.cpp b/buildtools/bin2res.cpp deleted file mode 100644 index 54e9483ce1f..00000000000 --- a/buildtools/bin2res.cpp +++ /dev/null @@ -1,212 +0,0 @@ -/* - * bin2res.cpp - generate embedded resources from binary data (based on qembed) - * - * Copyright (c) 2005-2008 Tobias Doerffel - * - * 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 2 of the License, or (at your option) 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. - * - * You should have received a copy of the GNU General Public - * License along with this program (see COPYING); if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA. - * - */ - - -#include -#include -#include -#include - -static void embedData( const char * _input, int _size, std::ostream & _output ); -static std::string convertFileNameToCIdentifier( const std::string & _s ); - - -struct embed -{ - unsigned int size; - std::string name; - std::string cname; -} ; - -typedef std::vector stringlist; - -const int MAX_FILE_SIZE = 256*256*256; // = 16 MB - - -int main( int argc, char * * argv ) -{ - if( argc < 2 ) - { - std::cerr << "Usage:" << std::endl << "\t" << argv[0] << - " files" << std::endl; - return( 1 ); - } - - std::cout << "// Generated by bin2res" << std::endl; - - std::vector embedded_data; - - std::cout << "#ifndef _EMBEDDED_RESOURCES_H" << std::endl; - std::cout << "#define _EMBEDDED_RESOURCES_H" << std::endl; - - stringlist files; - for( int i = 1; i < argc; ++i ) - { - files.push_back( std::string( argv[i] ) ); - } - for( stringlist::iterator it = files.begin(); it != files.end(); ++it ) - { - std::ifstream f( it->c_str(), std::ios::binary ); - if( f.fail() ) - { - std::cerr << "Cannot open file " << *it << - ", ignoring it" << std::endl; - continue; - } - f.seekg( 0, std::ios::end ); - int fsize = f.tellg(); - f.seekg( 0 ); - if( fsize == 0 || fsize > MAX_FILE_SIZE ) - { - std::cerr << "File " << *it << " has zero size or is " - "too large to be processed with bin2res." << - std::endl; - } - char * data = new char[fsize]; - f.read( data, fsize ); - embed * e = new embed; - e->size = fsize; - if( it->rfind( '/' ) != std::string::npos ) - { - e->name = std::string( it->c_str() + - it->rfind( '/' ) + 1 ); - } - else - { - e->name = *it; - } - e->cname = convertFileNameToCIdentifier( e->name ); - embedded_data.push_back( e ); - std::string s; - std::cout << "static const unsigned char " << e->cname << - "_data[] = {"; - embedData( data, fsize, std::cout ); - std::cout << std::endl << "};" << std::endl << std::endl; - delete[] data; - } - - if( embedded_data.size() > 0 ) - { - std::cout << "static const unsigned char dummy_data[] =" - "{ 0x00 };" << std::endl << std::endl; - embed * dummy = new embed; - dummy->size = 1; - dummy->name = "dummy"; - dummy->cname = convertFileNameToCIdentifier( - std::string( "dummy" ) ); - embedded_data.push_back( dummy ); - - std::cout << "#include " << std::endl << std::endl; - std::cout << "#include \"embed.h\"" << std::endl << std::endl; - std::cout << "static embed::descriptor embed_vec[] = {" << std::endl; -/* << "{" << std::endl - << " int size;" << std::endl - << " const unsigned char * data;" << - std::endl - << " const char * name;" << std::endl - << "} embed_vec[] = {" << std::endl;*/ - while( embedded_data.size() > 0 ) - { - embed * e = embedded_data[0]; - std::cout << " { " << e->size << ", " << e->cname << - "_data, " << "\"" << e->name << - "\" }," << std::endl; - delete e; - embedded_data.erase( embedded_data.begin() ); - } - std::cout << " { 0, 0, 0 }" << std::endl << "};" << std::endl - << std::endl - << "static const embed::descriptor & " - "findEmbeddedData( const char * _name )" - << std::endl << "{" << std::endl - << " for( int i = 0; embed_vec[i].data; " - "i++ )" << std::endl - << " {" << std::endl - << " if( strcmp( embed_vec[i].name, " - "_name ) == 0 )" << std::endl - << " {" << std::endl - << " return( " - "embed_vec[i] );" << std::endl - << " }" << std::endl - << " }" << std::endl -/* << " printf( \"warning: embedded resource " - "%s not found!\\n\", _name );" - << std::endl*/ - << " return( findEmbeddedData( " - "\"dummy\" ) );" << std::endl - << "}" << std::endl << std::endl; - } - std::cout << "#endif" << std::endl; - return( 0 ); -} - - - - -std::string convertFileNameToCIdentifier( const std::string & _s ) -{ - std::string r = _s; - int len = r.length(); - if ( len > 0 && !isalpha( (char)r[0] ) ) - { - r[0] = '_'; - } - for ( int i = 1; i < len; i++ ) - { - if ( !isalnum( (char)r[i] ) ) - { - r[i] = '_'; - } - } - return( r ); -} - - - - -void embedData( const char * _input, int _nbytes, std::ostream & _output ) -{ - static const char hexdigits[] = "0123456789abcdef"; - std::string s; - for( int i = 0; i < _nbytes; i++ ) - { - if( ( i%14 ) == 0 ) - { - s += "\n "; - _output << s; - s = ""; - } - unsigned int v = _input[i]; - s += "0x"; - s += hexdigits[(v >> 4) & 15]; - s += hexdigits[v & 15]; - if( i < _nbytes-1 ) - { - s += ','; - } - } - if ( s.length() ) - { - _output << s; - } -} - diff --git a/cmake/modules/BuildPlugin.cmake b/cmake/modules/BuildPlugin.cmake index a107ef5ac39..4f5e159ddfe 100644 --- a/cmake/modules/BuildPlugin.cmake +++ b/cmake/modules/BuildPlugin.cmake @@ -3,6 +3,8 @@ # description: build LMMS-plugin # usage: BUILD_PLUGIN( MOCFILES EMBEDDED_RESOURCES UICFILES LINK ) +INCLUDE(GenQrc) + MACRO(BUILD_PLUGIN PLUGIN_NAME) CMAKE_PARSE_ARGUMENTS(PLUGIN "" "" "MOCFILES;EMBEDDED_RESOURCES;UICFILES;LINK" ${ARGN}) SET(PLUGIN_SOURCES ${PLUGIN_UNPARSED_ARGUMENTS}) @@ -25,11 +27,7 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME) ENDFOREACH() SET(PLUGIN_EMBEDDED_RESOURCES ${NEW_ARGS}) - SET(ER_H ${CMAKE_CURRENT_BINARY_DIR}/embedded_resources.h) - ADD_CUSTOM_COMMAND(OUTPUT ${ER_H} - COMMAND ${BIN2RES} - ARGS ${PLUGIN_EMBEDDED_RESOURCES} > ${ER_H} - DEPENDS bin2res) + ADD_GEN_QRC(RCC_OUT "${PLUGIN_NAME}.qrc" PREFIX artwork/${PLUGIN_NAME} ${PLUGIN_EMBEDDED_RESOURCES}) ENDIF(ER_LEN) IF(QT5) @@ -41,7 +39,7 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME) ENDIF() FOREACH(f ${PLUGIN_SOURCES}) - ADD_FILE_DEPENDENCIES(${f} ${ER_H} ${plugin_UIC_out}) + ADD_FILE_DEPENDENCIES(${f} ${RCC_OUT} ${plugin_UIC_out}) ENDFOREACH(f) IF(LMMS_BUILD_APPLE) @@ -58,11 +56,11 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME) ENDIF() IF ("${PLUGIN_LINK}" STREQUAL "SHARED") - ADD_LIBRARY(${PLUGIN_NAME} SHARED ${PLUGIN_SOURCES} ${plugin_MOC_out}) + ADD_LIBRARY(${PLUGIN_NAME} SHARED ${PLUGIN_SOURCES} ${plugin_MOC_out} ${RCC_OUT}) ELSE () - ADD_LIBRARY(${PLUGIN_NAME} MODULE ${PLUGIN_SOURCES} ${plugin_MOC_out}) + ADD_LIBRARY(${PLUGIN_NAME} MODULE ${PLUGIN_SOURCES} ${plugin_MOC_out} ${RCC_OUT}) ENDIF () - + IF(QT5) TARGET_LINK_LIBRARIES(${PLUGIN_NAME} Qt5::Widgets Qt5::Xml) ENDIF() @@ -81,6 +79,6 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME) ADD_CUSTOM_COMMAND(TARGET ${PLUGIN_NAME} POST_BUILD COMMAND ${STRIP} $) ENDIF(LMMS_BUILD_WIN32) - SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${ER_H} ${plugin_MOC_out}") + SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${RCC_OUT} ${plugin_MOC_out}") ENDMACRO(BUILD_PLUGIN) diff --git a/cmake/modules/GenQrc.cmake b/cmake/modules/GenQrc.cmake new file mode 100644 index 00000000000..6a793355786 --- /dev/null +++ b/cmake/modules/GenQrc.cmake @@ -0,0 +1,57 @@ +# GenQrc.cmake - Copyright (c) 2015 Lukas W + +# Generates a simple qrc file containing the given resource files ${ARGN}: +# GEN_QRC(resources.qrc artwork.png icon.png PREFIX /icons) +# Files may also be added using a pattern with the GLOB keyword, e.g.: +# GEN_QRC(resources.qrc GLOB *.png) +FUNCTION(GEN_QRC OUT_FILE) + CMAKE_PARSE_ARGUMENTS(RC "" "PREFIX;GLOB" "" ${ARGN}) + + IF(DEFINED RC_GLOB) + FILE(GLOB GLOB_FILES ${RC_GLOB}) + ENDIF() + + # Set the standard prefix to "/" if none is given + IF(NOT DEFINED RC_PREFIX) + SET(RC_PREFIX "/") + ENDIF() + + # We need to convert our list to a string in order to pass it to the script + # on the command line. + STRING(REPLACE ";" "\;" FILES "${RC_UNPARSED_ARGUMENTS};${GLOB_FILES}") + + SET(GENQRC_SCRIPT "${CMAKE_SOURCE_DIR}/cmake/scripts/GenQrc.cmake") + ADD_CUSTOM_COMMAND( + OUTPUT ${OUT_FILE} + COMMAND ${CMAKE_COMMAND} -D OUT_FILE=${OUT_FILE} -D RC_PREFIX=${RC_PREFIX} -D FILES:list=${FILES} -D DIR=${CMAKE_CURRENT_SOURCE_DIR} -P "${GENQRC_SCRIPT}" + DEPENDS ${GENQRC_SCRIPT} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + VERBATIM + ) +ENDFUNCTION() + +# Generates a qrc file named ${QRC_OUT} from ${ARGN}, rccs it and returns Qt's +# output file. +# Must only be run once per CMakeLists.txt. +# Usage example: +# ADD_GEN_QRC(RCC_OUTPUT resources.qrc icon.png manual.pdf) +# ADD_EXECUTABLE(myexe main.cpp ${RCC_OUTPUT}) +MACRO(ADD_GEN_QRC RCCOUT QRC_OUT) + IF(NOT IS_ABSOLUTE ${QRC_OUT}) + SET(QRC_FILE "${CMAKE_CURRENT_BINARY_DIR}/${QRC_OUT}") + ELSE() + SET(QRC_FILE ${QRC_OUT}) + ENDIF() + + GEN_QRC(${QRC_FILE} "${ARGN}") + QT_ADD_RESOURCES(${RCCOUT} ${QRC_FILE}) +ENDMACRO() + + +MACRO(QT_ADD_RESOURCES) + IF(QT5) + QT5_ADD_RESOURCES(${ARGN}) + ELSE() + QT4_ADD_RESOURCES(${ARGN}) + ENDIF() +ENDMACRO() diff --git a/cmake/scripts/GenQrc.cmake b/cmake/scripts/GenQrc.cmake new file mode 100644 index 00000000000..1e99130dea2 --- /dev/null +++ b/cmake/scripts/GenQrc.cmake @@ -0,0 +1,26 @@ +# GenQrcScript.cmake - Copyright (c) 2015 Lukas W + +INCLUDE(CMakeParseArguments) + +FILE(REMOVE ${OUT_FILE}) +MACRO(OUT STRING) + FILE(APPEND ${OUT_FILE} "${STRING}\n") +ENDMACRO() + +IF(NOT DEFINED RC_PREFIX) + SET(RC_PREFIX "/") +ENDIF() + +# Write qrc file +OUT("") +OUT(" ") +FOREACH(VAR ${FILES}) + GET_FILENAME_COMPONENT(FILENAME ${VAR} NAME) + IF(IS_ABSOLUTE ${VAR}) + OUT(" ${VAR}") + ELSE() + OUT(" ${DIR}/${VAR}") + ENDIF() +ENDFOREACH() +OUT(" ") +OUT("") diff --git a/include/embed.h b/include/embed.h index 0a240ff619b..57ca743cdda 100644 --- a/include/embed.h +++ b/include/embed.h @@ -35,15 +35,7 @@ namespace embed { -struct descriptor -{ - int size; - const unsigned char * data; - const char * name; -} ; - - -QPixmap EXPORT getIconPixmap( const char * _name, int _w = -1, int _h = -1 ); +QPixmap EXPORT getIconPixmap( const QString& _name, int _w = -1, int _h = -1 ); QString EXPORT getText( const char * _name ); } @@ -53,7 +45,10 @@ QString EXPORT getText( const char * _name ); namespace PLUGIN_NAME { -QPixmap getIconPixmap( const char * _name, int _w = -1, int _h = -1 ); +inline QPixmap getIconPixmap( const QString& _name, int _w = -1, int _h = -1 ) +{ + return embed::getIconPixmap(QString("%1/%2").arg(STRINGIFY(PLUGIN_NAME), _name), _w, _h); +} //QString getText( const char * _name ); } diff --git a/plugins/Amplifier/Amplifier.cpp b/plugins/Amplifier/Amplifier.cpp index 652a929baa2..f7b23d87fe9 100644 --- a/plugins/Amplifier/Amplifier.cpp +++ b/plugins/Amplifier/Amplifier.cpp @@ -25,7 +25,7 @@ #include "Amplifier.h" -#include "embed.cpp" +#include "embed.h" extern "C" @@ -39,7 +39,7 @@ Plugin::Descriptor PLUGIN_EXPORT amplifier_plugin_descriptor = "Vesa Kivimäki ", 0x0100, Plugin::Effect, - new PluginPixmapLoader( "logo" ), + new PluginPixmapLoader("logo"), NULL, NULL } ; diff --git a/plugins/Amplifier/CMakeLists.txt b/plugins/Amplifier/CMakeLists.txt index 06ed1160e41..3e57ba5ef60 100644 --- a/plugins/Amplifier/CMakeLists.txt +++ b/plugins/Amplifier/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(amplifier Amplifier.cpp AmplifierControls.cpp AmplifierControlDialog.cpp MOCFILES AmplifierControls.h AmplifierControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(amplifier Amplifier.cpp AmplifierControls.cpp AmplifierControlDialog.cpp MOCFILES AmplifierControls.h AmplifierControlDialog.h EMBEDDED_RESOURCES artwork.png logo.png) diff --git a/plugins/BassBooster/BassBooster.cpp b/plugins/BassBooster/BassBooster.cpp index f395fb7309a..0499ba7ee0a 100644 --- a/plugins/BassBooster/BassBooster.cpp +++ b/plugins/BassBooster/BassBooster.cpp @@ -24,7 +24,7 @@ #include "BassBooster.h" -#include "embed.cpp" +#include "embed.h" extern "C" @@ -38,7 +38,7 @@ Plugin::Descriptor PLUGIN_EXPORT bassbooster_plugin_descriptor = "Tobias Doerffel ", 0x0100, Plugin::Effect, - new PluginPixmapLoader( "logo" ), + new PluginPixmapLoader("logo"), NULL, NULL } ; diff --git a/plugins/BassBooster/CMakeLists.txt b/plugins/BassBooster/CMakeLists.txt index 2f0703254d4..35bfb50492e 100644 --- a/plugins/BassBooster/CMakeLists.txt +++ b/plugins/BassBooster/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(bassbooster BassBooster.cpp BassBoosterControls.cpp BassBoosterControlDialog.cpp MOCFILES BassBoosterControls.h BassBoosterControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(bassbooster BassBooster.cpp BassBoosterControls.cpp BassBoosterControlDialog.cpp MOCFILES BassBoosterControls.h BassBoosterControlDialog.h EMBEDDED_RESOURCES artwork.png logo.png) diff --git a/plugins/Bitcrush/Bitcrush.cpp b/plugins/Bitcrush/Bitcrush.cpp index 30a9730dec5..6c7073f3100 100644 --- a/plugins/Bitcrush/Bitcrush.cpp +++ b/plugins/Bitcrush/Bitcrush.cpp @@ -24,7 +24,7 @@ */ #include "Bitcrush.h" -#include "embed.cpp" +#include "embed.h" const int OS_RATE = 5; const float OS_RATIO = 1.0f / OS_RATE; diff --git a/plugins/Bitcrush/CMakeLists.txt b/plugins/Bitcrush/CMakeLists.txt index ca70afcebb1..f4810183ee3 100644 --- a/plugins/Bitcrush/CMakeLists.txt +++ b/plugins/Bitcrush/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(bitcrush Bitcrush.cpp BitcrushControls.cpp BitcrushControlDialog.cpp MOCFILES BitcrushControls.h BitcrushControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(bitcrush Bitcrush.cpp BitcrushControls.cpp BitcrushControlDialog.cpp MOCFILES BitcrushControls.h BitcrushControlDialog.h EMBEDDED_RESOURCES artwork.png logo.png) diff --git a/plugins/CrossoverEQ/CMakeLists.txt b/plugins/CrossoverEQ/CMakeLists.txt index fbc8407d978..447c92c1155 100644 --- a/plugins/CrossoverEQ/CMakeLists.txt +++ b/plugins/CrossoverEQ/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(crossovereq CrossoverEQ.cpp CrossoverEQControls.cpp CrossoverEQControlDialog.cpp MOCFILES CrossoverEQControls.h CrossoverEQControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(crossovereq CrossoverEQ.cpp CrossoverEQControls.cpp CrossoverEQControlDialog.cpp MOCFILES CrossoverEQControls.h CrossoverEQControlDialog.h EMBEDDED_RESOURCES artwork.png fader_bg.png fader_empty.png fader_knob2.png logo.png) diff --git a/plugins/CrossoverEQ/CrossoverEQ.cpp b/plugins/CrossoverEQ/CrossoverEQ.cpp index 325c73d864a..b406045878e 100644 --- a/plugins/CrossoverEQ/CrossoverEQ.cpp +++ b/plugins/CrossoverEQ/CrossoverEQ.cpp @@ -26,7 +26,7 @@ #include "CrossoverEQ.h" #include "lmms_math.h" -#include "embed.cpp" +#include "embed.h" extern "C" { diff --git a/plugins/Delay/CMakeLists.txt b/plugins/Delay/CMakeLists.txt index ceb7ceb4a68..8f14b3f1437 100644 --- a/plugins/Delay/CMakeLists.txt +++ b/plugins/Delay/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(delay DelayEffect.cpp DelayControls.cpp DelayControlsDialog.cpp Lfo.cpp StereoDelay.cpp MOCFILES DelayControls.h DelayControlsDialog.h ../Eq/EqFader.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(delay DelayEffect.cpp DelayControls.cpp DelayControlsDialog.cpp Lfo.cpp StereoDelay.cpp MOCFILES DelayControls.h DelayControlsDialog.h ../Eq/EqFader.h EMBEDDED_RESOURCES artwork.png logo.png) diff --git a/plugins/Delay/DelayEffect.cpp b/plugins/Delay/DelayEffect.cpp index 8e60007d8de..2305b19668a 100644 --- a/plugins/Delay/DelayEffect.cpp +++ b/plugins/Delay/DelayEffect.cpp @@ -24,7 +24,7 @@ #include "DelayEffect.h" #include "Engine.h" -#include "embed.cpp" +#include "embed.h" #include "interpolation.h" @@ -39,7 +39,7 @@ Plugin::Descriptor PLUGIN_EXPORT delay_plugin_descriptor = "Dave French ", 0x0100, Plugin::Effect, - new PluginPixmapLoader( "logo" ), + new PluginPixmapLoader("logo"), NULL, NULL } ; diff --git a/plugins/DualFilter/CMakeLists.txt b/plugins/DualFilter/CMakeLists.txt index 748cbcd1cb5..9aca1a7d549 100644 --- a/plugins/DualFilter/CMakeLists.txt +++ b/plugins/DualFilter/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(dualfilter DualFilter.cpp DualFilterControls.cpp DualFilterControlDialog.cpp MOCFILES DualFilterControls.h DualFilterControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(dualfilter DualFilter.cpp DualFilterControls.cpp DualFilterControlDialog.cpp MOCFILES DualFilterControls.h DualFilterControlDialog.h EMBEDDED_RESOURCES artwork.png logo.png) diff --git a/plugins/DualFilter/DualFilter.cpp b/plugins/DualFilter/DualFilter.cpp index cb4b91b922e..3189e2c2bdb 100644 --- a/plugins/DualFilter/DualFilter.cpp +++ b/plugins/DualFilter/DualFilter.cpp @@ -25,7 +25,7 @@ #include "DualFilter.h" -#include "embed.cpp" +#include "embed.h" #include "BasicFilters.h" diff --git a/plugins/Eq/CMakeLists.txt b/plugins/Eq/CMakeLists.txt index 1414b519414..36109cb3cc0 100644 --- a/plugins/Eq/CMakeLists.txt +++ b/plugins/Eq/CMakeLists.txt @@ -3,4 +3,4 @@ INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS}) LINK_DIRECTORIES(${FFTW3F_LIBRARY_DIRS}) LINK_LIBRARIES(${FFTW3F_LIBRARIES}) BUILD_PLUGIN(eq EqEffect.cpp EqCurve.cpp EqCurve.h EqControls.cpp EqControlsDialog.cpp EqFilter.h EqParameterWidget.cpp EqFader.h EqSpectrumView.h EqSpectrumView.cpp -MOCFILES EqControls.h EqControlsDialog.h EqCurve.h EqParameterWidget.h EqFader.h EqSpectrumView.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +MOCFILES EqControls.h EqControlsDialog.h EqCurve.h EqParameterWidget.h EqFader.h EqSpectrumView.h EMBEDDED_RESOURCES *.png) diff --git a/plugins/Eq/EqEffect.cpp b/plugins/Eq/EqEffect.cpp index 25ab79e98a0..66e924cae00 100644 --- a/plugins/Eq/EqEffect.cpp +++ b/plugins/Eq/EqEffect.cpp @@ -24,7 +24,7 @@ #include "EqEffect.h" -#include "embed.cpp" +#include "embed.h" #include "Engine.h" #include "EqFader.h" #include "interpolation.h" @@ -42,7 +42,7 @@ Plugin::Descriptor PLUGIN_EXPORT eq_plugin_descriptor = "Dave French ", 0x0100, Plugin::Effect, - new PluginPixmapLoader( "logo" ), + new PluginPixmapLoader("logo"), NULL, NULL } ; diff --git a/plugins/Flanger/CMakeLists.txt b/plugins/Flanger/CMakeLists.txt index f2195e0bcd9..2d11c50c46b 100644 --- a/plugins/Flanger/CMakeLists.txt +++ b/plugins/Flanger/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(flanger FlangerEffect.cpp FlangerControls.cpp FlangerControlsDialog.cpp Noise.cpp QuadratureLfo.cpp MonoDelay.cpp MOCFILES FlangerControls.h FlangerControlsDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(flanger FlangerEffect.cpp FlangerControls.cpp FlangerControlsDialog.cpp Noise.cpp QuadratureLfo.cpp MonoDelay.cpp MOCFILES FlangerControls.h FlangerControlsDialog.h EMBEDDED_RESOURCES artwork.png logo.png) diff --git a/plugins/Flanger/FlangerEffect.cpp b/plugins/Flanger/FlangerEffect.cpp index f9d55bb602c..5a287bec319 100644 --- a/plugins/Flanger/FlangerEffect.cpp +++ b/plugins/Flanger/FlangerEffect.cpp @@ -24,7 +24,7 @@ #include "FlangerEffect.h" #include "Engine.h" -#include "embed.cpp" +#include "embed.h" extern "C" { @@ -37,7 +37,7 @@ Plugin::Descriptor PLUGIN_EXPORT flanger_plugin_descriptor = "Dave French ", 0x0100, Plugin::Effect, - new PluginPixmapLoader( "logo" ), + new PluginPixmapLoader("logo"), NULL, NULL } ; diff --git a/plugins/GigPlayer/GigPlayer.cpp b/plugins/GigPlayer/GigPlayer.cpp index 266e93bad70..4a23e513bb5 100644 --- a/plugins/GigPlayer/GigPlayer.cpp +++ b/plugins/GigPlayer/GigPlayer.cpp @@ -52,7 +52,7 @@ #include "ToolTip.h" #include "LcdSpinBox.h" -#include "embed.cpp" +#include "embed.h" extern "C" diff --git a/plugins/LadspaEffect/CMakeLists.txt b/plugins/LadspaEffect/CMakeLists.txt index 8ab9685c74d..e827611402c 100644 --- a/plugins/LadspaEffect/CMakeLists.txt +++ b/plugins/LadspaEffect/CMakeLists.txt @@ -3,7 +3,7 @@ INCLUDE(BuildPlugin) # Disable C++11 REMOVE_DEFINITIONS(-std=c++0x) -BUILD_PLUGIN(ladspaeffect LadspaEffect.cpp LadspaControls.cpp LadspaControlDialog.cpp LadspaSubPluginFeatures.cpp LadspaEffect.h LadspaControls.h LadspaControlDialog.h LadspaSubPluginFeatures.h MOCFILES LadspaEffect.h LadspaControls.h LadspaControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(ladspaeffect LadspaEffect.cpp LadspaControls.cpp LadspaControlDialog.cpp LadspaSubPluginFeatures.cpp LadspaEffect.h LadspaControls.h LadspaControlDialog.h LadspaSubPluginFeatures.h MOCFILES LadspaEffect.h LadspaControls.h LadspaControlDialog.h EMBEDDED_RESOURCES logo.png) SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ladspa") diff --git a/plugins/LadspaEffect/LadspaEffect.cpp b/plugins/LadspaEffect/LadspaEffect.cpp index 72b195314f0..b5bbe2728c0 100644 --- a/plugins/LadspaEffect/LadspaEffect.cpp +++ b/plugins/LadspaEffect/LadspaEffect.cpp @@ -41,7 +41,7 @@ #include "ValueBuffer.h" #include "Song.h" -#include "embed.cpp" +#include "embed.h" extern "C" @@ -57,7 +57,7 @@ Plugin::Descriptor PLUGIN_EXPORT ladspaeffect_plugin_descriptor = "Danny McRae ", 0x0100, Plugin::Effect, - new PluginPixmapLoader( "logo" ), + new PluginPixmapLoader("logo"), NULL, new LadspaSubPluginFeatures( Plugin::Effect ) } ; diff --git a/plugins/MultitapEcho/CMakeLists.txt b/plugins/MultitapEcho/CMakeLists.txt index bfd9e62498f..690baf1f1cb 100644 --- a/plugins/MultitapEcho/CMakeLists.txt +++ b/plugins/MultitapEcho/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(multitapecho MultitapEcho.cpp MultitapEchoControls.cpp MultitapEchoControlDialog.cpp MOCFILES MultitapEchoControls.h MultitapEchoControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(multitapecho MultitapEcho.cpp MultitapEchoControls.cpp MultitapEchoControlDialog.cpp MOCFILES MultitapEchoControls.h MultitapEchoControlDialog.h EMBEDDED_RESOURCES artwork.png graph_bg.png logo.png) diff --git a/plugins/MultitapEcho/MultitapEcho.cpp b/plugins/MultitapEcho/MultitapEcho.cpp index 447d319eb73..7e84a289ef5 100644 --- a/plugins/MultitapEcho/MultitapEcho.cpp +++ b/plugins/MultitapEcho/MultitapEcho.cpp @@ -24,7 +24,7 @@ */ #include "MultitapEcho.h" -#include "embed.cpp" +#include "embed.h" extern "C" diff --git a/plugins/ReverbSC/CMakeLists.txt b/plugins/ReverbSC/CMakeLists.txt index b2481e523e4..85a005d3c9f 100644 --- a/plugins/ReverbSC/CMakeLists.txt +++ b/plugins/ReverbSC/CMakeLists.txt @@ -20,5 +20,5 @@ BUILD_PLUGIN( base.h revsc.h dcblock.h - EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png" + EMBEDDED_RESOURCES artwork.png logo.png ) diff --git a/plugins/ReverbSC/ReverbSC.cpp b/plugins/ReverbSC/ReverbSC.cpp index 93e526e8716..1aec2b9dce9 100644 --- a/plugins/ReverbSC/ReverbSC.cpp +++ b/plugins/ReverbSC/ReverbSC.cpp @@ -23,7 +23,7 @@ #include #include "ReverbSC.h" -#include "embed.cpp" +#include "embed.h" #define DB2LIN(X) pow(10, X / 20.0f); diff --git a/plugins/SpectrumAnalyzer/CMakeLists.txt b/plugins/SpectrumAnalyzer/CMakeLists.txt index 2f56fe256ed..c2aec0d43fd 100644 --- a/plugins/SpectrumAnalyzer/CMakeLists.txt +++ b/plugins/SpectrumAnalyzer/CMakeLists.txt @@ -2,4 +2,4 @@ INCLUDE(BuildPlugin) INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS}) LINK_DIRECTORIES(${FFTW3F_LIBRARY_DIRS}) LINK_LIBRARIES(${FFTW3F_LIBRARIES}) -BUILD_PLUGIN(spectrumanalyzer SpectrumAnalyzer.cpp SpectrumAnalyzerControls.cpp SpectrumAnalyzerControlDialog.cpp SpectrumAnalyzer.h SpectrumAnalyzerControls.h SpectrumAnalyzerControlDialog.h MOCFILES SpectrumAnalyzerControlDialog.h SpectrumAnalyzerControls.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(spectrumanalyzer SpectrumAnalyzer.cpp SpectrumAnalyzerControls.cpp SpectrumAnalyzerControlDialog.cpp SpectrumAnalyzer.h SpectrumAnalyzerControls.h SpectrumAnalyzerControlDialog.h MOCFILES SpectrumAnalyzerControlDialog.h SpectrumAnalyzerControls.h EMBEDDED_RESOURCES *.png) diff --git a/plugins/SpectrumAnalyzer/SpectrumAnalyzer.cpp b/plugins/SpectrumAnalyzer/SpectrumAnalyzer.cpp index c63c536ce78..bba33463590 100644 --- a/plugins/SpectrumAnalyzer/SpectrumAnalyzer.cpp +++ b/plugins/SpectrumAnalyzer/SpectrumAnalyzer.cpp @@ -24,7 +24,7 @@ #include "SpectrumAnalyzer.h" -#include "embed.cpp" +#include "embed.h" extern "C" @@ -38,7 +38,7 @@ Plugin::Descriptor PLUGIN_EXPORT spectrumanalyzer_plugin_descriptor = "Tobias Doerffel ", 0x0100, Plugin::Effect, - new PluginPixmapLoader( "logo" ), + new PluginPixmapLoader(), NULL, NULL } ; diff --git a/plugins/VstEffect/CMakeLists.txt b/plugins/VstEffect/CMakeLists.txt index 4a1c03196a8..e62b6610ea0 100644 --- a/plugins/VstEffect/CMakeLists.txt +++ b/plugins/VstEffect/CMakeLists.txt @@ -10,7 +10,7 @@ ELSE() SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${PLUGIN_DIR}") ENDIF() -BUILD_PLUGIN(vsteffect VstEffect.cpp VstEffectControls.cpp VstEffectControlDialog.cpp VstSubPluginFeatures.cpp VstEffect.h VstEffectControls.h VstEffectControlDialog.h VstSubPluginFeatures.h MOCFILES VstEffectControlDialog.h VstEffectControls.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(vsteffect VstEffect.cpp VstEffectControls.cpp VstEffectControlDialog.cpp VstSubPluginFeatures.cpp VstEffect.h VstEffectControls.h VstEffectControlDialog.h VstSubPluginFeatures.h MOCFILES VstEffectControlDialog.h VstEffectControls.h EMBEDDED_RESOURCES logo.png) SET_TARGET_PROPERTIES(vsteffect PROPERTIES COMPILE_FLAGS "-Wno-attributes") TARGET_LINK_LIBRARIES(vsteffect -lvstbase) ADD_DEPENDENCIES(vsteffect vstbase) diff --git a/plugins/VstEffect/VstEffect.cpp b/plugins/VstEffect/VstEffect.cpp index 88e37ea925f..fb7b6b33ddd 100644 --- a/plugins/VstEffect/VstEffect.cpp +++ b/plugins/VstEffect/VstEffect.cpp @@ -29,7 +29,7 @@ #include "TextFloat.h" #include "VstSubPluginFeatures.h" -#include "embed.cpp" +#include "embed.h" extern "C" @@ -44,7 +44,7 @@ Plugin::Descriptor PLUGIN_EXPORT vsteffect_plugin_descriptor = "Tobias Doerffel ", 0x0200, Plugin::Effect, - new PluginPixmapLoader( "logo" ), + new PluginPixmapLoader("logo"), NULL, new VstSubPluginFeatures( Plugin::Effect ) } ; diff --git a/plugins/audio_file_processor/CMakeLists.txt b/plugins/audio_file_processor/CMakeLists.txt index 089028c3272..d7b4620b076 100644 --- a/plugins/audio_file_processor/CMakeLists.txt +++ b/plugins/audio_file_processor/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(audiofileprocessor audio_file_processor.cpp audio_file_processor.h MOCFILES audio_file_processor.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(audiofileprocessor audio_file_processor.cpp audio_file_processor.h MOCFILES audio_file_processor.h EMBEDDED_RESOURCES *.png) diff --git a/plugins/audio_file_processor/audio_file_processor.cpp b/plugins/audio_file_processor/audio_file_processor.cpp index 2fdb8e459b8..f7ce90e133f 100644 --- a/plugins/audio_file_processor/audio_file_processor.cpp +++ b/plugins/audio_file_processor/audio_file_processor.cpp @@ -44,7 +44,7 @@ #include "StringPairDrag.h" #include "DataFile.h" -#include "embed.cpp" +#include "embed.h" extern "C" diff --git a/plugins/bit_invader/bit_invader.cpp b/plugins/bit_invader/bit_invader.cpp index 983df5ec20f..7f22211b2fd 100644 --- a/plugins/bit_invader/bit_invader.cpp +++ b/plugins/bit_invader/bit_invader.cpp @@ -41,7 +41,7 @@ #include "Song.h" #include "interpolation.h" -#include "embed.cpp" +#include "embed.h" extern "C" { diff --git a/plugins/carlabase/CMakeLists.txt b/plugins/carlabase/CMakeLists.txt index 8fdde2ec51f..48a637c62c1 100644 --- a/plugins/carlabase/CMakeLists.txt +++ b/plugins/carlabase/CMakeLists.txt @@ -3,7 +3,7 @@ if(LMMS_HAVE_CARLA) INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS}) LINK_DIRECTORIES(${CARLA_LIBRARY_DIRS}) LINK_LIBRARIES(${CARLA_LIBRARIES}) - BUILD_PLUGIN(carlabase carla.cpp carla.h MOCFILES carla.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png" LINK SHARED) + BUILD_PLUGIN(carlabase carla.cpp carla.h MOCFILES carla.h EMBEDDED_RESOURCES artwork-patchbay.png artwork-rack.png LINK SHARED) SET_TARGET_PROPERTIES(carlabase PROPERTIES SKIP_BUILD_RPATH TRUE BUILD_WITH_INSTALL_RPATH TRUE diff --git a/plugins/carlabase/carla.cpp b/plugins/carlabase/carla.cpp index 0d550aae532..8d46d4c1a95 100644 --- a/plugins/carlabase/carla.cpp +++ b/plugins/carlabase/carla.cpp @@ -42,7 +42,7 @@ #include -#include "embed.cpp" +#include "embed.h" // this doesn't seem to be defined anywhere static const double ticksPerBeat = 48.0; diff --git a/plugins/carlapatchbay/CMakeLists.txt b/plugins/carlapatchbay/CMakeLists.txt index d9aa6b32102..64a21a605c9 100644 --- a/plugins/carlapatchbay/CMakeLists.txt +++ b/plugins/carlapatchbay/CMakeLists.txt @@ -5,5 +5,5 @@ if(LMMS_HAVE_CARLA) LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/../carlabase" ${CARLA_LIBRARY_DIRS}) LINK_LIBRARIES(carlabase) - BUILD_PLUGIN(carlapatchbay carlapatchbay.cpp EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") + BUILD_PLUGIN(carlapatchbay carlapatchbay.cpp EMBEDDED_RESOURCES logo.png) endif(LMMS_HAVE_CARLA) diff --git a/plugins/carlapatchbay/carlapatchbay.cpp b/plugins/carlapatchbay/carlapatchbay.cpp index ae6ca1906e3..d67ffebb80c 100644 --- a/plugins/carlapatchbay/carlapatchbay.cpp +++ b/plugins/carlapatchbay/carlapatchbay.cpp @@ -24,7 +24,7 @@ #include "carla.h" -#include "embed.cpp" +#include "embed.h" extern "C" { diff --git a/plugins/carlarack/CMakeLists.txt b/plugins/carlarack/CMakeLists.txt index 1834b23715e..1d9cb975a12 100644 --- a/plugins/carlarack/CMakeLists.txt +++ b/plugins/carlarack/CMakeLists.txt @@ -5,5 +5,5 @@ if(LMMS_HAVE_CARLA) LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/../carlabase" ${CARLA_LIBRARY_DIRS}) LINK_LIBRARIES(carlabase) - BUILD_PLUGIN(carlarack carlarack.cpp EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") + BUILD_PLUGIN(carlarack carlarack.cpp EMBEDDED_RESOURCES logo.png) endif(LMMS_HAVE_CARLA) diff --git a/plugins/carlarack/carlarack.cpp b/plugins/carlarack/carlarack.cpp index 0a52c63c53d..5225f46b902 100644 --- a/plugins/carlarack/carlarack.cpp +++ b/plugins/carlarack/carlarack.cpp @@ -24,7 +24,7 @@ #include "carla.h" -#include "embed.cpp" +#include "embed.h" extern "C" { diff --git a/plugins/dynamics_processor/CMakeLists.txt b/plugins/dynamics_processor/CMakeLists.txt index fcfd8e20775..1d4c1a2b4f2 100644 --- a/plugins/dynamics_processor/CMakeLists.txt +++ b/plugins/dynamics_processor/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(dynamicsprocessor dynamics_processor.cpp dynamics_processor_controls.cpp dynamics_processor_control_dialog.cpp MOCFILES dynamics_processor_controls.h dynamics_processor_control_dialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(dynamicsprocessor dynamics_processor.cpp dynamics_processor_controls.cpp dynamics_processor_control_dialog.cpp MOCFILES dynamics_processor_controls.h dynamics_processor_control_dialog.h EMBEDDED_RESOURCES *.png) diff --git a/plugins/dynamics_processor/dynamics_processor.cpp b/plugins/dynamics_processor/dynamics_processor.cpp index 2005d5e8650..4f9c9648c72 100644 --- a/plugins/dynamics_processor/dynamics_processor.cpp +++ b/plugins/dynamics_processor/dynamics_processor.cpp @@ -28,7 +28,7 @@ #include "lmms_math.h" #include "interpolation.h" -#include "embed.cpp" +#include "embed.h" extern "C" { @@ -42,7 +42,7 @@ Plugin::Descriptor PLUGIN_EXPORT dynamicsprocessor_plugin_descriptor = "Vesa Kivimäki ", 0x0100, Plugin::Effect, - new PluginPixmapLoader( "logo" ), + new PluginPixmapLoader("logo"), NULL, NULL } ; diff --git a/plugins/kicker/CMakeLists.txt b/plugins/kicker/CMakeLists.txt index d2990639d80..0ac9f87b50b 100644 --- a/plugins/kicker/CMakeLists.txt +++ b/plugins/kicker/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(kicker kicker.cpp kicker.h MOCFILES kicker.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(kicker kicker.cpp kicker.h MOCFILES kicker.h EMBEDDED_RESOURCES artwork.png logo.png) diff --git a/plugins/kicker/kicker.cpp b/plugins/kicker/kicker.cpp index dfe65182a15..3b6b18c73b6 100644 --- a/plugins/kicker/kicker.cpp +++ b/plugins/kicker/kicker.cpp @@ -35,7 +35,7 @@ #include "NotePlayHandle.h" #include "KickerOsc.h" -#include "embed.cpp" +#include "embed.h" extern "C" diff --git a/plugins/ladspa_browser/CMakeLists.txt b/plugins/ladspa_browser/CMakeLists.txt index 5da7194edf6..ae46c314c25 100644 --- a/plugins/ladspa_browser/CMakeLists.txt +++ b/plugins/ladspa_browser/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(ladspabrowser ladspa_browser.cpp ladspa_browser.h ladspa_description.cpp ladspa_description.h ladspa_port_dialog.cpp ladspa_port_dialog.h MOCFILES ladspa_browser.h ladspa_description.h ladspa_port_dialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(ladspabrowser ladspa_browser.cpp ladspa_browser.h ladspa_description.cpp ladspa_description.h ladspa_port_dialog.cpp ladspa_port_dialog.h MOCFILES ladspa_browser.h ladspa_description.h ladspa_port_dialog.h EMBEDDED_RESOURCES logo.png) diff --git a/plugins/ladspa_browser/ladspa_browser.cpp b/plugins/ladspa_browser/ladspa_browser.cpp index fabef529fbb..23134048c1e 100644 --- a/plugins/ladspa_browser/ladspa_browser.cpp +++ b/plugins/ladspa_browser/ladspa_browser.cpp @@ -38,7 +38,7 @@ #include "TabBar.h" #include "TabButton.h" -#include "embed.cpp" +#include "embed.h" @@ -54,7 +54,7 @@ Plugin::Descriptor PLUGIN_EXPORT ladspabrowser_plugin_descriptor = "Danny McRae ", 0x0100, Plugin::Tool, - new PluginPixmapLoader( "logo" ), + new PluginPixmapLoader("logo"), NULL, NULL } ; diff --git a/plugins/lb302/CMakeLists.txt b/plugins/lb302/CMakeLists.txt index c9389eb189a..6406ecfc0dd 100644 --- a/plugins/lb302/CMakeLists.txt +++ b/plugins/lb302/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(lb302 lb302.cpp lb302.h MOCFILES lb302.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(lb302 lb302.cpp lb302.h MOCFILES lb302.h EMBEDDED_RESOURCES artwork.png logo.png) diff --git a/plugins/lb302/lb302.cpp b/plugins/lb302/lb302.cpp index 81cd46a4702..dedd9822c95 100644 --- a/plugins/lb302/lb302.cpp +++ b/plugins/lb302/lb302.cpp @@ -45,7 +45,7 @@ #include "ToolTip.h" #include "BandLimitedWave.h" -#include "embed.cpp" +#include "embed.h" // Envelope Recalculation period diff --git a/plugins/monstro/CMakeLists.txt b/plugins/monstro/CMakeLists.txt index 6a9195b75a4..575ace8c6c2 100644 --- a/plugins/monstro/CMakeLists.txt +++ b/plugins/monstro/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(monstro Monstro.cpp Monstro.h MOCFILES Monstro.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(monstro Monstro.cpp Monstro.h MOCFILES Monstro.h EMBEDDED_RESOURCES *.png) diff --git a/plugins/monstro/Monstro.cpp b/plugins/monstro/Monstro.cpp index 75825c1d6a0..0ac0079f88d 100644 --- a/plugins/monstro/Monstro.cpp +++ b/plugins/monstro/Monstro.cpp @@ -35,7 +35,7 @@ #include "lmms_math.h" #include "interpolation.h" -#include "embed.cpp" +#include "embed.h" extern "C" diff --git a/plugins/nes/CMakeLists.txt b/plugins/nes/CMakeLists.txt index b864f612513..7084483996f 100644 --- a/plugins/nes/CMakeLists.txt +++ b/plugins/nes/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(nes Nes.cpp Nes.h MOCFILES Nes.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(nes Nes.cpp Nes.h MOCFILES Nes.h EMBEDDED_RESOURCES *.png) diff --git a/plugins/nes/Nes.cpp b/plugins/nes/Nes.cpp index 1b385e46578..b09f84a222d 100644 --- a/plugins/nes/Nes.cpp +++ b/plugins/nes/Nes.cpp @@ -35,7 +35,7 @@ #include "Mixer.h" #include "Oscillator.h" -#include "embed.cpp" +#include "embed.h" extern "C" { diff --git a/plugins/opl2/opl2instrument.cpp b/plugins/opl2/opl2instrument.cpp index be84d91e099..53c4fb08418 100644 --- a/plugins/opl2/opl2instrument.cpp +++ b/plugins/opl2/opl2instrument.cpp @@ -50,7 +50,7 @@ #include "opl.h" #include "temuopl.h" -#include "embed.cpp" +#include "embed.h" #include "math.h" #include "debug.h" diff --git a/plugins/organic/CMakeLists.txt b/plugins/organic/CMakeLists.txt index 8eb0db7c8eb..8274af798d2 100644 --- a/plugins/organic/CMakeLists.txt +++ b/plugins/organic/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(organic organic.cpp organic.h MOCFILES organic.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(organic organic.cpp organic.h MOCFILES organic.h EMBEDDED_RESOURCES *.png) diff --git a/plugins/organic/organic.cpp b/plugins/organic/organic.cpp index b062e5b114d..7d7c60057c3 100644 --- a/plugins/organic/organic.cpp +++ b/plugins/organic/organic.cpp @@ -40,7 +40,7 @@ #include "templates.h" #include "ToolTip.h" -#include "embed.cpp" +#include "embed.h" diff --git a/plugins/papu/papu_instrument.cpp b/plugins/papu/papu_instrument.cpp index 0f2035696eb..ed64995f3e6 100644 --- a/plugins/papu/papu_instrument.cpp +++ b/plugins/papu/papu_instrument.cpp @@ -40,7 +40,7 @@ #include "Engine.h" #include "Graph.h" -#include "embed.cpp" +#include "embed.h" extern "C" { diff --git a/plugins/patman/CMakeLists.txt b/plugins/patman/CMakeLists.txt index 38132ae223e..cf8c7ffdf1b 100644 --- a/plugins/patman/CMakeLists.txt +++ b/plugins/patman/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(patman patman.cpp patman.h MOCFILES patman.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(patman patman.cpp patman.h MOCFILES patman.h EMBEDDED_RESOURCES *.png) diff --git a/plugins/patman/patman.cpp b/plugins/patman/patman.cpp index 60cd6210cd4..55e64fa4805 100644 --- a/plugins/patman/patman.cpp +++ b/plugins/patman/patman.cpp @@ -29,6 +29,7 @@ #include #include +#include "ConfigManager.h" #include "endian_handling.h" #include "Engine.h" #include "gui_templates.h" @@ -41,7 +42,7 @@ #include "FileDialog.h" #include "ConfigManager.h" -#include "embed.cpp" +#include "embed.h" diff --git a/plugins/peak_controller_effect/CMakeLists.txt b/plugins/peak_controller_effect/CMakeLists.txt index b55fde5c559..eeef8a5991a 100644 --- a/plugins/peak_controller_effect/CMakeLists.txt +++ b/plugins/peak_controller_effect/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(peakcontrollereffect peak_controller_effect.cpp peak_controller_effect_controls.cpp peak_controller_effect_control_dialog.cpp peak_controller_effect.h peak_controller_effect_controls.h peak_controller_effect_control_dialog.h MOCFILES peak_controller_effect_controls.h peak_controller_effect_control_dialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(peakcontrollereffect peak_controller_effect.cpp peak_controller_effect_controls.cpp peak_controller_effect_control_dialog.cpp peak_controller_effect.h peak_controller_effect_controls.h peak_controller_effect_control_dialog.h MOCFILES peak_controller_effect_controls.h peak_controller_effect_control_dialog.h EMBEDDED_RESOURCES artwork.png logo.png) diff --git a/plugins/peak_controller_effect/peak_controller_effect.cpp b/plugins/peak_controller_effect/peak_controller_effect.cpp index 59c91f3d18d..ec4ec1e94c0 100644 --- a/plugins/peak_controller_effect/peak_controller_effect.cpp +++ b/plugins/peak_controller_effect/peak_controller_effect.cpp @@ -30,7 +30,7 @@ #include "peak_controller_effect.h" #include "lmms_math.h" -#include "embed.cpp" +#include "embed.h" extern "C" { @@ -44,7 +44,7 @@ Plugin::Descriptor PLUGIN_EXPORT peakcontrollereffect_plugin_descriptor = "Paul Giblock ", 0x0100, Plugin::Effect, - new PluginPixmapLoader( "logo" ), + new PluginPixmapLoader("logo"), NULL, NULL } ; diff --git a/plugins/sf2_player/CMakeLists.txt b/plugins/sf2_player/CMakeLists.txt index d087f437d4e..9d8bf97f0d1 100644 --- a/plugins/sf2_player/CMakeLists.txt +++ b/plugins/sf2_player/CMakeLists.txt @@ -3,6 +3,6 @@ if(LMMS_HAVE_FLUIDSYNTH) INCLUDE_DIRECTORIES(${FLUIDSYNTH_INCLUDE_DIRS} ${SAMPLERATE_INCLUDE_DIRS}) LINK_DIRECTORIES(${FLUIDSYNTH_LIBRARY_DIRS} ${SAMPLERATE_LIBRARY_DIRS}) LINK_LIBRARIES(${FLUIDSYNTH_LIBRARIES} ${SAMPLERATE_LIBRARIES}) - BUILD_PLUGIN(sf2player sf2_player.cpp sf2_player.h patches_dialog.cpp patches_dialog.h patches_dialog.ui MOCFILES sf2_player.h patches_dialog.h UICFILES patches_dialog.ui EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") + BUILD_PLUGIN(sf2player sf2_player.cpp sf2_player.h patches_dialog.cpp patches_dialog.h patches_dialog.ui MOCFILES sf2_player.h patches_dialog.h UICFILES patches_dialog.ui EMBEDDED_RESOURCES *.png) endif(LMMS_HAVE_FLUIDSYNTH) diff --git a/plugins/sf2_player/sf2_player.cpp b/plugins/sf2_player/sf2_player.cpp index 9f17965039c..6b809da87ea 100644 --- a/plugins/sf2_player/sf2_player.cpp +++ b/plugins/sf2_player/sf2_player.cpp @@ -31,6 +31,7 @@ #include "ConfigManager.h" #include "FileDialog.h" #include "sf2_player.h" +#include "ConfigManager.h" #include "Engine.h" #include "InstrumentTrack.h" #include "InstrumentPlayHandle.h" @@ -44,7 +45,7 @@ #include "ToolTip.h" #include "LcdSpinBox.h" -#include "embed.cpp" +#include "embed.h" extern "C" diff --git a/plugins/sfxr/CMakeLists.txt b/plugins/sfxr/CMakeLists.txt index 97f6dd88d97..420825b2f64 100644 --- a/plugins/sfxr/CMakeLists.txt +++ b/plugins/sfxr/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(sfxr sfxr.cpp sfxr.h MOCFILES sfxr.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(sfxr sfxr.cpp sfxr.h MOCFILES sfxr.h EMBEDDED_RESOURCES *.png) diff --git a/plugins/sfxr/sfxr.cpp b/plugins/sfxr/sfxr.cpp index b0222a0b12b..c8370de8200 100644 --- a/plugins/sfxr/sfxr.cpp +++ b/plugins/sfxr/sfxr.cpp @@ -52,7 +52,7 @@ float frnd(float range) #include "MidiTime.h" #include "Mixer.h" -#include "embed.cpp" +#include "embed.h" extern "C" { diff --git a/plugins/sid/CMakeLists.txt b/plugins/sid/CMakeLists.txt index 387604bd473..3198723c05e 100644 --- a/plugins/sid/CMakeLists.txt +++ b/plugins/sid/CMakeLists.txt @@ -1,5 +1,5 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(sid sid_instrument.cpp sid_instrument.h envelope.h extfilt.h filter.h pot.h siddefs.h sid.h spline.h voice.h wave.h envelope.cc extfilt.cc filter.cc pot.cc sid.cc version.cc voice.cc wave6581_PS_.cc wave6581_PST.cc wave6581_P_T.cc wave6581__ST.cc wave8580_PS_.cc wave8580_PST.cc wave8580_P_T.cc wave8580__ST.cc wave.cc MOCFILES sid_instrument.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(sid sid_instrument.cpp sid_instrument.h envelope.h extfilt.h filter.h pot.h siddefs.h sid.h spline.h voice.h wave.h envelope.cc extfilt.cc filter.cc pot.cc sid.cc version.cc voice.cc wave6581_PS_.cc wave6581_PST.cc wave6581_P_T.cc wave6581__ST.cc wave8580_PS_.cc wave8580_PST.cc wave8580_P_T.cc wave8580__ST.cc wave.cc MOCFILES sid_instrument.h EMBEDDED_RESOURCES *.png) diff --git a/plugins/sid/sid_instrument.cpp b/plugins/sid/sid_instrument.cpp index b2a52ace859..0ab8e217be1 100644 --- a/plugins/sid/sid_instrument.cpp +++ b/plugins/sid/sid_instrument.cpp @@ -41,7 +41,7 @@ #include "PixmapButton.h" #include "ToolTip.h" -#include "embed.cpp" +#include "embed.h" #define C64_PAL_CYCLES_PER_SEC 985248 diff --git a/plugins/stereo_enhancer/CMakeLists.txt b/plugins/stereo_enhancer/CMakeLists.txt index c8e8c60097e..fdc0d7a73ec 100644 --- a/plugins/stereo_enhancer/CMakeLists.txt +++ b/plugins/stereo_enhancer/CMakeLists.txt @@ -1,4 +1,4 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(stereoenhancer stereo_enhancer.cpp stereoenhancer_controls.cpp stereoenhancer_control_dialog.cpp stereo_enhancer.h stereoenhancer_controls.h stereoenhancer_control_dialog.h MOCFILES stereoenhancer_controls.h stereoenhancer_control_dialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(stereoenhancer stereo_enhancer.cpp stereoenhancer_controls.cpp stereoenhancer_control_dialog.cpp stereo_enhancer.h stereoenhancer_controls.h stereoenhancer_control_dialog.h MOCFILES stereoenhancer_controls.h stereoenhancer_control_dialog.h EMBEDDED_RESOURCES logo.png) diff --git a/plugins/stereo_enhancer/stereo_enhancer.cpp b/plugins/stereo_enhancer/stereo_enhancer.cpp index 9dbe909f14a..7d252f57654 100644 --- a/plugins/stereo_enhancer/stereo_enhancer.cpp +++ b/plugins/stereo_enhancer/stereo_enhancer.cpp @@ -25,7 +25,7 @@ #include "stereo_enhancer.h" -#include "embed.cpp" +#include "embed.h" extern "C" @@ -40,7 +40,7 @@ Plugin::Descriptor PLUGIN_EXPORT stereoenhancer_plugin_descriptor = "Lou Herard ", 0x0100, Plugin::Effect, - new PluginPixmapLoader( "logo" ), + new PluginPixmapLoader("logo"), NULL, NULL } ; diff --git a/plugins/stereo_matrix/CMakeLists.txt b/plugins/stereo_matrix/CMakeLists.txt index 1c6471ab211..088107f5c9c 100644 --- a/plugins/stereo_matrix/CMakeLists.txt +++ b/plugins/stereo_matrix/CMakeLists.txt @@ -1,4 +1,4 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(stereomatrix stereo_matrix.cpp stereomatrix_controls.cpp stereomatrix_control_dialog.cpp stereo_matrix.h stereomatrix_controls.h stereomatrix_control_dialog.h MOCFILES stereomatrix_controls.h stereomatrix_control_dialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(stereomatrix stereo_matrix.cpp stereomatrix_controls.cpp stereomatrix_control_dialog.cpp stereo_matrix.h stereomatrix_controls.h stereomatrix_control_dialog.h MOCFILES stereomatrix_controls.h stereomatrix_control_dialog.h EMBEDDED_RESOURCES artwork.png) diff --git a/plugins/stereo_matrix/stereo_matrix.cpp b/plugins/stereo_matrix/stereo_matrix.cpp index cd7dd0f61e7..a9d2a8e10a5 100644 --- a/plugins/stereo_matrix/stereo_matrix.cpp +++ b/plugins/stereo_matrix/stereo_matrix.cpp @@ -25,7 +25,7 @@ #include "stereo_matrix.h" -#include "embed.cpp" +#include "embed.h" extern "C" @@ -40,7 +40,7 @@ Plugin::Descriptor PLUGIN_EXPORT stereomatrix_plugin_descriptor = "Paul Giblock ", 0x0100, Plugin::Effect, - new PluginPixmapLoader( "logo" ), + new PluginPixmapLoader("logo"), NULL, NULL } ; diff --git a/plugins/stk/mallets/CMakeLists.txt b/plugins/stk/mallets/CMakeLists.txt index 5be9cd14408..b749b54648c 100644 --- a/plugins/stk/mallets/CMakeLists.txt +++ b/plugins/stk/mallets/CMakeLists.txt @@ -2,4 +2,4 @@ INCLUDE(BuildPlugin) INCLUDE_DIRECTORIES("${STK_INCLUDE_DIR}") LINK_LIBRARIES(${STK_LIBRARY}) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions") -BUILD_PLUGIN(malletsstk mallets.cpp mallets.h MOCFILES mallets.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(malletsstk mallets.cpp mallets.h MOCFILES mallets.h EMBEDDED_RESOURCES artwork.png logo.png) diff --git a/plugins/stk/mallets/mallets.cpp b/plugins/stk/mallets/mallets.cpp index 5e5f35ffc10..9e392ebccdc 100644 --- a/plugins/stk/mallets/mallets.cpp +++ b/plugins/stk/mallets/mallets.cpp @@ -40,7 +40,7 @@ #include "InstrumentTrack.h" #include "Mixer.h" -#include "embed.cpp" +#include "embed.h" extern "C" diff --git a/plugins/triple_oscillator/CMakeLists.txt b/plugins/triple_oscillator/CMakeLists.txt index e17c39f1d25..ef16236324b 100644 --- a/plugins/triple_oscillator/CMakeLists.txt +++ b/plugins/triple_oscillator/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(tripleoscillator TripleOscillator.cpp TripleOscillator.h MOCFILES TripleOscillator.h EMBEDDED_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.png) +BUILD_PLUGIN(tripleoscillator TripleOscillator.cpp TripleOscillator.h MOCFILES TripleOscillator.h EMBEDDED_RESOURCES *.png) diff --git a/plugins/triple_oscillator/TripleOscillator.cpp b/plugins/triple_oscillator/TripleOscillator.cpp index b1c441cdd75..4efb040d220 100644 --- a/plugins/triple_oscillator/TripleOscillator.cpp +++ b/plugins/triple_oscillator/TripleOscillator.cpp @@ -39,7 +39,7 @@ #include "SampleBuffer.h" #include "ToolTip.h" -#include "embed.cpp" +#include "embed.h" extern "C" diff --git a/plugins/vestige/vestige.cpp b/plugins/vestige/vestige.cpp index a2e5d2d1fa0..dc3f36e6edd 100644 --- a/plugins/vestige/vestige.cpp +++ b/plugins/vestige/vestige.cpp @@ -32,6 +32,7 @@ #include #include +#include "ConfigManager.h" #include "Engine.h" #include "gui_templates.h" #include "InstrumentPlayHandle.h" @@ -46,7 +47,7 @@ #include "ToolTip.h" #include "FileDialog.h" -#include "embed.cpp" +#include "embed.h" diff --git a/plugins/vibed/CMakeLists.txt b/plugins/vibed/CMakeLists.txt index c092e874ea2..b0e812d805b 100644 --- a/plugins/vibed/CMakeLists.txt +++ b/plugins/vibed/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(vibedstrings vibed.cpp nine_button_selector.cpp string_container.cpp vibrating_string.cpp vibed.h nine_button_selector.h string_container.h vibrating_string.h MOCFILES vibed.h nine_button_selector.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(vibedstrings vibed.cpp nine_button_selector.cpp string_container.cpp vibrating_string.cpp vibed.h nine_button_selector.h string_container.h vibrating_string.h MOCFILES vibed.h nine_button_selector.h EMBEDDED_RESOURCES *.png) diff --git a/plugins/vibed/vibed.cpp b/plugins/vibed/vibed.cpp index 7944958fb23..b3738ef2409 100644 --- a/plugins/vibed/vibed.cpp +++ b/plugins/vibed/vibed.cpp @@ -40,7 +40,7 @@ #include "volume.h" #include "Song.h" -#include "embed.cpp" +#include "embed.h" extern "C" diff --git a/plugins/watsyn/CMakeLists.txt b/plugins/watsyn/CMakeLists.txt index 1353b47caca..5aec12a46d2 100644 --- a/plugins/watsyn/CMakeLists.txt +++ b/plugins/watsyn/CMakeLists.txt @@ -2,4 +2,4 @@ INCLUDE(BuildPlugin) LINK_DIRECTORIES(${SAMPLERATE_LIBRARY_DIRS}) LINK_LIBRARIES(${SAMPLERATE_LIBRARIES}) -BUILD_PLUGIN(watsyn Watsyn.cpp Watsyn.h MOCFILES Watsyn.h EMBEDDED_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.png) +BUILD_PLUGIN(watsyn Watsyn.cpp Watsyn.h MOCFILES Watsyn.h EMBEDDED_RESOURCES *.png) diff --git a/plugins/watsyn/Watsyn.cpp b/plugins/watsyn/Watsyn.cpp index dab399e72c6..40d64a4c437 100644 --- a/plugins/watsyn/Watsyn.cpp +++ b/plugins/watsyn/Watsyn.cpp @@ -35,7 +35,7 @@ #include "Mixer.h" #include "interpolation.h" -#include "embed.cpp" +#include "embed.h" extern "C" { diff --git a/plugins/waveshaper/CMakeLists.txt b/plugins/waveshaper/CMakeLists.txt index da44322d2c2..860bfd00e2e 100644 --- a/plugins/waveshaper/CMakeLists.txt +++ b/plugins/waveshaper/CMakeLists.txt @@ -1,3 +1,3 @@ INCLUDE(BuildPlugin) -BUILD_PLUGIN(waveshaper waveshaper.cpp waveshaper_controls.cpp waveshaper_control_dialog.cpp MOCFILES waveshaper_controls.h waveshaper_control_dialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(waveshaper waveshaper.cpp waveshaper_controls.cpp waveshaper_control_dialog.cpp MOCFILES waveshaper_controls.h waveshaper_control_dialog.h EMBEDDED_RESOURCES *.png) diff --git a/plugins/waveshaper/waveshaper.cpp b/plugins/waveshaper/waveshaper.cpp index df09456dde9..0d6c1302965 100644 --- a/plugins/waveshaper/waveshaper.cpp +++ b/plugins/waveshaper/waveshaper.cpp @@ -26,7 +26,7 @@ #include "waveshaper.h" #include "lmms_math.h" -#include "embed.cpp" +#include "embed.h" #include "interpolation.h" @@ -42,7 +42,7 @@ Plugin::Descriptor PLUGIN_EXPORT waveshaper_plugin_descriptor = "Vesa Kivimäki ", 0x0100, Plugin::Effect, - new PluginPixmapLoader( "logo" ), + new PluginPixmapLoader("logo"), NULL, NULL } ; diff --git a/plugins/zynaddsubfx/CMakeLists.txt b/plugins/zynaddsubfx/CMakeLists.txt index 541b8cf2a17..d0e810c0b4a 100644 --- a/plugins/zynaddsubfx/CMakeLists.txt +++ b/plugins/zynaddsubfx/CMakeLists.txt @@ -146,7 +146,7 @@ IF(LMMS_BUILD_LINUX) ELSE() SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${PLUGIN_DIR}") ENDIF() -BUILD_PLUGIN(zynaddsubfx ZynAddSubFx.cpp ZynAddSubFx.h MOCFILES ZynAddSubFx.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +BUILD_PLUGIN(zynaddsubfx ZynAddSubFx.cpp ZynAddSubFx.h MOCFILES ZynAddSubFx.h EMBEDDED_RESOURCES artwork.png logo.png) TARGET_LINK_LIBRARIES(zynaddsubfx -lZynAddSubFxCore) ADD_DEPENDENCIES(zynaddsubfx ZynAddSubFxCore) diff --git a/plugins/zynaddsubfx/ZynAddSubFx.cpp b/plugins/zynaddsubfx/ZynAddSubFx.cpp index 47da5147c8f..275f0952d75 100644 --- a/plugins/zynaddsubfx/ZynAddSubFx.cpp +++ b/plugins/zynaddsubfx/ZynAddSubFx.cpp @@ -46,7 +46,7 @@ #include "Mixer.h" #include "ControllerConnection.h" -#include "embed.cpp" +#include "embed.h" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 32bdc17888b..19106d917c5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -41,12 +41,12 @@ IF(WIN32) DEPENDS "${CMAKE_BINARY_DIR}/lmms.rc") ENDIF() -SET(lmms_EMBEDDED_RESOURCES +INCLUDE(GenQrc) +ADD_GEN_QRC(LMMS_RCC_OUT lmms.qrc "${CMAKE_SOURCE_DIR}/doc/AUTHORS" "${CMAKE_SOURCE_DIR}/LICENSE.txt" - "${CMAKE_SOURCE_DIR}/doc/CONTRIBUTORS") -SET(LMMS_ER_H "${CMAKE_CURRENT_BINARY_DIR}/embedded_resources.h") -ADD_CUSTOM_COMMAND(OUTPUT "${LMMS_ER_H}" COMMAND "${BIN2RES}" ARGS ${lmms_EMBEDDED_RESOURCES} > "\"${LMMS_ER_H}\"" DEPENDS bin2res) + "${CMAKE_SOURCE_DIR}/doc/CONTRIBUTORS" +) # Paths relative to lmms executable FILE(RELATIVE_PATH LIB_DIR_RELATIVE "/${BIN_DIR}" "/${LIB_DIR}") @@ -89,28 +89,25 @@ IF(CMAKE_VERSION VERSION_GREATER "2.8.7") ${LMMS_SRCS} ${LMMS_INCLUDES} ${LMMS_UI_OUT} - ${LMMS_ER_H} + ${LMMS_RCC_OUT} ) ADD_EXECUTABLE(lmms core/main.cpp $ "${WINRC}" ) - - SET(iwyu include-what-you-use -Xiwyu --mapping_file=/usr/share/include-what-you-use/qt5_4.imp) - #SET_PROPERTY(TARGET lmmsobjs PROPERTY CXX_INCLUDE_WHAT_YOU_USE ${iwyu}) ELSE() ADD_EXECUTABLE(lmms core/main.cpp ${LMMS_SRCS} ${LMMS_INCLUDES} ${LMMS_UI_OUT} - ${LMMS_ER_H} + ${LMMS_RCC_OUT} "${WINRC}" ) ENDIF() -SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${LMMS_ER_H} ${LMMS_UI_OUT} lmmsconfig.h lmms.1.gz") +SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${LMMS_RCC_OUT} ${LMMS_UI_OUT} lmmsconfig.h lmms.1.gz") IF(LMMS_BUILD_WIN32) SET(EXTRA_LIBRARIES "-lwinmm") diff --git a/src/gui/GuiApplication.cpp b/src/gui/GuiApplication.cpp index 5315a66a977..448dd740e2d 100644 --- a/src/gui/GuiApplication.cpp +++ b/src/gui/GuiApplication.cpp @@ -40,6 +40,7 @@ #include "SongEditor.h" #include +#include #include #include @@ -65,6 +66,10 @@ GuiApplication::GuiApplication() ConfigManager::inst()->createWorkingDir(); } // Init style and palette + QDir::addSearchPath("artwork", ConfigManager::inst()->artworkDir()); + QDir::addSearchPath("artwork", ConfigManager::inst()->defaultArtworkDir()); + QDir::addSearchPath("artwork", ":/artwork"); + LmmsStyle* lmmsstyle = new LmmsStyle(); QApplication::setStyle(lmmsstyle); diff --git a/src/gui/embed.cpp b/src/gui/embed.cpp index c574ea4dd7c..af298bec30a 100644 --- a/src/gui/embed.cpp +++ b/src/gui/embed.cpp @@ -22,92 +22,58 @@ * */ - -#include -#include +#include #include +#include +#include #include "embed.h" -#ifndef PLUGIN_NAME namespace embed -#else -namespace PLUGIN_NAME -#endif -{ - -namespace { - static QHash s_pixmapCache; -} -#include "embedded_resources.h" - -QPixmap getIconPixmap( const char * pixmapName, int width, int height ) +QPixmap getIconPixmap(const QString& pixmapName, int width, int height ) { - if( width == -1 || height == -1 ) + QString cacheName; + if (width > 0 && height > 0) { - // Return cached pixmap - QPixmap cached = s_pixmapCache.value( pixmapName ); - if( !cached.isNull() ) - { - return cached; - } - - // Or try to load it - QList formats = QImageReader::supportedImageFormats(); - QList candidates; - QPixmap pixmap; - QString name; - int i; - - for ( i = 0; i < formats.size() && pixmap.isNull(); ++i ) - { - candidates << QString( pixmapName ) + "." + formats.at( i ).data(); - } + cacheName = QString("%1_%2_%3").arg(pixmapName, width, height); + } + else + { + cacheName = pixmapName; + } -#ifdef PLUGIN_NAME - for ( i = 0; i < candidates.size() && pixmap.isNull(); ++i ) { - name = candidates.at( i ); - pixmap = QPixmap( "resources:plugins/" STRINGIFY( PLUGIN_NAME ) "_" + name ); - } -#endif - for ( i = 0; i < candidates.size() && pixmap.isNull(); ++i ) { - name = candidates.at( i ); - pixmap = QPixmap( "resources:" + name ); - } - - for ( i = 0; i < candidates.size() && pixmap.isNull(); ++i ) { - name = candidates.at( i ); - const embed::descriptor & e = - findEmbeddedData( name.toUtf8().constData() ); - // found? - if( name == e.name ) - { - pixmap.loadFromData( e.data, e.size ); - } - } - - // Fallback - if( pixmap.isNull() ) - { - pixmap = QPixmap( 1, 1 ); - } - // Save to cache and return - s_pixmapCache.insert( pixmapName, pixmap ); + // Return cached pixmap + QPixmap pixmap; + if( QPixmapCache::find(cacheName, &pixmap) ) + { return pixmap; } + QImageReader reader(QString("artwork:%1").arg(pixmapName)); + + if (width > 0 && height > 0) + { + reader.setScaledSize(QSize(width, height)); + } + + pixmap = QPixmap::fromImageReader(&reader); + if (pixmap.isNull()) + { + qWarning().nospace() << "Error loading icon pixmap " << pixmapName << ": " << + reader.errorString().toLocal8Bit().data(); + return QPixmap(1,1); + } - return getIconPixmap( pixmapName ). - scaled( width, height, Qt::IgnoreAspectRatio, - Qt::SmoothTransformation ); + // Save to cache and return + QPixmapCache::insert(cacheName, pixmap); + return pixmap; } -QString getText( const char * _name ) +QString getText( const char * name ) { - const embed::descriptor & e = findEmbeddedData( _name ); - return QString::fromUtf8( (const char *) e.data, e.size ); + return QString::fromUtf8( (const char*) QResource(QString(":/%1").arg(name)).data()); }