From b87f2e6dc882be4f8cddba106223ce2e6bd2e9f9 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Wed, 30 Jan 2019 12:01:05 -0500 Subject: [PATCH] Create DEP_LOCAL automatically in dep.mk. Document Plugin and Model fields. --- dep.mk | 10 ++++++++-- include/plugin/Model.hpp | 8 ++++---- include/plugin/Plugin.hpp | 27 +++++++++++++++++++++------ 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/dep.mk b/dep.mk index 75c6c0bd..44563d34 100644 --- a/dep.mk +++ b/dep.mk @@ -29,10 +29,11 @@ endif CMAKE += -DCMAKE_INSTALL_LIBDIR=lib ifdef ARCH_MAC - SHA256 := sha256check() { echo "$$2 $$1" | shasum -a 256 -c; }; sha256check + SHA256SUM := shasum -a 256 else - SHA256 := sha256check() { echo "$$2 $$1" | sha256sum -c; }; sha256check + SHA256SUM := sha256sum endif +SHA256 := sha256check() { echo "$$2 $$1" | $(SHA256SUM) -c; }; sha256check # Export environment for all dependency targets $(DEPS): export CFLAGS = $(DEP_CFLAGS) @@ -41,4 +42,9 @@ $(DEPS): export LDFLAGS = $(DEP_LDFLAGS) dep: $(DEPS) +$(DEPS): | dep_create_dir + +dep_create_dir: + mkdir -p $(DEP_LOCAL) + .PHONY: dep diff --git a/include/plugin/Model.hpp b/include/plugin/Model.hpp index 3216c9ea..ea5014e4 100644 --- a/include/plugin/Model.hpp +++ b/include/plugin/Model.hpp @@ -24,16 +24,16 @@ namespace plugin { struct Model { Plugin *plugin = NULL; - /** An identifier for the model, e.g. "VCO". Used for saving patches. - The model slug must be unique in your plugin, but it doesn't need to be unique among different plugins. + /** Must be unique. Used for saving patches. Never change this. + The model slug must be unique within your plugin, but it doesn't need to be unique among different plugins. */ std::string slug; /** Human readable name for your model, e.g. "Voltage Controlled Oscillator" */ std::string name; - /** A one-line summary of the module's purpose */ - std::string description; /** List of tags representing the function(s) of the module */ std::list tags; + /** A one-line summary of the module's purpose */ + std::string description; virtual ~Model() {} /** Creates a headless Module */ diff --git a/include/plugin/Plugin.hpp b/include/plugin/Plugin.hpp index bd27a39a..9168b641 100644 --- a/include/plugin/Plugin.hpp +++ b/include/plugin/Plugin.hpp @@ -20,24 +20,39 @@ struct Plugin { /** OS-dependent library handle */ void *handle = NULL; - /** Must be unique. Used for patch files and the VCV store API. + /** Must be unique. Used for saving patches. Never change this. To guarantee uniqueness, it is a good idea to prefix the slug by your "company name" if available, e.g. "MyCompany-MyPlugin" */ std::string slug; - /** The version of your plugin - Plugins should follow the versioning scheme described at https://github.com/VCVRack/Rack/issues/266 - Do not include the "v" in "v1.0" for example. + /** Your plugin's latest version, using the guidelines at https://github.com/VCVRack/Rack/issues/266. Do not include the "v" prefix. */ std::string version; - /** Human readable name for your plugin, e.g. "Voltage Controlled Oscillator" */ + /** Human-readable display name for your plugin. You can change this on a whim, unlike slugs. + */ std::string name; - std::string author; + /** The license type of your plugin. Use "proprietary" if all rights are reserved. If your license is in the [SPDX license list](https://spdx.org/licenses/), use its abbreviation in the "Identifier" column. + */ std::string license; + /** Your name, company, alias, or GitHub username. + */ + std::string author; + /** Your email address for support inquiries. + */ std::string authorEmail; + /** Homepage featuring the plugin itself. + */ std::string pluginUrl; + /** Homepage of the author. + */ std::string authorUrl; + /** The manual of your plugin. HTML, PDF, or GitHub readme/wiki are fine. + */ std::string manualUrl; + /** The source code homepage. E.g. GitHub repo. + */ std::string sourceUrl; + /** Link to donation page for users who wish to donate. E.g. PayPal URL. + */ std::string donateUrl; virtual ~Plugin();