Skip to content

Commit baa8209

Browse files
committed
feat: enhance updater functionality and improve plugin integration
1 parent 23d7a90 commit baa8209

5 files changed

Lines changed: 17 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,8 @@ if(APPLE AND ELEMENT_ENABLE_UPDATER)
7676
string(APPEND ELEMENT_APP_PLIST_TO_MERGE "<string>${SPARKLE_PUBLIC_KEY}</string>")
7777

7878
string(APPEND ELEMENT_APP_PLIST_TO_MERGE "</dict></plist>")
79-
message(${ELEMENT_APP_PLIST_TO_MERGE})
8079
endif()
8180

82-
8381
juce_add_gui_app(element_app
8482
PRODUCT_NAME "${ELEMENT_STANDALONE_PRODUCT_NAME}"
8583
BUILD_VERSION "${ELEMENT_BUILD_NUMBER}"
@@ -109,7 +107,9 @@ else()
109107
target_link_libraries(element_app PRIVATE ${SPARKLE_FRAMEWORK})
110108
target_sources(element_app PRIVATE src/sparkle.mm)
111109
add_custom_command(TARGET element_app POST_BUILD
112-
COMMAND ${CMAKE_COMMAND} -E copy_directory
110+
COMMAND ${CMAKE_COMMAND} -E rm -rf
111+
"$<TARGET_BUNDLE_CONTENT_DIR:element_app>/Frameworks/Sparkle.framework"
112+
COMMAND /usr/bin/ditto
113113
"${SPARKLE_FRAMEWORK}"
114114
"$<TARGET_BUNDLE_CONTENT_DIR:element_app>/Frameworks/Sparkle.framework")
115115
# Set rpath to find Sparkle.framework in app bundle

src/plugins/effect.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ juce::AudioProcessor* JUCE_CALLTYPE createPluginFilter()
99
element::PluginProcessor::Effect, 16);
1010
}
1111

12+
#if ELEMENT_UPDATER
1213
#include "./pluginupdater.cc"
14+
#endif

src/plugins/instrument.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ juce::AudioProcessor* JUCE_CALLTYPE createPluginFilter()
99
element::PluginProcessor::Instrument, 16);
1010
}
1111

12+
#if ELEMENT_UPDATER
1213
#include "./pluginupdater.cc"
14+
#endif

src/plugins/midieffect.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ juce::AudioProcessor* JUCE_CALLTYPE createPluginFilter()
99
element::PluginProcessor::MidiEffect, 0);
1010
}
1111

12+
#if ELEMENT_UPDATER
1213
#include "./pluginupdater.cc"
14+
#endif

src/ui/updater.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,14 @@ class Updater::Updates : public juce::Thread,
199199
std::vector<UpdatePackage> cachedPackages;
200200
};
201201

202+
#if ! ELEMENT_UPDATER
203+
std::unique_ptr<Updater> Updater::create()
204+
{
205+
std::unique_ptr<Updater> u (new Updater());
206+
return u;
207+
}
208+
#endif
209+
202210
Updater::Updater()
203211
{
204212
updates = std::make_unique<Updates> (*this);

0 commit comments

Comments
 (0)