You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(10) |
Sep
|
Oct
|
Nov
|
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(1) |
Feb
(2) |
Mar
(3) |
Apr
(2) |
May
(10) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2008 |
Jan
(6) |
Feb
(4) |
Mar
(5) |
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(4) |
Aug
(6) |
Sep
(2) |
Oct
(9) |
Nov
(1) |
Dec
(4) |
2009 |
Jan
(9) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(6) |
Jun
(18) |
Jul
(33) |
Aug
(39) |
Sep
(33) |
Oct
(24) |
Nov
(23) |
Dec
(22) |
2010 |
Jan
(29) |
Feb
(32) |
Mar
(51) |
Apr
(17) |
May
(31) |
Jun
(21) |
Jul
(32) |
Aug
(28) |
Sep
(35) |
Oct
(27) |
Nov
(11) |
Dec
(13) |
2011 |
Jan
(14) |
Feb
(13) |
Mar
(27) |
Apr
(27) |
May
(28) |
Jun
(20) |
Jul
(43) |
Aug
(52) |
Sep
(66) |
Oct
(61) |
Nov
(11) |
Dec
(8) |
2012 |
Jan
(20) |
Feb
(30) |
Mar
(38) |
Apr
(21) |
May
(33) |
Jun
(21) |
Jul
(25) |
Aug
(9) |
Sep
(24) |
Oct
(42) |
Nov
(27) |
Dec
(41) |
2013 |
Jan
(20) |
Feb
(35) |
Mar
(156) |
Apr
(298) |
May
(258) |
Jun
(201) |
Jul
(105) |
Aug
(60) |
Sep
(193) |
Oct
(245) |
Nov
(280) |
Dec
(194) |
2014 |
Jan
(63) |
Feb
(202) |
Mar
(200) |
Apr
(23) |
May
(53) |
Jun
(105) |
Jul
(18) |
Aug
(26) |
Sep
(110) |
Oct
(187) |
Nov
(97) |
Dec
(74) |
2015 |
Jan
(45) |
Feb
(55) |
Mar
(116) |
Apr
(116) |
May
(193) |
Jun
(164) |
Jul
(50) |
Aug
(111) |
Sep
(98) |
Oct
(71) |
Nov
(103) |
Dec
(63) |
2016 |
Jan
(33) |
Feb
(101) |
Mar
(182) |
Apr
(139) |
May
(140) |
Jun
(103) |
Jul
(165) |
Aug
(286) |
Sep
(208) |
Oct
(127) |
Nov
(97) |
Dec
(54) |
2017 |
Jan
(64) |
Feb
(335) |
Mar
(202) |
Apr
(212) |
May
(139) |
Jun
(127) |
Jul
(294) |
Aug
(154) |
Sep
(170) |
Oct
(152) |
Nov
(156) |
Dec
(62) |
2018 |
Jan
(168) |
Feb
(237) |
Mar
(196) |
Apr
(174) |
May
(174) |
Jun
(161) |
Jul
(127) |
Aug
(88) |
Sep
(149) |
Oct
(66) |
Nov
(52) |
Dec
(135) |
2019 |
Jan
(146) |
Feb
(126) |
Mar
(104) |
Apr
(58) |
May
(60) |
Jun
(28) |
Jul
(197) |
Aug
(129) |
Sep
(141) |
Oct
(148) |
Nov
(63) |
Dec
(100) |
2020 |
Jan
(74) |
Feb
(37) |
Mar
(59) |
Apr
(154) |
May
(194) |
Jun
(133) |
Jul
(313) |
Aug
(197) |
Sep
(49) |
Oct
(162) |
Nov
(143) |
Dec
(57) |
2021 |
Jan
(120) |
Feb
(107) |
Mar
(314) |
Apr
(157) |
May
(524) |
Jun
(169) |
Jul
(72) |
Aug
(133) |
Sep
(135) |
Oct
(146) |
Nov
(198) |
Dec
(325) |
2022 |
Jan
(409) |
Feb
(249) |
Mar
(138) |
Apr
(95) |
May
(102) |
Jun
(221) |
Jul
(66) |
Aug
(120) |
Sep
(192) |
Oct
(131) |
Nov
(53) |
Dec
(171) |
2023 |
Jan
(357) |
Feb
(82) |
Mar
(168) |
Apr
(218) |
May
(196) |
Jun
(86) |
Jul
(115) |
Aug
(49) |
Sep
(190) |
Oct
(102) |
Nov
(45) |
Dec
(76) |
2024 |
Jan
(86) |
Feb
(50) |
Mar
(324) |
Apr
(209) |
May
(197) |
Jun
(232) |
Jul
(194) |
Aug
(247) |
Sep
(219) |
Oct
(266) |
Nov
(328) |
Dec
(304) |
2025 |
Jan
(191) |
Feb
(115) |
Mar
(137) |
Apr
(32) |
May
(126) |
Jun
(403) |
Jul
(213) |
Aug
(158) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@op...> - 2024-08-05 13:00:44
|
Author: manx Date: Mon Aug 5 15:00:32 2024 New Revision: 21330 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21330 Log: Merged revision(s) 21327 from trunk/OpenMPT: [Var] ASIO::Modern: Update to v0.12.9 ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/include/asiomodern/OpenMPT.txt branches/OpenMPT-1.31/include/asiomodern/include/ASIOModern/ASIOConfig.hpp branches/OpenMPT-1.31/include/asiomodern/include/ASIOModern/ASIOVersion.hpp branches/OpenMPT-1.31/include/asiomodern/include/ASIOModern/ASIOstdcxx20bit.hpp Modified: branches/OpenMPT-1.31/include/asiomodern/OpenMPT.txt ============================================================================== --- branches/OpenMPT-1.31/include/asiomodern/OpenMPT.txt Mon Aug 5 14:52:35 2024 (r21329) +++ branches/OpenMPT-1.31/include/asiomodern/OpenMPT.txt Mon Aug 5 15:00:32 2024 (r21330) @@ -1 +1 @@ -ASIO::Modern v0.12.8 +ASIO::Modern v0.12.9 Modified: branches/OpenMPT-1.31/include/asiomodern/include/ASIOModern/ASIOConfig.hpp ============================================================================== --- branches/OpenMPT-1.31/include/asiomodern/include/ASIOModern/ASIOConfig.hpp Mon Aug 5 14:52:35 2024 (r21329) +++ branches/OpenMPT-1.31/include/asiomodern/include/ASIOModern/ASIOConfig.hpp Mon Aug 5 15:00:32 2024 (r21330) @@ -46,6 +46,17 @@ #endif +#if ASIO_COMPILER_MSVC +#if defined(_MSVC_LANG) +#define ASIO_CXX_VERSION _MSVC_LANG +#else +#define ASIO_CXX_VERSION __cplusplus +#endif +#else +#define ASIO_CXX_VERSION __cplusplus +#endif + + #if ASIO_COMPILER_MSVC || ASIO_COMPILER_CLANG || ASIO_COMPILER_GCC || ASIO_SYSTEM_WINDOWS // assume #pragma pack support on Windows #define ASIO_HAVE_PRAGMA_PACK 1 Modified: branches/OpenMPT-1.31/include/asiomodern/include/ASIOModern/ASIOVersion.hpp ============================================================================== --- branches/OpenMPT-1.31/include/asiomodern/include/ASIOModern/ASIOVersion.hpp Mon Aug 5 14:52:35 2024 (r21329) +++ branches/OpenMPT-1.31/include/asiomodern/include/ASIOModern/ASIOVersion.hpp Mon Aug 5 15:00:32 2024 (r21330) @@ -17,7 +17,7 @@ #define ASIO_MODERNSDK_VERSION_MAJOR 0 #define ASIO_MODERNSDK_VERSION_MINOR 12 -#define ASIO_MODERNSDK_VERSION_PATCH 8 +#define ASIO_MODERNSDK_VERSION_PATCH 9 #define ASIO_MODERNSDK_VERSION_BUILD 0 Modified: branches/OpenMPT-1.31/include/asiomodern/include/ASIOModern/ASIOstdcxx20bit.hpp ============================================================================== --- branches/OpenMPT-1.31/include/asiomodern/include/ASIOModern/ASIOstdcxx20bit.hpp Mon Aug 5 14:52:35 2024 (r21329) +++ branches/OpenMPT-1.31/include/asiomodern/include/ASIOModern/ASIOstdcxx20bit.hpp Mon Aug 5 15:00:32 2024 (r21330) @@ -9,7 +9,7 @@ -#if (__cplusplus > 202000L) +#if (ASIO_CXX_VERSION >= 202002L) #include <bit> namespace ASIO { inline namespace ASIO_VERSION_NAMESPACE { |
From: <sv...@op...> - 2024-08-05 12:52:42
|
Author: manx Date: Mon Aug 5 14:52:35 2024 New Revision: 21329 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21329 Log: [Fix] Work-around VS2017 quirk. Modified: trunk/OpenMPT/mptrack/Vstplug.cpp Modified: trunk/OpenMPT/mptrack/Vstplug.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp Mon Aug 5 14:49:22 2024 (r21328) +++ trunk/OpenMPT/mptrack/Vstplug.cpp Mon Aug 5 14:52:35 2024 (r21329) @@ -263,7 +263,7 @@ while((childID = CVstPlugin::DispatchSEH(maskCrashes, *effect, Vst::effShellGetNextPlugin, 0, 0, name.data(), 0.0f, exception)) != 0) { name[63] = 0; - result.shellPlugins.emplace_back(name.data(), static_cast<uint32>(childID)); + result.shellPlugins.emplace_back(LoadResult::ShellPlugin{name.data(), static_cast<uint32>(childID)}); if(static_cast<uint32>(childID) == plugin.shellPluginID) shellPlugIndex = result.shellPlugins.size(); |
From: <sv...@op...> - 2024-08-05 12:49:29
|
Author: manx Date: Mon Aug 5 14:49:22 2024 New Revision: 21328 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21328 Log: [Fix] Cont.contains(Elem) is C++20, use mpt::contains(Cont, Elem) instead. Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp ============================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Mon Aug 5 12:56:24 2024 (r21327) +++ trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Mon Aug 5 14:49:22 2024 (r21328) @@ -832,7 +832,7 @@ size_t deleted = 0; for(const auto &[id, i] : existingCandidates) { - if(!containedIDs.contains(id) && !pluginList[i - deleted]->pPluginsList) + if(!mpt::contains(containedIDs, id) && !pluginList[i - deleted]->pPluginsList) { MPT_ASSERT(pluginList[i - deleted]->shellPluginID == id); pluginList.erase(pluginList.begin() + i - deleted); |
From: <sv...@op...> - 2024-08-05 10:56:31
|
Author: manx Date: Mon Aug 5 12:56:24 2024 New Revision: 21327 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21327 Log: [Var] ASIO::Modern: Update to v0.12.9 Modified: trunk/OpenMPT/include/asiomodern/OpenMPT.txt trunk/OpenMPT/include/asiomodern/include/ASIOModern/ASIOConfig.hpp trunk/OpenMPT/include/asiomodern/include/ASIOModern/ASIOVersion.hpp trunk/OpenMPT/include/asiomodern/include/ASIOModern/ASIOstdcxx20bit.hpp Modified: trunk/OpenMPT/include/asiomodern/OpenMPT.txt ============================================================================== --- trunk/OpenMPT/include/asiomodern/OpenMPT.txt Sun Aug 4 23:58:03 2024 (r21326) +++ trunk/OpenMPT/include/asiomodern/OpenMPT.txt Mon Aug 5 12:56:24 2024 (r21327) @@ -1 +1 @@ -ASIO::Modern v0.12.8 +ASIO::Modern v0.12.9 Modified: trunk/OpenMPT/include/asiomodern/include/ASIOModern/ASIOConfig.hpp ============================================================================== --- trunk/OpenMPT/include/asiomodern/include/ASIOModern/ASIOConfig.hpp Sun Aug 4 23:58:03 2024 (r21326) +++ trunk/OpenMPT/include/asiomodern/include/ASIOModern/ASIOConfig.hpp Mon Aug 5 12:56:24 2024 (r21327) @@ -46,6 +46,17 @@ #endif +#if ASIO_COMPILER_MSVC +#if defined(_MSVC_LANG) +#define ASIO_CXX_VERSION _MSVC_LANG +#else +#define ASIO_CXX_VERSION __cplusplus +#endif +#else +#define ASIO_CXX_VERSION __cplusplus +#endif + + #if ASIO_COMPILER_MSVC || ASIO_COMPILER_CLANG || ASIO_COMPILER_GCC || ASIO_SYSTEM_WINDOWS // assume #pragma pack support on Windows #define ASIO_HAVE_PRAGMA_PACK 1 Modified: trunk/OpenMPT/include/asiomodern/include/ASIOModern/ASIOVersion.hpp ============================================================================== --- trunk/OpenMPT/include/asiomodern/include/ASIOModern/ASIOVersion.hpp Sun Aug 4 23:58:03 2024 (r21326) +++ trunk/OpenMPT/include/asiomodern/include/ASIOModern/ASIOVersion.hpp Mon Aug 5 12:56:24 2024 (r21327) @@ -17,7 +17,7 @@ #define ASIO_MODERNSDK_VERSION_MAJOR 0 #define ASIO_MODERNSDK_VERSION_MINOR 12 -#define ASIO_MODERNSDK_VERSION_PATCH 8 +#define ASIO_MODERNSDK_VERSION_PATCH 9 #define ASIO_MODERNSDK_VERSION_BUILD 0 Modified: trunk/OpenMPT/include/asiomodern/include/ASIOModern/ASIOstdcxx20bit.hpp ============================================================================== --- trunk/OpenMPT/include/asiomodern/include/ASIOModern/ASIOstdcxx20bit.hpp Sun Aug 4 23:58:03 2024 (r21326) +++ trunk/OpenMPT/include/asiomodern/include/ASIOModern/ASIOstdcxx20bit.hpp Mon Aug 5 12:56:24 2024 (r21327) @@ -9,7 +9,7 @@ -#if (__cplusplus > 202000L) +#if (ASIO_CXX_VERSION >= 202002L) #include <bit> namespace ASIO { inline namespace ASIO_VERSION_NAMESPACE { |
From: <sv...@op...> - 2024-08-04 21:58:18
|
Author: sagamusix Date: Sun Aug 4 23:58:03 2024 New Revision: 21326 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21326 Log: [New] Can now load shell VST plugins (https://bugs.openmpt.org/view.php?id=1551). [Mod] OpenMPT: Version is now 1.32.00.22 Modified: trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/ModDocTemplate.cpp trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/SelectPluginDialog.cpp trunk/OpenMPT/mptrack/SelectPluginDialog.h trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/mptrack/TrackerSettings.h trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/mptrack/Vstplug.h trunk/OpenMPT/mptrack/mod2midi.cpp trunk/OpenMPT/pluginBridge/Bridge.cpp trunk/OpenMPT/pluginBridge/Bridge.h trunk/OpenMPT/pluginBridge/BridgeOpCodes.h trunk/OpenMPT/soundlib/plugins/PluginManager.cpp trunk/OpenMPT/soundlib/plugins/PluginManager.h trunk/OpenMPT/soundlib/plugins/PluginStructs.h Modified: trunk/OpenMPT/common/versionNumber.h ============================================================================== --- trunk/OpenMPT/common/versionNumber.h Sun Aug 4 23:52:56 2024 (r21325) +++ trunk/OpenMPT/common/versionNumber.h Sun Aug 4 23:58:03 2024 (r21326) @@ -18,6 +18,6 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 32 #define VER_MINOR 00 -#define VER_MINORMINOR 21 +#define VER_MINORMINOR 22 OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/ModDocTemplate.cpp ============================================================================== --- trunk/OpenMPT/mptrack/ModDocTemplate.cpp Sun Aug 4 23:52:56 2024 (r21325) +++ trunk/OpenMPT/mptrack/ModDocTemplate.cpp Sun Aug 4 23:58:03 2024 (r21326) @@ -134,14 +134,15 @@ { if(auto plugManager = theApp.GetPluginManager(); plugManager != nullptr) { - if(auto plugLib = plugManager->AddPlugin(filename, TrackerSettings::Instance().BrokenPluginsWorkaroundVSTMaskAllCrashes); plugLib != nullptr) + bool isPlugin = false; + for(VSTPluginLib *plugLib : plugManager->AddPlugin(filename, TrackerSettings::Instance().BrokenPluginsWorkaroundVSTMaskAllCrashes)) { + isPlugin = true; if(!CSelectPluginDlg::VerifyPlugin(plugLib, nullptr)) - { plugManager->RemovePlugin(plugLib); - } - return nullptr; } + if(isPlugin) + return nullptr; } } Modified: trunk/OpenMPT/mptrack/Mptrack.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp Sun Aug 4 23:52:56 2024 (r21325) +++ trunk/OpenMPT/mptrack/Mptrack.cpp Sun Aug 4 23:58:03 2024 (r21326) @@ -2287,9 +2287,15 @@ /////////////////////////////////////////////////////////////////////////////////// // -// DirectX Plugins +// Restore / save plugin list // +static const auto PLUGFORMAT_FILENAME = MPT_UFORMAT("Plugin{}"); +static const auto PLUGFORMAT_TAGS = MPT_UFORMAT("Plugin{}.Tags"); +static const auto PLUGFORMAT_TAGS_BUILTIN = MPT_UFORMAT("Plugin{}{}.Tags"); +static const auto PLUGFORMAT_LIBNAME = MPT_UFORMAT("Plugin{}.LibraryName"); +static const auto PLUGFORMAT_SHELLID = MPT_UFORMAT("Plugin{}.ShellPluginID"); + void CTrackApp::InitializeDXPlugins() { m_pPluginManager = new CVstPluginManager; @@ -2298,17 +2304,17 @@ bool maskCrashes = TrackerSettings::Instance().BrokenPluginsWorkaroundVSTMaskAllCrashes; std::vector<VSTPluginLib *> nonFoundPlugs; - const mpt::PathString failedPlugin = GetSettings().Read<mpt::PathString>(U_("VST Plugins"), U_("FailedPlugin"), P_("")); + const mpt::PathString failedPlugin = GetSettings().Read<mpt::PathString>(U_("VST Plugins"), U_("FailedPlugin")); + ConfirmAnswer skipFailed = cnfCancel; CDialog pluginScanDlg; CWnd *textWnd = nullptr; DWORD64 scanStart = Util::GetTickCount64(); // Read tags for built-in plugins - for(auto plug : *m_pPluginManager) + for(auto &plug : *m_pPluginManager) { - mpt::ustring key = MPT_UFORMAT("Plugin{}{}.Tags")(mpt::ufmt::HEX0<8>(plug->pluginId1), mpt::ufmt::HEX0<8>(plug->pluginId2)); - plug->tags = GetSettings().Read<mpt::ustring>(U_("VST Plugins"), key, mpt::ustring()); + plug->tags = GetSettings().Read<mpt::ustring>(U_("VST Plugins"), PLUGFORMAT_TAGS_BUILTIN(mpt::ufmt::HEX0<8>(plug->pluginId1), mpt::ufmt::HEX0<8>(plug->pluginId2))); } // Restructured plugin cache @@ -2319,58 +2325,68 @@ } m_pPluginManager->reserve(numPlugins); - auto plugIDFormat = MPT_UFORMAT("Plugin{}"); auto scanFormat = MPT_CFORMAT("Scanning Plugin {} / {}...\n{}"); - auto tagFormat = MPT_UFORMAT("Plugin{}.Tags"); for(size_t plug = 0; plug < numPlugins; plug++) { - mpt::PathString plugPath = GetSettings().Read<mpt::PathString>(U_("VST Plugins"), plugIDFormat(plug), mpt::PathString()); - if(!plugPath.empty()) - { - plugPath = PathInstallRelativeToAbsolute(plugPath); + const mpt::PathString plugPath = PathInstallRelativeToAbsolute(GetSettings().Read<mpt::PathString>(U_("VST Plugins"), PLUGFORMAT_FILENAME(plug))); + if(plugPath.empty()) + continue; - if(!pluginScanDlg.m_hWnd && Util::GetTickCount64() >= scanStart + 2000) + if(!pluginScanDlg.m_hWnd && Util::GetTickCount64() >= scanStart + 2000) + { + // If this is taking too long, show the user what they're waiting for. + pluginScanDlg.Create(IDD_SCANPLUGINS, gpSplashScreen); + pluginScanDlg.ShowWindow(SW_SHOW); + pluginScanDlg.CenterWindow(gpSplashScreen); + textWnd = pluginScanDlg.GetDlgItem(IDC_SCANTEXT); + } else if(pluginScanDlg.m_hWnd && Util::GetTickCount64() >= scanStart + 30) + { + textWnd->SetWindowText(scanFormat(plug + 1, numPlugins + 1, plugPath)); + MSG msg; + while(::PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) { - // If this is taking too long, show the user what they're waiting for. - pluginScanDlg.Create(IDD_SCANPLUGINS, gpSplashScreen); - pluginScanDlg.ShowWindow(SW_SHOW); - pluginScanDlg.CenterWindow(gpSplashScreen); - textWnd = pluginScanDlg.GetDlgItem(IDC_SCANTEXT); - } else if(pluginScanDlg.m_hWnd && Util::GetTickCount64() >= scanStart + 30) - { - textWnd->SetWindowText(scanFormat(plug + 1, numPlugins + 1, plugPath)); - MSG msg; - while(::PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - { - ::TranslateMessage(&msg); - ::DispatchMessage(&msg); - } - scanStart = Util::GetTickCount64(); + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); } + scanStart = Util::GetTickCount64(); + } - if(plugPath == failedPlugin) + if(plugPath == failedPlugin) + { + GetSettings().Remove(U_("VST Plugins"), U_("FailedPlugin")); + if(skipFailed == cnfCancel) { - GetSettings().Remove(U_("VST Plugins"), U_("FailedPlugin")); - const CString text = _T("The following plugin has previously crashed OpenMPT during initialisation:\n\n") + failedPlugin.ToCString() + _T("\n\nDo you still want to load it?"); - if(Reporting::Confirm(text, false, true, &pluginScanDlg) == cnfNo) - { - continue; - } + const CString text = MPT_CFORMAT("The following plugin has previously crashed OpenMPT during initialisation:\n\n{}\n\nDo you still want to load it?") + (failedPlugin.ToCString()); + skipFailed = Reporting::Confirm(text, false, true, &pluginScanDlg); } - mpt::ustring plugTags = GetSettings().Read<mpt::ustring>(U_("VST Plugins"), tagFormat(plug), mpt::ustring()); + if(skipFailed == cnfNo) + continue; + } - bool plugFound = true; - VSTPluginLib *lib = m_pPluginManager->AddPlugin(plugPath, maskCrashes, plugTags, true, &plugFound); - if(!plugFound && lib != nullptr) - { - nonFoundPlugs.push_back(lib); - } - if(lib != nullptr && lib->libraryName == P_("MIDI Input Output") && lib->pluginId1 == PLUGMAGIC('V','s','t','P') && lib->pluginId2 == PLUGMAGIC('M','M','I','D')) + const uint32 shellPluginID = mpt::parse_hex<uint32>(GetSettings().Read<mpt::ustring>(U_("VST Plugins"), PLUGFORMAT_SHELLID(plug))); + bool plugFound = true; + for(VSTPluginLib *lib : m_pPluginManager->AddPlugin(plugPath, maskCrashes, true, &plugFound, shellPluginID)) + { + if(lib->libraryName == P_("MIDI Input Output") && lib->pluginId1 == PLUGMAGIC('V', 's', 't', 'P') && lib->pluginId2 == PLUGMAGIC('M', 'M', 'I', 'D') && !lib->shellPluginID) { // This appears to be an old version of our MIDI I/O plugin, which is now built right into the main executable. m_pPluginManager->RemovePlugin(lib); + continue; + } + if(!plugFound) + nonFoundPlugs.push_back(lib); + if(shellPluginID && lib->shellPluginID != shellPluginID) + continue; + + lib->tags = GetSettings().Read<mpt::ustring>(U_("VST Plugins"), PLUGFORMAT_TAGS(plug)); + if(shellPluginID != 0) + { + if(mpt::PathString libName = GetSettings().Read<mpt::PathString>(U_("VST Plugins"), PLUGFORMAT_LIBNAME(plug)); !libName.empty()) + lib->libraryName = std::move(libName); } + } } GetPluginCache().Flush(); @@ -2392,24 +2408,34 @@ #ifndef NO_PLUGINS size_t plugIndex = 0; - for(auto plug : *m_pPluginManager) + for(auto &plug : *m_pPluginManager) { if(!plug->isBuiltIn) { - mpt::PathString plugPath = plug->dllPath; + mpt::PathString plugPath; if(theApp.IsPortableMode()) + plugPath = PathAbsoluteToInstallRelative(plug->dllPath); + else + plugPath = plug->dllPath; + + const auto libName = PLUGFORMAT_LIBNAME(plugIndex), shellID = PLUGFORMAT_SHELLID(plugIndex); + if(plug->shellPluginID != 0) + { + theApp.GetSettings().Write(U_("VST Plugins"), libName, plug->libraryName); + theApp.GetSettings().Write(U_("VST Plugins"), shellID, mpt::ufmt::HEX0<8>(plug->shellPluginID)); + } else { - plugPath = PathAbsoluteToInstallRelative(plugPath); + theApp.GetSettings().Remove(U_("VST Plugins"), libName); + theApp.GetSettings().Remove(U_("VST Plugins"), shellID); } - theApp.GetSettings().Write<mpt::PathString>(U_("VST Plugins"), MPT_UFORMAT("Plugin{}")(plugIndex), plugPath); - theApp.GetSettings().Write(U_("VST Plugins"), MPT_UFORMAT("Plugin{}.Tags")(plugIndex), plug->tags); + theApp.GetSettings().Write<mpt::PathString>(U_("VST Plugins"), PLUGFORMAT_FILENAME(plugIndex), plugPath); + theApp.GetSettings().Write(U_("VST Plugins"), PLUGFORMAT_TAGS(plugIndex), plug->tags); plugIndex++; } else { - mpt::ustring key = MPT_UFORMAT("Plugin{}{}.Tags")(mpt::ufmt::HEX0<8>(plug->pluginId1), mpt::ufmt::HEX0<8>(plug->pluginId2)); - theApp.GetSettings().Write(U_("VST Plugins"), key, plug->tags); + theApp.GetSettings().Write(U_("VST Plugins"), PLUGFORMAT_TAGS_BUILTIN(mpt::ufmt::HEX0<8>(plug->pluginId1), mpt::ufmt::HEX0<8>(plug->pluginId2)), plug->tags); } } theApp.GetSettings().Write(U_("VST Plugins"), U_("NumPlugins"), static_cast<uint32>(plugIndex)); Modified: trunk/OpenMPT/mptrack/SelectPluginDialog.cpp ============================================================================== --- trunk/OpenMPT/mptrack/SelectPluginDialog.cpp Sun Aug 4 23:52:56 2024 (r21325) +++ trunk/OpenMPT/mptrack/SelectPluginDialog.cpp Sun Aug 4 23:58:03 2024 (r21326) @@ -156,6 +156,7 @@ m_pPlugin->SetOutputPlugin(oldOutput); m_pPlugin->Info.dwPluginId1 = pFactory->pluginId1; m_pPlugin->Info.dwPluginId2 = pFactory->pluginId2; + m_pPlugin->Info.shellPluginID = pFactory->shellPluginID; m_pPlugin->editorX = m_pPlugin->editorY = int32_min; m_pPlugin->SetAutoSuspend(TrackerSettings::Instance().enableAutoSuspend); @@ -216,7 +217,7 @@ if(changed) { if(m_pPlugin->Info.dwPluginId2) - TrackerSettings::Instance().gnPlugWindowLast = m_pPlugin->Info.dwPluginId2; + TrackerSettings::Instance().lastSelectedPlugin = {static_cast<uint32>(m_pPlugin->Info.dwPluginId1), static_cast<uint32>(m_pPlugin->Info.dwPluginId2), m_pPlugin->Info.shellPluginID}; if(m_pModDoc) { m_pModDoc->UpdateAllViews(nullptr, PluginHint(static_cast<PLUGINDEX>(m_nPlugSlot + 1)).Info().Names()); @@ -349,7 +350,7 @@ }; PlugMatchQuality foundPlugin = kNoMatch; - const int32 lastPluginID = TrackerSettings::Instance().gnPlugWindowLast; + const auto lastPluginID = TrackerSettings::Instance().lastSelectedPlugin.Get(); const bool nameFilterActive = !m_nameFilter.empty(); const auto currentTags = mpt::split(m_nameFilter, U_(" ")); @@ -357,11 +358,11 @@ { bool first = true; - for(auto p : *pManager) + for(auto &p : *pManager) { MPT_ASSERT(p); const VSTPluginLib &plug = *p; - if(plug.category == PluginCategory::Hidden && (m_pPlugin == nullptr || m_pPlugin->pMixPlugin == nullptr || &m_pPlugin->pMixPlugin->GetPluginFactory() != p)) + if(plug.category == PluginCategory::Hidden && (m_pPlugin == nullptr || m_pPlugin->pMixPlugin == nullptr || &m_pPlugin->pMixPlugin->GetPluginFactory() != p.get())) continue; if(nameFilterActive) @@ -445,12 +446,16 @@ { // Plugin with matching ID to current slot's plug if(plug.pluginId1 == m_pPlugin->Info.dwPluginId1 - && plug.pluginId2 == m_pPlugin->Info.dwPluginId2) + && plug.pluginId2 == m_pPlugin->Info.dwPluginId2 + && plug.shellPluginID == m_pPlugin->Info.shellPluginID) { currentPlug = h; foundPlugin = kSameIdAsCurrent; } - } else if(plug.pluginId2 == lastPluginID && foundPlugin < kSameIdAsLastWithPlatformMatch) + } else if(static_cast<uint32>(plug.pluginId1) == lastPluginID.pluginID1 + && static_cast<uint32>(plug.pluginId2) == lastPluginID.pluginID2 + && plug.shellPluginID == lastPluginID.shellPluginID + && foundPlugin < kSameIdAsLastWithPlatformMatch) { // Previously selected plugin #ifdef MPT_WITH_VST @@ -689,8 +694,7 @@ for(const auto &file : dlg.GetFilenames()) { - VSTPluginLib *lib = plugManager->AddPlugin(file, TrackerSettings::Instance().BrokenPluginsWorkaroundVSTMaskAllCrashes, mpt::ustring(), false); - if(lib != nullptr) + for(VSTPluginLib *lib : plugManager->AddPlugin(file, TrackerSettings::Instance().BrokenPluginsWorkaroundVSTMaskAllCrashes, false)) { update = true; if(!VerifyPlugin(lib, this)) @@ -701,7 +705,7 @@ plugLib = lib; // If this plugin was missing anywhere, try loading it - ReloadMissingPlugins(lib); + ReloadMissingPlugins(*lib); } } } @@ -726,9 +730,9 @@ UpdatePluginsList(plugLib); // If any of the plugins was missing anywhere, try loading it - for(auto p : *theApp.GetPluginManager()) + for(auto &p : *theApp.GetPluginManager()) { - ReloadMissingPlugins(p); + ReloadMissingPlugins(*p); } } @@ -763,8 +767,7 @@ ::DispatchMessage(&msg); } - VSTPluginLib *lib = pManager->AddPlugin(fileName, maskCrashes, mpt::ustring(), false); - if(lib) + for(VSTPluginLib *lib : pManager->AddPlugin(fileName, maskCrashes, false)) { update = true; if(!VerifyPlugin(lib, parent)) @@ -793,7 +796,7 @@ // After adding new plugins, check if they were missing in any open songs. -void CSelectPluginDlg::ReloadMissingPlugins(const VSTPluginLib *lib) const +void CSelectPluginDlg::ReloadMissingPlugins(const VSTPluginLib &lib) const { CVstPluginManager *plugManager = theApp.GetPluginManager(); auto docs = theApp.GetOpenDocuments(); @@ -804,8 +807,9 @@ for(auto &plugin : sndFile.m_MixPlugins) { if(plugin.pMixPlugin == nullptr - && plugin.Info.dwPluginId1 == lib->pluginId1 - && plugin.Info.dwPluginId2 == lib->pluginId2) + && plugin.Info.dwPluginId1 == lib.pluginId1 + && plugin.Info.dwPluginId2 == lib.pluginId2 + && plugin.Info.shellPluginID == lib.shellPluginID) { updateDoc = true; plugManager->CreateMixPlugin(plugin, sndFile); Modified: trunk/OpenMPT/mptrack/SelectPluginDialog.h ============================================================================== --- trunk/OpenMPT/mptrack/SelectPluginDialog.h Sun Aug 4 23:52:56 2024 (r21325) +++ trunk/OpenMPT/mptrack/SelectPluginDialog.h Sun Aug 4 23:58:03 2024 (r21326) @@ -69,7 +69,7 @@ VSTPluginLib *GetSelectedPlugin(); void SaveWindowPos() const; - void ReloadMissingPlugins(const VSTPluginLib *lib) const; + void ReloadMissingPlugins(const VSTPluginLib &lib) const; void UpdatePluginsList(const VSTPluginLib *forceSelect = nullptr); Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp ============================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp Sun Aug 4 23:52:56 2024 (r21325) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp Sun Aug 4 23:58:03 2024 (r21326) @@ -187,7 +187,7 @@ , gnPlugWindowY(conf, U_("Display"), U_("PlugSelectWindowY"), 273) , gnPlugWindowWidth(conf, U_("Display"), U_("PlugSelectWindowWidth"), 450) , gnPlugWindowHeight(conf, U_("Display"), U_("PlugSelectWindowHeight"), 540) - , gnPlugWindowLast(conf, U_("Display"), U_("PlugSelectWindowLast"), 0) + , lastSelectedPlugin(conf, U_("Display"), U_("PlugSelectWindowLast"), {}) , gnMsgBoxVisiblityFlags(conf, U_("Display"), U_("MsgBoxVisibilityFlags"), uint32_max) , GUIUpdateInterval(conf, U_("Display"), U_("GUIUpdateInterval"), 0) , FSUpdateInterval(conf, U_("Display"), U_("FSUpdateInterval"), 500) Modified: trunk/OpenMPT/mptrack/TrackerSettings.h ============================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.h Sun Aug 4 23:52:56 2024 (r21325) +++ trunk/OpenMPT/mptrack/TrackerSettings.h Sun Aug 4 23:58:03 2024 (r21326) @@ -178,7 +178,7 @@ template<> inline EQPreset FromSettingValue(const SettingValue &val) { ASSERT(val.GetTypeTag() == "EQPreset"); - EQPresetPacked valpacked = DecodeBinarySetting<EQPresetPacked>(val.as<std::vector<std::byte> >()); + EQPresetPacked valpacked = DecodeBinarySetting<EQPresetPacked>(val.as<std::vector<std::byte>>()); EQPreset valresult; std::memcpy(valresult.szName, valpacked.szName, std::size(valresult.szName)); std::copy(valpacked.Gains, valpacked.Gains + MAX_EQ_BANDS, valresult.Gains); @@ -209,7 +209,7 @@ std::array<NoteType, notesPerChord - 1> notes; // Additional chord notes }; -using MPTChords = std::array<MPTChord, 60>; // Size == kcCommandSetNumNotes +using MPTChords = std::array<MPTChord, 60>; // Size == kcCommandSetNumNotes + 1 // MIDI recording enum RecordAftertouchOptions @@ -278,7 +278,7 @@ public: enum { - defaultSize = 10, // In percent + defaultSize = 10, // In percent }; SampleUndoBufferSize(int32 percent = defaultSize) : sizePercent(percent) { CalculateSize(); } @@ -292,6 +292,15 @@ template<> inline SampleUndoBufferSize FromSettingValue(const SettingValue &val) { return SampleUndoBufferSize(val.as<int32>()); } +struct LastPluginID +{ + uint32 pluginID1, pluginID2, shellPluginID; +}; + +template<> inline SettingValue ToSettingValue(const LastPluginID &val) { return EncodeBinarySetting(val); } +template<> inline LastPluginID FromSettingValue(const SettingValue &val) { return DecodeBinarySetting<LastPluginID>(val.as<std::vector<std::byte>>()); } + + mpt::ustring IgnoredCCsToString(const std::bitset<128> &midiIgnoreCCs); std::bitset<128> StringToIgnoredCCs(const mpt::ustring &in); @@ -673,7 +682,7 @@ Setting<int32> gnPlugWindowY; Setting<int32> gnPlugWindowWidth; Setting<int32> gnPlugWindowHeight; - Setting<int32> gnPlugWindowLast; // Last selected plugin ID + Setting<LastPluginID> lastSelectedPlugin; Setting<uint32> gnMsgBoxVisiblityFlags; Setting<uint32> GUIUpdateInterval; Modified: trunk/OpenMPT/mptrack/Vstplug.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp Sun Aug 4 23:52:56 2024 (r21325) +++ trunk/OpenMPT/mptrack/Vstplug.cpp Sun Aug 4 23:58:03 2024 (r21326) @@ -42,6 +42,7 @@ OPENMPT_NAMESPACE_BEGIN static VstTimeInfo g_timeInfoFallback = {}; +static int32 g_shellPluginToLoad = 0; #ifdef MPT_ALL_LOGGING #define VST_LOG @@ -98,7 +99,19 @@ } -AEffect *CVstPlugin::LoadPlugin(bool maskCrashes, VSTPluginLib &plugin, HMODULE &library, BridgeMode bridgeMode) +static bool IsValidPlugin(const AEffect *effect) +{ + return effect && effect->magic == Vst::kEffectMagic && effect->dispatcher != nullptr; +} + + +static bool IsBridged(const AEffect &effect) +{ + return !memcmp(&effect.reservedForHost2, "OMPT", 4); +} + + +std::pair<Vst::AEffect *, Vst::MainProc> CVstPlugin::LoadPluginInternal(bool maskCrashes, VSTPluginLib &plugin, HMODULE &library, BridgeMode bridgeMode) { const mpt::PathString &pluginPath = plugin.dllPath; @@ -117,7 +130,7 @@ effect = BridgeWrapper::Create(plugin, false); if(effect != nullptr) { - return effect; + return {effect, nullptr}; } } catch(BridgeWrapper::BridgeNotFoundException &) { @@ -134,7 +147,7 @@ effect = BridgeWrapper::Create(plugin, bridgeMode == BridgeMode::DetectRequiredBridgeMode); if(effect != nullptr) { - return effect; + return {effect, nullptr}; } } catch(BridgeWrapper::BridgeNotFoundException &) { @@ -142,7 +155,7 @@ if(!isNative) { Reporting::Error("Could not locate the plugin bridge executable, which is required for running non-native plugins.", "OpenMPT Plugin Bridge"); - return nullptr; + return {nullptr, nullptr}; } } catch(BridgeWrapper::BridgeException &e) { @@ -154,12 +167,12 @@ (plugin.dllPath, mpt::get_exception_text<mpt::ustring>(e)); if(Reporting::Confirm(msg, _T("OpenMPT Plugin Bridge")) == cnfNo) { - return nullptr; + return {nullptr, nullptr}; } } else { Reporting::Error(mpt::get_exception_text<mpt::ustring>(e), "OpenMPT Plugin Bridge"); - return nullptr; + return {nullptr, nullptr}; } } // If plugin was marked to use the plugin bridge but this somehow doesn't work (e.g. because the bridge is missing), @@ -177,7 +190,7 @@ if(exception) { CVstPluginManager::ReportPlugException(MPT_UFORMAT("Exception caught while loading {}")(pluginPath)); - return nullptr; + return {nullptr, nullptr}; } } if(library == nullptr) @@ -185,7 +198,7 @@ DWORD error = GetLastError(); if(error == ERROR_MOD_NOT_FOUND) { - return nullptr; + return {nullptr, nullptr}; } else if(error == ERROR_DLL_INIT_FAILED) { // A likely reason for this error is that Fiber Local Storage slots are exhausted, e.g. because too many plugins ship with a statically linked runtime. @@ -206,11 +219,9 @@ if(library != nullptr && library != INVALID_HANDLE_VALUE) { - auto pMainProc = (Vst::MainProc)GetProcAddress(library, "VSTPluginMain"); + auto pMainProc = reinterpret_cast<Vst::MainProc>(GetProcAddress(library, "VSTPluginMain")); if(pMainProc == nullptr) - { - pMainProc = (Vst::MainProc)GetProcAddress(library, "main"); - } + pMainProc = reinterpret_cast<Vst::MainProc>(GetProcAddress(library, "main")); if(pMainProc != nullptr) { @@ -218,23 +229,107 @@ ExceptionHandler::Context ectx{ MPT_UFORMAT("VST Plugin: {}")(plugin.dllPath.ToUnicode()) }; ExceptionHandler::ContextSetter ectxguard{&ectx}; #endif // MODPLUG_TRACKER - DWORD exception = SETryOrError(maskCrashes, [&](){ effect = pMainProc(CVstPlugin::MasterCallBack); }); - if(exception) - { - return nullptr; - } + if(!SETryOrError(maskCrashes, [&]() { effect = pMainProc(CVstPlugin::MasterCallBack); })) + return {effect, pMainProc}; } else { #ifdef VST_LOG MPT_LOG_GLOBAL(LogDebug, "VST", MPT_UFORMAT("Entry point not found! (handle={})")(mpt::ufmt::PTR(library))); #endif // VST_LOG - return nullptr; } } + return {nullptr, nullptr}; +} + - return effect; +CVstPlugin::LoadResult CVstPlugin::LoadPlugin(bool maskCrashes, VSTPluginLib &plugin, BridgeMode bridgeMode, unsigned long &exception) +{ + LoadResult result{}; + auto [effectPtr, mainProc] = LoadPluginInternal(maskCrashes, plugin, result.library, bridgeMode); + result.effect = effectPtr; + result.mainProc = mainProc; + if(!IsValidPlugin(result.effect)) + return result; + + Vst::AEffect *effect = result.effect; + result.magic = effect->magic; + result.uniqueID = effect->uniqueID; + + size_t shellPlugIndex = 0; + if(static_cast<PluginCategory>(DispatchSEH(maskCrashes, *effect, Vst::effGetPlugCategory, 0, 0, nullptr, 0, exception)) == PluginCategory::Shell) + { + std::vector<char> name(256, 0); // 64 chars officially supported, but our plugin bridge assumes 256 chars max for all strings + intptr_t childID; + while((childID = CVstPlugin::DispatchSEH(maskCrashes, *effect, Vst::effShellGetNextPlugin, 0, 0, name.data(), 0.0f, exception)) != 0) + { + name[63] = 0; + result.shellPlugins.emplace_back(name.data(), static_cast<uint32>(childID)); + + if(static_cast<uint32>(childID) == plugin.shellPluginID) + shellPlugIndex = result.shellPlugins.size(); + } + } + + if(plugin.shellPluginID) + { + if(!shellPlugIndex) + { + result.effect = nullptr; + Reporting::Error(MPT_UFORMAT("The shell plugin \"{}\" does not contain \"{}\".") + (plugin.dllPath.ToUnicode(), plugin.libraryName)); + } else + { + SelectShellPlugin(maskCrashes, result, plugin); + effect = result.effect; + } + } + + return result; +} + + +bool CVstPlugin::SelectShellPlugin(bool maskCrashes, LoadResult &loadResult, const VSTPluginLib &plugin) +{ + if(!loadResult.effect) + return false; + + g_shellPluginToLoad = plugin.shellPluginID; + if(IsBridged(*loadResult.effect)) + { + loadResult.effect->dispatcher(loadResult.effect, Vst::effVendorSpecific, kVendorOpenMPT, kCallVSTPluginMain, nullptr, 0.0f); + } else + { + unsigned long exception = 0; + if(loadResult.effect) + CVstPlugin::DispatchSEH(maskCrashes, *loadResult.effect, Vst::effClose, 0, 0, nullptr, 0.0f, exception); + exception = SETryOrError(maskCrashes, [&]() { loadResult.effect = loadResult.mainProc(CVstPlugin::MasterCallBack); }); + } + g_shellPluginToLoad = 0; + + if(!IsValidPlugin(loadResult.effect)) + loadResult.effect = nullptr; + return loadResult.effect != nullptr; } + +void CVstPlugin::GetPluginMetadata(bool maskCrashes, LoadResult &loadResult, VSTPluginLib &plugin) +{ + std::vector<char> vendor(256, 0); + unsigned long exception = 0; + CVstPlugin::DispatchSEH(maskCrashes, *loadResult.effect, Vst::effGetVendorString, 0, 0, vendor.data(), 0.0f, exception); + vendor.back() = '\0'; + plugin.vendor = mpt::ToCString(mpt::Charset::Locale, vendor.data()); + + if(CVstPlugin::IsInstrument(*loadResult.effect)) + plugin.category = PluginCategory::Synth; + else + plugin.category = static_cast<PluginCategory>(DispatchSEH(maskCrashes, *loadResult.effect, Vst::effGetPlugCategory, 0, 0, nullptr, 0.0f, exception)); + + if(plugin.category >= PluginCategory::NumCategories) + plugin.category = PluginCategory::Unknown; +} + + static void operator|= (Vst::VstTimeInfoFlags &lhs, Vst::VstTimeInfoFlags rhs) { lhs = (lhs | rhs).as_enum(); @@ -253,9 +348,9 @@ enum { - HostDoNotKnow = 0, - HostCanDo = 1, - HostCanNotDo = -1 + HostDoNotKnow = 0, + HostCanDo = 1, + HostCanNotDo = -1 }; CVstPlugin *pVstPlugin = nullptr; @@ -283,9 +378,11 @@ return kVstVersion; // Returns the unique id of a plugin that's currently loading - // We don't support shell plugins currently, so we only support one effect ID as well. case audioMasterCurrentId: - return (effect != nullptr) ? effect->uniqueID : 0; + if(pVstPlugin && pVstPlugin->m_pMixStruct) + return pVstPlugin->m_pMixStruct->Info.shellPluginID ? pVstPlugin->m_pMixStruct->Info.shellPluginID : effect->uniqueID; + else + return g_shellPluginToLoad; // Call application idle routine (this will call effEditIdle for all open editors too) case audioMasterIdle: @@ -594,7 +691,8 @@ || !strcmp((char *)ptr, HostCanDo::openFileSelector) || !strcmp((char *)ptr, HostCanDo::closeFileSelector) || !strcmp((char *)ptr, HostCanDo::acceptIOChanges) - || !strcmp((char *)ptr, HostCanDo::reportConnectionChanges)) + || !strcmp((char *)ptr, HostCanDo::reportConnectionChanges) + || !strcmp((char *)ptr, HostCanDo::shellCategory)) { return HostCanDo; } else @@ -881,7 +979,7 @@ , m_isInitialized(false) , m_needIdle(false) , timeInfo{} - , isBridged(!memcmp(&effect.reservedForHost2, "OMPT", 4)) + , isBridged(IsBridged(effect)) { // Open plugin and initialize data structures Initialize(); @@ -892,18 +990,13 @@ void CVstPlugin::Initialize() { - m_Ectx = { MPT_UFORMAT("VST Plugin: {}")(m_Factory.dllPath.ToUnicode()) }; - // If filename matched during load but plugin ID didn't, make sure it's updated. - m_pMixStruct->Info.dwPluginId1 = m_Factory.pluginId1 = m_Effect.magic; - m_pMixStruct->Info.dwPluginId2 = m_Factory.pluginId2 = m_Effect.uniqueID; - // Store a pointer so we can get the CVstPlugin object from the basic VST effect object. m_Effect.reservedForHost1 = this; m_nSampleRate = m_SndFile.GetSampleRate(); - // First try to let the plugin know the render parameters. + // First try to let the plugin know the render parameters. (added in r6457, but I have no recollection of which plugins needed this!) Dispatch(effSetSampleRate, 0, 0, nullptr, static_cast<float>(m_nSampleRate)); Dispatch(effSetBlockSize, 0, MIXBUFFERSIZE, nullptr, 0.0f); @@ -1085,12 +1178,12 @@ // Wrapper for VST dispatch call with structured exception handling. -intptr_t CVstPlugin::DispatchSEH(bool maskCrashes, AEffect *effect, VstOpcodeToPlugin opCode, int32 index, intptr_t value, void *ptr, float opt, unsigned long &exception) +intptr_t CVstPlugin::DispatchSEH(bool maskCrashes, AEffect &effect, VstOpcodeToPlugin opCode, int32 index, intptr_t value, void *ptr, float opt, unsigned long &exception) { - if(effect->dispatcher != nullptr) + if(effect.dispatcher != nullptr) { intptr_t result = 0; - DWORD e = SETryOrError(maskCrashes, [&](){ result = effect->dispatcher(effect, opCode, index, value, ptr, opt); }); + DWORD e = SETryOrError(maskCrashes, [&](){ result = effect.dispatcher(&effect, opCode, index, value, ptr, opt); }); if(e) { exception = e; @@ -1704,9 +1797,15 @@ } +bool CVstPlugin::IsInstrument(Vst::AEffect &effect) +{ + return (effect.flags & effFlagsIsSynth) || !effect.numInputs; +} + + bool CVstPlugin::IsInstrument() const { - return ((m_Effect.flags & effFlagsIsSynth) || (!m_Effect.numInputs)); + return IsInstrument(m_Effect); } Modified: trunk/OpenMPT/mptrack/Vstplug.h ============================================================================== --- trunk/OpenMPT/mptrack/Vstplug.h Sun Aug 4 23:52:56 2024 (r21325) +++ trunk/OpenMPT/mptrack/Vstplug.h Sun Aug 4 23:58:03 2024 (r21326) @@ -30,6 +30,7 @@ class CSoundFile; struct SNDMIXPLUGIN; struct VSTPluginLib; +enum class PluginCategory : uint8; class CVstPlugin final : public IMidiPlugin @@ -84,9 +85,28 @@ DetectRequiredBridgeMode, }; - static Vst::AEffect *LoadPlugin(bool maskCrashes, VSTPluginLib &plugin, HMODULE &library, BridgeMode bridgeMode); + struct LoadResult + { + struct ShellPlugin + { + std::string name; + uint32 shellPluginID = 0; + }; + + Vst::AEffect *effect = nullptr; + Vst::MainProc mainProc = nullptr; + HMODULE library = nullptr; + int32 magic = 0, uniqueID = 0; + std::vector<ShellPlugin> shellPlugins; + }; + + static LoadResult LoadPlugin(bool maskCrashes, VSTPluginLib &plugin, BridgeMode bridgeMode, unsigned long &exception); + static bool SelectShellPlugin(bool maskCrashes, LoadResult &loadResult, const VSTPluginLib &plugin); + static void GetPluginMetadata(bool maskCrashes, LoadResult &loadResult, VSTPluginLib &plugin); protected: + static std::pair<Vst::AEffect *, Vst::MainProc> LoadPluginInternal(bool maskCrashes, VSTPluginLib &plugin, HMODULE &library, BridgeMode bridgeMode); + void Initialize(); public: @@ -99,8 +119,6 @@ bool ProgramsAreChunks() const override { return (m_Effect.flags & Vst::effFlagsProgramChunks) != 0; } ChunkData GetChunk(bool isBank) override; void SetChunk(const ChunkData &chunk, bool isBank) override; - // If true, the plugin produces an output even if silence is being fed into it. - //bool ShouldProcessSilence() { return IsInstrument() || ((m_Effect.flags & effFlagsNoSoundInStop) == 0 && Dispatch(effGetTailSize, 0, 0, nullptr, 0.0f) != 1) override; } // Old JUCE versions set effFlagsNoSoundInStop even when the shouldn't (see various ValhallaDSP reverb plugins). While the user cannot change the plugin bypass setting manually yet, play safe with VST plugins and do not optimize. bool ShouldProcessSilence() override { return true; } @@ -120,7 +138,7 @@ CString GetParamLabel(PlugParamIndex param) override { return GetParamPropertyString(param, Vst::effGetParamLabel); }; CString GetParamDisplay(PlugParamIndex param) override { return GetParamPropertyString(param, Vst::effGetParamDisplay); }; - static intptr_t DispatchSEH(bool maskCrashes, Vst::AEffect *effect, Vst::VstOpcodeToPlugin opCode, int32 index, intptr_t value, void *ptr, float opt, unsigned long &exception); + static intptr_t DispatchSEH(bool maskCrashes, Vst::AEffect &effect, Vst::VstOpcodeToPlugin opCode, int32 index, intptr_t value, void *ptr, float opt, unsigned long &exception); intptr_t Dispatch(Vst::VstOpcodeToPlugin opCode, int32 index, intptr_t value, void *ptr, float opt); bool HasEditor() const override { return (m_Effect.flags & Vst::effFlagsHasEditor) != 0; } @@ -129,6 +147,7 @@ void Bypass(bool bypass = true) override; + static bool IsInstrument(Vst::AEffect &effect); bool IsInstrument() const override; bool CanRecieveMidiEvents() override; Modified: trunk/OpenMPT/mptrack/mod2midi.cpp ============================================================================== --- trunk/OpenMPT/mptrack/mod2midi.cpp Sun Aug 4 23:52:56 2024 (r21325) +++ trunk/OpenMPT/mptrack/mod2midi.cpp Sun Aug 4 23:58:03 2024 (r21326) @@ -440,7 +440,7 @@ public: Conversion(CSoundFile &sndFile, const InstrMap &instrMap, std::ostream &file, bool overlappingInstruments, const GetLengthType &songLength) : m_oldInstruments(sndFile.GetNumInstruments()) - , m_plugFactory(nullptr, true, {}, {}, {}) + , m_plugFactory(nullptr, true, {}, {}) , m_sndFile(sndFile) , m_file(file) , m_songLength(songLength) Modified: trunk/OpenMPT/pluginBridge/Bridge.cpp ============================================================================== --- trunk/OpenMPT/pluginBridge/Bridge.cpp Sun Aug 4 23:52:56 2024 (r21325) +++ trunk/OpenMPT/pluginBridge/Bridge.cpp Sun Aug 4 23:58:03 2024 (r21326) @@ -368,17 +368,15 @@ return; } - auto mainProc = (Vst::MainProc)GetProcAddress(m_library, "VSTPluginMain"); - if(mainProc == nullptr) - { - mainProc = (Vst::MainProc)GetProcAddress(m_library, "main"); - } + m_mainProc = reinterpret_cast<Vst::MainProc>(GetProcAddress(m_library, "VSTPluginMain")); + if(m_mainProc == nullptr) + m_mainProc = reinterpret_cast<Vst::MainProc>(GetProcAddress(m_library, "main")); - if(mainProc != nullptr) + if(m_mainProc != nullptr) { __try { - m_nativeEffect = mainProc(MasterCallback); + m_nativeEffect = m_mainProc(MasterCallback); } __except(EXCEPTION_EXECUTE_HANDLER) { m_nativeEffect = nullptr; @@ -624,6 +622,13 @@ } } break; + case kCallVSTPluginMain: + if(m_mainProc) + { + Dispatch(effClose, 0, 0, nullptr, 0.0f); + m_nativeEffect = m_mainProc(MasterCallback); + UpdateEffectStruct(); + } default: msg.result = 0; } Modified: trunk/OpenMPT/pluginBridge/Bridge.h ============================================================================== --- trunk/OpenMPT/pluginBridge/Bridge.h Sun Aug 4 23:52:56 2024 (r21325) +++ trunk/OpenMPT/pluginBridge/Bridge.h Sun Aug 4 23:58:03 2024 (r21326) @@ -34,6 +34,7 @@ // Plugin Vst::AEffect *m_nativeEffect = nullptr; + Vst::MainProc m_mainProc = nullptr; HMODULE m_library = nullptr; HWND m_window = nullptr; int m_windowWidth = 0, m_windowHeight = 0; Modified: trunk/OpenMPT/pluginBridge/BridgeOpCodes.h ============================================================================== --- trunk/OpenMPT/pluginBridge/BridgeOpCodes.h Sun Aug 4 23:52:56 2024 (r21325) +++ trunk/OpenMPT/pluginBridge/BridgeOpCodes.h Sun Aug 4 23:58:03 2024 (r21326) @@ -35,6 +35,8 @@ kBeginGetProgram, // Stop using parameter value cache kEndGetProgram, + // Call the VSTPluginMain entry point again (for shell plugins) + kCallVSTPluginMain, // Constant for identifying our vendor-specific opcodes kVendorOpenMPT = Vst::FourCC("OMPT"), Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp ============================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Sun Aug 4 23:52:56 2024 (r21325) +++ trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Sun Aug 4 23:58:03 2024 (r21326) @@ -242,7 +242,10 @@ pathStr = theApp.PathAbsoluteToInstallRelative(dllPath).ToUnicode(); else pathStr = dllPath.ToUnicode(); - + + if(shellPluginID) + pathStr += U_("|") + mpt::ufmt::HEX0<8>(shellPluginID); + // CRC is used to distinguish plugins sharing the same IDs const std::string crcName = mpt::ToCharset(mpt::Charset::UTF8, pathStr); const mpt::crc32 crc(crcName); @@ -350,19 +353,15 @@ pluginList.reserve(std::size(BuiltInPlugins)); for(const auto &plugin : BuiltInPlugins) { - VSTPluginLib *plug = new (std::nothrow) VSTPluginLib(plugin.createProc, true, mpt::PathString::FromUTF8(plugin.filename), mpt::PathString::FromUTF8(plugin.name)); - if(plug != nullptr) - { - pluginList.push_back(plug); - plug->pluginId1 = plugin.pluginId1; - plug->pluginId2 = plugin.pluginId2; - plug->category = plugin.category; - plug->isInstrument = plugin.isInstrument; + auto &plug = pluginList.emplace_back(std::make_unique<VSTPluginLib>(plugin.createProc, true, mpt::PathString::FromUTF8(plugin.filename), mpt::PathString::FromUTF8(plugin.name))); + plug->pluginId1 = plugin.pluginId1; + plug->pluginId2 = plugin.pluginId2; + plug->category = plugin.category; + plug->isInstrument = plugin.isInstrument; #ifdef MODPLUG_TRACKER - if(plugin.isOurs) - plug->vendor = _T("OpenMPT Project"); + if(plugin.isOurs) + plug->vendor = _T("OpenMPT Project"); #endif // MODPLUG_TRACKER - } } #ifdef MODPLUG_TRACKER @@ -382,7 +381,6 @@ plug->RemovePluginInstanceFromList(*pluginInstance); pluginInstance->Release(); } - delete plug; } #if defined(MPT_WITH_DMO) if(MustUnInitilizeCOM) @@ -396,7 +394,10 @@ bool CVstPluginManager::IsValidPlugin(const VSTPluginLib *pLib) const { - return mpt::contains(pluginList, pLib); + return std::find_if(pluginList.begin(), pluginList.end(), [pLib](const std::unique_ptr<VSTPluginLib> &value) + { + return value.get() == pLib; + }) != pluginList.end(); } @@ -444,24 +445,13 @@ if(ERROR_SUCCESS == RegQueryValueEx(hksub, nullptr, 0, &datatype, (LPBYTE)name, &datasize)) { - VSTPluginLib *plug = new (std::nothrow) VSTPluginLib(DMOPlugin::Create, true, mpt::PathString::FromNative(mpt::GUIDToString(clsid)), mpt::PathString::FromNative(ParseMaybeNullTerminatedStringFromBufferWithSizeInBytes<mpt::winstring>(name, datasize))); - if(plug != nullptr) - { - try - { - pluginList.push_back(plug); - plug->pluginId1 = kDmoMagic; - plug->pluginId2 = clsid.Data1; - plug->category = PluginCategory::DMO; - } catch(mpt::out_of_memory e) - { - mpt::delete_out_of_memory(e); - delete plug; - } + auto &plug = pluginList.emplace_back(std::make_unique<VSTPluginLib>(DMOPlugin::Create, true, mpt::PathString::FromNative(mpt::GUIDToString(clsid)), mpt::PathString::FromNative(ParseMaybeNullTerminatedStringFromBufferWithSizeInBytes<mpt::winstring>(name, datasize)))); + plug->pluginId1 = kDmoMagic; + plug->pluginId2 = clsid.Data1; + plug->category = PluginCategory::DMO; #ifdef DMO_LOG - MPT_LOG_GLOBAL(LogDebug, "DMO", MPT_UFORMAT("Found \"{}\" clsid={}\n")(plug->libraryName, plug->dllPath)); + MPT_LOG_GLOBAL(LogDebug, "DMO", MPT_UFORMAT("Found \"{}\" clsid={}\n")(plug->libraryName, plug->dllPath)); #endif - } } RegCloseKey(hksub); } @@ -475,74 +465,50 @@ } -// Extract instrument and category information from plugin. #ifdef MPT_WITH_VST -static void GetPluginInformation(bool maskCrashes, Vst::AEffect *effect, VSTPluginLib &library) +// Convert CVstPlugin::LoadResult into a collection of VSTPluginLibs. +static std::vector<VSTPluginLib> GetPluginInformation(VSTPluginLib plug, const CVstPlugin::LoadResult &loadResult) { - unsigned long exception = 0; - library.category = static_cast<PluginCategory>(CVstPlugin::DispatchSEH(maskCrashes, effect, Vst::effGetPlugCategory, 0, 0, nullptr, 0, exception)); - library.isInstrument = ((effect->flags & Vst::effFlagsIsSynth) || !effect->numInputs); + plug.pluginId1 = loadResult.magic; + plug.pluginId2 = loadResult.uniqueID; + plug.isInstrument = CVstPlugin::IsInstrument(*loadResult.effect); - if(library.isInstrument) + std::vector<VSTPluginLib> containedPlugins; + if(loadResult.shellPlugins.empty()) { - library.category = PluginCategory::Synth; - } else if(library.category >= PluginCategory::NumCategories) - { - library.category = PluginCategory::Unknown; - } - #ifdef MODPLUG_TRACKER - std::vector<char> s(256, 0); - CVstPlugin::DispatchSEH(maskCrashes, effect, Vst::effGetVendorString, 0, 0, s.data(), 0, exception); - library.vendor = mpt::ToCString(mpt::Charset::Locale, s.data()); -#endif // MODPLUG_TRACKER -} -#endif // MPT_WITH_VST - - -#ifdef MPT_WITH_VST -static bool TryLoadPlugin(bool maskCrashes, VSTPluginLib *plug, HINSTANCE hLib, unsigned long &exception) -{ - Vst::AEffect *pEffect = CVstPlugin::LoadPlugin(maskCrashes, *plug, hLib, CVstPlugin::BridgeMode::DetectRequiredBridgeMode); - if(!pEffect || pEffect->magic != Vst::kEffectMagic || !pEffect->dispatcher) + plug.WriteToCache(); +#endif // MODPLUG_TRACKER + containedPlugins.push_back(std::move(plug)); + } else { - return false; + for(auto &shellPlug : loadResult.shellPlugins) + { + plug.shellPluginID = shellPlug.shellPluginID; + plug.libraryName = mpt::PathString::FromLocale(shellPlug.name); +#ifdef MODPLUG_TRACKER + plug.WriteToCache(); +#endif // MODPLUG_TRACKER + containedPlugins.push_back(plug); + } } - CVstPlugin::DispatchSEH(maskCrashes, pEffect, Vst::effOpen, 0, 0, 0, 0, exception); - - plug->pluginId1 = pEffect->magic; - plug->pluginId2 = pEffect->uniqueID; - - GetPluginInformation(maskCrashes, pEffect, *plug); - -#ifdef VST_LOG - intptr_t nver = CVstPlugin::DispatchSEH(maskCrashes, pEffect, Vst::effGetVstVersion, 0,0, nullptr, 0, exception); - if (!nver) nver = pEffect->version; - MPT_LOG_GLOBAL(LogDebug, "VST", MPT_UFORMAT("{}: v{}.0, {} in, {} out, {} programs, {} params, flags=0x{} realQ={} offQ={}")( - plug->libraryName, nver, - pEffect->numInputs, pEffect->numOutputs, - mpt::ufmt::dec0<2>(pEffect->numPrograms), mpt::ufmt::dec0<2>(pEffect->numParams), - mpt::ufmt::HEX0<4>(static_cast<int32>(pEffect->flags)), pEffect->realQualities, pEffect->offQualities)); -#endif // VST_LOG - - CVstPlugin::DispatchSEH(maskCrashes, pEffect, Vst::effClose, 0, 0, 0, 0, exception); - - return true; + return containedPlugins; } -#endif // !NO_NVST +#endif // !NO_VST #ifdef MODPLUG_TRACKER // Add a plugin to the list of known plugins. -VSTPluginLib *CVstPluginManager::AddPlugin(const mpt::PathString &dllPath, bool maskCrashes, const mpt::ustring &tags, bool fromCache, bool *fileFound) +std::vector<VSTPluginLib *> CVstPluginManager::AddPlugin(const mpt::PathString &dllPath, bool maskCrashes, bool fromCache, bool *fileFound, uint32 shellPluginID) { const mpt::PathString fileName = dllPath.GetFilenameBase(); - // Check if this is already a known plugin. + // Check if this is already a known plugin for(const auto &dupePlug : pluginList) { - if(!mpt::PathCompareNoCase(dllPath, dupePlug->dllPath)) return dupePlug; + if(shellPluginID == dupePlug->shellPluginID && !mpt::PathCompareNoCase(dllPath, dupePlug->dllPath)) + return {dupePlug.get()}; } if(fileFound != nullptr) @@ -553,24 +519,23 @@ // Look if the plugin info is stored in the PluginCache if(fromCache) { - SettingsContainer & cacheFile = theApp.GetPluginCache(); + mpt::ustring shellStr; + if(shellPluginID) + shellStr = UL_("|") + mpt::ufmt::HEX0<8>(shellPluginID); + + SettingsContainer &cacheFile = theApp.GetPluginCache(); // First try finding the full path - mpt::ustring IDs = cacheFile.Read<mpt::ustring>(cacheSection, dllPath.ToUnicode(), U_("")); + mpt::ustring IDs = cacheFile.Read<mpt::ustring>(cacheSection, dllPath.ToUnicode() + shellStr, U_("")); if(IDs.length() < 16) { // If that didn't work out, find relative path mpt::PathString relPath = theApp.PathAbsoluteToInstallRelative(dllPath); - IDs = cacheFile.Read<mpt::ustring>(cacheSection, relPath.ToUnicode(), U_("")); + IDs = cacheFile.Read<mpt::ustring>(cacheSection, relPath.ToUnicode() + shellStr, U_("")); } if(IDs.length() >= 16) { - VSTPluginLib *plug = new (std::nothrow) VSTPluginLib(nullptr, false, dllPath, fileName, tags); - if(plug == nullptr) - { - return nullptr; - } - pluginList.push_back(plug); + auto &plug = pluginList.emplace_back(std::make_unique<VSTPluginLib>(nullptr, false, dllPath, fileName)); // Extract plugin IDs uint32 id1 = 0, id2 = 0; @@ -591,11 +556,12 @@ const mpt::ustring flagKey = IDs + U_(".Flags"); plug->DecodeCacheFlags(cacheFile.Read<int32>(cacheSection, flagKey, 0)); plug->vendor = cacheFile.Read<CString>(cacheSection, IDs + U_(".Vendor"), CString()); + plug->shellPluginID = shellPluginID; #ifdef VST_LOG MPT_LOG_GLOBAL(LogDebug, "VST", MPT_UFORMAT("Plugin \"{}\" found in PluginCache")(plug->libraryName)); #endif // VST_LOG - return plug; + return {plug.get()}; } else { #ifdef VST_LOG @@ -607,33 +573,41 @@ // If this key contains a file name on program launch, a plugin previously crashed OpenMPT. theApp.GetSettings().Write<mpt::PathString>(U_("VST Plugins"), U_("FailedPlugin"), dllPath, SettingWriteThrough); - bool validPlug = false; - - VSTPluginLib *plug = new (std::nothrow) VSTPluginLib(nullptr, false, dllPath, fileName, tags); - if(plug == nullptr) - { - return nullptr; - } + std::vector<VSTPluginLib *> foundPlugins; #ifdef MPT_WITH_VST unsigned long exception = 0; // Always scan plugins in a separate process - HINSTANCE hLib = NULL; { -#ifdef MODPLUG_TRACKER - ExceptionHandler::Context ectx{ MPT_UFORMAT("VST Plugin: {}")(plug->dllPath.ToUnicode()) }; + ExceptionHandler::Context ectx{ MPT_UFORMAT("VST Plugin: {}")(dllPath.ToUnicode()) }; ExceptionHandler::ContextSetter ectxguard{&ectx}; -#endif // MODPLUG_TRACKER - validPlug = TryLoadPlugin(maskCrashes, plug, hLib, exception); - } - if(hLib) - { - FreeLibrary(hLib); + VSTPluginLib plug{nullptr, false, dllPath, fileName}; + auto loadResult = CVstPlugin::LoadPlugin(maskCrashes, plug, CVstPlugin::BridgeMode::DetectRequiredBridgeMode, exception); + Vst::AEffect *pEffect = loadResult.effect; + if(pEffect) + { + foundPlugins = AddPluginsToList(GetPluginInformation(std::move(plug), loadResult), + [&](VSTPluginLib &library, bool updateExisting) + { + if(updateExisting) + return; + if(library.shellPluginID) + { + if(!CVstPlugin::SelectShellPlugin(maskCrashes, loadResult, library)) + return; + } + CVstPlugin::GetPluginMetadata(maskCrashes, loadResult, library); + }); + } + if(loadResult.library) + { + FreeLibrary(loadResult.library); + } } if(exception != 0) { - CVstPluginManager::ReportPlugException(MPT_UFORMAT("Exception {} while trying to load plugin \"{}\"!\n")(mpt::ufmt::HEX0<8>(exception), plug->libraryName)); + CVstPluginManager::ReportPlugException(MPT_UFORMAT("Exception {} while trying to load plugin \"{}\"!\n")(mpt::ufmt::HEX0<8>(exception), fileName)); } #endif // MPT_WITH_VST @@ -641,17 +615,7 @@ // Now it should be safe to assume that this plugin loaded properly. :) theApp.GetSettings().Remove(U_("VST Plugins"), U_("FailedPlugin")); - // If OK, write the information in PluginCache - if(validPlug) - { - pluginList.push_back(plug); - plug->WriteToCache(); - } else - { - delete plug; - } - - return (validPlug ? plug : nullptr); + return foundPlugins; } @@ -660,7 +624,7 @@ { for(const_iterator p = begin(); p != end(); p++) { - VSTPluginLib *plug = *p; + VSTPluginLib *plug = p->get(); if(plug == pFactory) { // Kill all instances of this plugin @@ -673,7 +637,6 @@ pluginInstance->Release(); } pluginList.erase(p); - delete plug; return true; } } @@ -696,7 +659,7 @@ kMatchNameAndId, }; - PlugMatchQuality match = kNoMatch; // "Match quality" of found plugin. Higher value = better match. + PlugMatchQuality match = kNoMatch; // "Match quality" of found plugin. Higher value = better match. #if MPT_OS_WINDOWS && !MPT_OS_WINDOWS_WINRT const mpt::PathString libraryName = mpt::PathString::FromUnicode(mixPlugin.GetLibraryName()); #else @@ -705,7 +668,8 @@ for(const auto &plug : pluginList) { const bool matchID = (plug->pluginId1 == mixPlugin.Info.dwPluginId1) - && (plug->pluginId2 == mixPlugin.Info.dwPluginId2); + && (plug->pluginId2 == mixPlugin.Info.dwPluginId2) + && (plug->shellPluginID == mixPlugin.Info.shellPluginID); #if MPT_OS_WINDOWS && !MPT_OS_WINDOWS_WINRT const bool matchName = !mpt::PathCompareNoCase(plug->libraryName, libraryName); #else @@ -714,7 +678,7 @@ if(matchID && matchName) { - pFound = plug; + pFound = plug.get(); #ifdef MPT_WITH_VST if(plug->IsNative(false)) { @@ -725,11 +689,11 @@ match = kMatchNameAndId; } else if(matchID && match < kMatchId) { - pFound = plug; + pFound = plug.get(); match = kMatchId; } else if(matchName && match < kMatchName) { - pFound = plug; + pFound = plug.get(); match = kMatchName; } } @@ -756,20 +720,19 @@ if(pFound) { bool maskCrashes = TrackerSettings::Instance().BrokenPluginsWorkaroundVSTMaskAllCrashes; - Vst::AEffect *pEffect = nullptr; - HINSTANCE hLibrary = nullptr; bool validPlugin = false; - pEffect = CVstPlugin::LoadPlugin(maskCrashes, *pFound, hLibrary, TrackerSettings::Instance().bridgeAllPlugins ? CVstPlugin::BridgeMode::ForceBridgeWithFallback : CVstPlugin::BridgeMode::Automatic); + unsigned long exception = 0; + auto loadResult = CVstPlugin::LoadPlugin(maskCrashes, *pFound, TrackerSettings::Instance().bridgeAllPlugins ? CVstPlugin::BridgeMode::ForceBridgeWithFallback : CVstPlugin::BridgeMode::Automatic, exception); + Vst::AEffect *pEffect = loadResult.effect; - if(pEffect != nullptr && pEffect->dispatcher != nullptr && pEffect->magic == Vst::kEffectMagic) + if(pEffect != nullptr) { - GetPluginInformation(maskCrashes, pEffect, *pFound); + // If filename matched during load but plugin ID didn't, make sure it's updated. + mixPlugin.Info.dwPluginId1 = pFound->pluginId1 = loadResult.magic; + mixPlugin.Info.dwPluginId2 = pFound->pluginId2 = loadResult.uniqueID; - // Update cached information - pFound->WriteToCache(); - - CVstPlugin *pVstPlug = new (std::nothrow) CVstPlugin(maskCrashes, hLibrary, *pFound, mixPlugin, *pEffect, sndFile); + CVstPlugin *pVstPlug = new (std::nothrow) CVstPlugin(maskCrashes, loadResult.library, *pFound, mixPlugin, *pEffect, sndFile); if(pVstPlug) { pFound->InsertPluginInstanceIntoList(*pVstPlug); @@ -777,11 +740,20 @@ validPlugin = (pVstPlug != nullptr); CriticalSection cs; mixPlugin.pMixPlugin = pVstPlug; + +#ifdef MODPLUG_TRACKER + AddPluginsToList(GetPluginInformation(*pFound, loadResult), + [&](VSTPluginLib &library, bool updateExisting) + { + if(&library == pFound && updateExisting) + CVstPlugin::GetPluginMetadata(maskCrashes, loadResult, library); + }); +#endif } - if(!validPlugin) + if(!validPlugin && loadResult.library) { - FreeLibrary(hLibrary); + FreeLibrary(loadResult.library); CVstPluginManager::ReportPlugException(MPT_UFORMAT("Unable to create plugin \"{}\"!\n")(pFound->libraryName)); } return validPlugin; @@ -798,6 +770,84 @@ } +#ifdef MPT_WITH_VST +std::vector<VSTPluginLib *> CVstPluginManager::AddPluginsToList(std::vector<VSTPluginLib> containedPlugins, std::function<void(VSTPluginLib &, bool)> updateFunc) +{ + std::vector<VSTPluginLib *> newPlugins; + if(containedPlugins.empty()) + return newPlugins; + + // Find existing shell plugins belonging to the same file first, so that we don't have to iterate through the whole plugin list again and again + std::map<uint32, size_t> existingCandidates; + for(size_t i = 0; i < pluginList.size(); i++) + { + const auto &plug = pluginList[i]; + if(plug->pluginId1 == containedPlugins.front().pluginId1 && plug->pluginId2 == containedPlugins.front().pluginId2) + { + if(!mpt::PathCompareNoCase(plug->dllPath, containedPlugins.front().dllPath)) + existingCandidates[plug->shellPluginID] = i; + } + } + + // Add found plugins to list or update them if they already exist + std::set<uint32> containedIDs; + VSTPluginLib *first = nullptr; + for(auto &containedPlug : containedPlugins) + { + containedIDs.insert(containedPlug.shellPluginID); + VSTPluginLib *found = nullptr; + if(auto it = existingCandidates.find(containedPlug.shellPluginID); it != existingCandidates.end()) + { + auto &plug = pluginList[it->second]; + MPT_ASSERT(plug->pluginId1 == containedPlug.pluginId1 && plug->pluginId2 == containedPlug.pluginId2); + if(plug->shellPluginID == containedPlug.shellPluginID) + found = plug.get(); + } + const bool updateExisting = found != nullptr; + if(updateExisting) + { + found->libraryName = containedPlug.libraryName; + } else + { + auto &plug = pluginList.emplace_back(std::make_unique<VSTPluginLib>(std::move(containedPlug))); + found = plug.get(); + newPlugins.push_back(found); + } + updateFunc(*found, updateExisting); + + if(found) + { + if(!first) + first = found; + +#ifdef MODPLUG_TRACKER + found->WriteToCache(); +#endif // MODPLUG_TRACKER + } + } + + // Are there any shell plugins in our list that are no longer part of the shell plugin? + if(containedPlugins.size() > 1) + { + size_t deleted = 0; + for(const auto &[id, i] : existingCandidates) + { + if(!containedIDs.contains(id) && !pluginList[i - deleted]->pPluginsList) + { + MPT_ASSERT(pluginList[i - deleted]->shellPluginID == id); + pluginList.erase(pluginList.begin() + i - deleted); + deleted++; + } + } + } + + if(newPlugins.empty() && first) + newPlugins.push_back(first); + return newPlugins; +} +#endif // MPT_WITH_VST + + #ifdef MODPLUG_TRACKER void CVstPluginManager::OnIdle() { Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.h ============================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginManager.h Sun Aug 4 23:52:56 2024 (r21325) +++ trunk/OpenMPT/soundlib/plugins/PluginManager.h Sun Aug 4 23:58:03 2024 (r21326) @@ -12,6 +12,8 @@ #include "openmpt/all/BuildSettings.hpp" +#include <functional> + OPENMPT_NAMESPACE_BEGIN constexpr int32 PLUGMAGIC(char a, char b, char c, char d) noexcept @@ -67,6 +69,7 @@ #endif // MODPLUG_TRACKER int32 pluginId1 = 0; // Plugin type (kEffectMagic, kDmoMagic, ...) int32 pluginId2 = 0; // Plugin unique ID + uint32 shellPluginID = 0; // ID of shell child plugin PluginCategory category = PluginCategory::Unknown; const bool isBuiltIn : 1; bool isInstrument : 1; @@ -75,22 +78,28 @@ mutable uint8 dllArch = 0; public: - VSTPluginLib(CreateProc factoryProc, bool isBuiltIn, const mpt::PathString &dllPath, const mpt::PathString &libraryName -#ifdef MODPLUG_TRACKER - , const mpt::ustring &tags = mpt::ustring(), const CString &vendor = CString() -#endif // MODPLUG_TRACKER - ) + VSTPluginLib(CreateProc factoryProc, bool isBuiltIn, mpt::PathString dllPath, mpt::PathString libraryName) : Create(factoryProc) - , libraryName(libraryName), dllPath(dllPath) -#ifdef MODPLUG_TRACKER - , tags(tags) - , vendor(vendor) -#endif // MODPLUG_TRACKER + , libraryName(std::move(libraryName)), dllPath(std::move(dllPath)) , category(PluginCategory::Unknown) , isBuiltIn(isBuiltIn), isInstrument(false) , useBridge(false), shareBridgeInstance(true), modernBridge(true) { } + VSTPluginLib(VSTPluginLib &&) = default; + VSTPluginLib(const VSTPluginLib &other) + : Create(other.Create) + , libraryName(other.libraryName), dllPath(other.dllPath) +#ifdef MODPLUG_TRACKER + , tags(other.tags), vendor(other.vendor) +#endif // MODPLUG_TRACKER + , pluginId1(other.pluginId1), pluginId2(other.pluginId2), shellPluginID(other.shellPluginID) + , category(other.category) + , isBuiltIn(other.isBuiltIn), isInstrument(other.isInstrument) + , useBridge(other.useBridge), shareBridgeInstance(other.shareBridgeInstance), modernBridge(other.modernBridge) + , dllArch(other.dllArch) + { + } #ifdef MPT_WITH_VST @@ -151,14 +160,14 @@ #if defined(MPT_WITH_DMO) bool MustUnInitilizeCOM = false; #endif - std::vector<VSTPluginLib *> pluginList; + std::vector<std::unique_ptr<VSTPluginLib>> pluginList; public: CVstPluginManager(); ~CVstPluginManager(); - using iterator = std::vector<VSTPluginLib *>::iterator; - using const_iterator = std::vector<VSTPluginLib *>::const_iterator; + using iterator = decltype(pluginList)::iterator; + using const_iterator = decltype(pluginList)::const_iterator; iterator begin() { return pluginList.begin(); } const_iterator begin() const { return pluginList.begin(); } @@ -168,7 +177,7 @@ size_t size() const { return pluginList.size(); } bool IsValidPlugin(const VSTPluginLib *pLib) const; - VSTPluginLib *AddPlugin(const mpt::PathString &dllPath, bool maskCrashes, const mpt::ustring &tags = mpt::ustring(), bool fromCache = true, bool *fileFound = nullptr); + std::vector<VSTPluginLib *> AddPlugin(const mpt::PathString &dllPath, bool maskCrashes, bool fromCache = true, bool *fileFound = nullptr, uint32 shellPluginID = 0); bool RemovePlugin(VSTPluginLib *); bool CreateMixPlugin(SNDMIXPLUGIN &, CSoundFile &); void OnIdle(); @@ -177,6 +186,8 @@ protected: void EnumerateDirectXDMOs(); + std::vector<VSTPluginLib *> AddPluginsToList(std::vector<VSTPluginLib> containedPlugins, std::function<void(VSTPluginLib &, bool)> updateFunc); + #else // NO_PLUGINS public: const VSTPluginLib **begin() const { return nullptr; } Modified: trunk/OpenMPT/soundlib/plugins/PluginStructs.h ============================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginStructs.h Sun Aug 4 23:52:56 2024 (r21325) +++ trunk/OpenMPT/soundlib/plugins/PluginStructs.h Sun Aug 4 23:58:03 2024 (r21326) @@ -55,16 +55,17 @@ irAutoSuspend = 0x10, // Plugin will automatically suspend on silence }; - int32le dwPluginId1; // Plugin type (kEffectMagic, kDmoMagic, kBuzzMagic) + int32le dwPluginId1; // Plugin type (kEffectMagic, kDmoMagic or custom for built-in plugins) int32le dwPluginId2; // Plugin unique ID uint8le routingFlags; // See RoutingFlags uint8le mixMode; uint8le gain; // Divide by 10 to get real gain uint8le reserved; uint32le dwOutputRouting; // 0 = send to master 0x80 + x = send to plugin x - uint32le dwReserved[4]; // Reserved for routing info + uint32le shellPluginID; // For shell plugins: The child plugin to load + uint32le dwReserved[3]; // Reserved for routing info mpt::modecharbuf<32, mpt::String::nullTerminated> szName; // User-chosen plugin display name - this is locale ANSI! - mpt::modecharbuf<64, mpt::String::nullTerminated> szLibraryName; // original DLL name - this is UTF-8! + mpt::modecharbuf<64, mpt::String::nullTerminated> szLibraryName; // original DLL name (shell plugins: child plugin name) - this is UTF-8! // Should only be called from SNDMIXPLUGIN::SetBypass() and IMixPlugin::Bypass() void SetBypass(bool bypass = true) { if(bypass) routingFlags |= irBypass; else routingFlags &= uint8(~irBypass); } |
From: <sv...@op...> - 2024-08-04 21:53:09
|
Author: sagamusix Date: Sun Aug 4 23:52:56 2024 New Revision: 21325 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21325 Log: [Mod/Fix] In the plugin cache, encode the relative path instead of absolute path in CRC32 in portable mode. That way, the cache remains valid when the portable installation is moved to a different location and doesn't have to re-scan plugins every time. Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp ============================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Sun Aug 4 10:38:24 2024 (r21324) +++ trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Sun Aug 4 23:52:56 2024 (r21325) @@ -237,17 +237,18 @@ { SettingsContainer &cacheFile = theApp.GetPluginCache(); - const std::string crcName = dllPath.ToUTF8(); + mpt::ustring pathStr; + if(theApp.IsPortableMode()) + pathStr = theApp.PathAbsoluteToInstallRelative(dllPath).ToUnicode(); + else + pathStr = dllPath.ToUnicode(); + + // CRC is used to distinguish plugins sharing the same IDs + const std::string crcName = mpt::ToCharset(mpt::Charset::UTF8, pathStr); const mpt::crc32 crc(crcName); const mpt::ustring IDs = mpt::ufmt::HEX0<8>(static_cast<uint32>(pluginId1)) + mpt::ufmt::HEX0<8>(static_cast<uint32>(pluginId2)) + mpt::ufmt::HEX0<8>(crc.result()); - mpt::PathString writePath = dllPath; - if(theApp.IsPortableMode()) - { - writePath = theApp.PathAbsoluteToInstallRelative(writePath); - } - - cacheFile.Write<mpt::ustring>(cacheSection, writePath.ToUnicode(), IDs); + cacheFile.Write<mpt::ustring>(cacheSection, pathStr, IDs); cacheFile.Write<CString>(cacheSection, IDs + U_(".Vendor"), vendor); cacheFile.Write<int32>(cacheSection, IDs + U_(".Flags"), EncodeCacheFlags()); } |
From: <sv...@op...> - 2024-08-04 08:38:33
|
Author: manx Date: Sun Aug 4 10:38:24 2024 New Revision: 21324 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21324 Log: [Mod/Imp] build: OpenMPT: Use Windows 8 builds for arm32, and rename directory and release flavour to arm-legacy. The latest Windows 11 SDK does not allow targeting 32bit ARM any more. [Mod] OpenMPT: Version is now 1.32.00.21 Modified: trunk/OpenMPT/build/auto/build_openmpt_release_packages_multiarch.py trunk/OpenMPT/build/auto/package_openmpt_installer_multiarch_args.cmd trunk/OpenMPT/build/build_openmpt_release.cmd trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/installer/generate_update_json.py trunk/OpenMPT/installer/install-multi-arch.iss Modified: trunk/OpenMPT/build/auto/build_openmpt_release_packages_multiarch.py ============================================================================== --- trunk/OpenMPT/build/auto/build_openmpt_release_packages_multiarch.py Sat Aug 3 22:23:21 2024 (r21323) +++ trunk/OpenMPT/build/auto/build_openmpt_release_packages_multiarch.py Sun Aug 4 10:38:24 2024 (r21324) @@ -70,14 +70,14 @@ openmpt_zip_x86_legacy_basepath = "installer/OpenMPT-" + openmpt_version + "-x86-legacy/" openmpt_zip_amd64_basepath = "installer/OpenMPT-" + openmpt_version + "-amd64/" openmpt_zip_amd64_legacy_basepath = "installer/OpenMPT-" + openmpt_version + "-amd64-legacy/" -openmpt_zip_arm_basepath = "installer/OpenMPT-" + openmpt_version + "-arm/" +openmpt_zip_arm_legacy_basepath = "installer/OpenMPT-" + openmpt_version + "-arm-legacy/" openmpt_zip_arm64_basepath = "installer/OpenMPT-" + openmpt_version + "-arm64/" openmpt_zip_symbols_basepath = "installer/OpenMPT-" + openmpt_version + "-symbols/" openmpt_zip_x86_path = openmpt_zip_x86_basepath openmpt_zip_x86_legacy_path = openmpt_zip_x86_legacy_basepath openmpt_zip_amd64_path = openmpt_zip_amd64_basepath openmpt_zip_amd64_legacy_path = openmpt_zip_amd64_legacy_basepath -openmpt_zip_arm_path = openmpt_zip_arm_basepath +openmpt_zip_arm_legacy_path = openmpt_zip_arm_legacy_basepath openmpt_zip_arm64_path = openmpt_zip_arm64_basepath openmpt_zip_symbols_path = openmpt_zip_symbols_basepath @@ -126,7 +126,7 @@ remove_dir(openmpt_zip_x86_basepath) remove_dir(openmpt_zip_amd64_basepath) -remove_dir(openmpt_zip_arm_basepath) +remove_dir(openmpt_zip_arm_legacy_basepath) remove_dir(openmpt_zip_arm64_basepath) remove_dir(openmpt_zip_symbols_basepath) @@ -140,8 +140,8 @@ remove_file("installer/" + openmpt_version_name + "-portable-amd64.update.json") remove_file("installer/" + openmpt_version_name + "-portable-amd64-legacy.zip") remove_file("installer/" + openmpt_version_name + "-portable-amd64-legacy.update.json") -remove_file("installer/" + openmpt_version_name + "-portable-arm.zip") -remove_file("installer/" + openmpt_version_name + "-portable-arm.update.json") +remove_file("installer/" + openmpt_version_name + "-portable-arm-legacy.zip") +remove_file("installer/" + openmpt_version_name + "-portable-arm-legacy.update.json") remove_file("installer/" + openmpt_version_name + "-portable-arm64.zip") remove_file("installer/" + openmpt_version_name + "-portable-arm64.update.json") remove_file("installer/" + openmpt_version_name + "-symbols.7z") @@ -150,7 +150,7 @@ remove_file("installer/" + openmpt_version_name + "-portable-x86-legacy.zip.digests") remove_file("installer/" + openmpt_version_name + "-portable-amd64.zip.digests") remove_file("installer/" + openmpt_version_name + "-portable-amd64-legacy.zip.digests") -remove_file("installer/" + openmpt_version_name + "-portable-arm.zip.digests") +remove_file("installer/" + openmpt_version_name + "-portable-arm-legacy.zip.digests") remove_file("installer/" + openmpt_version_name + "-portable-arm64.zip.digests") remove_file("installer/" + openmpt_version_name + "-symbols.7z.digests") remove_file("installer/" + openmpt_version_name + "-update.json") @@ -163,8 +163,9 @@ raise Exception("Something went wrong during manual creation!") -sourcePathModern = "bin/release/vs2022-win10-static/" -sourcePathLegacy = "bin/release/vs2022-win7-static/" +sourcePathModern = "bin/release/vs2022-win10-static/" +sourcePathLegacyARM = "bin/release/vs2022-win8-static/" +sourcePathLegacy = "bin/release/vs2022-win7-static/" signToolCmdLine = ["signtool", "sign", "/fd", "sha256", "/a", "/tr", "http://time.certum.pl", "/td", "sha256"] @@ -178,7 +179,7 @@ if(signBinaries): print("Signing binaries...") - signDirs = [sourcePathModern + "x86/", sourcePathLegacy + "x86/", sourcePathModern + "amd64/", sourcePathLegacy + "amd64/", sourcePathModern + "arm/", sourcePathModern + "arm64/"] + signDirs = [sourcePathModern + "x86/", sourcePathLegacy + "x86/", sourcePathModern + "amd64/", sourcePathLegacy + "amd64/", sourcePathLegacyARM + "arm/", sourcePathModern + "arm64/"] signFiles = [] for dir in signDirs: signFiles = signFiles + list_binaries(dir) @@ -193,7 +194,7 @@ copy_binaries(sourcePathModern + "x86/", openmpt_zip_x86_path) copy_pluginbridge(sourcePathModern, "x86", openmpt_zip_x86_path) copy_pluginbridge(sourcePathModern, "amd64", openmpt_zip_x86_path) -copy_pluginbridge(sourcePathModern, "arm", openmpt_zip_x86_path) +copy_pluginbridge(sourcePathLegacyARM, "arm", openmpt_zip_x86_path) copy_pluginbridge(sourcePathModern, "arm64", openmpt_zip_x86_path) Path(openmpt_zip_x86_path + "OpenMPT.portable").touch() print("Copying x86 legacy binaries...") @@ -207,7 +208,7 @@ copy_binaries(sourcePathModern + "amd64/", openmpt_zip_amd64_path) copy_pluginbridge(sourcePathModern, "x86", openmpt_zip_amd64_path) copy_pluginbridge(sourcePathModern, "amd64", openmpt_zip_amd64_path) -copy_pluginbridge(sourcePathModern, "arm", openmpt_zip_amd64_path) +copy_pluginbridge(sourcePathLegacyARM, "arm", openmpt_zip_amd64_path) copy_pluginbridge(sourcePathModern, "arm64", openmpt_zip_amd64_path) Path(openmpt_zip_amd64_path + "OpenMPT.portable").touch() print("Copying amd64 legacy binaries...") @@ -217,19 +218,19 @@ copy_pluginbridge(sourcePathLegacy, "amd64", openmpt_zip_amd64_legacy_path) Path(openmpt_zip_amd64_legacy_path + "OpenMPT.portable").touch() print("Copying arm binaries...") -shutil.rmtree(openmpt_zip_arm_basepath, ignore_errors=True) -copy_binaries(sourcePathModern + "arm/", openmpt_zip_arm_path) -copy_pluginbridge(sourcePathModern, "x86", openmpt_zip_arm_path) -copy_pluginbridge(sourcePathModern, "amd64", openmpt_zip_arm_path) -copy_pluginbridge(sourcePathModern, "arm", openmpt_zip_arm_path) -copy_pluginbridge(sourcePathModern, "arm64", openmpt_zip_arm_path) -Path(openmpt_zip_arm_path + "OpenMPT.portable").touch() +shutil.rmtree(openmpt_zip_arm_legacy_basepath, ignore_errors=True) +copy_binaries(sourcePathLegacyARM + "arm/", openmpt_zip_arm_legacy_path) +copy_pluginbridge(sourcePathModern, "x86", openmpt_zip_arm_legacy_path) +copy_pluginbridge(sourcePathModern, "amd64", openmpt_zip_arm_legacy_path) +copy_pluginbridge(sourcePathLegacyARM, "arm", openmpt_zip_arm_legacy_path) +copy_pluginbridge(sourcePathModern, "arm64", openmpt_zip_arm_legacy_path) +Path(openmpt_zip_arm_legacy_path + "OpenMPT.portable").touch() print("Copying arm64 binaries...") shutil.rmtree(openmpt_zip_arm64_basepath, ignore_errors=True) copy_binaries(sourcePathModern + "arm64/", openmpt_zip_arm64_path) copy_pluginbridge(sourcePathModern, "x86", openmpt_zip_arm64_path) copy_pluginbridge(sourcePathModern, "amd64", openmpt_zip_arm64_path) -copy_pluginbridge(sourcePathModern, "arm", openmpt_zip_arm64_path) +copy_pluginbridge(sourcePathLegacyARM, "arm", openmpt_zip_arm64_path) copy_pluginbridge(sourcePathModern, "arm64", openmpt_zip_arm64_path) Path(openmpt_zip_arm64_path + "OpenMPT.portable").touch() @@ -239,13 +240,13 @@ copy_symbols(sourcePathLegacy + "x86/", openmpt_zip_symbols_path + "x86-legacy/") copy_symbols(sourcePathModern + "amd64/", openmpt_zip_symbols_path + "amd64/") copy_symbols(sourcePathLegacy + "amd64/", openmpt_zip_symbols_path + "amd64-legacy/") -copy_symbols(sourcePathModern + "arm/", openmpt_zip_symbols_path + "arm/") +copy_symbols(sourcePathLegacyARM + "arm/", openmpt_zip_symbols_path + "arm-legacy/") copy_symbols(sourcePathModern + "arm64/", openmpt_zip_symbols_path + "arm64/") copy_symbols_pluginbridge(sourcePathModern + "x86/", openmpt_zip_symbols_path + "x86/", "x86") copy_symbols_pluginbridge(sourcePathLegacy + "x86/", openmpt_zip_symbols_path + "x86-legacy/", "x86") copy_symbols_pluginbridge(sourcePathModern + "amd64/", openmpt_zip_symbols_path + "amd64/", "amd64") copy_symbols_pluginbridge(sourcePathLegacy + "amd64/", openmpt_zip_symbols_path + "amd64-legacy/", "amd64") -copy_symbols_pluginbridge(sourcePathModern + "arm/", openmpt_zip_symbols_path + "arm/", "arm") +copy_symbols_pluginbridge(sourcePathLegacyARM + "arm/", openmpt_zip_symbols_path + "arm-legacy/", "arm") copy_symbols_pluginbridge(sourcePathModern + "arm64/", openmpt_zip_symbols_path + "arm64/", "arm64") if not singleThreaded: @@ -264,7 +265,7 @@ copy_other(openmpt_zip_x86_legacy_path, openmpt_version_short) copy_other(openmpt_zip_amd64_path, openmpt_version_short) copy_other(openmpt_zip_amd64_legacy_path, openmpt_version_short) -copy_other(openmpt_zip_arm_path, openmpt_version_short) +copy_other(openmpt_zip_arm_legacy_path, openmpt_version_short) copy_other(openmpt_zip_arm64_path, openmpt_version_short) print("Creating zip files and installers...") @@ -289,7 +290,7 @@ p7zamd64legacy = Popen([path7z, "a", "-tzip", "-mx=9", "../" + openmpt_version_name + "-portable-amd64-legacy.zip", "."], cwd=openmpt_zip_amd64_legacy_basepath) if singleThreaded: p7zamd64legacy.communicate() -p7zarm = Popen([path7z, "a", "-tzip", "-mx=9", "../" + openmpt_version_name + "-portable-arm.zip", "."], cwd=openmpt_zip_arm_basepath) +p7zarm = Popen([path7z, "a", "-tzip", "-mx=9", "../" + openmpt_version_name + "-portable-arm-legacy.zip", "."], cwd=openmpt_zip_arm_legacy_basepath) if singleThreaded: p7zarm.communicate() p7zarm64 = Popen([path7z, "a", "-tzip", "-mx=9", "../" + openmpt_version_name + "-portable-arm64.zip", "."], cwd=openmpt_zip_arm64_basepath) @@ -329,7 +330,7 @@ hash_file("installer/" + openmpt_version_name + "-portable-x86-legacy.zip") hash_file("installer/" + openmpt_version_name + "-portable-amd64.zip") hash_file("installer/" + openmpt_version_name + "-portable-amd64-legacy.zip") -hash_file("installer/" + openmpt_version_name + "-portable-arm.zip") +hash_file("installer/" + openmpt_version_name + "-portable-arm-legacy.zip") hash_file("installer/" + openmpt_version_name + "-portable-arm64.zip") hash_file("installer/" + openmpt_version_name + "-symbols.7z") @@ -337,7 +338,7 @@ shutil.rmtree(openmpt_zip_x86_legacy_basepath) shutil.rmtree(openmpt_zip_amd64_basepath) shutil.rmtree(openmpt_zip_amd64_legacy_basepath) -shutil.rmtree(openmpt_zip_arm_basepath) +shutil.rmtree(openmpt_zip_arm_legacy_basepath) shutil.rmtree(openmpt_zip_arm64_basepath) shutil.rmtree(openmpt_zip_symbols_basepath) Modified: trunk/OpenMPT/build/auto/package_openmpt_installer_multiarch_args.cmd ============================================================================== --- trunk/OpenMPT/build/auto/package_openmpt_installer_multiarch_args.cmd Sat Aug 3 22:23:21 2024 (r21323) +++ trunk/OpenMPT/build/auto/package_openmpt_installer_multiarch_args.cmd Sun Aug 4 10:38:24 2024 (r21324) @@ -46,10 +46,10 @@ copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-amd64-legacy.zip.digests openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-amd64-legacy.zip.digests copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-amd64-legacy.update.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-amd64-legacy.update.json copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-amd64-legacy.update.json.jws.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-amd64-legacy.update.json.jws.json -copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm.zip openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm.zip -copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm.zip.digests openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm.zip.digests -copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm.update.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm.update.json -copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm.update.json.jws.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm.update.json.jws.json +copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm-legacy.zip openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm-legacy.zip +copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm-legacy.zip.digests openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm-legacy.zip.digests +copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm-legacy.update.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm-legacy.update.json +copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm-legacy.update.json.jws.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm-legacy.update.json.jws.json copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm64.zip openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm64.zip copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm64.zip.digests openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm64.zip.digests copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm64.update.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm64.update.json Modified: trunk/OpenMPT/build/build_openmpt_release.cmd ============================================================================== --- trunk/OpenMPT/build/build_openmpt_release.cmd Sat Aug 3 22:23:21 2024 (r21323) +++ trunk/OpenMPT/build/build_openmpt_release.cmd Sun Aug 4 10:38:24 2024 (r21324) @@ -12,8 +12,8 @@ cmd /c build\auto\update_package_template.cmd || goto error cmd /c build\auto\build_openmpt_args.cmd vs2022 win10 Win32 Release 7z default || goto error cmd /c build\auto\build_openmpt_args.cmd vs2022 win10 x64 Release 7z default || goto error -cmd /c build\auto\build_openmpt_args.cmd vs2022 win10 ARM Release 7z default || goto error cmd /c build\auto\build_openmpt_args.cmd vs2022 win10 ARM64 Release 7z default || goto error +cmd /c build\auto\build_openmpt_args.cmd vs2022 win8 ARM Release 7z default || goto error cmd /c build\auto\build_openmpt_args.cmd vs2022 win7 Win32 Release 7z default || goto error cmd /c build\auto\build_openmpt_args.cmd vs2022 win7 x64 Release 7z default || goto error cmd /c build\auto\build_openmpt_release_packages_multiarch.cmd auto sign || goto error Modified: trunk/OpenMPT/common/versionNumber.h ============================================================================== --- trunk/OpenMPT/common/versionNumber.h Sat Aug 3 22:23:21 2024 (r21323) +++ trunk/OpenMPT/common/versionNumber.h Sun Aug 4 10:38:24 2024 (r21324) @@ -18,6 +18,6 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 32 #define VER_MINOR 00 -#define VER_MINORMINOR 20 +#define VER_MINORMINOR 21 OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/installer/generate_update_json.py ============================================================================== --- trunk/OpenMPT/installer/generate_update_json.py Sat Aug 3 22:23:21 2024 (r21323) +++ trunk/OpenMPT/installer/generate_update_json.py Sun Aug 4 10:38:24 2024 (r21324) @@ -125,19 +125,19 @@ f.close() update = { - "url": download_base_url + OPENMPT_VERSION_MAJORMAJOR + "." + OPENMPT_VERSION_MAJOR + "/OpenMPT-" + version + "-portable-arm.zip", + "url": download_base_url + OPENMPT_VERSION_MAJORMAJOR + "." + OPENMPT_VERSION_MAJOR + "/OpenMPT-" + version + "-portable-arm-legacy.zip", "checksums": { - "SHA-512": hash_file_sha512("installer/OpenMPT-" + plainversion + "-portable-arm.zip"), - "SHA3-512": hash_file_sha3_512("installer/OpenMPT-" + plainversion + "-portable-arm.zip"), + "SHA-512": hash_file_sha512("installer/OpenMPT-" + plainversion + "-portable-arm-legacy.zip"), + "SHA3-512": hash_file_sha3_512("installer/OpenMPT-" + plainversion + "-portable-arm-legacy.zip"), }, - "filename": "OpenMPT-" + version + "-portable-arm.zip", + "filename": "OpenMPT-" + version + "-portable-arm-legacy.zip", "autoupdate_installer": None, "autoupdate_archive": { "subfolder": "", "restartbinary": "OpenMPT.exe" } } -with open("installer/" + "OpenMPT-" + OPENMPT_VERSION_MAJORMAJOR + "." + OPENMPT_VERSION_MAJOR + "." + OPENMPT_VERSION_MINOR + "." + OPENMPT_VERSION_MINORMINOR + "-portable-arm.update.json", "wb") as f: +with open("installer/" + "OpenMPT-" + OPENMPT_VERSION_MAJORMAJOR + "." + OPENMPT_VERSION_MAJOR + "." + OPENMPT_VERSION_MINOR + "." + OPENMPT_VERSION_MINORMINOR + "-portable-arm-legacy.update.json", "wb") as f: f.write((json.dumps(update, ensure_ascii=False, indent=1)).encode('utf-8')) f.close() @@ -227,14 +227,14 @@ "supported_architectures": { "amd64":True }, "required_processor_features": { "amd64":{"sse2":True} } }, - "portable-arm": { - "url": download_base_url + OPENMPT_VERSION_MAJORMAJOR + "." + OPENMPT_VERSION_MAJOR + "/OpenMPT-" + version + "-portable-arm.update.json", - "download_url": download_base_url + OPENMPT_VERSION_MAJORMAJOR + "." + OPENMPT_VERSION_MAJOR + "/OpenMPT-" + version + "-portable-arm.zip", + "portable-arm-legacy": { + "url": download_base_url + OPENMPT_VERSION_MAJORMAJOR + "." + OPENMPT_VERSION_MAJOR + "/OpenMPT-" + version + "-portable-arm-legacy.update.json", + "download_url": download_base_url + OPENMPT_VERSION_MAJORMAJOR + "." + OPENMPT_VERSION_MAJOR + "/OpenMPT-" + version + "-portable-arm-legacy.zip", "type": "archive", "can_autoupdate": True, "autoupdate_minversion": "1.30.00.08", "os": "windows", - "required_windows_version": { "version_major":10, "version_minor":0, "servicepack_major":0, "servicepack_minor":0, "build":19044, "wine_major":1, "wine_minor":8, "wine_update":0 }, + "required_windows_version": { "version_major":6, "version_minor":2, "servicepack_major":0, "servicepack_minor":0, "build":0, "wine_major":1, "wine_minor":8, "wine_update":0 }, "required_architectures": {}, "supported_architectures": { "arm":True }, "required_processor_features": { "arm":{} } @@ -268,7 +268,7 @@ sign_file("installer/" + "OpenMPT-" + OPENMPT_VERSION_MAJORMAJOR + "." + OPENMPT_VERSION_MAJOR + "." + OPENMPT_VERSION_MINOR + "." + OPENMPT_VERSION_MINORMINOR + "-portable-x86-legacy.update.json") sign_file("installer/" + "OpenMPT-" + OPENMPT_VERSION_MAJORMAJOR + "." + OPENMPT_VERSION_MAJOR + "." + OPENMPT_VERSION_MINOR + "." + OPENMPT_VERSION_MINORMINOR + "-portable-amd64.update.json") sign_file("installer/" + "OpenMPT-" + OPENMPT_VERSION_MAJORMAJOR + "." + OPENMPT_VERSION_MAJOR + "." + OPENMPT_VERSION_MINOR + "." + OPENMPT_VERSION_MINORMINOR + "-portable-amd64-legacy.update.json") -sign_file("installer/" + "OpenMPT-" + OPENMPT_VERSION_MAJORMAJOR + "." + OPENMPT_VERSION_MAJOR + "." + OPENMPT_VERSION_MINOR + "." + OPENMPT_VERSION_MINORMINOR + "-portable-arm.update.json") +sign_file("installer/" + "OpenMPT-" + OPENMPT_VERSION_MAJORMAJOR + "." + OPENMPT_VERSION_MAJOR + "." + OPENMPT_VERSION_MINOR + "." + OPENMPT_VERSION_MINORMINOR + "-portable-arm-legacy.update.json") sign_file("installer/" + "OpenMPT-" + OPENMPT_VERSION_MAJORMAJOR + "." + OPENMPT_VERSION_MAJOR + "." + OPENMPT_VERSION_MINOR + "." + OPENMPT_VERSION_MINORMINOR + "-portable-arm64.update.json") pdumpkey = Popen(["bin/release/vs2022-win7-static/amd64/updatesigntool.exe", "dumpkey", "auto", "installer/" + "OpenMPT-" + OPENMPT_VERSION_MAJORMAJOR + "." + OPENMPT_VERSION_MAJOR + "." + OPENMPT_VERSION_MINOR + "." + OPENMPT_VERSION_MINORMINOR + "-update-publickey.jwk.json"]) Modified: trunk/OpenMPT/installer/install-multi-arch.iss ============================================================================== --- trunk/OpenMPT/installer/install-multi-arch.iss Sat Aug 3 22:23:21 2024 (r21323) +++ trunk/OpenMPT/installer/install-multi-arch.iss Sun Aug 4 10:38:24 2024 (r21324) @@ -4,6 +4,7 @@ #define BuildFolder "release\vs2022-win10-static" +#define BuildFolderLegacyarm "release\vs2022-win8-static" #define BuildFolderLegacyx86 "release\vs2022-win7-static" #define BuildFolderLegacyamd64 "release\vs2022-win7-static" @@ -110,12 +111,12 @@ Source: ..\bin\{#BuildFolderLegacyamd64}\amd64\openmpt-mpg123.dll; DestDir: {app}\bin\amd64; Flags: ignoreversion; Components: archamd64; OnlyBelowVersion: 10.0.19044 Source: ..\bin\{#BuildFolderLegacyamd64}\amd64\openmpt-soundtouch.dll; DestDir: {app}\bin\amd64; Flags: ignoreversion; Components: archamd64; OnlyBelowVersion: 10.0.19044 -Source: ..\bin\{#BuildFolder}\arm\OpenMPT.exe; DestDir: {app}\bin\arm; Flags: ignoreversion; Components: archarm; MinVersion: 10.0.19044 -Source: ..\bin\{#BuildFolder}\arm\PluginBridge-arm.exe; DestDir: {app}\bin\arm; Flags: ignoreversion; Components: archarm; MinVersion: 10.0.19044 -Source: ..\bin\{#BuildFolder}\arm\PluginBridgeLegacy-arm.exe; DestDir: {app}\bin\arm; Flags: ignoreversion; Components: archarm; MinVersion: 10.0.19044 -Source: ..\bin\{#BuildFolder}\arm\openmpt-lame.dll; DestDir: {app}\bin\arm; Flags: ignoreversion; Components: archarm; MinVersion: 10.0.19044 -Source: ..\bin\{#BuildFolder}\arm\openmpt-mpg123.dll; DestDir: {app}\bin\arm; Flags: ignoreversion; Components: archarm; MinVersion: 10.0.19044 -Source: ..\bin\{#BuildFolder}\arm\openmpt-soundtouch.dll; DestDir: {app}\bin\arm; Flags: ignoreversion; Components: archarm; MinVersion: 10.0.19044 +Source: ..\bin\{#BuildFolderLegacyarm}\arm\OpenMPT.exe; DestDir: {app}\bin\arm; Flags: ignoreversion; Components: archarm; MinVersion: 6.2 +Source: ..\bin\{#BuildFolderLegacyarm}\arm\PluginBridge-arm.exe; DestDir: {app}\bin\arm; Flags: ignoreversion; Components: archarm; MinVersion: 6.2 +Source: ..\bin\{#BuildFolderLegacyarm}\arm\PluginBridgeLegacy-arm.exe; DestDir: {app}\bin\arm; Flags: ignoreversion; Components: archarm; MinVersion: 6.2 +Source: ..\bin\{#BuildFolderLegacyarm}\arm\openmpt-lame.dll; DestDir: {app}\bin\arm; Flags: ignoreversion; Components: archarm; MinVersion: 6.2 +Source: ..\bin\{#BuildFolderLegacyarm}\arm\openmpt-mpg123.dll; DestDir: {app}\bin\arm; Flags: ignoreversion; Components: archarm; MinVersion: 6.2 +Source: ..\bin\{#BuildFolderLegacyarm}\arm\openmpt-soundtouch.dll; DestDir: {app}\bin\arm; Flags: ignoreversion; Components: archarm; MinVersion: 6.2 Source: ..\bin\{#BuildFolder}\arm64\OpenMPT.exe; DestDir: {app}\bin\arm64; Flags: ignoreversion; Components: archarm64; MinVersion: 10.0.19044 Source: ..\bin\{#BuildFolder}\arm64\PluginBridge-arm64.exe; DestDir: {app}\bin\arm64; Flags: ignoreversion; Components: archarm64; MinVersion: 10.0.19044 |
From: <sv...@op...> - 2024-08-03 20:23:34
|
Author: sagamusix Date: Sat Aug 3 22:23:21 2024 New Revision: 21323 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21323 Log: [Ref] Convert VSTPluginLib::PluginCategory into enum class and move it out of the class. Modified: trunk/OpenMPT/mptrack/SelectPluginDialog.cpp trunk/OpenMPT/soundlib/plugins/PluginManager.cpp trunk/OpenMPT/soundlib/plugins/PluginManager.h Modified: trunk/OpenMPT/mptrack/SelectPluginDialog.cpp ============================================================================== --- trunk/OpenMPT/mptrack/SelectPluginDialog.cpp Sat Aug 3 18:50:26 2024 (r21322) +++ trunk/OpenMPT/mptrack/SelectPluginDialog.cpp Sat Aug 3 22:23:21 2024 (r21323) @@ -309,34 +309,34 @@ static constexpr struct { - VSTPluginLib::PluginCategory category; + PluginCategory category; const TCHAR *description; } categories[] = { - { VSTPluginLib::catEffect, _T("Audio Effects") }, - { VSTPluginLib::catGenerator, _T("Tone Generators") }, - { VSTPluginLib::catRestoration, _T("Audio Restauration") }, - { VSTPluginLib::catSurroundFx, _T("Surround Effects") }, - { VSTPluginLib::catRoomFx, _T("Room Effects") }, - { VSTPluginLib::catSpacializer, _T("Spacializers") }, - { VSTPluginLib::catMastering, _T("Mastering Plugins") }, - { VSTPluginLib::catAnalysis, _T("Analysis Plugins") }, - { VSTPluginLib::catOfflineProcess, _T("Offline Processing") }, - { VSTPluginLib::catShell, _T("Shell Plugins") }, - { VSTPluginLib::catUnknown, _T("Unsorted") }, - { VSTPluginLib::catDMO, _T("DirectX Media Audio Effects") }, - { VSTPluginLib::catSynth, _T("Instrument Plugins") }, - { VSTPluginLib::catHidden, _T("Legacy Plugins") }, + { PluginCategory::Effect, _T("Audio Effects") }, + { PluginCategory::Generator, _T("Tone Generators") }, + { PluginCategory::Restoration, _T("Audio Restauration") }, + { PluginCategory::SurroundFx, _T("Surround Effects") }, + { PluginCategory::RoomFx, _T("Room Effects") }, + { PluginCategory::Spacializer, _T("Spacializers") }, + { PluginCategory::Mastering, _T("Mastering Plugins") }, + { PluginCategory::Analysis, _T("Analysis Plugins") }, + { PluginCategory::OfflineProcess, _T("Offline Processing") }, + { PluginCategory::Shell, _T("Shell Plugins") }, + { PluginCategory::Unknown, _T("Unsorted") }, + { PluginCategory::DMO, _T("DirectX Media Audio Effects") }, + { PluginCategory::Synth, _T("Instrument Plugins") }, + { PluginCategory::Hidden, _T("Legacy Plugins") }, }; const HTREEITEM noPlug = AddTreeItem(_T("No plugin (empty slot)"), IMAGE_NOPLUGIN, false); HTREEITEM currentPlug = noPlug; - std::bitset<VSTPluginLib::numCategories> categoryUsed; - HTREEITEM categoryFolders[VSTPluginLib::numCategories]; + std::bitset<uint8(PluginCategory::NumCategories)> categoryUsed; + HTREEITEM categoryFolders[uint8(PluginCategory::NumCategories)]; for(const auto &cat : categories) { - categoryFolders[cat.category] = AddTreeItem(cat.description, IMAGE_FOLDER, false); + categoryFolders[static_cast<uint32>(cat.category)] = AddTreeItem(cat.description, IMAGE_FOLDER, false); } enum PlugMatchQuality @@ -361,7 +361,7 @@ { MPT_ASSERT(p); const VSTPluginLib &plug = *p; - if(plug.category == VSTPluginLib::catHidden && (m_pPlugin == nullptr || m_pPlugin->pMixPlugin == nullptr || &m_pPlugin->pMixPlugin->GetPluginFactory() != p)) + if(plug.category == PluginCategory::Hidden && (m_pPlugin == nullptr || m_pPlugin->pMixPlugin == nullptr || &m_pPlugin->pMixPlugin->GetPluginFactory() != p)) continue; if(nameFilterActive) @@ -408,8 +408,8 @@ title += MPT_CFORMAT(" ({})")(plug.GetDllArchNameUser()); } #endif // MPT_WITH_VST - HTREEITEM h = AddTreeItem(title, plug.isInstrument ? IMAGE_PLUGININSTRUMENT : IMAGE_EFFECTPLUGIN, true, categoryFolders[plug.category], reinterpret_cast<LPARAM>(&plug)); - categoryUsed[plug.category] = true; + HTREEITEM h = AddTreeItem(title, plug.isInstrument ? IMAGE_PLUGININSTRUMENT : IMAGE_EFFECTPLUGIN, true, categoryFolders[static_cast<uint32>(plug.category)], reinterpret_cast<LPARAM>(&plug)); + categoryUsed[static_cast<uint32>(plug.category)] = true; if(nameFilterActive) { Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp ============================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Sat Aug 3 18:50:26 2024 (r21322) +++ trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Sat Aug 3 22:23:21 2024 (r21323) @@ -319,30 +319,30 @@ VSTPluginLib::CreateProc createProc; const char *filename, *name; uint32 pluginId1, pluginId2; - VSTPluginLib::PluginCategory category; + PluginCategory category; bool isInstrument, isOurs; } BuiltInPlugins[] = { // DirectX Media Objects Emulation - { DMO::Chorus::Create, "{EFE6629C-81F7-4281-BD91-C9D604A95AF6}", "Chorus", kDmoMagic, 0xEFE6629C, VSTPluginLib::catDMO, false, false }, - { DMO::Compressor::Create, "{EF011F79-4000-406D-87AF-BFFB3FC39D57}", "Compressor", kDmoMagic, 0xEF011F79, VSTPluginLib::catDMO, false, false }, - { DMO::Distortion::Create, "{EF114C90-CD1D-484E-96E5-09CFAF912A21}", "Distortion", kDmoMagic, 0xEF114C90, VSTPluginLib::catDMO, false, false }, - { DMO::Echo::Create, "{EF3E932C-D40B-4F51-8CCF-3F98F1B29D5D}", "Echo", kDmoMagic, 0xEF3E932C, VSTPluginLib::catDMO, false, false }, - { DMO::Flanger::Create, "{EFCA3D92-DFD8-4672-A603-7420894BAD98}", "Flanger", kDmoMagic, 0xEFCA3D92, VSTPluginLib::catDMO, false, false }, - { DMO::Gargle::Create, "{DAFD8210-5711-4B91-9FE3-F75B7AE279BF}", "Gargle", kDmoMagic, 0xDAFD8210, VSTPluginLib::catDMO, false, false }, - { DMO::I3DL2Reverb::Create, "{EF985E71-D5C7-42D4-BA4D-2D073E2E96F4}", "I3DL2Reverb", kDmoMagic, 0xEF985E71, VSTPluginLib::catDMO, false, false }, - { DMO::ParamEq::Create, "{120CED89-3BF4-4173-A132-3CB406CF3231}", "ParamEq", kDmoMagic, 0x120CED89, VSTPluginLib::catDMO, false, false }, - { DMO::WavesReverb::Create, "{87FC0268-9A55-4360-95AA-004A1D9DE26C}", "WavesReverb", kDmoMagic, 0x87FC0268, VSTPluginLib::catDMO, false, false }, + { DMO::Chorus::Create, "{EFE6629C-81F7-4281-BD91-C9D604A95AF6}", "Chorus", kDmoMagic, 0xEFE6629C, PluginCategory::DMO, false, false }, + { DMO::Compressor::Create, "{EF011F79-4000-406D-87AF-BFFB3FC39D57}", "Compressor", kDmoMagic, 0xEF011F79, PluginCategory::DMO, false, false }, + { DMO::Distortion::Create, "{EF114C90-CD1D-484E-96E5-09CFAF912A21}", "Distortion", kDmoMagic, 0xEF114C90, PluginCategory::DMO, false, false }, + { DMO::Echo::Create, "{EF3E932C-D40B-4F51-8CCF-3F98F1B29D5D}", "Echo", kDmoMagic, 0xEF3E932C, PluginCategory::DMO, false, false }, + { DMO::Flanger::Create, "{EFCA3D92-DFD8-4672-A603-7420894BAD98}", "Flanger", kDmoMagic, 0xEFCA3D92, PluginCategory::DMO, false, false }, + { DMO::Gargle::Create, "{DAFD8210-5711-4B91-9FE3-F75B7AE279BF}", "Gargle", kDmoMagic, 0xDAFD8210, PluginCategory::DMO, false, false }, + { DMO::I3DL2Reverb::Create, "{EF985E71-D5C7-42D4-BA4D-2D073E2E96F4}", "I3DL2Reverb", kDmoMagic, 0xEF985E71, PluginCategory::DMO, false, false }, + { DMO::ParamEq::Create, "{120CED89-3BF4-4173-A132-3CB406CF3231}", "ParamEq", kDmoMagic, 0x120CED89, PluginCategory::DMO, false, false }, + { DMO::WavesReverb::Create, "{87FC0268-9A55-4360-95AA-004A1D9DE26C}", "WavesReverb", kDmoMagic, 0x87FC0268, PluginCategory::DMO, false, false }, // First (inaccurate) Flanger implementation (will be chosen based on library name, shares ID1 and ID2 with regular Flanger) - { DMO::Flanger::CreateLegacy, "{EFCA3D92-DFD8-4672-A603-7420894BAD98}", "Flanger (Legacy)", kDmoMagic, 0xEFCA3D92, VSTPluginLib::catHidden, false, false }, + { DMO::Flanger::CreateLegacy, "{EFCA3D92-DFD8-4672-A603-7420894BAD98}", "Flanger (Legacy)", kDmoMagic, 0xEFCA3D92, PluginCategory::Hidden, false, false }, // DigiBooster Pro Echo DSP - { DigiBoosterEcho::Create, "", "DigiBooster Pro Echo", MagicLE("DBM0"), MagicLE("Echo"), VSTPluginLib::catRoomFx, false, true }, + { DigiBoosterEcho::Create, "", "DigiBooster Pro Echo", MagicLE("DBM0"), MagicLE("Echo"), PluginCategory::RoomFx, false, true }, // LFO - { LFOPlugin::Create, "", "LFO", MagicLE("OMPT"), MagicLE("LFO "), VSTPluginLib::catGenerator, false, true }, + { LFOPlugin::Create, "", "LFO", MagicLE("OMPT"), MagicLE("LFO "), PluginCategory::Generator, false, true }, // SymMOD Echo - { SymMODEcho::Create, "", "SymMOD Echo", MagicLE("SymM"), MagicLE("Echo"), VSTPluginLib::catRoomFx, false, true }, + { SymMODEcho::Create, "", "SymMOD Echo", MagicLE("SymM"), MagicLE("Echo"), PluginCategory::RoomFx, false, true }, #ifdef MODPLUG_TRACKER - { MidiInOut::Create, "", "MIDI Input Output", PLUGMAGIC('V','s','t','P'), PLUGMAGIC('M','M','I','D'), VSTPluginLib::catSynth, true, true }, + { MidiInOut::Create, "", "MIDI Input Output", PLUGMAGIC('V','s','t','P'), PLUGMAGIC('M','M','I','D'), PluginCategory::Synth, true, true }, #endif // MODPLUG_TRACKER }; @@ -451,7 +451,7 @@ pluginList.push_back(plug); plug->pluginId1 = kDmoMagic; plug->pluginId2 = clsid.Data1; - plug->category = VSTPluginLib::catDMO; + plug->category = PluginCategory::DMO; } catch(mpt::out_of_memory e) { mpt::delete_out_of_memory(e); @@ -479,15 +479,15 @@ static void GetPluginInformation(bool maskCrashes, Vst::AEffect *effect, VSTPluginLib &library) { unsigned long exception = 0; - library.category = static_cast<VSTPluginLib::PluginCategory>(CVstPlugin::DispatchSEH(maskCrashes, effect, Vst::effGetPlugCategory, 0, 0, nullptr, 0, exception)); + library.category = static_cast<PluginCategory>(CVstPlugin::DispatchSEH(maskCrashes, effect, Vst::effGetPlugCategory, 0, 0, nullptr, 0, exception)); library.isInstrument = ((effect->flags & Vst::effFlagsIsSynth) || !effect->numInputs); if(library.isInstrument) { - library.category = VSTPluginLib::catSynth; - } else if(library.category >= VSTPluginLib::numCategories) + library.category = PluginCategory::Synth; + } else if(library.category >= PluginCategory::NumCategories) { - library.category = VSTPluginLib::catUnknown; + library.category = PluginCategory::Unknown; } #ifdef MODPLUG_TRACKER Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.h ============================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginManager.h Sat Aug 3 18:50:26 2024 (r21322) +++ trunk/OpenMPT/soundlib/plugins/PluginManager.h Sat Aug 3 22:23:21 2024 (r21323) @@ -27,31 +27,30 @@ struct SNDMIXPLUGIN; enum PluginArch : int; -struct VSTPluginLib +enum class PluginCategory : uint8 { -public: - enum PluginCategory : uint8 - { - // Same plugin categories as defined in VST SDK - catUnknown = 0, - catEffect, // Simple Effect - catSynth, // VST Instrument (Synths, samplers,...) - catAnalysis, // Scope, Tuner, ... - catMastering, // Dynamics, ... - catSpacializer, // Panners, ... - catRoomFx, // Delays and Reverbs - catSurroundFx, // Dedicated surround processor - catRestoration, // Denoiser, ... - catOfflineProcess, // Offline Process - catShell, // Plug-in is container of other plug-ins - catGenerator, // Tone Generator, ... - // Custom categories - catDMO, // DirectX media object plugin - catHidden, // For internal plugins that should not be visible to the user (e.g. because they only exist for legacy reasons) + // Same plugin categories as defined in VST SDK + Unknown = 0, + Effect, // Simple Effect + Synth, // VST Instrument (Synths, samplers,...) + Analysis, // Scope, Tuner, ... + Mastering, // Dynamics, ... + Spacializer, // Panners, ... + RoomFx, // Delays and Reverbs + SurroundFx, // Dedicated surround processor + Restoration, // Denoiser, ... + OfflineProcess, // Offline Process + Shell, // Plug-in is container of other plug-ins + Generator, // Tone Generator, ... + // Custom categories + DMO, // DirectX media object plugin + Hidden, // For internal plugins that should not be visible to the user (e.g. because they only exist for legacy reasons) - numCategories - }; + NumCategories +}; +struct VSTPluginLib +{ public: using CreateProc = IMixPlugin *(*)(VSTPluginLib &factory, CSoundFile &sndFile, SNDMIXPLUGIN &mixStruct); @@ -68,7 +67,7 @@ #endif // MODPLUG_TRACKER int32 pluginId1 = 0; // Plugin type (kEffectMagic, kDmoMagic, ...) int32 pluginId2 = 0; // Plugin unique ID - PluginCategory category = catUnknown; + PluginCategory category = PluginCategory::Unknown; const bool isBuiltIn : 1; bool isInstrument : 1; bool useBridge : 1, shareBridgeInstance : 1, modernBridge : 1; @@ -87,7 +86,7 @@ , tags(tags) , vendor(vendor) #endif // MODPLUG_TRACKER - , category(catUnknown) + , category(PluginCategory::Unknown) , isBuiltIn(isBuiltIn), isInstrument(false) , useBridge(false), shareBridgeInstance(true), modernBridge(true) { @@ -117,7 +116,7 @@ { // Format: 00000000.0000000M.AAAAAASB.CCCCCCCI return (isInstrument ? 1 : 0) - | (category << 1) + | (static_cast<uint32>(category) << 1) | (useBridge ? 0x100 : 0) | (shareBridgeInstance ? 0x200 : 0) | ((dllArch / 8) << 10) @@ -128,14 +127,14 @@ void DecodeCacheFlags(uint32 flags) { category = static_cast<PluginCategory>((flags & 0xFF) >> 1); - if(category >= numCategories) + if(category >= PluginCategory::NumCategories) { - category = catUnknown; + category = PluginCategory::Unknown; } if(flags & 1) { isInstrument = true; - category = catSynth; + category = PluginCategory::Synth; } useBridge = (flags & 0x100) != 0; shareBridgeInstance = (flags & 0x200) != 0; |
From: <sv...@op...> - 2024-08-03 16:50:33
|
Author: sagamusix Date: Sat Aug 3 18:50:26 2024 New Revision: 21322 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21322 Log: [Imp] General tab: Disable Remove button if current plugin slot is empty. Modified: trunk/OpenMPT/mptrack/View_gen.cpp Modified: trunk/OpenMPT/mptrack/View_gen.cpp ============================================================================== --- trunk/OpenMPT/mptrack/View_gen.cpp Sat Aug 3 18:17:02 2024 (r21321) +++ trunk/OpenMPT/mptrack/View_gen.cpp Sat Aug 3 18:50:26 2024 (r21322) @@ -456,6 +456,7 @@ GetDlgItem(IDC_MOVEFXSLOT)->EnableWindow((pPlugin) ? TRUE : FALSE); GetDlgItem(IDC_INSERTFXSLOT)->EnableWindow((pPlugin) ? TRUE : FALSE); GetDlgItem(IDC_CLONEPLUG)->EnableWindow((pPlugin) ? TRUE : FALSE); + GetDlgItem(IDC_DELPLUGIN)->EnableWindow((plugin.IsValidPlugin() || !plugin.Info.szLibraryName.empty() || !plugin.Info.szName.empty()) ? TRUE : FALSE); UpdateDryWetDisplay(); m_CbnSpecialMixProcessing.SetCurSel(static_cast<int>(plugin.GetMixMode())); |
From: <sv...@op...> - 2024-08-03 16:17:15
|
Author: sagamusix Date: Sat Aug 3 18:17:02 2024 New Revision: 21321 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21321 Log: [Reg] Remove mostly-dead fallback code when trying to load non-existent plugins: 1) OpenMPT hasn't had a Plugins directory in its installation directory from which we could load a missing plugin for years now. 2) It's highly unlikely to find a plugin in the root of the specified plugin directory (most plugin installers will put plugins in sub folders). 3) Our plugin.cache format hasn't contained pure plugin library names for many years as well, only full paths. As a result, none of the three fallback methods were likely to yield any results. Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp ============================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Sat Aug 3 16:41:44 2024 (r21320) +++ trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Sat Aug 3 18:17:02 2024 (r21321) @@ -747,40 +747,6 @@ return plugin != nullptr; } -#ifdef MODPLUG_TRACKER - bool maskCrashes = TrackerSettings::Instance().BrokenPluginsWorkaroundVSTMaskAllCrashes; - - if(!pFound && (mixPlugin.GetLibraryName() != U_(""))) - { - // Try finding the plugin DLL in the plugin directory or plugin cache instead. - mpt::PathString fullPath = TrackerSettings::Instance().PathPlugins.GetDefaultDir(); - if(fullPath.empty()) - { - fullPath = theApp.GetInstallPath() + P_("Plugins\\"); - } - fullPath += mpt::PathString::FromUnicode(mixPlugin.GetLibraryName()) + P_(".dll"); - - pFound = AddPlugin(fullPath, maskCrashes); - if(!pFound) - { - // Try plugin cache (search for library name) - SettingsContainer &cacheFile = theApp.GetPluginCache(); - mpt::ustring IDs = cacheFile.Read<mpt::ustring>(cacheSection, mixPlugin.GetLibraryName(), U_("")); - if(IDs.length() >= 16) - { - fullPath = cacheFile.Read<mpt::PathString>(cacheSection, IDs, P_("")); - if(!fullPath.empty()) - { - fullPath = theApp.PathInstallRelativeToAbsolute(fullPath); - if(mpt::native_fs{}.is_file(fullPath)) - { - pFound = AddPlugin(fullPath, maskCrashes); - } - } - } - } - } - #ifdef MPT_WITH_VST // Note: we don't check if dwPluginId1 matches Vst::kEffectMagic here, even if it should. // I have an old file I made with OpenMPT 1.17 where the primary plugin ID has an unexpected value. @@ -788,6 +754,7 @@ // after instantiating a plugin and the cached plugin ID was blindly written to the module file) if(pFound) { + bool maskCrashes = TrackerSettings::Instance().BrokenPluginsWorkaroundVSTMaskAllCrashes; Vst::AEffect *pEffect = nullptr; HINSTANCE hLibrary = nullptr; bool validPlugin = false; @@ -826,7 +793,6 @@ } #endif // MPT_WITH_VST -#endif // MODPLUG_TRACKER return false; } |
From: <sv...@op...> - 2024-08-03 14:41:56
|
Author: sagamusix Date: Sat Aug 3 16:41:44 2024 New Revision: 21320 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21320 Log: Merged revision(s) 21319 from trunk/OpenMPT: [Fix] VST: For plugin IDs with the highest bit set, cache information retrieval was not possible due to incorrect INI key formatting. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/soundlib/plugins/PluginManager.cpp Modified: branches/OpenMPT-1.31/soundlib/plugins/PluginManager.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/plugins/PluginManager.cpp Sat Aug 3 16:41:25 2024 (r21319) +++ branches/OpenMPT-1.31/soundlib/plugins/PluginManager.cpp Sat Aug 3 16:41:44 2024 (r21320) @@ -238,7 +238,7 @@ const std::string crcName = dllPath.ToUTF8(); const mpt::crc32 crc(crcName); - const mpt::ustring IDs = mpt::ufmt::HEX0<8>(pluginId1) + mpt::ufmt::HEX0<8>(pluginId2) + mpt::ufmt::HEX0<8>(crc.result()); + const mpt::ustring IDs = mpt::ufmt::HEX0<8>(static_cast<uint32>(pluginId1)) + mpt::ufmt::HEX0<8>(static_cast<uint32>(pluginId2)) + mpt::ufmt::HEX0<8>(crc.result()); mpt::PathString writePath = dllPath; if(theApp.IsPortableMode()) @@ -570,19 +570,20 @@ pluginList.push_back(plug); // Extract plugin IDs - for (int i = 0; i < 16; i++) + uint32 id1 = 0, id2 = 0; + for(int i = 0; i < 16; i++) { - int32 n = IDs[i] - '0'; - if (n > 9) n = IDs[i] + 10 - 'A'; - n &= 0x0f; + uint32 n = IDs[i] - '0'; + if(n > 9) + n = IDs[i] + 10 - 'A'; + n &= 0x0F; if (i < 8) - { - plug->pluginId1 = (plug->pluginId1 << 4) | n; - } else - { - plug->pluginId2 = (plug->pluginId2 << 4) | n; - } + id1 = (id1 << 4) | n; + else + id2 = (id2 << 4) | n; } + plug->pluginId1 = id1; + plug->pluginId2 = id2; const mpt::ustring flagKey = IDs + U_(".Flags"); plug->DecodeCacheFlags(cacheFile.Read<int32>(cacheSection, flagKey, 0)); |
From: <sv...@op...> - 2024-08-03 14:41:37
|
Author: sagamusix Date: Sat Aug 3 16:41:25 2024 New Revision: 21319 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21319 Log: [Fix] VST: For plugin IDs with the highest bit set, cache information retrieval was not possible due to incorrect INI key formatting. Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp ============================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Sat Aug 3 14:52:09 2024 (r21318) +++ trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Sat Aug 3 16:41:25 2024 (r21319) @@ -239,7 +239,7 @@ const std::string crcName = dllPath.ToUTF8(); const mpt::crc32 crc(crcName); - const mpt::ustring IDs = mpt::ufmt::HEX0<8>(pluginId1) + mpt::ufmt::HEX0<8>(pluginId2) + mpt::ufmt::HEX0<8>(crc.result()); + const mpt::ustring IDs = mpt::ufmt::HEX0<8>(static_cast<uint32>(pluginId1)) + mpt::ufmt::HEX0<8>(static_cast<uint32>(pluginId2)) + mpt::ufmt::HEX0<8>(crc.result()); mpt::PathString writePath = dllPath; if(theApp.IsPortableMode()) @@ -572,19 +572,20 @@ pluginList.push_back(plug); // Extract plugin IDs - for (int i = 0; i < 16; i++) + uint32 id1 = 0, id2 = 0; + for(int i = 0; i < 16; i++) { - int32 n = IDs[i] - '0'; - if (n > 9) n = IDs[i] + 10 - 'A'; - n &= 0x0f; + uint32 n = IDs[i] - '0'; + if(n > 9) + n = IDs[i] + 10 - 'A'; + n &= 0x0F; if (i < 8) - { - plug->pluginId1 = (plug->pluginId1 << 4) | n; - } else - { - plug->pluginId2 = (plug->pluginId2 << 4) | n; - } + id1 = (id1 << 4) | n; + else + id2 = (id2 << 4) | n; } + plug->pluginId1 = id1; + plug->pluginId2 = id2; const mpt::ustring flagKey = IDs + U_(".Flags"); plug->DecodeCacheFlags(cacheFile.Read<int32>(cacheSection, flagKey, 0)); |
From: <sv...@op...> - 2024-08-03 12:52:22
|
Author: sagamusix Date: Sat Aug 3 14:52:09 2024 New Revision: 21318 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21318 Log: Merged revision(s) 21265 from trunk/OpenMPT: [Imp] Note Properties: For XM, automatically round to the 16 available panning positions. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/mptrack/EffectInfo.cpp branches/OpenMPT-1.31/mptrack/EffectInfo.h branches/OpenMPT-1.31/mptrack/PatternEditorDialogs.cpp Modified: branches/OpenMPT-1.31/mptrack/EffectInfo.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/EffectInfo.cpp Sat Aug 3 14:43:58 2024 (r21317) +++ branches/OpenMPT-1.31/mptrack/EffectInfo.cpp Sat Aug 3 14:52:09 2024 (r21318) @@ -988,25 +988,29 @@ bool EffectInfo::GetVolCmdInfo(UINT ndx, CString *s, ModCommand::VOL *prangeMin, ModCommand::VOL *prangeMax) const { - if (s) s->Empty(); - if (prangeMin) *prangeMin = 0; - if (prangeMax) *prangeMax = 0; - if (ndx >= std::size(gVolCmdInfo)) return false; - if (s) - { + if(s) + s->Empty(); + if(prangeMin) + *prangeMin = 0; + if(prangeMax) + *prangeMax = 0; + if(ndx >= std::size(gVolCmdInfo)) + return false; + if(s) s->Format(_T("%c: %s"), sndFile.GetModSpecifications().GetVolEffectLetter(GetVolCmdFromIndex(ndx)), gVolCmdInfo[ndx].name); - } - if ((prangeMin) && (prangeMax)) + if(prangeMin && prangeMax) { switch(gVolCmdInfo[ndx].volCmd) { case VOLCMD_VOLUME: - case VOLCMD_PANNING: *prangeMax = 64; break; - + case VOLCMD_PANNING: + *prangeMax = (sndFile.GetType() & MOD_TYPE_XM) ? 15 : 64; + break; default: *prangeMax = (sndFile.GetType() & MOD_TYPE_XM) ? 15 : 9; + break; } } return (sndFile.GetType() & gVolCmdInfo[ndx].supportedFormats); @@ -1106,5 +1110,24 @@ return true; } + // Map an effect value to slider position +UINT EffectInfo::MapVolumeToPos(VolumeCommand cmd, ModCommand::VOL param) const +{ + if(cmd == VOLCMD_PANNING && sndFile.GetType() == MOD_TYPE_XM) + return param / 4u; + else + return param; +} + + +// Map slider position to an effect value +ModCommand::VOL EffectInfo::MapPosToVolume(VolumeCommand cmd, UINT pos) const +{ + if(cmd == VOLCMD_PANNING && sndFile.GetType() == MOD_TYPE_XM) + return static_cast<ModCommand::VOL>(std::min(pos * 4u, 64u)); + else + return static_cast<ModCommand::VOL>(std::min(pos, 64u)); +} + OPENMPT_NAMESPACE_END Modified: branches/OpenMPT-1.31/mptrack/EffectInfo.h ============================================================================== --- branches/OpenMPT-1.31/mptrack/EffectInfo.h Sat Aug 3 14:43:58 2024 (r21317) +++ branches/OpenMPT-1.31/mptrack/EffectInfo.h Sat Aug 3 14:52:09 2024 (r21318) @@ -62,6 +62,10 @@ bool GetVolCmdInfo(UINT ndx, CString *s, ModCommand::VOL *prangeMin = nullptr, ModCommand::VOL *prangeMax = nullptr) const; // Get effect name and parameter description bool GetVolCmdParamInfo(const ModCommand &m, CString *s) const; + // Map an effect value to slider position + UINT MapVolumeToPos(VolumeCommand cmd, ModCommand::VOL param) const; + // Map slider position to an effect value + ModCommand::VOL MapPosToVolume(VolumeCommand cmd, UINT pos) const; }; OPENMPT_NAMESPACE_END Modified: branches/OpenMPT-1.31/mptrack/PatternEditorDialogs.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/PatternEditorDialogs.cpp Sat Aug 3 14:43:58 2024 (r21317) +++ branches/OpenMPT-1.31/mptrack/PatternEditorDialogs.cpp Sat Aug 3 14:52:09 2024 (r21318) @@ -598,7 +598,7 @@ sldVolParam.EnableWindow(TRUE); sldVolParam.SetRange(rangeMin, rangeMax); Limit(m->vol, rangeMin, rangeMax); - sldVolParam.SetPos(m->vol); + sldVolParam.SetPos(effectInfo.MapVolumeToPos(m->volcmd, m->vol)); } else { // Why does this not update the display at all? @@ -706,7 +706,7 @@ newVolCmd = effectInfo.GetVolCmdFromIndex(static_cast<UINT>(cbnVolCmd.GetItemData(n))); } - newVol = static_cast<ModCommand::VOL>(sldVolParam.GetPos()); + newVol = effectInfo.MapPosToVolume(newVolCmd, sldVolParam.GetPos()); const bool volCmdChanged = m->volcmd != newVolCmd; if(volCmdChanged || m->vol != newVol) @@ -1439,7 +1439,7 @@ bool update = false; // Volume slider - if(bar == reinterpret_cast<CScrollBar *>(&m_volSlider)) + if(bar->m_hWnd == m_volSlider.m_hWnd) { uint16 pos = static_cast<uint16>(m_volSlider.GetPos()); PrepareUndo(); @@ -1450,7 +1450,7 @@ } } // Pan slider - if(bar == reinterpret_cast<CScrollBar *>(&m_panSlider)) + if(bar->m_hWnd == m_panSlider.m_hWnd) { uint16 pos = static_cast<uint16>(m_panSlider.GetPos()); PrepareUndo(); |
From: <sv...@op...> - 2024-08-03 12:44:11
|
Author: sagamusix Date: Sat Aug 3 14:43:58 2024 New Revision: 21317 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21317 Log: [New] When increasing pattern size, there is now an option to repeat the exising pattern contents to the newly-added rows (https://bugs.openmpt.org/view.php?id=431). Modified: trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp trunk/OpenMPT/mptrack/mptrack.rc Modified: trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp ============================================================================== --- trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp Wed Jul 31 14:38:00 2024 (r21316) +++ trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp Sat Aug 3 14:43:58 2024 (r21317) @@ -287,15 +287,16 @@ const ROWINDEX newSize = (ROWINDEX)GetDlgItemInt(IDC_COMBO1, NULL, FALSE); // Check if any pattern data would be removed. - bool resize = (newSize != sndFile.Patterns[m_nPattern].GetNumRows()); - bool resizeAtEnd = IsDlgButtonChecked(IDC_RADIO2) != BST_UNCHECKED; - if(newSize < sndFile.Patterns[m_nPattern].GetNumRows()) + const ROWINDEX oldSize = pattern.GetNumRows(); + bool resize = newSize != oldSize; + const bool resizeAtEnd = IsDlgButtonChecked(IDC_RADIO2) != BST_UNCHECKED; + if(newSize < pattern.GetNumRows()) { ROWINDEX firstRow = resizeAtEnd ? newSize : 0; - ROWINDEX lastRow = resizeAtEnd ? sndFile.Patterns[m_nPattern].GetNumRows() : sndFile.Patterns[m_nPattern].GetNumRows() - newSize; + ROWINDEX lastRow = resizeAtEnd ? oldSize : oldSize - newSize; for(ROWINDEX row = firstRow; row < lastRow; row++) { - if(!sndFile.Patterns[m_nPattern].IsEmptyRow(row)) + if(!pattern.IsEmptyRow(row)) { resize = (Reporting::Confirm(MPT_AFORMAT("Data at the {} of the pattern will be lost.\nDo you want to continue?")(resizeAtEnd ? "end" : "start"), "Shrink Pattern") == cnfYes); break; @@ -305,10 +306,25 @@ if(resize) { + const bool copyContents = (newSize > oldSize) && IsDlgButtonChecked(IDC_CHECK2) != BST_UNCHECKED; modDoc.BeginWaitCursor(); - modDoc.GetPatternUndo().PrepareUndo(m_nPattern, 0, 0, sndFile.Patterns[m_nPattern].GetNumChannels(), sndFile.Patterns[m_nPattern].GetNumRows(), "Resize"); + modDoc.GetPatternUndo().PrepareUndo(m_nPattern, 0, 0, sndFile.Patterns[m_nPattern].GetNumChannels(), oldSize, "Resize"); if(sndFile.Patterns[m_nPattern].Resize(newSize, true, resizeAtEnd)) { + if(copyContents) + { + const ROWINDEX copyRows = newSize - oldSize; + const ROWINDEX sourceBaseRow = resizeAtEnd ? 0 : copyRows; + const ROWINDEX baseOffset = resizeAtEnd ? 0 : (oldSize - copyRows % oldSize); + ROWINDEX destRow = resizeAtEnd ? oldSize : 0; + for(ROWINDEX row = 0; row < copyRows; row++, destRow++) + { + ROWINDEX sourceRow = sourceBaseRow + (baseOffset + row) % oldSize; + const auto sourceRowData = pattern.GetRow(sourceRow); + auto destRowData = pattern.GetRow(destRow); + std::copy(sourceRowData.begin(), sourceRowData.end(), destRowData.begin()); + } + } modDoc.SetModified(); } modDoc.EndWaitCursor(); Modified: trunk/OpenMPT/mptrack/mptrack.rc ============================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc Wed Jul 31 14:38:00 2024 (r21316) +++ trunk/OpenMPT/mptrack/mptrack.rc Sat Aug 3 14:43:58 2024 (r21317) @@ -1854,27 +1854,29 @@ CONTROL "Replace &All (No confirmation)",IDC_CHECK8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,126,186,10 END -IDD_PATTERN_PROPERTIES DIALOGEX 0, 0, 191, 149 +IDD_PATTERN_PROPERTIES DIALOGEX 0, 0, 191, 170 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Pattern Properties" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - LTEXT "Rows:",IDC_STATIC,6,6,108,8 + LTEXT "&Rows:",IDC_STATIC,6,6,108,8 COMBOBOX IDC_COMBO1,6,18,48,93,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&/2",IDC_BUTTON_HALF,60,18,18,12 PUSHBUTTON "&x2",IDC_BUTTON_DOUBLE,84,18,18,12 LTEXT "Remove rows from / Add rows at:",IDC_STATIC,6,36,126,8 CONTROL "&Top of Pattern",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,6,48,84,12 CONTROL "&Bottom of Pattern",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,90,48,84,12 - CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,6,66,174,1 - CONTROL "Override &song signature:",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,72,108,12 - PUSHBUTTON "Configure S&wing",IDC_BUTTON1,114,72,66,12 - LTEXT "Rows per beat",IDC_STATIC,54,92,126,8 - EDITTEXT IDC_ROWSPERBEAT,18,90,30,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "Rows per measure",IDC_STATIC,54,110,126,8 - EDITTEXT IDC_ROWSPERMEASURE,18,108,30,12,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,6,126,174,1 - LTEXT "Pattern Info",IDC_TEXT1,6,132,174,14 + CONTROL "Repeat pattern contents when &adding rows",IDC_CHECK2, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,66,168,10 + CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,6,84,174,1 + CONTROL "Override &song signature:",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,90,108,12 + PUSHBUTTON "Configure S&wing",IDC_BUTTON1,114,90,66,12 + LTEXT "Rows per b&eat",IDC_STATIC,54,111,126,8 + EDITTEXT IDC_ROWSPERBEAT,18,108,30,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "Rows per &measure",IDC_STATIC,54,128,126,8 + EDITTEXT IDC_ROWSPERMEASURE,18,127,30,12,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,6,144,174,1 + LTEXT "Pattern Info",IDC_TEXT1,6,151,174,14 DEFPUSHBUTTON "&OK",IDOK,132,6,50,14 PUSHBUTTON "&Cancel",IDCANCEL,132,24,50,14 END @@ -2429,7 +2431,7 @@ LEFTMARGIN, 4 RIGHTMARGIN, 187 TOPMARGIN, 4 - BOTTOMMARGIN, 145 + BOTTOMMARGIN, 166 END IDD_PATTERN_EDITCOMMAND, DIALOG |
From: <sv...@op...> - 2024-07-31 12:38:11
|
Author: manx Date: Wed Jul 31 14:38:00 2024 New Revision: 21316 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21316 Log: Merged revision(s) 21311-21313 from trunk/OpenMPT: [New] build: CI: GitHub: macOS: Add Autotools builder. ........ [Fix] build: CI: GitHub: macOS: Install Autoconf and Automake. ........ [Fix] build: CI: GitHub: macOS: Install libtool. ........ Added: branches/OpenMPT-1.31/.github/workflows/macOS-Autotools.yml - copied, changed from r21313, trunk/OpenMPT/.github/workflows/macOS-Autotools.yml Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/.github/workflows/macOS-Makefile.yml Copied and modified: branches/OpenMPT-1.31/.github/workflows/macOS-Autotools.yml (from r21313, trunk/OpenMPT/.github/workflows/macOS-Autotools.yml) ============================================================================== --- trunk/OpenMPT/.github/workflows/macOS-Autotools.yml Wed Jul 31 11:54:14 2024 (r21313, copy source) +++ branches/OpenMPT-1.31/.github/workflows/macOS-Autotools.yml Wed Jul 31 14:38:00 2024 (r21316) @@ -2,9 +2,7 @@ on: push: - branches: [ master ] - pull_request: - branches: [ master ] + branches: [ OpenMPT-1.31 ] jobs: build: Modified: branches/OpenMPT-1.31/.github/workflows/macOS-Makefile.yml ============================================================================== --- branches/OpenMPT-1.31/.github/workflows/macOS-Makefile.yml Wed Jul 31 14:37:07 2024 (r21315) +++ branches/OpenMPT-1.31/.github/workflows/macOS-Makefile.yml Wed Jul 31 14:38:00 2024 (r21316) @@ -53,7 +53,7 @@ if: ${{ matrix.host == 'macos-12' || matrix.host == 'macos-13' }} run: brew unlink python@3.11 && brew unlink python@3.12 && brew link --overwrite python@3.11 && brew link --overwrite python@3.12 - name: install dependencies - run: brew update && brew upgrade && brew install p7zip help2man doxygen autoconf-archive mpg123 libogg libvorbis portaudio flac libsndfile sdl2 + run: brew update && brew upgrade && brew install p7zip help2man doxygen autoconf autoconf-archive automake libtool mpg123 libogg libvorbis portaudio flac libsndfile sdl2 - name: selecting Xcode version run: sudo xcode-select --switch /Applications/Xcode_${{matrix.compiler}}.app - name: setup parallel make |
From: <sv...@op...> - 2024-07-31 12:37:20
|
Author: manx Date: Wed Jul 31 14:37:07 2024 New Revision: 21315 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21315 Log: Merged revision(s) 21314 from trunk/OpenMPT: [Fix] build: Autotools: Support macOS tar. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/build/autotools/autoconfiscate.sh Modified: branches/OpenMPT-1.31/build/autotools/autoconfiscate.sh ============================================================================== --- branches/OpenMPT-1.31/build/autotools/autoconfiscate.sh Wed Jul 31 13:23:31 2024 (r21314) +++ branches/OpenMPT-1.31/build/autotools/autoconfiscate.sh Wed Jul 31 14:37:07 2024 (r21315) @@ -11,17 +11,25 @@ echo "Detecting OS ..." UNAME_S="$(uname -s)" -if [[ $UNAME_S == *"BSD"* ]]; then - if [[ $UNAME_S == "OpenBSD" ]]; then + +case $UNAME_S in + Darwin) + TAR_FLAVOUR=mac + MAKE=make + ;; + OpenBSD) TAR_FLAVOUR=bsd - else + MAKE=gmake + ;; + *BSD*) TAR_FLAVOUR=libarchive - fi - MAKE=gmake -else - TAR_FLAVOUR=gnu - MAKE=make -fi + MAKE=gmake + ;; + *) + TAR_FLAVOUR=gnu + MAKE=make + ;; +esac echo "Gathering version ..." . libopenmpt/libopenmpt_version.mk @@ -276,11 +284,14 @@ cp *.tar.gz libopenmpt/src.autotools/$MPT_LIBOPENMPT_VERSION/ case $TAR_FLAVOUR in + mac) + tar -cv -f ../dist-autotools.tar libopenmpt + ;; bsd) tar -cv -N -f ../dist-autotools.tar libopenmpt ;; libarchive) - tar -cv --numeric-owner --uname "" --gname "" --uid 0 --gid 0 -f ../dist-autotools.tar libopenmpt + tar -cv --numeric-owner --uname "" --gname "" --uid 0 --gid 0 -f ../dist-autotools.tar libopenmpt ;; gnu) tar -cv --numeric-owner --owner=0 --group=0 -f ../dist-autotools.tar libopenmpt |
From: <sv...@op...> - 2024-07-31 11:23:43
|
Author: manx Date: Wed Jul 31 13:23:31 2024 New Revision: 21314 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21314 Log: [Fix] build: Autotools: Support macOS tar. Modified: trunk/OpenMPT/build/autotools/autoconfiscate.sh Modified: trunk/OpenMPT/build/autotools/autoconfiscate.sh ============================================================================== --- trunk/OpenMPT/build/autotools/autoconfiscate.sh Wed Jul 31 11:54:14 2024 (r21313) +++ trunk/OpenMPT/build/autotools/autoconfiscate.sh Wed Jul 31 13:23:31 2024 (r21314) @@ -11,17 +11,25 @@ echo "Detecting OS ..." UNAME_S="$(uname -s)" -if [[ $UNAME_S == *"BSD"* ]]; then - if [[ $UNAME_S == "OpenBSD" ]]; then + +case $UNAME_S in + Darwin) + TAR_FLAVOUR=mac + MAKE=make + ;; + OpenBSD) TAR_FLAVOUR=bsd - else + MAKE=gmake + ;; + *BSD*) TAR_FLAVOUR=libarchive - fi - MAKE=gmake -else - TAR_FLAVOUR=gnu - MAKE=make -fi + MAKE=gmake + ;; + *) + TAR_FLAVOUR=gnu + MAKE=make + ;; +esac echo "Gathering version ..." . libopenmpt/libopenmpt_version.mk @@ -276,11 +284,14 @@ cp *.tar.gz libopenmpt/src.autotools/$MPT_LIBOPENMPT_VERSION/ case $TAR_FLAVOUR in + mac) + tar -cv -f ../dist-autotools.tar libopenmpt + ;; bsd) tar -cv -N -f ../dist-autotools.tar libopenmpt ;; libarchive) - tar -cv --numeric-owner --uname "" --gname "" --uid 0 --gid 0 -f ../dist-autotools.tar libopenmpt + tar -cv --numeric-owner --uname "" --gname "" --uid 0 --gid 0 -f ../dist-autotools.tar libopenmpt ;; gnu) tar -cv --numeric-owner --owner=0 --group=0 -f ../dist-autotools.tar libopenmpt |
From: <sv...@op...> - 2024-07-31 09:54:26
|
Author: manx Date: Wed Jul 31 11:54:14 2024 New Revision: 21313 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21313 Log: [Fix] build: CI: GitHub: macOS: Install libtool. Modified: trunk/OpenMPT/.github/workflows/macOS-Autotools.yml trunk/OpenMPT/.github/workflows/macOS-Makefile.yml Modified: trunk/OpenMPT/.github/workflows/macOS-Autotools.yml ============================================================================== --- trunk/OpenMPT/.github/workflows/macOS-Autotools.yml Wed Jul 31 11:53:05 2024 (r21312) +++ trunk/OpenMPT/.github/workflows/macOS-Autotools.yml Wed Jul 31 11:54:14 2024 (r21313) @@ -33,7 +33,7 @@ if: ${{ matrix.host == 'macos-12' || matrix.host == 'macos-13' }} run: brew unlink python@3.11 && brew unlink python@3.12 && brew link --overwrite python@3.11 && brew link --overwrite python@3.12 - name: install dependencies - run: brew update && brew upgrade && brew install p7zip help2man doxygen autoconf autoconf-archive automake mpg123 libogg libvorbis portaudio flac libsndfile sdl2 + run: brew update && brew upgrade && brew install p7zip help2man doxygen autoconf autoconf-archive automake libtool mpg123 libogg libvorbis portaudio flac libsndfile sdl2 - name: selecting Xcode version run: sudo xcode-select --switch /Applications/Xcode_${{matrix.compiler}}.app - name: setup parallel make Modified: trunk/OpenMPT/.github/workflows/macOS-Makefile.yml ============================================================================== --- trunk/OpenMPT/.github/workflows/macOS-Makefile.yml Wed Jul 31 11:53:05 2024 (r21312) +++ trunk/OpenMPT/.github/workflows/macOS-Makefile.yml Wed Jul 31 11:54:14 2024 (r21313) @@ -73,7 +73,7 @@ if: ${{ matrix.host == 'macos-12' || matrix.host == 'macos-13' }} run: brew unlink python@3.11 && brew unlink python@3.12 && brew link --overwrite python@3.11 && brew link --overwrite python@3.12 - name: install dependencies - run: brew update && brew upgrade && brew install p7zip help2man doxygen autoconf autoconf-archive automake mpg123 libogg libvorbis portaudio flac libsndfile sdl2 + run: brew update && brew upgrade && brew install p7zip help2man doxygen autoconf autoconf-archive automake libtool mpg123 libogg libvorbis portaudio flac libsndfile sdl2 - name: selecting Xcode version run: sudo xcode-select --switch /Applications/Xcode_${{matrix.compiler}}.app - name: setup parallel make |
From: <sv...@op...> - 2024-07-31 09:53:18
|
Author: manx Date: Wed Jul 31 11:53:05 2024 New Revision: 21312 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21312 Log: [Fix] build: CI: GitHub: macOS: Install Autoconf and Automake. Modified: trunk/OpenMPT/.github/workflows/macOS-Autotools.yml trunk/OpenMPT/.github/workflows/macOS-Makefile.yml Modified: trunk/OpenMPT/.github/workflows/macOS-Autotools.yml ============================================================================== --- trunk/OpenMPT/.github/workflows/macOS-Autotools.yml Wed Jul 31 10:52:21 2024 (r21311) +++ trunk/OpenMPT/.github/workflows/macOS-Autotools.yml Wed Jul 31 11:53:05 2024 (r21312) @@ -33,7 +33,7 @@ if: ${{ matrix.host == 'macos-12' || matrix.host == 'macos-13' }} run: brew unlink python@3.11 && brew unlink python@3.12 && brew link --overwrite python@3.11 && brew link --overwrite python@3.12 - name: install dependencies - run: brew update && brew upgrade && brew install p7zip help2man doxygen autoconf-archive mpg123 libogg libvorbis portaudio flac libsndfile sdl2 + run: brew update && brew upgrade && brew install p7zip help2man doxygen autoconf autoconf-archive automake mpg123 libogg libvorbis portaudio flac libsndfile sdl2 - name: selecting Xcode version run: sudo xcode-select --switch /Applications/Xcode_${{matrix.compiler}}.app - name: setup parallel make Modified: trunk/OpenMPT/.github/workflows/macOS-Makefile.yml ============================================================================== --- trunk/OpenMPT/.github/workflows/macOS-Makefile.yml Wed Jul 31 10:52:21 2024 (r21311) +++ trunk/OpenMPT/.github/workflows/macOS-Makefile.yml Wed Jul 31 11:53:05 2024 (r21312) @@ -73,7 +73,7 @@ if: ${{ matrix.host == 'macos-12' || matrix.host == 'macos-13' }} run: brew unlink python@3.11 && brew unlink python@3.12 && brew link --overwrite python@3.11 && brew link --overwrite python@3.12 - name: install dependencies - run: brew update && brew upgrade && brew install p7zip help2man doxygen autoconf-archive mpg123 libogg libvorbis portaudio flac libsndfile sdl2 + run: brew update && brew upgrade && brew install p7zip help2man doxygen autoconf autoconf-archive automake mpg123 libogg libvorbis portaudio flac libsndfile sdl2 - name: selecting Xcode version run: sudo xcode-select --switch /Applications/Xcode_${{matrix.compiler}}.app - name: setup parallel make |
From: <sv...@op...> - 2024-07-31 08:52:33
|
Author: manx Date: Wed Jul 31 10:52:21 2024 New Revision: 21311 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21311 Log: [New] build: CI: GitHub: macOS: Add Autotools builder. Added: trunk/OpenMPT/.github/workflows/macOS-Autotools.yml Added: trunk/OpenMPT/.github/workflows/macOS-Autotools.yml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/OpenMPT/.github/workflows/macOS-Autotools.yml Wed Jul 31 10:52:21 2024 (r21311) @@ -0,0 +1,42 @@ +name: macOS Autotools + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + strategy: + fail-fast: false + matrix: + include: + - { host: macos-14, compiler: '16.0' } + - { host: macos-14, compiler: '15.4' } + - { host: macos-14, compiler: '15.3' } + - { host: macos-13, compiler: '15.2' } + - { host: macos-12, compiler: '14.2' } + concurrency: + group: ${{github.ref}}-${{github.workflow}}-${{matrix.host}}-${{matrix.compiler}}-autotools + cancel-in-progress: true + runs-on: ${{matrix.host}} + steps: + - uses: actions/checkout@v4 + - name: fixup GitHub Homebrew xcbeautify breakage + if: ${{ matrix.host == 'macos-12' }} + run: brew pin xcbeautify + - name: fixup GitHub Homebrew node breakage + if: ${{ matrix.host == 'macos-12' }} + run: brew unlink node@18 && brew unlink node && brew link --overwrite node + - name: fixup GitHub Homebrew python breakage + if: ${{ matrix.host == 'macos-12' || matrix.host == 'macos-13' }} + run: brew unlink python@3.11 && brew unlink python@3.12 && brew link --overwrite python@3.11 && brew link --overwrite python@3.12 + - name: install dependencies + run: brew update && brew upgrade && brew install p7zip help2man doxygen autoconf-archive mpg123 libogg libvorbis portaudio flac libsndfile sdl2 + - name: selecting Xcode version + run: sudo xcode-select --switch /Applications/Xcode_${{matrix.compiler}}.app + - name: setup parallel make + run: echo "MAKEFLAGS=-j$(sysctl -n hw.ncpu)" >> $GITHUB_ENV + - name: build + run: ./build/autotools/autoconfiscate.sh |
From: <sv...@op...> - 2024-07-31 08:31:38
|
Author: manx Date: Wed Jul 31 10:31:30 2024 New Revision: 21310 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21310 Log: [Var] Update .gitignore. Modified: trunk/OpenMPT/.gitignore Modified: trunk/OpenMPT/.gitignore ============================================================================== --- trunk/OpenMPT/.gitignore Tue Jul 30 07:28:13 2024 (r21309) +++ trunk/OpenMPT/.gitignore Wed Jul 31 10:31:30 2024 (r21310) @@ -51,6 +51,8 @@ /build/vs2019win10uwp/ext/Generated Files /build/vs2019win7/*.user /build/vs2019win7/.vs +/build/vs2019win8/*.user +/build/vs2019win8/.vs /build/vs2019win81/*.user /build/vs2019win81/.vs /build/vs2022win10/*.user @@ -67,6 +69,8 @@ /build/vs2022win7/*.user /build/vs2022win7/.vs /build/vs2022win7/ext/*.user +/build/vs2022win8/*.user +/build/vs2022win8/.vs /build/vs2022win81/*.user /build/vs2022win81/.vs /build/vs2022win81/ext/*.user |
From: <sv...@op...> - 2024-07-30 05:28:25
|
Author: manx Date: Tue Jul 30 07:28:13 2024 New Revision: 21309 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21309 Log: [Fix] build: libopenmpt: Create arm-legacy directories. Modified: trunk/OpenMPT/build/auto/package_libopenmpt_multi_args.cmd Modified: trunk/OpenMPT/build/auto/package_libopenmpt_multi_args.cmd ============================================================================== --- trunk/OpenMPT/build/auto/package_libopenmpt_multi_args.cmd Mon Jul 29 22:59:40 2024 (r21308) +++ trunk/OpenMPT/build/auto/package_libopenmpt_multi_args.cmd Tue Jul 30 07:28:13 2024 (r21309) @@ -38,7 +38,7 @@ mkdir openmpt123\amd64 mkdir openmpt123\x86-legacy mkdir openmpt123\amd64-legacy -mkdir openmpt123\arm +mkdir openmpt123\arm-legacy mkdir openmpt123\arm64 mkdir XMPlay mkdir Winamp @@ -154,15 +154,15 @@ mkdir lib mkdir lib\x86 mkdir lib\amd64 -mkdir lib\arm mkdir lib\arm64 +mkdir lib\arm-legacy mkdir lib\x86-legacy mkdir lib\amd64-legacy mkdir bin mkdir bin\x86 mkdir bin\amd64 -mkdir bin\arm mkdir bin\arm64 +mkdir bin\arm-legacy mkdir bin\x86-legacy mkdir bin\amd64-legacy copy /y ..\..\LICENSE .\LICENSE.txt || goto error |
From: <sv...@op...> - 2024-07-29 20:59:48
|
Author: manx Date: Mon Jul 29 22:59:40 2024 New Revision: 21308 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21308 Log: [Fix] build: Add win8 to build/auto/setup_arguments.cmd. Modified: trunk/OpenMPT/build/auto/setup_arguments.cmd Modified: trunk/OpenMPT/build/auto/setup_arguments.cmd ============================================================================== --- trunk/OpenMPT/build/auto/setup_arguments.cmd Mon Jul 29 21:40:42 2024 (r21307) +++ trunk/OpenMPT/build/auto/setup_arguments.cmd Mon Jul 29 22:59:40 2024 (r21308) @@ -28,6 +28,7 @@ if "%MPT_VS_TARGET%" == "winxp" set MPT_VS_WITHTARGET=%MPT_VS_VER%winxp if "%MPT_VS_TARGET%" == "vista" set MPT_VS_WITHTARGET=%MPT_VS_VER%winvista if "%MPT_VS_TARGET%" == "win7" set MPT_VS_WITHTARGET=%MPT_VS_VER%win7 +if "%MPT_VS_TARGET%" == "win8" set MPT_VS_WITHTARGET=%MPT_VS_VER%win8 if "%MPT_VS_TARGET%" == "win81" set MPT_VS_WITHTARGET=%MPT_VS_VER%win81 if "%MPT_VS_TARGET%" == "win10" set MPT_VS_WITHTARGET=%MPT_VS_VER%win10 if "%MPT_VS_TARGET%" == "default" set MPT_VS_WITHTARGET=%MPT_VS_VER%win10 @@ -39,6 +40,7 @@ if "%MPT_VS_TARGET%" == "winxp" set MPT_BIN_TARGET=winxp if "%MPT_VS_TARGET%" == "vista" set MPT_BIN_TARGET=vista if "%MPT_VS_TARGET%" == "win7" set MPT_BIN_TARGET=win7 + if "%MPT_VS_TARGET%" == "win8" set MPT_BIN_TARGET=win8 if "%MPT_VS_TARGET%" == "win81" set MPT_BIN_TARGET=win81 if "%MPT_VS_TARGET%" == "win10" set MPT_BIN_TARGET=win10 if "%MPT_VS_TARGET%" == "default" set MPT_BIN_TARGET=win10 @@ -49,6 +51,7 @@ if "%MPT_VS_TARGET%" == "winxp" set MPT_BIN_TARGET=winxp if "%MPT_VS_TARGET%" == "vista" set MPT_BIN_TARGET=vista if "%MPT_VS_TARGET%" == "win7" set MPT_BIN_TARGET=win7 + if "%MPT_VS_TARGET%" == "win8" set MPT_BIN_TARGET=win8 if "%MPT_VS_TARGET%" == "win81" set MPT_BIN_TARGET=win81 if "%MPT_VS_TARGET%" == "win10" set MPT_BIN_TARGET=win10 if "%MPT_VS_TARGET%" == "default" set MPT_BIN_TARGET=win10 @@ -59,6 +62,7 @@ if "%MPT_VS_TARGET%" == "winxp" set MPT_BIN_TARGET=winxp if "%MPT_VS_TARGET%" == "vista" set MPT_BIN_TARGET=vista if "%MPT_VS_TARGET%" == "win7" set MPT_BIN_TARGET=win7 + if "%MPT_VS_TARGET%" == "win8" set MPT_BIN_TARGET=win8 if "%MPT_VS_TARGET%" == "win81" set MPT_BIN_TARGET=win81 if "%MPT_VS_TARGET%" == "win10" set MPT_BIN_TARGET=win10 if "%MPT_VS_TARGET%" == "default" set MPT_BIN_TARGET=win10 @@ -69,6 +73,7 @@ if "%MPT_VS_TARGET%" == "winxp" set MPT_BIN_TARGET=winxp if "%MPT_VS_TARGET%" == "vista" set MPT_BIN_TARGET=vista if "%MPT_VS_TARGET%" == "win7" set MPT_BIN_TARGET=win7 + if "%MPT_VS_TARGET%" == "win8" set MPT_BIN_TARGET=win8 if "%MPT_VS_TARGET%" == "win81" set MPT_BIN_TARGET=win81 if "%MPT_VS_TARGET%" == "win10" set MPT_BIN_TARGET=win10 if "%MPT_VS_TARGET%" == "default" set MPT_BIN_TARGET=win10 @@ -79,6 +84,7 @@ if "%MPT_VS_TARGET%" == "winxp" set MPT_BIN_TARGET32=winxp if "%MPT_VS_TARGET%" == "vista" set MPT_BIN_TARGET32=vista if "%MPT_VS_TARGET%" == "win7" set MPT_BIN_TARGET32=win7 +if "%MPT_VS_TARGET%" == "win8" set MPT_BIN_TARGET32=win8 if "%MPT_VS_TARGET%" == "win81" set MPT_BIN_TARGET32=win81 if "%MPT_VS_TARGET%" == "win10" set MPT_BIN_TARGET32=win10 if "%MPT_VS_TARGET%" == "default" set MPT_BIN_TARGET32=win10 @@ -88,6 +94,7 @@ if "%MPT_VS_TARGET%" == "winxp" set MPT_BIN_TARGET64=winxp if "%MPT_VS_TARGET%" == "vista" set MPT_BIN_TARGET64=vista if "%MPT_VS_TARGET%" == "win7" set MPT_BIN_TARGET64=win7 +if "%MPT_VS_TARGET%" == "win8" set MPT_BIN_TARGET64=win8 if "%MPT_VS_TARGET%" == "win81" set MPT_BIN_TARGET64=win81 if "%MPT_VS_TARGET%" == "win10" set MPT_BIN_TARGET64=win10 if "%MPT_VS_TARGET%" == "default" set MPT_BIN_TARGET64=win10 @@ -119,6 +126,7 @@ if "%MPT_VS_TARGET%" == "winxp" set MPT_DIST_VARIANT_OS=winxp if "%MPT_VS_TARGET%" == "vista" set MPT_DIST_VARIANT_OS=winvista if "%MPT_VS_TARGET%" == "win7" set MPT_DIST_VARIANT_OS=win7 +if "%MPT_VS_TARGET%" == "win8" set MPT_DIST_VARIANT_OS=win8 if "%MPT_VS_TARGET%" == "win81" set MPT_DIST_VARIANT_OS=win81 if "%MPT_VS_TARGET%" == "win10" set MPT_DIST_VARIANT_OS=win10 if "%MPT_VS_TARGET%" == "default" set MPT_DIST_VARIANT_OS=win10 @@ -131,6 +139,7 @@ if "%MPT_VS_TARGET%" == "winxp" set MPT_DIST_VARIANT_PREFIX=retro-winxp if "%MPT_VS_TARGET%" == "vista" set MPT_DIST_VARIANT_PREFIX=retro-winvista if "%MPT_VS_TARGET%" == "win7" set MPT_DIST_VARIANT_PREFIX=win7 +if "%MPT_VS_TARGET%" == "win8" set MPT_DIST_VARIANT_PREFIX=win8 if "%MPT_VS_TARGET%" == "win81" set MPT_DIST_VARIANT_PREFIX=win81 if "%MPT_VS_TARGET%" == "win10" set MPT_DIST_VARIANT_PREFIX=win10 if "%MPT_VS_TARGET%" == "default" set MPT_DIST_VARIANT_PREFIX= |
From: <sv...@op...> - 2024-07-29 19:40:49
|
Author: manx Date: Mon Jul 29 21:40:42 2024 New Revision: 21307 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21307 Log: [Mod] build: libopenmpt: Use Windows 8 builds for arm32, and rename directory to arm-legacy. Modified: trunk/OpenMPT/build/auto/package_libopenmpt_multi_args.cmd Modified: trunk/OpenMPT/build/auto/package_libopenmpt_multi_args.cmd ============================================================================== --- trunk/OpenMPT/build/auto/package_libopenmpt_multi_args.cmd Mon Jul 29 20:25:47 2024 (r21306) +++ trunk/OpenMPT/build/auto/package_libopenmpt_multi_args.cmd Mon Jul 29 21:40:42 2024 (r21307) @@ -89,8 +89,8 @@ copy /y ..\..\bin\release\%MPT_VS_VER%-win10-static\amd64\openmpt-mpg123.dll .\openmpt123\amd64\ || goto error copy /y ..\..\bin\release\%MPT_VS_VER%-win10-static\arm64\openmpt123.exe .\openmpt123\arm64\ || goto error copy /y ..\..\bin\release\%MPT_VS_VER%-win10-static\arm64\openmpt-mpg123.dll .\openmpt123\arm64\ || goto error -copy /y ..\..\bin\release\%MPT_VS_VER%-win8-static\arm-legacy\openmpt123.exe .\openmpt123\arm-legacy\ || goto error -copy /y ..\..\bin\release\%MPT_VS_VER%-win8-static\arm-legacy\openmpt-mpg123.dll .\openmpt123\arm-legacy\ || goto error +copy /y ..\..\bin\release\%MPT_VS_VER%-win8-static\arm\openmpt123.exe .\openmpt123\arm-legacy\ || goto error +copy /y ..\..\bin\release\%MPT_VS_VER%-win8-static\arm\openmpt-mpg123.dll .\openmpt123\arm-legacy\ || goto error copy /y ..\..\bin\release\%MPT_VS_VER%-win7-static\x86\openmpt123.exe .\openmpt123\x86-legacy\ || goto error copy /y ..\..\bin\release\%MPT_VS_VER%-win7-static\x86\openmpt-mpg123.dll .\openmpt123\x86-legacy\ || goto error copy /y ..\..\bin\release\%MPT_VS_VER%-win7-static\amd64\openmpt123.exe .\openmpt123\amd64-legacy\ || goto error |
From: <sv...@op...> - 2024-07-29 18:25:54
|
Author: manx Date: Mon Jul 29 20:25:47 2024 New Revision: 21306 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21306 Log: [Doc] libopenmpt: Update changelog. Modified: trunk/OpenMPT/doc/libopenmpt/changelog.md Modified: trunk/OpenMPT/doc/libopenmpt/changelog.md ============================================================================== --- trunk/OpenMPT/doc/libopenmpt/changelog.md Mon Jul 29 20:22:08 2024 (r21305) +++ trunk/OpenMPT/doc/libopenmpt/changelog.md Mon Jul 29 20:25:47 2024 (r21306) @@ -13,6 +13,7 @@ DXE (use `ENABLE_DXE=0` to disable). * [**New**] New `Makefile` `CONFIG=mingw-w64` option `WINDOWS_CRT=[crtdll,msvcrt,ucrt]` to select the toolchain CRT library. + * [**New**] 32bit ARM builds now support Windows 8 (Windows RT) again. * [**Change**] DOS builds now use zlib, libmpg123, libogg, and libvorbis instead of miniz, minimp3, and stb_vorbis by default. |