diff --git a/NeuralAmpModeler/NeuralAmpModelerControls.h b/NeuralAmpModeler/NeuralAmpModelerControls.h index dacd32c30..4ee90ffed 100644 --- a/NeuralAmpModeler/NeuralAmpModelerControls.h +++ b/NeuralAmpModeler/NeuralAmpModelerControls.h @@ -1,9 +1,16 @@ #pragma once #include // std::round +#include // FILE, fclose #include // std::stringstream #include // std::unordered_map #include "IControls.h" +#include "IPlugPaths.h" + +#ifdef OS_WIN + #include + #include +#endif #define PLUG() static_cast(GetDelegate()) #define NAM_KNOB_HEIGHT 120.0f @@ -902,19 +909,176 @@ class NAMSettingsPageControl : public IContainerBaseWithNamedChildren buildInfoStr.SetFormatted(100, "Version %s %s %s", verStr.Get(), PLUG()->GetArchStr(), PLUG()->GetAPIStr()); - AddChildControl(new IVLabelControl(GetRECT().SubRectVertical(5, 0), "NEURAL AMP MODELER", mStyle)); + AddChildControl(new IURLControl(GetRECT().SubRectVertical(5, 0), "NEURAL AMP MODELER", + "https://www.neuralampmodeler.com", mText, COLOR_TRANSPARENT, + PluginColors::HELP_TEXT_MO, PluginColors::HELP_TEXT_CLICKED)); AddChildControl(new IVLabelControl(GetRECT().SubRectVertical(5, 1), "By Steven Atkinson", mStyle)); AddChildControl(new IVLabelControl(GetRECT().SubRectVertical(5, 2), buildInfoStr.Get(), mStyle)); AddChildControl(new IURLControl(GetRECT().SubRectVertical(5, 3), "Plug-in development: Steve Atkinson, Oli Larkin, ... ", "https://github.com/sdatkinson/NeuralAmpModelerPlugin/graphs/contributors", mText, COLOR_TRANSPARENT, PluginColors::HELP_TEXT_MO, PluginColors::HELP_TEXT_CLICKED)); - AddChildControl(new IURLControl(GetRECT().SubRectVertical(5, 4), "www.neuralampmodeler.com", - "https://www.neuralampmodeler.com", mText, COLOR_TRANSPARENT, - PluginColors::HELP_TEXT_MO, PluginColors::HELP_TEXT_CLICKED)); + AddChildControl(new ThirdPartyNoticesControl(GetRECT().SubRectVertical(5, 4), mText)); }; private: + class ThirdPartyNoticesControl : public IURLControl + { + public: + ThirdPartyNoticesControl(const IRECT& bounds, const IText& text) + : IURLControl(bounds, "Third party notices", "", text, COLOR_TRANSPARENT, PluginColors::HELP_TEXT_MO, + PluginColors::HELP_TEXT_CLICKED) + { + } + + void OnMouseDown(float x, float y, const IMouseMod& mod) override + { + WDL_String path; + bool opened = false; + + if (ResolveNoticesPath(GetUI(), path)) + opened = OpenNoticesPath(GetUI(), path); + + if (!opened) + ShowOpenError(GetUI()); + + GetUI()->ReleaseMouseCapture(); + mClicked = true; + SetDirty(false); + } + + private: + static bool FileExists(const WDL_String& path) + { + if (!CStringHasContents(path.Get())) + return false; + + FILE* file = WDL_fopenA(path.Get(), "rb"); + if (file == nullptr) + return false; + + fclose(file); + return true; + } + + static bool TryNoticePathInDirectory(WDL_String& result, const WDL_String& directory) + { + if (!CStringHasContents(directory.Get())) + return false; + + WDL_String candidate(directory); + const char lastChar = candidate.Get()[candidate.GetLength() - 1]; + + if (!WDL_IS_DIRCHAR(lastChar)) + candidate.Append(WDL_DIRCHAR_STR); + + candidate.Append(kNoticesFileName); + + if (!FileExists(candidate)) + return false; + + result.Set(candidate.Get()); + return true; + } + + // AAX (and similar) load the binary from Contents\x64 or Contents\Win32 while notices live in + // Contents\Resources. Same layout as a VST3 bundle; this path is not covered by BundleResourcePath + // when the plug-in is built as AAX_API only (no VST3_API). + static bool TryNoticePathSiblingResources(WDL_String& result, const WDL_String& moduleDirectory) + { + if (!CStringHasContents(moduleDirectory.Get())) + return false; + + WDL_String candidate(moduleDirectory); + const char lastChar = candidate.Get()[candidate.GetLength() - 1]; + if (!WDL_IS_DIRCHAR(lastChar)) + candidate.Append(WDL_DIRCHAR_STR); + + candidate.Append(".."); + candidate.Append(WDL_DIRCHAR_STR); + candidate.Append("Resources"); + candidate.Append(WDL_DIRCHAR_STR); + candidate.Append(kNoticesFileName); + + if (!FileExists(candidate)) + return false; + + result.Set(candidate.Get()); + return true; + } + + static bool ResolveNoticesPath(IGraphics* pGraphics, WDL_String& path) + { + path.Set(""); + + if (pGraphics == nullptr) + return false; + +#ifdef OS_WIN + WDL_String directory; + const auto moduleHandle = static_cast(pGraphics->GetWinModuleHandle()); + + BundleResourcePath(directory, moduleHandle); + if (TryNoticePathInDirectory(path, directory)) + return true; + + directory.Set(""); + PluginPath(directory, moduleHandle); + if (TryNoticePathInDirectory(path, directory)) + return true; + + if (TryNoticePathSiblingResources(path, directory)) + return true; +#endif + + const auto resourceLocation = + LocateResource(kNoticesFileName, "txt", path, pGraphics->GetBundleID(), pGraphics->GetWinModuleHandle(), + pGraphics->GetSharedResourcesSubPath()); + + return resourceLocation == EResourceLocation::kAbsolutePath && FileExists(path); + } + + static bool OpenNoticesPath(IGraphics* pGraphics, const WDL_String& path) + { + if (pGraphics == nullptr || !CStringHasContents(path.Get())) + return false; + +#ifdef OS_WIN + WCHAR pathWide[IPLUG_WIN_MAX_WIDE_PATH]; + UTF8ToUTF16(pathWide, path.Get(), IPLUG_WIN_MAX_WIDE_PATH); + + if (pathWide[0] == 0) + return false; + + WCHAR canon[IPLUG_WIN_MAX_WIDE_PATH]; + const DWORD nCanon = GetFullPathNameW(pathWide, IPLUG_WIN_MAX_WIDE_PATH, canon, nullptr); + const WCHAR* const launchPath = + (nCanon > 0 && nCanon < IPLUG_WIN_MAX_WIDE_PATH) ? canon : pathWide; + + return ShellExecuteW(nullptr, L"open", launchPath, nullptr, nullptr, SW_SHOWNORMAL) > HINSTANCE(32); +#else + return pGraphics->OpenURL(path.Get()); +#endif + } + + static void ShowOpenError(IGraphics* pGraphics) + { + if (pGraphics == nullptr) + return; + + const char* const title = "Third party notices"; + const char* const message = "Could not open ThirdPartyNotices.txt."; + +#ifdef OS_MAC + pGraphics->ShowMessageBox(title, message, kMB_OK); +#else + pGraphics->ShowMessageBox(message, title, kMB_OK); +#endif + } + + static constexpr const char* kNoticesFileName = "ThirdPartyNotices.txt"; + }; + IVStyle mStyle; IText mText; }; diff --git a/NeuralAmpModeler/installer/NeuralAmpModeler.iss b/NeuralAmpModeler/installer/NeuralAmpModeler.iss index 4d60c9daf..02d95f5c7 100644 --- a/NeuralAmpModeler/installer/NeuralAmpModeler.iss +++ b/NeuralAmpModeler/installer/NeuralAmpModeler.iss @@ -1,12 +1,12 @@ [Setup] AppName=NeuralAmpModeler AppContact=neuralampmodeler@gmail.com -AppCopyright=Copyright (C) 2024 Steven Atkinson +AppCopyright=Copyright (C) 2022 Steven Atkinson AppPublisher=Steven Atkinson AppPublisherURL=https://www.neuralampmodeler.com/ AppSupportURL=https://www.neuralampmodeler.com/ AppVersion=0.7.14 -VersionInfoVersion=1.0.0 +VersionInfoVersion=0.7.14 DefaultDirName={pf}\NeuralAmpModeler DefaultGroupName=NeuralAmpModeler Compression=lzma2 @@ -49,6 +49,7 @@ Name: "{cf64}\VST3\NeuralAmpModeler.vst3\"; Attribs: readonly; Check: Is64BitIns [Files] ;Source: "..\build-win\NeuralAmpModeler_Win32.exe"; DestDir: "{app}"; Check: not Is64BitInstallMode; Components:app; Flags: ignoreversion; Source: "..\build-win\NeuralAmpModeler_x64.exe"; DestDir: "{app}"; Check: Is64BitInstallMode; Components:app; Flags: ignoreversion; +Source: "ThirdPartyNotices.txt"; DestDir: "{app}"; Components:app; Flags: ignoreversion; ;Source: "..\build-win\NeuralAmpModeler_Win32.dll"; DestDir: {code:GetVST2Dir_32}; Check: not Is64BitInstallMode; Components:vst2_32; Flags: ignoreversion; ;Source: "..\build-win\NeuralAmpModeler_Win32.dll"; DestDir: {code:GetVST2Dir_32}; Check: Is64BitInstallMode; Components:vst2_32; Flags: ignoreversion; @@ -58,9 +59,11 @@ Source: "..\build-win\NeuralAmpModeler_x64.exe"; DestDir: "{app}"; Check: Is64Bi ;Source: "..\build-win\NeuralAmpModeler.vst3\Desktop.ini"; DestDir: "{cf32}\VST3\NeuralAmpModeler.vst3\"; Components:vst3_32; Flags: overwritereadonly ignoreversion; Attribs: hidden system; ;Source: "..\build-win\NeuralAmpModeler.vst3\PlugIn.ico"; DestDir: "{cf32}\VST3\NeuralAmpModeler.vst3\"; Components:vst3_32; Flags: overwritereadonly ignoreversion; Attribs: hidden system; -Source: "..\build-win\NeuralAmpModeler.vst3\*.*"; Excludes: "\Contents\x86\*,*.pdb,*.exp,*.lib,*.ilk,*.ico,*.ini"; DestDir: "{cf64}\VST3\NeuralAmpModeler.vst3\"; Check: Is64BitInstallMode; Components:vst3_64; Flags: ignoreversion recursesubdirs; +; 64-bit install: exclude 32-bit arch folder only (iPlug uses x86-win / x86_64-win, not "x86"). +Source: "..\build-win\NeuralAmpModeler.vst3\*.*"; Excludes: "\Contents\x86-win\*,*.pdb,*.exp,*.lib,*.ilk,*.ico,*.ini"; DestDir: "{cf64}\VST3\NeuralAmpModeler.vst3\"; Check: Is64BitInstallMode; Components:vst3_64; Flags: ignoreversion recursesubdirs; Source: "..\build-win\NeuralAmpModeler.vst3\Desktop.ini"; DestDir: "{cf64}\VST3\NeuralAmpModeler.vst3\"; Check: Is64BitInstallMode; Components:vst3_64; Flags: overwritereadonly ignoreversion; Attribs: hidden system; Source: "..\build-win\NeuralAmpModeler.vst3\PlugIn.ico"; DestDir: "{cf64}\VST3\NeuralAmpModeler.vst3\"; Check: Is64BitInstallMode; Components:vst3_64; Flags: overwritereadonly ignoreversion; Attribs: hidden system; +Source: "ThirdPartyNotices.txt"; DestDir: "{cf64}\VST3\NeuralAmpModeler.vst3\Contents\Resources"; Check: Is64BitInstallMode; Components:vst3_64; Flags: ignoreversion; ;Source: "..\build-win\aax\bin\NeuralAmpModeler.aaxplugin\*.*"; Excludes: "\Contents\x64\*,*.pdb,*.exp,*.lib,*.ilk,*.ico,*.ini"; DestDir: "{cf32}\Avid\Audio\Plug-Ins\NeuralAmpModeler.aaxplugin\"; Components:aax_32; Flags: ignoreversion recursesubdirs; ;Source: "..\build-win\aax\bin\NeuralAmpModeler.aaxplugin\Desktop.ini"; DestDir: "{cf32}\Avid\Audio\Plug-Ins\NeuralAmpModeler.aaxplugin\"; Components:aax_32; Flags: overwritereadonly ignoreversion; Attribs: hidden system; diff --git a/NeuralAmpModeler/installer/README.md b/NeuralAmpModeler/installer/README.md new file mode 100644 index 000000000..f6a0b24db --- /dev/null +++ b/NeuralAmpModeler/installer/README.md @@ -0,0 +1,28 @@ +# Installer Identity + +The checked-in Windows installer uses the Neural Amp Modeler product metadata. Before publishing a pre-built installer from a private release fork, replace `license.rtf` with the product's real license and override the installer identity if needed. + +The Windows distribution script calls `scripts/update_installer-win.py`, which accepts these environment variable overrides: + +- `INSTALLER_DISPLAY_NAME` +- `INSTALLER_APP_CONTACT` +- `INSTALLER_APP_COPYRIGHT` +- `INSTALLER_APP_PUBLISHER` +- `INSTALLER_APP_PUBLISHER_URL` +- `INSTALLER_APP_SUPPORT_URL` +- `INSTALLER_OUTPUT_BASE_FILENAME` +- `INSTALLER_WELCOME_LABEL` +- `INSTALLER_SETUP_WINDOW_TITLE` + +The macOS installer package identifiers default to `com.StevenAtkinson.*`. Set `INSTALLER_PKG_ID_PREFIX` to use your own reverse-DNS prefix, for example `com.example.myproduct`. + +`ThirdPartyNotices.txt` is installed with the standalone application and inside the VST3/AU bundle resources. Keep it current when adding, removing, or replacing dependencies. Private/product forks should update any source-availability language that points at this public repository. + +For notarized macOS release builds, `scripts/makedist-mac.sh` also accepts: + +- `NOTARIZE_BUNDLE_ID` +- `NOTARIZE_BUNDLE_ID_DEMO` +- `APP_SPECIFIC_ID` +- `APP_SPECIFIC_PWD` + +These settings only affect installer/package identity. Plug-in identity, DAW compatibility, and saved-session compatibility are controlled elsewhere, including `config.h`, Xcode bundle identifiers, and plug-in format metadata. diff --git a/NeuralAmpModeler/installer/ThirdPartyNotices.txt b/NeuralAmpModeler/installer/ThirdPartyNotices.txt new file mode 100644 index 000000000..687f72434 --- /dev/null +++ b/NeuralAmpModeler/installer/ThirdPartyNotices.txt @@ -0,0 +1,482 @@ +Third-Party Notices +=================== + +This product includes open-source and third-party software. The notices below +are provided for the Neural Amp Modeler plug-ins and standalone application, +including the VST3, Audio Unit, and standalone application installer outputs. + +Downstream product forks should review this file before release, update product +source-code locations where appropriate, and add notices for any additional +dependencies they ship. + + +NeuralAmpModelerPlugin +---------------------- + +MIT License + +Copyright (c) 2022 Steven Atkinson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +NeuralAmpModelerCore +-------------------- + +MIT License + +Copyright (c) 2023 Steven Atkinson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +AudioDSPTools +------------- + +MIT License + +Copyright (c) 2023 Steven Atkinson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +iPlug2 +------ + +iPlug 2 C++ Plug-in Framework. + +Copyright (C) the iPlug 2 Developers. Portions copyright other contributors, +see each source file for more information. + +Based on WDL-OL/iPlug by Oli Larkin (2011-2018), and the original iPlug v1 +(2008) by John Schwartz / Cockos. + +This software is provided 'as-is', without any express or implied warranty. In +no event will the authors be held liable for any damages arising from the use +of this software. + +Permission is granted to anyone to use this software for any purpose, including +commercial applications, and to alter it and redistribute it freely, subject to +the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim + that you wrote the original software. If you use this software in a product, + an acknowledgment in the product documentation would be appreciated but is + not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + + +Cockos WDL and SWELL +-------------------- + +Portions of iPlug2 and AudioDSPTools use WDL and SWELL code. + +Copyright (C) 2005 and later Cockos Incorporated + +This software is provided 'as-is', without any express or implied warranty. In +no event will the authors be held liable for any damages arising from the use +of this software. + +Permission is granted to anyone to use this software for any purpose, including +commercial applications, and to alter it and redistribute it freely, subject to +the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim + that you wrote the original software. If you use this software in a product, + an acknowledgment in the product documentation would be appreciated but is + not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + + +Steinberg VST3 SDK +------------------ + +MIT License + +Copyright (c) 2025, Steinberg Media Technologies GmbH + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +Steinberg ASIO SDK Interface Files +---------------------------------- + +The Windows standalone application target includes RtAudio support for ASIO and +compiles ASIO interface files from the bundled RtAudio include directory. + +Steinberg Audio Stream I/O API +Copyright (c) 1997-2013, Steinberg Media Technologies GmbH +ASIO Interface Specification v 2.3 + +Distributors should verify that their use and redistribution of ASIO SDK files +is permitted by the applicable Steinberg ASIO SDK license terms. + + +RtAudio +------- + +RtAudio: realtime audio i/o C++ classes +Copyright (c) 2001-2019 Gary P. Scavone + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +Any person wishing to distribute modifications to the Software is asked to send +the modifications to the original developer so that they can be incorporated +into the canonical version. This is, however, not a binding provision of this +license. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +RtMidi +------ + +RtMidi: realtime MIDI i/o C++ classes +Copyright (c) 2003-2019 Gary P. Scavone + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +Any person wishing to distribute modifications to the Software is asked to send +the modifications to the original developer so that they can be incorporated +into the canonical version. This is, however, not a binding provision of this +license. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +NanoVG +------ + +Copyright (c) 2013 Mikko Mononen memon@inside.org + +This software is provided 'as-is', without any express or implied warranty. In +no event will the authors be held liable for any damages arising from the use +of this software. + +Permission is granted to anyone to use this software for any purpose, including +commercial applications, and to alter it and redistribute it freely, subject to +the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim + that you wrote the original software. If you use this software in a product, + an acknowledgment in the product documentation would be appreciated but is + not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + + +NanoSVG +------- + +Copyright (c) 2013-14 Mikko Mononen memon@inside.org + +This software is provided 'as-is', without any express or implied warranty. In +no event will the authors be held liable for any damages arising from the use +of this software. + +Permission is granted to anyone to use this software for any purpose, including +commercial applications, and to alter it and redistribute it freely, subject to +the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim + that you wrote the original software. If you use this software in a product, + an acknowledgment in the product documentation would be appreciated but is + not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + + +Fontstash +--------- + +Copyright (c) 2009-2013 Mikko Mononen memon@inside.org + +This software is provided 'as-is', without any express or implied warranty. In +no event will the authors be held liable for any damages arising from the use +of this software. + +Permission is granted to anyone to use this software for any purpose, including +commercial applications, and to alter it and redistribute it freely, subject to +the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim + that you wrote the original software. If you use this software in a product, + an acknowledgment in the product documentation would be appreciated but is + not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + + +MetalNanoVG +----------- + +MIT License + +Copyright (c) 2017 Ollix + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +stb_image, stb_truetype, and stb_textedit +----------------------------------------- + +stb_image is a public domain image loader by Sean Barrett and contributors. +Where the public domain dedication is not recognized, users are granted a +perpetual, irrevocable license to copy, distribute, and modify the file as they +see fit. + +stb_truetype is public domain software authored from 2009-2015 by Sean Barrett +/ RAD Game Tools, with additional contributors. Where that dedication is not +recognized, users are granted a perpetual, irrevocable license to copy, +distribute, and modify the file as they see fit. + +stb_textedit is available under either the public domain dedication or the MIT +license. This notice includes the MIT alternative: + +Copyright (c) 2017 Sean Barrett + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +Khronos khrplatform.h +--------------------- + +Copyright (c) 2008-2018 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and/or associated documentation files (the "Materials"), to deal +in the Materials without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Materials, and to permit persons to whom the Materials are furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Materials. + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + + +Yoga +---- + +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +nlohmann/json +------------- + +MIT License + +Copyright (c) 2013-2022 Niels Lohmann + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +Eigen +----- + +Source code for Eigen is available from https://gitlab.com/libeigen/eigen. + + +AudioDSPTools Lanczos Resampler Derivation +------------------------------------------ + +MIT License + +Copyright (c) 2023 Paul Walker + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +Additional System Frameworks and SDKs +------------------------------------- + +The product also links against operating-system frameworks and SDKs such as +Apple Audio Unit/Core Audio frameworks and Microsoft Windows audio APIs. Those +system components are provided under their respective platform SDK terms and are +not redistributed here as third-party open-source source code. diff --git a/NeuralAmpModeler/installer/license.rtf b/NeuralAmpModeler/installer/license.rtf index a57c8dd47..6a20a3061 100644 --- a/NeuralAmpModeler/installer/license.rtf +++ b/NeuralAmpModeler/installer/license.rtf @@ -1,35 +1,45 @@ -{\rtf1\ansi\ansicpg1252\cocoartf2758 -\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 ArialMT;} -{\colortbl;\red255\green255\blue255;\red0\green0\blue0;\red0\green0\blue0;} -{\*\expandedcolortbl;;\cssrgb\c0\c0\c0\cname textColor;\cssrgb\c0\c0\c0;} -\vieww20040\viewh15360\viewkind0 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 +{\rtf1\ansi\ansicpg1252\cocoartf1561\cocoasubrtf600 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 ArialMT;} +{\colortbl;\red255\green255\blue255;} +{\*\expandedcolortbl;;} +\paperw11900\paperh16840\margl1440\margr1440\vieww17060\viewh12300\viewkind0 +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\f0\fs20 \cf2 This is a legal agreement between you and Steven Atkinson (\'93The Developer\'94). Read this agreement carefully. By downloading and installing this software, you agree that you have read and understand this agreement and will be bound by its terms and conditions.\ -\ -Software\ -"Software" means the executable software product accompanying this agreement, along with any modules, presets, and/or user documentation. \ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\pardirnatural\partightenfactor0 -\cf2 \ -License Grant\ -You are granted a personal, non-transferable, non-exclusive license to use the Software on your devices in accordance with the terms of this EULA agreement.\ -\ -Restrictions\ -You may not modify, adapt, decompile, disassemble or otherwise reverse engineer the Software; permit the whole or any part of the Software to be combined with or become incorporated in any other product; reproduce, copy, distribute, resell or otherwise use the Software for any commercial purpose; allow any third party to use the Software on behalf of or for the benefit of any third party; use the Software in any way which breaches any applicable local, national or international law; nor use the Software for any purpose that The Developer considers a breach of this Agreement.\ -\ -Intellectual Property and Ownership\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 -\cf2 The Software and all intellectual property rights therein (including copyrights, patents, trade secrets, trademarks, and trade dress) are owned by The Developer or its suppliers. The Developer retains all rights not expressly granted in this Agreement. \ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\pardirnatural\partightenfactor0 -\cf2 \ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 -\cf2 Termination\ -The Agreement will terminate automatically if you fail to comply with any of its terms. On termination, you must immediately cease using and destroy all copies of the Software. \ -\ -Governing Law\ -This Agreement shall be governed by and construed in accordance with the laws of the State of Washington.\cf0 \expnd0\expndtw0\kerning0 -\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardeftab720\pardirnatural\partightenfactor0 -\cf0 \kerning1\expnd0\expndtw0 \ -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\ -} +\f0\b\fs20 \cf0 THIS IS A PLACEHOLDER LICENCE PROVIDED WITH IPLUG2 \ +\ +IT HAS NO LEGAL BASIS\ +\ +YOU MAY WISH TO CONSULT A LAWYER BEFORE MAKING A LICENCE\ +\ +Caveat: +\b0 \ +By installing this software you agree to use it at your own risk. The developer cannot be held responsible for any damages caused as a result of it's use.\ +\ + +\b Distribution: +\b0 \ +You are not permitted to distribute the software without the developer's permission. This includes, but is not limited to the distribution on magazine covers or software review websites.\ +\ + +\b Multiple Installations*: +\b0 If you purchased this product as an individual, you are licensed to install and use the software on any computer you need to use it on, providing you remove it afterwards (if it is a shared machine). If you purchased it as an institution or company, you are licensed to use it on one machine only, and must purchase additional copies for each machine you wish to use it on.\ +\ + +\b Upgrades*: +\b0 If you purchased this product you are entitled to free updates until the next major version number. The developer makes no guarantee is made that this product will be maintained indefinitely.\ +\ + +\b License transfers*: +\b0 If you purchased this product you may transfer your license to another person. As the original owner you are required to contact the developer with the details of the license transfer, so that the new owner can receive the updates and support attached to the license. Upon transferring a license the original owner must remove any copies from their machines and are no longer permitted to use the software.\ +\ + +\b TemplateProject is \'a9 Copyright AcmeInc 2019\ + +\b0 \ +http://www.acmeinc.com\ +\ +VST and VST3 are trademarks of Steinberg Media Technologies GmbH. \ +Audio Unit is a trademark of Apple, Inc. \ +AAX is a trademarks of Avid, Inc.\ +\ +* Applies to full version only, not the demo version.} \ No newline at end of file diff --git a/NeuralAmpModeler/scripts/makedist-mac.sh b/NeuralAmpModeler/scripts/makedist-mac.sh index a78af5d2f..5e11d07dc 100755 --- a/NeuralAmpModeler/scripts/makedist-mac.sh +++ b/NeuralAmpModeler/scripts/makedist-mac.sh @@ -21,15 +21,14 @@ SCRIPTS=$IPLUG2_ROOT/Scripts CODESIGN=0 # macOS codesigning/notarization -NOTARIZE_BUNDLE_ID=com.StevenAtkinson.NeuralAmpModeler -NOTARIZE_BUNDLE_ID_DEMO=com.StevenAtkinson.NeuralAmpModeler.DEMO -APP_SPECIFIC_ID=TODO -APP_SPECIFIC_PWD=TODO +INSTALLER_PKG_ID_PREFIX=${INSTALLER_PKG_ID_PREFIX:-com.StevenAtkinson} +APP_SPECIFIC_ID=${APP_SPECIFIC_ID:-TODO} +APP_SPECIFIC_PWD=${APP_SPECIFIC_PWD:-TODO} # AAX/PACE wraptool codesigning -ILOK_ID=TODO -ILOK_PWD=TODO -WRAP_GUID=TODO +ILOK_ID=${ILOK_ID:-TODO} +ILOK_PWD=${ILOK_PWD:-TODO} +WRAP_GUID=${WRAP_GUID:-TODO} DEMO=0 if [ "$1" == "demo" ]; then @@ -56,7 +55,21 @@ PLUGIN_NAME=`echo | grep BUNDLE_NAME config.h` PLUGIN_NAME=${PLUGIN_NAME//\#define BUNDLE_NAME } PLUGIN_NAME=${PLUGIN_NAME//\"} +NOTARIZE_BUNDLE_ID=${NOTARIZE_BUNDLE_ID:-${INSTALLER_PKG_ID_PREFIX}.${PLUGIN_NAME}} +NOTARIZE_BUNDLE_ID_DEMO=${NOTARIZE_BUNDLE_ID_DEMO:-${INSTALLER_PKG_ID_PREFIX}.${PLUGIN_NAME}.DEMO} + ARCHIVE_NAME=$PLUGIN_NAME-v$FULL_VERSION-mac +THIRD_PARTY_NOTICES="./installer/ThirdPartyNotices.txt" + +copy_third_party_notices() +{ + bundle_path=$1 + + if [ -d "$bundle_path" ] && [ -f "$THIRD_PARTY_NOTICES" ]; then + mkdir -p "$bundle_path/Contents/Resources" + cp "$THIRD_PARTY_NOTICES" "$bundle_path/Contents/Resources/" + fi +} if [ $DEMO == 1 ]; then ARCHIVE_NAME=$ARCHIVE_NAME-demo @@ -190,6 +203,13 @@ if [ -d "${AAX}" ]; then strip -x "${AAX}/Contents/MacOS/$PLUGIN_NAME" fi +echo "copying third-party notices" +echo "" + +copy_third_party_notices "$APP" +copy_third_party_notices "$AU" +copy_third_party_notices "$VST3" + if [ $CODESIGN == 1 ]; then #--------------------------------------------------------------------------------------------------------- # code sign AAX binary with wraptool @@ -266,9 +286,9 @@ if [ $BUILD_INSTALLER == 1 ]; then PWD=`pwd` if [ $DEMO == 1 ]; then - ./$SCRIPTS/notarise.sh "${PWD}/build-mac" "${PWD}/build-mac/${ARCHIVE_NAME}.dmg" $NOTARIZE_BUNDLE_ID $APP_SPECIFIC_ID $APP_SPECIFIC_PWD - else ./$SCRIPTS/notarise.sh "${PWD}/build-mac" "${PWD}/build-mac/${ARCHIVE_NAME}.dmg" $NOTARIZE_BUNDLE_ID_DEMO $APP_SPECIFIC_ID $APP_SPECIFIC_PWD + else + ./$SCRIPTS/notarise.sh "${PWD}/build-mac" "${PWD}/build-mac/${ARCHIVE_NAME}.dmg" $NOTARIZE_BUNDLE_ID $APP_SPECIFIC_ID $APP_SPECIFIC_PWD fi if [ "${PIPESTATUS[0]}" -ne "0" ]; then @@ -339,4 +359,4 @@ mv ./build-mac/*.zip ./build-mac/out #fi echo "done!" -echo "" \ No newline at end of file +echo "" diff --git a/NeuralAmpModeler/scripts/makeinstaller-mac.sh b/NeuralAmpModeler/scripts/makeinstaller-mac.sh index df38d8c65..d6e7c2f3a 100755 --- a/NeuralAmpModeler/scripts/makeinstaller-mac.sh +++ b/NeuralAmpModeler/scripts/makeinstaller-mac.sh @@ -27,6 +27,7 @@ if [ "$VERSION" == "" ]; then fi PRODUCT_NAME=NeuralAmpModeler +PKG_ID_PREFIX="${INSTALLER_PKG_ID_PREFIX:-com.StevenAtkinson}" # locations PRODUCTS="build-mac" @@ -36,9 +37,16 @@ AU="${PRODUCT_NAME}.component" APP="${PRODUCT_NAME}.app" AAX="${PRODUCT_NAME}.aaxplugin" +VST3_PKG_ID="${PKG_ID_PREFIX}.vst3.pkg.${PRODUCT_NAME}" +AU_PKG_ID="${PKG_ID_PREFIX}.au.pkg.${PRODUCT_NAME}" +AAX_PKG_ID="${PKG_ID_PREFIX}.aax.pkg.${PRODUCT_NAME}" +APP_PKG_ID="${PKG_ID_PREFIX}.app.pkg.${PRODUCT_NAME}" +RES_PKG_ID="${PKG_ID_PREFIX}.resources.pkg.${PRODUCT_NAME}" + RSRCS="~/Music/${PRODUCT_NAME}/Resources" OUTPUT_BASE_FILENAME="${PRODUCT_NAME} Installer.pkg" +THIRD_PARTY_NOTICES="./installer/ThirdPartyNotices.txt" TARGET_DIR="./build-mac/installer" PKG_DIR=${TARGET_DIR}/pkgs @@ -64,6 +72,30 @@ build_flavor() mkdir -p $TMPDIR cp -R -L $PRODUCTS/$flavorprod $TMPDIR + case "$flavor" in + VST3|AU|APP) + if [[ -f "$THIRD_PARTY_NOTICES" ]]; then + bundled_notices="$TMPDIR/$flavorprod/Contents/Resources/ThirdPartyNotices.txt" + if [[ -f "$bundled_notices" ]]; then + if ! cmp -s "$THIRD_PARTY_NOTICES" "$bundled_notices"; then + echo "The bundled ThirdPartyNotices.txt in $flavorprod differs from $THIRD_PARTY_NOTICES." + echo "Update the bundle before signing, then rerun the installer build." + exit 1 + fi + else + if codesign --verify --strict "$PRODUCTS/$flavorprod" >/dev/null 2>&1; then + echo "$flavorprod appears to be signed but does not contain ThirdPartyNotices.txt." + echo "Add the notices before signing to avoid invalidating the code signature." + exit 1 + fi + + mkdir -p "$TMPDIR/$flavorprod/Contents/Resources" + cp "$THIRD_PARTY_NOTICES" "$bundled_notices" + fi + fi + ;; + esac + pkgbuild --root $TMPDIR --identifier $ident --version $VERSION --install-location $loc ${PKG_DIR}/${PRODUCT_NAME}_${flavor}.pkg #|| exit 1 rm -r $TMPDIR @@ -71,22 +103,22 @@ build_flavor() # # try to build VST3 package if [[ -d $PRODUCTS/$VST3 ]]; then - build_flavor "VST3" $VST3 "com.StevenAtkinson.vst3.pkg.${PRODUCT_NAME}" "/Library/Audio/Plug-Ins/VST3" + build_flavor "VST3" $VST3 "$VST3_PKG_ID" "/Library/Audio/Plug-Ins/VST3" fi # # try to build AU package if [[ -d $PRODUCTS/$AU ]]; then - build_flavor "AU" $AU "com.StevenAtkinson.au.pkg.${PRODUCT_NAME}" "/Library/Audio/Plug-Ins/Components" + build_flavor "AU" $AU "$AU_PKG_ID" "/Library/Audio/Plug-Ins/Components" fi # # try to build AAX package if [[ -d $PRODUCTS/$AAX ]]; then - build_flavor "AAX" $AAX "com.StevenAtkinson.aax.pkg.${PRODUCT_NAME}" ""/Library/Application Support/Avid/Audio/Plug-Ins"" + build_flavor "AAX" $AAX "$AAX_PKG_ID" ""/Library/Application Support/Avid/Audio/Plug-Ins"" fi # try to build App package if [[ -d $PRODUCTS/$APP ]]; then - build_flavor "APP" $APP "com.StevenAtkinson.app.pkg.${PRODUCT_NAME}" "/Applications" + build_flavor "APP" $APP "$APP_PKG_ID" "/Applications" fi # write build info to resources folder @@ -98,7 +130,7 @@ fi # build resources package # --scripts ResourcesPackageScript -# pkgbuild --root "$RSRCS" --identifier "com.StevenAtkinson.resources.pkg.${PRODUCT_NAME}" --version $VERSION --install-location "/tmp/${PRODUCT_NAME}" ${PRODUCT_NAME}_RES.pkg +# pkgbuild --root "$RSRCS" --identifier "$RES_PKG_ID" --version $VERSION --install-location "/tmp/${PRODUCT_NAME}" ${PRODUCT_NAME}_RES.pkg # remove build info from resource folder # rm "$RSRCS/BuildInfo.txt" @@ -106,30 +138,30 @@ fi # create distribution.xml if [[ -d $PRODUCTS/$VST3 ]]; then - VST3_PKG_REF="" - VST3_CHOICE="" - VST3_CHOICE_DEF="${PRODUCT_NAME}_VST3.pkg" + VST3_PKG_REF="" + VST3_CHOICE="" + VST3_CHOICE_DEF="${PRODUCT_NAME}_VST3.pkg" fi if [[ -d $PRODUCTS/$AU ]]; then - AU_PKG_REF="" - AU_CHOICE="" - AU_CHOICE_DEF="${PRODUCT_NAME}_AU.pkg" + AU_PKG_REF="" + AU_CHOICE="" + AU_CHOICE_DEF="${PRODUCT_NAME}_AU.pkg" fi if [[ -d $PRODUCTS/$AAX ]]; then - AAX_PKG_REF="" - AAX_CHOICE="" - AAX_CHOICE_DEF="${PRODUCT_NAME}_AAX.pkg" + AAX_PKG_REF="" + AAX_CHOICE="" + AAX_CHOICE_DEF="${PRODUCT_NAME}_AAX.pkg" fi if [[ -d $PRODUCTS/$APP ]]; then - APP_PKG_REF="" - APP_CHOICE="" - APP_CHOICE_DEF="${PRODUCT_NAME}_APP.pkg" + APP_PKG_REF="" + APP_CHOICE="" + APP_CHOICE_DEF="${PRODUCT_NAME}_APP.pkg" fi # if [[ -d $PRODUCTS/$RES ]]; then - # RES_PKG_REF="' - # RES_CHOICE="' - # RES_CHOICE_DEF="${PRODUCT_NAME}_RES.pkg" + # RES_PKG_REF="' + # RES_CHOICE="' + # RES_CHOICE_DEF="${PRODUCT_NAME}_RES.pkg" # fi cat > ${TARGET_DIR}/distribution.xml << XMLEND diff --git a/NeuralAmpModeler/scripts/postbuild-win.bat b/NeuralAmpModeler/scripts/postbuild-win.bat index c953203ba..a74b5639c 100644 --- a/NeuralAmpModeler/scripts/postbuild-win.bat +++ b/NeuralAmpModeler/scripts/postbuild-win.bat @@ -3,98 +3,127 @@ REM - CALL "$(SolutionDir)scripts\postbuild-win.bat" "$(TargetExt)" "$(BINARY_NAME)" "$(Platform)" "$(TargetPath)" "$(VST3_32_PATH)" "$(VST3_64_PATH)" "$(AAX_32_PATH)" "$(AAX_64_PATH)" "$(BUILD_DIR)" "$(VST_ICON)" "$(AAX_ICON)" " REM $(CREATE_BUNDLE_SCRIPT)" -set FORMAT=%1 -set NAME=%2 -set PLATFORM=%3 -set BUILT_BINARY=%4 -set VST3_32_PATH=%5 -set VST3_64_PATH=%6 +REM Anchor paths to this script: if %0 is relative, %~dp0 can be wrong; %~f0 fixes that. +for %%I in ("%~f0") do set "POSTBUILD_SCRIPT_DIR=%%~dpI" +set "THIRD_PARTY_NOTICES=%POSTBUILD_SCRIPT_DIR%..\installer\ThirdPartyNotices.txt" + +REM MSBuild may quote args; SET uses tilde+param to strip quotes so FORMAT matches .vst3. +set "FORMAT=%~1" +set "NAME=%~2" +set "PLATFORM=%~3" +set "BUILT_BINARY=%~4" +set "BUILT_BINARY_DIR=%~dp4" +set "VST3_32_PATH=%~5" +set "VST3_64_PATH=%~6" +shift shift -shift shift shift -shift shift -set AAX_32_PATH=%1 -set AAX_64_PATH=%2 -set BUILD_DIR=%3 -set VST_ICON=%4 -set AAX_ICON=%5 -set CREATE_BUNDLE_SCRIPT=%6 +shift +set "AAX_32_PATH=%~1" +set "AAX_64_PATH=%~2" +set "BUILD_DIR=%~3" +set "VST_ICON=%~4" +set "AAX_ICON=%~5" +set "CREATE_BUNDLE_SCRIPT=%~6" + +REM Paths like Program Files (x86)\... contain "(". Inside (...) blocks, %VAR% expands at parse time and breaks IF parsing — use !VAR!. +setlocal EnableDelayedExpansion echo POSTBUILD SCRIPT VARIABLES ----------------------------------------------------- -echo FORMAT %FORMAT% -echo NAME %NAME% -echo PLATFORM %PLATFORM% -echo BUILT_BINARY %BUILT_BINARY% -echo VST3_32_PATH %VST3_32_PATH% -echo VST3_64_PATH %VST3_64_PATH% +echo FORMAT %FORMAT% +echo NAME %NAME% +echo PLATFORM %PLATFORM% +echo BUILT_BINARY %BUILT_BINARY% +echo VST3_32_PATH %VST3_32_PATH% +echo VST3_64_PATH %VST3_64_PATH% echo BUILD_DIR %BUILD_DIR% -echo VST_ICON %VST_ICON% -echo AAX_ICON %AAX_ICON% +echo VST_ICON %VST_ICON% +echo AAX_ICON %AAX_ICON% echo CREATE_BUNDLE_SCRIPT %CREATE_BUNDLE_SCRIPT% echo END POSTBUILD SCRIPT VARIABLES ----------------------------------------------------- -if %PLATFORM% == "Win32" ( - if %FORMAT% == ".exe" ( - copy /y %BUILT_BINARY% %BUILD_DIR%\%NAME%_%PLATFORM%.exe +if not exist "%THIRD_PARTY_NOTICES%" ( + echo ThirdPartyNotices.txt not found at "%THIRD_PARTY_NOTICES%" +) + +REM Use quoted IF operands: "if x64 == \"x64\"" is false in cmd.exe; "if \"%VAR%\"==\"x64\"" works. +if /i "%PLATFORM%"=="Win32" ( + if "%FORMAT%"==".exe" ( + copy /y "%BUILT_BINARY%" "%BUILD_DIR%\%NAME%_%PLATFORM%.exe" + call :CopyThirdPartyNotices "%BUILD_DIR%" + call :CopyThirdPartyNotices "%BUILT_BINARY_DIR%" ) - if %FORMAT% == ".dll" ( - copy /y %BUILT_BINARY% %BUILD_DIR%\%NAME%_%PLATFORM%.dll + if "%FORMAT%"==".dll" ( + copy /y "%BUILT_BINARY%" "%BUILD_DIR%\%NAME%_%PLATFORM%.dll" ) - - if %FORMAT% == ".vst3" ( + + if "%FORMAT%"==".vst3" ( echo copying 32bit binary to VST3 BUNDLE .. - call %CREATE_BUNDLE_SCRIPT% %BUILD_DIR%\%NAME%.vst3 %VST_ICON% %FORMAT% - copy /y %BUILT_BINARY% %BUILD_DIR%\%NAME%.vst3\Contents\x86-win - if exist %VST3_32_PATH% ( + call "%CREATE_BUNDLE_SCRIPT%" "%BUILD_DIR%\%NAME%.vst3" "%VST_ICON%" "%FORMAT%" + copy /y "%BUILT_BINARY%" "%BUILD_DIR%\%NAME%.vst3\Contents\x86-win" + call :CopyThirdPartyNotices "%BUILD_DIR%\%NAME%.vst3\Contents\Resources" + call :CopyThirdPartyNotices "%BUILT_BINARY_DIR%" + if exist "!VST3_32_PATH!" ( echo copying VST3 bundle to 32bit VST3 Plugins folder ... - call %CREATE_BUNDLE_SCRIPT% %VST3_32_PATH%\%NAME%.vst3 %VST_ICON% %FORMAT% - xcopy /E /H /Y %BUILD_DIR%\%NAME%.vst3\Contents\* %VST3_32_PATH%\%NAME%.vst3\Contents\ + call "%CREATE_BUNDLE_SCRIPT%" "!VST3_32_PATH!\%NAME%.vst3" "%VST_ICON%" "%FORMAT%" + xcopy /E /H /Y "%BUILD_DIR%\%NAME%.vst3\Contents\*" "!VST3_32_PATH!\%NAME%.vst3\Contents\" ) ) - - if %FORMAT% == ".aaxplugin" ( + + if "%FORMAT%"==".aaxplugin" ( echo copying 32bit binary to AAX BUNDLE .. - call %CREATE_BUNDLE_SCRIPT% %BUILD_DIR%\%NAME%.aaxplugin %AAX_ICON% %FORMAT% - copy /y %BUILT_BINARY% %BUILD_DIR%\%NAME%.aaxplugin\Contents\Win32 - echo copying 32bit bundle to 32bit AAX Plugins folder ... - call %CREATE_BUNDLE_SCRIPT% %BUILD_DIR%\%NAME%.aaxplugin %AAX_ICON% %FORMAT% - xcopy /E /H /Y %BUILD_DIR%\%NAME%.aaxplugin\Contents\* %AAX_32_PATH%\%NAME%.aaxplugin\Contents\ + call "%CREATE_BUNDLE_SCRIPT%" "%BUILD_DIR%\%NAME%.aaxplugin" "%AAX_ICON%" "%FORMAT%" + copy /y "%BUILT_BINARY%" "%BUILD_DIR%\%NAME%.aaxplugin\Contents\Win32" + call :CopyThirdPartyNotices "%BUILD_DIR%\%NAME%.aaxplugin\Contents\Resources" + echo copying 32bit bundle to 32bit AAX Plugins folder ... + call "%CREATE_BUNDLE_SCRIPT%" "%BUILD_DIR%\%NAME%.aaxplugin" "%AAX_ICON%" "%FORMAT%" + xcopy /E /H /Y "%BUILD_DIR%\%NAME%.aaxplugin\Contents\*" "!AAX_32_PATH!\%NAME%.aaxplugin\Contents\" ) ) -if %PLATFORM% == "x64" ( - if not exist "%ProgramFiles(x86)%" ( - echo "This batch script fails on 32 bit windows... edit accordingly" +if /i "%PLATFORM%"=="x64" ( + if "%FORMAT%"==".exe" ( + copy /y "%BUILT_BINARY%" "%BUILD_DIR%\%NAME%_%PLATFORM%.exe" + call :CopyThirdPartyNotices "%BUILD_DIR%" + call :CopyThirdPartyNotices "%BUILT_BINARY_DIR%" ) - if %FORMAT% == ".exe" ( - copy /y %BUILT_BINARY% %BUILD_DIR%\%NAME%_%PLATFORM%.exe + if "%FORMAT%"==".dll" ( + copy /y "%BUILT_BINARY%" "%BUILD_DIR%\%NAME%_%PLATFORM%.dll" ) - if %FORMAT% == ".dll" ( - copy /y %BUILT_BINARY% %BUILD_DIR%\%NAME%_%PLATFORM%.dll - ) - - if %FORMAT% == ".vst3" ( + if "%FORMAT%"==".vst3" ( echo copying 64bit binary to VST3 BUNDLE ... - call %CREATE_BUNDLE_SCRIPT% %BUILD_DIR%\%NAME%.vst3 %VST_ICON% %FORMAT% - copy /y %BUILT_BINARY% %BUILD_DIR%\%NAME%.vst3\Contents\x86_64-win - if exist %VST3_64_PATH% ( + call "%CREATE_BUNDLE_SCRIPT%" "%BUILD_DIR%\%NAME%.vst3" "%VST_ICON%" "%FORMAT%" + copy /y "%BUILT_BINARY%" "%BUILD_DIR%\%NAME%.vst3\Contents\x86_64-win" + call :CopyThirdPartyNotices "%BUILD_DIR%\%NAME%.vst3\Contents\Resources" + call :CopyThirdPartyNotices "%BUILT_BINARY_DIR%" + if exist "!VST3_64_PATH!" ( echo copying VST3 bundle to 64bit VST3 Plugins folder ... - call %CREATE_BUNDLE_SCRIPT% %VST3_64_PATH%\%NAME%.vst3 %VST_ICON% %FORMAT% - xcopy /E /H /Y %BUILD_DIR%\%NAME%.vst3\Contents\* %VST3_64_PATH%\%NAME%.vst3\Contents\ + call "%CREATE_BUNDLE_SCRIPT%" "!VST3_64_PATH!\%NAME%.vst3" "%VST_ICON%" "%FORMAT%" + xcopy /E /H /Y "%BUILD_DIR%\%NAME%.vst3\Contents\*" "!VST3_64_PATH!\%NAME%.vst3\Contents\" ) ) - - if %FORMAT% == ".aaxplugin" ( + + if "%FORMAT%"==".aaxplugin" ( echo copying 64bit binary to AAX BUNDLE ... - call %CREATE_BUNDLE_SCRIPT% %BUILD_DIR%\%NAME%.aaxplugin %AAX_ICON% %FORMAT% - copy /y %BUILT_BINARY% %BUILD_DIR%\%NAME%.aaxplugin\Contents\x64 - echo copying 64bit bundle to 64bit AAX Plugins folder ... - call %CREATE_BUNDLE_SCRIPT% %BUILD_DIR%\%NAME%.aaxplugin %AAX_ICON% %FORMAT% - xcopy /E /H /Y %BUILD_DIR%\%NAME%.aaxplugin\Contents\* %AAX_64_PATH%\%NAME%.aaxplugin\Contents\ + call "%CREATE_BUNDLE_SCRIPT%" "%BUILD_DIR%\%NAME%.aaxplugin" "%AAX_ICON%" "%FORMAT%" + copy /y "%BUILT_BINARY%" "%BUILD_DIR%\%NAME%.aaxplugin\Contents\x64" + call :CopyThirdPartyNotices "%BUILD_DIR%\%NAME%.aaxplugin\Contents\Resources" + echo copying 64bit bundle to 64bit AAX Plugins folder ... + call "%CREATE_BUNDLE_SCRIPT%" "%BUILD_DIR%\%NAME%.aaxplugin" "%AAX_ICON%" "%FORMAT%" + xcopy /E /H /Y "%BUILD_DIR%\%NAME%.aaxplugin\Contents\*" "!AAX_64_PATH!\%NAME%.aaxplugin\Contents\" ) ) + +goto :eof + +:CopyThirdPartyNotices +if exist "%THIRD_PARTY_NOTICES%" ( + if not exist "%~1" mkdir "%~1" + copy /y "%THIRD_PARTY_NOTICES%" "%~1\ThirdPartyNotices.txt" +) +goto :eof diff --git a/NeuralAmpModeler/scripts/prepare_resources-mac.py b/NeuralAmpModeler/scripts/prepare_resources-mac.py index d6fc7f9e2..dd2324f97 100755 --- a/NeuralAmpModeler/scripts/prepare_resources-mac.py +++ b/NeuralAmpModeler/scripts/prepare_resources-mac.py @@ -51,6 +51,11 @@ def main(): print("copying " + font + " to " + dst) shutil.copy(projectpath + "/resources/fonts/" + font, dst) + third_party_notices = projectpath + "/installer/ThirdPartyNotices.txt" + if os.path.exists(third_party_notices): + print("copying ThirdPartyNotices.txt to " + dst) + shutil.copy(third_party_notices, dst) + if __name__ == "__main__": main() diff --git a/NeuralAmpModeler/scripts/update_installer-win.py b/NeuralAmpModeler/scripts/update_installer-win.py index 208ff5f00..09b846b86 100644 --- a/NeuralAmpModeler/scripts/update_installer-win.py +++ b/NeuralAmpModeler/scripts/update_installer-win.py @@ -23,6 +23,10 @@ def replacestrs(filename, s, r): sys.stdout.write(line) +def env_or_default(name, default): + return os.environ.get(name, default) + + def main(): demo = 0 @@ -33,20 +37,59 @@ def main(): demo = int(sys.argv[1]) config = parse_config(projectpath) + bundle_name = config["BUNDLE_NAME"] + display_name = env_or_default("INSTALLER_DISPLAY_NAME", bundle_name) + installer_suffix = " Demo" if demo else "" + default_output_name = display_name + installer_suffix + " Installer" + + setup_values = { + "AppName": display_name, + "AppContact": env_or_default( + "INSTALLER_APP_CONTACT", + "neuralampmodeler@gmail.com", + ), + "AppCopyright": env_or_default( + "INSTALLER_APP_COPYRIGHT", + "Copyright (C) 2022 Steven Atkinson", + ), + "AppPublisher": env_or_default( + "INSTALLER_APP_PUBLISHER", "Steven Atkinson" + ), + "AppPublisherURL": env_or_default( + "INSTALLER_APP_PUBLISHER_URL", + "https://www.neuralampmodeler.com/", + ), + "AppSupportURL": env_or_default( + "INSTALLER_APP_SUPPORT_URL", + "https://www.neuralampmodeler.com/", + ), + "AppVersion": config["FULL_VER_STR"], + "VersionInfoVersion": config["FULL_VER_STR"], + "DefaultDirName": "{pf}\\" + display_name, + "DefaultGroupName": display_name, + "OutputBaseFilename": env_or_default( + "INSTALLER_OUTPUT_BASE_FILENAME", default_output_name + ), + "WelcomeLabel1": env_or_default( + "INSTALLER_WELCOME_LABEL", + "Welcome to the " + display_name + installer_suffix + " installer", + ), + "SetupWindowTitle": env_or_default( + "INSTALLER_SETUP_WINDOW_TITLE", + display_name + installer_suffix + " installer", + ), + } # WIN INSTALLER print("Updating Windows Installer version info...") for line in fileinput.input( - projectpath + "/installer/" + config["BUNDLE_NAME"] + ".iss", inplace=1 + projectpath + "/installer/" + bundle_name + ".iss", inplace=1 ): - if "AppVersion" in line: - line = "AppVersion=" + config["FULL_VER_STR"] + "\n" - if "OutputBaseFilename" in line: - if demo: - line = "OutputBaseFilename=NeuralAmpModeler Demo Installer\n" - else: - line = "OutputBaseFilename=NeuralAmpModeler Installer\n" + if "=" in line: + key = line.split("=", 1)[0] + if key in setup_values: + line = key + "=" + setup_values[key] + "\n" if 'Source: "readme' in line: if demo: @@ -54,18 +97,6 @@ def main(): else: line = 'Source: "readme-win.rtf"; DestDir: "{app}"; DestName: "readme.rtf"; Flags: isreadme\n' - if "WelcomeLabel1" in line: - if demo: - line = "WelcomeLabel1=Welcome to the NeuralAmpModeler Demo installer\n" - else: - line = "WelcomeLabel1=Welcome to the NeuralAmpModeler installer\n" - - if "SetupWindowTitle" in line: - if demo: - line = "SetupWindowTitle=NeuralAmpModeler Demo installer\n" - else: - line = "SetupWindowTitle=NeuralAmpModeler installer\n" - sys.stdout.write(line) diff --git a/NeuralAmpModeler/scripts/update_version-mac.py b/NeuralAmpModeler/scripts/update_version-mac.py index b4bd311df..afad13bcf 100644 --- a/NeuralAmpModeler/scripts/update_version-mac.py +++ b/NeuralAmpModeler/scripts/update_version-mac.py @@ -144,7 +144,10 @@ def main(): auv3["CFBundlePackageType"] = "XPC!" auv3["NSExtension"] = dict( NSExtensionAttributes=dict( - AudioComponentBundle="com.StevenAtkinson.app." + AudioComponentBundle=config["BUNDLE_DOMAIN"] + + "." + + config["BUNDLE_MFR"] + + ".app." + config["BUNDLE_NAME"] + ".AUv3Framework", AudioComponents=[{}], diff --git a/iPlug2 b/iPlug2 index ce269af7d..66f9060b5 160000 --- a/iPlug2 +++ b/iPlug2 @@ -1 +1 @@ -Subproject commit ce269af7df778cd163110be059bb4008215e5186 +Subproject commit 66f9060b5287afdb2ddb83aab5a2a2a8e66a4d5e