I guess I understand why it would have to be different from plugin to plugin but I don’t understand why it would have to be from build to build:
- I start Logic load my plugin… need to make some changes
- I close Logic, rebuild my plugin, deploy my plugin in the same location with the same name
- I reopen Logic, reload my plugin… why would Logic load an old one?
If you are trying to prevent the use case close/open, then I am not sure it is worth it… even with only C++ that never seems to work: if I build and deploy a VST plugin, I must close/reopen Maschine or Reason, in order for it to be reloaded since they only scan plugins when they open.
I think it is overkill to do it at every build and makes builds non reproducible since even if you don’t change a single line of code, you will have a different binary. I ended up changing for my own use to be the md5 of the main target of the project… That way it is different for every plugin but not build to build.
I understand that you use this script outside cmake so you can’t rely on cmake. But I think it is unfortunate to have to depend on ruby for doing such a simple task which can be accomplished with a simple shell script…
#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "Cannot resolve output directory"
exit 1
fi
NOW=`date "+%s"`
echo "#define SMTG_AU_NAMESPACE SMTGAUCocoa${NOW}_\n" > $1/aucocoaclassprefix.h
Yan