One of my users has alerted me to the fact that my plug-ins can’t be used by users who do not have the VS C++ runtime DDLs on their systems because my plug-ins depend on the DLL.
This wasn’t something I hadn’t paid any thought to since I’d assumed the Projucer would set up the release configuration propery for a full comercial release, but upon inspection the Runtime Library option for the Release configuration for Visual Studio is set to Default (Use DLL runtime).
Can we please change the default option for release builds to use a STATIC runtime instead so that plug-ins built under these settings don’t depend on the C++ runtime?
Depending on what versions of Windows you want to support, it’s better to use the dynamic linking option (the default in JUCE). See how it affects the number of plugins a user can run simultaneously on older versions of Windows here:
I don’t think that for the latest and greatest version of Windows 10 this is relevant anymore, but if you want to serve Windows 7, 8, or older versions of Win10, it’s probably still relevant.
You can include the runtime dlls in your installer to install it automatically, or supply the redistributable that comes with Visual Studio and ask your users to run it.
It doesn’t take long to create a script that duplicates a template and replaces all the pertinent parts for you. This is the list of replacements that I have in my own BASH script on macOS:
PROJECTID=`cat /dev/random | LC_CTYPE=C tr -dc "[:alpha:]" | head -c 6`
sed -i '' "s/{{mainId}}/$PROJECTID/g;" template.jucer
sed -i '' "s/{{pluginName}}/$PLUGIN_NAME/g;" template.jucer
sed -i '' "s/{{copyrightYear}}/$COPYRIGHT_YEAR/g;" template.jucer
mv template.jucer "${PLUGIN_NAME}.jucer"
sed -i '' "s/{{AudioProcessor}}/$PROCESSOR_NAME/g;" Source/PluginProcessor.*
sed -i '' "s/{{AudioProcessor}}/$PROCESSOR_NAME/g;" Source/gui/PluginEditor.*
sed -i '' "s/{{AudioProcessorEditor}}/$EDITOR_NAME/g;" Source/PluginProcessor.*
sed -i '' "s/{{AudioProcessorEditor}}/$EDITOR_NAME/g;" Source/gui/PluginEditor.*
sed -i '' "s/{{pluginName}}/$PLUGIN_NAME/g;" Source/PluginProcessor.*
sed -i '' "s/{{pluginName}}/$PLUGIN_NAME/g;" Source/gui/PluginEditor.*
sed -i '' "s/{{pluginName}}/$PLUGIN_NAME/g;" Installers/build_scripts/build_*.sh
sed -i '' "s/{{pluginName}}/$PLUGIN_NAME/g;" Installers/*.iss
sed -i '' "s/{{pluginName}}/$PLUGIN_NAME/g;" Installers/License.rtf
sed -i '' "s/{{pluginName}}/$PLUGIN_NAME/g;" azure-pipelines.yml
sed -i '' "s/{{pluginName}}/$PLUGIN_NAME/g;" .gitignore
sed -i '' "s/{{copyrightYear}}/$COPYRIGHT_YEAR/g;" Source/PluginProcessor.*
sed -i '' "s/{{copyrightYear}}/$COPYRIGHT_YEAR/g;" Source/gui/PluginEditor.*
sed -i '' "s/{{copyrightYear}}/$COPYRIGHT_YEAR/g;" Installers/License.rtf
GUID=`uuidgen`
sed -i '' "s/{{GUID}}/$GUID/g;" Installers/*.iss
one thing I did notice is that it doesn’t matter about ids in the JUCER for the <FILE>s themselves being duplicated across projects as long as you don’t have multiple JUCER projects open at the same time, it can get a bit confused in that case.