void CalDavClient::startSlowSync()
{
    FUNCTION_CALL_TRACE;

    if (!mManager) {
        mManager = new Accounts::Manager(this);
    }
    Accounts::Account *account  = mManager->account(mAccountId);
    if (account != NULL) {
        mKCal::Notebook::Ptr notebook = mKCal::Notebook::Ptr(new mKCal::Notebook(account->displayName(), ""));
        notebook->setAccount(QString::number(mAccountId));
        notebook->setPluginName(getPluginName());
        notebook->setSyncProfile(getProfileName());

        mKCal::ExtendedCalendar::Ptr calendar = mKCal::ExtendedCalendar::Ptr(new mKCal::ExtendedCalendar(KDateTime::Spec::UTC()));
        mKCal::ExtendedStorage::Ptr storage = calendar->defaultStorage(calendar);
        storage->open();
        bool status = storage->addNotebook(notebook);
        LOG_DEBUG("NOTEBOOK created " << status << "   UUID of NoteBook = " << notebook->uid());
        storage->close();
        calendar->close();

        Report *report = new Report(mNAManager, &mSettings);
        mRequests.insert(report);
        connect(report, SIGNAL(finished()), this, SLOT(reportRequestFinished()));
        report->getAllEvents();
    }
}
Example #2
0
void ClntAuthBlock::extractDataFromPluginTo(Firebird::ClumpletWriter& user_id)
{
	// Add user login name
	if (cliOrigUserName.hasData())
	{
		HANDSHAKE_DEBUG(fprintf(stderr, "Cli: extractDataFromPluginTo: cliOrigUserName=%s\n",
			cliOrigUserName.c_str()));
		user_id.insertString(CNCT_login, cliOrigUserName);
	}

	// Add plugin name
	Firebird::PathName pluginName = getPluginName();
	if (pluginName.hasData())
	{
		HANDSHAKE_DEBUG(fprintf(stderr, "Cli: extractDataFromPluginTo: pluginName=%s\n", pluginName.c_str()));
		user_id.insertPath(CNCT_plugin_name, pluginName);
	}

	// Add plugin list
	if (pluginList.hasData())
	{
		user_id.insertPath(CNCT_plugin_list, pluginList);
	}

	// This is specially tricky field - user_id is limited to 255 bytes per entry,
	// and we have no ways to override this limit cause it can be sent to any version server.
	// Therefore divide data into 254-byte parts, leaving first byte for the number of that part.
	// This appears more reliable than put them in strict order.
	addMultiPartConnectParameter(dataFromPlugin, user_id, CNCT_specific_data);

	// Client's wirecrypt requested level
	user_id.insertInt(CNCT_client_crypt, clntConfig->getWireCrypt(WC_CLIENT));
}
Example #3
0
    void setMissingProjectProperties (Project& project) const
    {
        const String sanitisedProjectName (CodeHelpers::makeValidIdentifier (project.getTitle(), false, true, false));

        setValueIfVoid (shouldBuildVST (project), true);
        setValueIfVoid (shouldBuildAU (project),  true);

        setValueIfVoid (getPluginName (project),                   project.getTitle());
        setValueIfVoid (getPluginDesc (project),                   project.getTitle());
        setValueIfVoid (getPluginManufacturer (project),           "yourcompany");
        setValueIfVoid (getPluginManufacturerCode (project),       "Manu");
        setValueIfVoid (getPluginCode (project),                   "Plug");
        setValueIfVoid (getPluginChannelConfigs (project),         "{1, 1}, {2, 2}");
        setValueIfVoid (getPluginIsSynth (project),                false);
        setValueIfVoid (getPluginWantsMidiInput (project),         false);
        setValueIfVoid (getPluginProducesMidiOut (project),        false);
        setValueIfVoid (getPluginSilenceInProducesSilenceOut (project), false);
        setValueIfVoid (getPluginTailLengthSeconds (project),      0);
        setValueIfVoid (getPluginEditorNeedsKeyFocus (project),    false);
        setValueIfVoid (getPluginAUExportPrefix (project),         sanitisedProjectName + "AU");
        setValueIfVoid (getPluginAUCocoaViewClassName (project),   sanitisedProjectName + "AU_V1");
        setValueIfVoid (getPluginRTASCategory (project),           String::empty);
        setValueIfVoid (project.getBundleIdentifier(),             project.getDefaultBundleIdentifier());
        setValueIfVoid (project.getAAXIdentifier(),                project.getDefaultAAXIdentifier());
        setValueIfVoid (getPluginAAXCategory (project),            "AAX_ePlugInCategory_Dynamics");
    }
void Project::setMissingAudioPluginDefaultValues()
{
    const String sanitisedProjectName (CodeHelpers::makeValidIdentifier (getTitle(), false, true, false));

    setValueIfVoid (shouldBuildVST(),                   true);
    setValueIfVoid (shouldBuildVST3(),                  false);
    setValueIfVoid (shouldBuildAU(),                    true);
    setValueIfVoid (shouldBuildAUv3(),                  false);
    setValueIfVoid (shouldBuildRTAS(),                  false);
    setValueIfVoid (shouldBuildAAX(),                   false);
    setValueIfVoid (shouldBuildStandalone(),            false);

    setValueIfVoid (getPluginName(),                    getTitle());
    setValueIfVoid (getPluginDesc(),                    getTitle());
    setValueIfVoid (getPluginManufacturer(),            "yourcompany");
    setValueIfVoid (getPluginManufacturerCode(),        "Manu");
    setValueIfVoid (getPluginCode(),                    makeValid4CC (getProjectUID() + getProjectUID()));
    setValueIfVoid (getPluginChannelConfigs(),          String());
    setValueIfVoid (getPluginIsSynth(),                 false);
    setValueIfVoid (getPluginWantsMidiInput(),          false);
    setValueIfVoid (getPluginProducesMidiOut(),         false);
    setValueIfVoid (getPluginIsMidiEffectPlugin(),      false);
    setValueIfVoid (getPluginEditorNeedsKeyFocus(),     false);
    setValueIfVoid (getPluginAUExportPrefix(),          sanitisedProjectName + "AU");
    setValueIfVoid (getPluginRTASCategory(),            String());
    setValueIfVoid (getBundleIdentifier(),              getDefaultBundleIdentifier());
    setValueIfVoid (getAAXIdentifier(),                 getDefaultAAXIdentifier());
    setValueIfVoid (getPluginAAXCategory(),             "AAX_ePlugInCategory_Dynamics");
}
Example #5
0
bool PluginManager::load(const std::string& path){
    std::string plugName = getPluginName(path);
    std::string realPath = resolvePathExtension(path);
    DLibrary* lib = DLibrary::load(realPath);
    if (!lib) return false;

    fnRegisterPlugin* registerFunction;
    registerFunction = reinterpret_cast<fnRegisterPlugin*>(lib->getSymbol("connect"));

    if(!registerFunction){
        fprintf(stderr, "Failed to initialize plugin \"%s\": connect function not found\n", plugName.c_str());
        delete lib;
        return false;
    }
    // try to initialize plugin:
    if (!registerFunction(host)){
        // plugin decided to fail
        fprintf(stderr, "Self registry failed on plugin \"%s\".\n", plugName.c_str());
        host.cancelAddictions();
        delete lib;
        return false;
    }
    // Store the library if addictions are confirmed
    if (host.confirmAddictions())
        libraries[plugName] = lib;
    else{
        // otherwise nothing was registered
        fprintf(stderr, "Nothing registered by plugin \"%s\".\n", plugName.c_str());
        delete lib;
        return false;
    }
    return true;
}
Example #6
0
void PionPlugin::openFile(const std::string& plugin_file)
{
	releaseData();	// make sure we're not already pointing to something
	
	// use a temporary object first since openPlugin() may throw
	PionPluginData plugin_data(getPluginName(plugin_file));
	
	// check to see if we already have a matching shared library
	boost::mutex::scoped_lock plugin_lock(m_plugin_mutex);
	PluginMap::iterator itr = m_plugin_map.find(plugin_data.m_plugin_name);
	if (itr == m_plugin_map.end()) {
		// no plug-ins found with the same name
		
		// open up the shared library using our temporary data object
		openPlugin(plugin_file, plugin_data);	// may throw
		
		// all is good -> insert it into the plug-in map
		m_plugin_data = new PionPluginData(plugin_data);
		m_plugin_map.insert( std::make_pair(m_plugin_data->m_plugin_name,
											m_plugin_data) );
	} else {
		// found an existing plug-in with the same name
		m_plugin_data = itr->second;
	}
	
	// increment the number of references
	++ m_plugin_data->m_references;
}
Example #7
0
    void setMissingProjectProperties (Project& project) const
    {
        const String sanitisedProjectName (CodeHelpers::makeValidIdentifier (project.getTitle(), false, true, false));

        setValueIfVoid (shouldBuildVST (project), true);
        setValueIfVoid (shouldBuildVST3 (project), false);
        setValueIfVoid (shouldBuildAU (project),  true);
        setValueIfVoid (shouldBuildRTAS (project), false);
        setValueIfVoid (shouldBuildAAX (project), false);

        setValueIfVoid (getPluginName (project),                   project.getTitle());
        setValueIfVoid (getPluginDesc (project),                   project.getTitle());
        setValueIfVoid (getPluginManufacturer (project),           "yourcompany");
        setValueIfVoid (getPluginManufacturerCode (project),       "Manu");
        setValueIfVoid (getPluginCode (project),                   makeValid4CC (project.getProjectUID() + project.getProjectUID()));
        setValueIfVoid (getPluginChannelConfigs (project),         "");
        setValueIfVoid (getPluginIsSynth (project),                false);
        setValueIfVoid (getPluginWantsMidiInput (project),         false);
        setValueIfVoid (getPluginProducesMidiOut (project),        false);
        setValueIfVoid (getPluginIsMidiEffectPlugin (project),     false);
        setValueIfVoid (getPluginEditorNeedsKeyFocus (project),    false);
        setValueIfVoid (getPluginAUExportPrefix (project),         sanitisedProjectName + "AU");
        setValueIfVoid (getPluginRTASCategory (project),           String::empty);
        setValueIfVoid (project.getBundleIdentifier(),             project.getDefaultBundleIdentifier());
        setValueIfVoid (project.getAAXIdentifier(),                project.getDefaultAAXIdentifier());
        setValueIfVoid (getPluginAAXCategory (project),            "AAX_ePlugInCategory_Dynamics");
    }
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
QString PMFileGenerator::generateFileContents(QString replaceStr)
{
  QString pluginName = getPluginName();

  QString contents = getFileContents(replaceStr);

  return contents;
}
Example #9
0
    void createPropertyEditors (Project& project, PropertyListBuilder& props) const
    {
        props.add (new BooleanPropertyComponent (shouldBuildVST (project), "Build VST", "Enabled"),
                   "Whether the project should produce a VST plugin.");
        props.add (new BooleanPropertyComponent (shouldBuildAU (project), "Build AudioUnit", "Enabled"),
                   "Whether the project should produce an AudioUnit plugin.");
        props.add (new BooleanPropertyComponent (shouldBuildRTAS (project), "Build RTAS", "Enabled"),
                   "Whether the project should produce an RTAS plugin.");
        props.add (new BooleanPropertyComponent (shouldBuildAAX (project), "Build AAX", "Enabled"),
                   "Whether the project should produce an AAX plugin.");

        props.add (new TextPropertyComponent (getPluginName (project), "Plugin Name", 128, false),
                   "The name of your plugin (keep it short!)");
        props.add (new TextPropertyComponent (getPluginDesc (project), "Plugin Description", 256, false),
                   "A short description of your plugin.");

        props.add (new TextPropertyComponent (getPluginManufacturer (project), "Plugin Manufacturer", 256, false),
                   "The name of your company (cannot be blank).");
        props.add (new TextPropertyComponent (getPluginManufacturerCode (project), "Plugin Manufacturer Code", 4, false),
                   "A four-character unique ID for your company. Note that for AU compatibility, this must contain at least one upper-case letter!");
        props.add (new TextPropertyComponent (getPluginCode (project), "Plugin Code", 4, false),
                   "A four-character unique ID for your plugin. Note that for AU compatibility, this must contain at least one upper-case letter!");

        props.add (new TextPropertyComponent (getPluginChannelConfigs (project), "Plugin Channel Configurations", 256, false),
                   "This is the set of input/output channel configurations that your plugin can handle.  The list is a comma-separated set of pairs of values in the form { numInputs, numOutputs }, and each "
                   "pair indicates a valid configuration that the plugin can handle. So for example, {1, 1}, {2, 2} means that the plugin can be used in just two configurations: either with 1 input "
                   "and 1 output, or with 2 inputs and 2 outputs.");

        props.add (new BooleanPropertyComponent (getPluginIsSynth (project), "Plugin is a Synth", "Is a Synth"),
                   "Enable this if you want your plugin to be treated as a synth or generator. It doesn't make much difference to the plugin itself, but some hosts treat synths differently to other plugins.");

        props.add (new BooleanPropertyComponent (getPluginWantsMidiInput (project), "Plugin Midi Input", "Plugin wants midi input"),
                   "Enable this if you want your plugin to accept midi messages.");

        props.add (new BooleanPropertyComponent (getPluginProducesMidiOut (project), "Plugin Midi Output", "Plugin produces midi output"),
                   "Enable this if your plugin is going to produce midi messages.");

        props.add (new BooleanPropertyComponent (getPluginSilenceInProducesSilenceOut (project), "Silence", "Silence in produces silence out"),
                   "Enable this if your plugin has no tail - i.e. if passing a silent buffer to it will always result in a silent buffer being produced.");

        props.add (new BooleanPropertyComponent (getPluginEditorNeedsKeyFocus (project), "Key Focus", "Plugin editor requires keyboard focus"),
                   "Enable this if your plugin needs keyboard input - some hosts can be a bit funny about keyboard focus..");

        props.add (new TextPropertyComponent (getPluginAUExportPrefix (project), "Plugin AU Export Prefix", 64, false),
                   "A prefix for the names of exported entry-point functions that the component exposes - typically this will be a version of your plugin's name that can be used as part of a C++ token.");

        props.add (new TextPropertyComponent (getPluginAUMainType (project), "Plugin AU Main Type", 128, false),
                   "In an AU, this is the value that is set as JucePlugin_AUMainType. Leave it blank unless you want to use a custom value.");

        props.add (new TextPropertyComponent (getPluginRTASCategory (project), "Plugin RTAS Category", 64, false),
                   "(Leave this blank if your plugin is a synth). This is one of the RTAS categories from FicPluginEnums.h, such as: ePlugInCategory_None, ePlugInCategory_EQ, ePlugInCategory_Dynamics, "
                   "ePlugInCategory_PitchShift, ePlugInCategory_Reverb, ePlugInCategory_Delay, "
                   "ePlugInCategory_Modulation, ePlugInCategory_Harmonic, ePlugInCategory_NoiseReduction, "
                   "ePlugInCategory_Dither, ePlugInCategory_SoundField");

        props.add (new TextPropertyComponent (getPluginAAXCategory (project), "Plugin AAX Category", 64, false),
                   "This is one of the RTAS categories from the AAX_EPlugInCategory enum");
    }
Example #10
0
bool PluginManager::unload(const std::string& pluginName){
    std::string plugName = getPluginName(pluginName);
    LibMap::iterator it = libraries.find(plugName);
    if( it != libraries.end() ) {
        delete it->second;
        libraries.erase(it);
        return true;
    }
    return false;
}
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
QString PMFileGenerator::createReplacementString(FileType type, QSet<QString> names)
{
  QString pluginName = getPluginName();
  QString replaceStr = "";
  if (type == CMAKELISTS)
  {
    // Build up the huge string full of namespaces using names
    QSet<QString>::iterator iter = names.begin();
    while (iter != names.end())
    {
      QString name = *iter;

      if (name == "@PluginName@Filter")
      {
        name.replace("@PluginName@", pluginName);
      }

      replaceStr.append("AddDREAM3DUnitTest(TESTNAME " + name + "Test SOURCES ${${PROJECT_NAME}_SOURCE_DIR}/" + name + "Test.cpp LINK_LIBRARIES ${${PROJECT_NAME}_Link_Libs})");

      if (++iter != names.end())
      {
        replaceStr.append("\n");
      }
    }
  }
  else if (type == TESTFILELOCATIONS)
  {
    // Build up the huge string full of namespaces using names
    QSet<QString>::iterator iter = names.begin();
    while (iter != names.end())
    {
      QString name = *iter;

      if (name == "@PluginName@Filter")
      {
        name.replace("@PluginName@", pluginName);
      }

      replaceStr.append("namespace " + name + "Test\n");
      replaceStr.append("  {\n");
      replaceStr.append("    const QString TestFile1(\"@TEST_TEMP_DIR@/TestFile1.txt\");\n");
      replaceStr.append("    const QString TestFile2(\"@TEST_TEMP_DIR@/TestFile2.txt\");\n");
      replaceStr.append("  }");

      if (++iter != names.end())
      {
        replaceStr.append("\n\n");
      }
    }
  }

  return replaceStr;
}
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
QString PMFileGenerator::getFileContents(QString replaceStr)
{
  //Get text feature values from widget
  QString pluginName = getPluginName();
  QString pluginDir = getOutputDir();
  QString text = "";

  if (pluginName.isEmpty() == true)
  {
    return text;
  }

  //Open file
  QFile rfile(getCodeTemplateResourcePath());
  if (rfile.open(QIODevice::ReadOnly | QIODevice::Text))
  {
    QTextStream in(&rfile);
    text = in.readAll();
    text.replace("@PluginName@", pluginName);
    QFileInfo fi(m_FileName);
    QString className = fi.baseName();
    QString filterName = className;
    //filterName = filterName.remove("Test");   // For the test files
    text.replace("@ClassName@", className);
    text.replace("@FilterName@", filterName);
    text.replace("@MD_FILE_NAME@", m_FileName);
    text.replace("@ClassNameLowerCase@", className.toLower());
    text.replace("@FilterGroup@", pluginName);
    text.replace("@FilterSubgroup@", pluginName);

    // Replace function contents with the string that we have stored
    text.replace("@SetupFPContents@", setupFPContents);
    text.replace("@FPContents@", fpContents);
    text.replace("@ReadFPContents@", readFPContents);
    text.replace("@WriteFPContents@", writeFPContents);
    text.replace("@DataCheckContents@", dataCheckContents);
    text.replace("@InitList@", initListContents);
    text.replace("@Filter_H_Includes@", filterHIncludesContents);
    text.replace("@Filter_CPP_Includes@", filterCPPIncludesContents);

    if (replaceStr.isEmpty() == false)
    {
      text.replace("@AddTestText@", replaceStr);    // Replace token for Test/CMakeLists.txt file
      text.replace("@Namespaces@", replaceStr);   // Replace token for Test/TestFileLocations.h.in file
    }

    rfile.close();
  }

  return text;
}
Example #13
0
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
void PMFileGenerator::generateOutput()
{
//  std::cout << "PMFileGenerator::generateOutput" << std::endl;
  if (doesGenerateOutput() == false)
  {
    return;
  }

  //Get text field values from widget
  QString pluginName = getPluginName();
  QString pluginDir = getOutputDir();

  if (pluginName.isEmpty() == true || pluginDir.isEmpty() == true)
  {
      return;
  }

//  QString classNameLowerCase = m_ClassName.toLower();

  //Open file
    QFile rfile(getCodeTemplateResourcePath());
    if ( rfile.open(QIODevice::ReadOnly | QIODevice::Text) ) {
      QTextStream in(&rfile);
      QString text = in.readAll();
      text.replace("@PluginName@", pluginName);
      QFileInfo fi(m_FileName);
      QString className = fi.baseName();
      text.replace("@ClassName@", className);
      text.replace("@MD_FILE_NAME@", m_FileName);
      text.replace("@ClassNameLowerCase@", className.toLower());
      text.replace("@FilterGroup@", pluginName);
      text.replace("@FilterSubgroup@", pluginName);

      QString parentPath = getOutputDir() + QDir::separator() + getPathTemplate().replace("@PluginName@", getPluginName());
      parentPath = QDir::toNativeSeparators(parentPath);

      QDir dir(parentPath);
      dir.mkpath(parentPath);

      parentPath = parentPath + QDir::separator() + m_FileName;
      //Write to file
      QFile f(parentPath);
      if ( f.open(QIODevice::WriteOnly | QIODevice::Text) ) {
        QTextStream out(&f);
        out << text;
      }
    }
}
Example #14
0
void setPluginFromCmndLine( CmdLineParameterType plugintype, char *PluginVar, int spec_type)
{
    char tempstr[100];
    char *tempPluginStr;
    GetCmdLineParameter( plugintype, tempstr);
    if( strlen(tempstr) > 0 )
	  {
        ShowInfo("Command Line: Checking plugin name: %s",tempstr);
        tempPluginStr = getPluginName( tempstr, spec_type);
        if (tempPluginStr) {
          sprintf(PluginVar,tempPluginStr);
          ShowInfo("Command Line: Loaded Plugin : %s",PluginVar);
         }    
   	  }
  
}
Example #15
0
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
QString PMFileGenerator::generateFileContents() {
  QString pluginName = getPluginName();
  QString text = "";

  //Open file
  QFile rfile( getCodeTemplateResourcePath() );
  if ( rfile.open(QIODevice::ReadOnly | QIODevice::Text) ) {
    QTextStream in(&rfile);
    text = in.readAll();
    text.replace("@PluginName@", pluginName);
    QFileInfo fi( getFileName() );
    QString className = fi.baseName();
    text.replace("@ClassName@", className);
    text.replace("@ClassNameLowerCase@", className.toLower());
  }
  return text;
}
Example #16
0
void PionPlugin::openPlugin(const std::string& plugin_file,
							PionPluginData& plugin_data)
{
	// get the name of the plugin (for create/destroy symbol names)
	plugin_data.m_plugin_name = getPluginName(plugin_file);
	
	// attempt to open the plugin; note that this tries all search paths
	// and also tries a variety of platform-specific extensions
	plugin_data.m_lib_handle = loadDynamicLibrary(plugin_file.c_str());
	if (plugin_data.m_lib_handle == NULL) {
#ifndef PION_WIN32
		char *error_msg = dlerror();
		if (error_msg != NULL) {
			std::string error_str(plugin_file);
			error_str += " (";
			error_str += error_msg;
			error_str += ')';
			throw OpenPluginException(error_str);
		} else
#endif
		throw OpenPluginException(plugin_file);
	}
	
	// find the function used to create new plugin objects
	plugin_data.m_create_func =
		getLibrarySymbol(plugin_data.m_lib_handle,
						 PION_PLUGIN_CREATE + plugin_data.m_plugin_name);
	if (plugin_data.m_create_func == NULL) {
		closeDynamicLibrary(plugin_data.m_lib_handle);
		throw PluginMissingCreateException(plugin_file);
	}

	// find the function used to destroy existing plugin objects
	plugin_data.m_destroy_func =
		getLibrarySymbol(plugin_data.m_lib_handle,
						 PION_PLUGIN_DESTROY + plugin_data.m_plugin_name);
	if (plugin_data.m_destroy_func == NULL) {
		closeDynamicLibrary(plugin_data.m_lib_handle);
		throw PluginMissingDestroyException(plugin_file);
	}
}
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
void PMFileGenerator::generateOutput()
{
//  qDebug() << "PMFileGenerator::generateOutput" << "\n";
  if (doesGenerateOutput() == false)
  {
    return;
  }

  //Get text feature values from widget
  QString pluginName = getPluginName();
  QString pluginDir = getOutputDir();

  if (pluginName.isEmpty() == true || pluginDir.isEmpty() == true)
  {
    return;
  }

  QString contents = getFileContents(QString());

  if (contents.isEmpty() == false)
  {
    QString parentPath = getOutputDir() + QDir::separator() + getPathTemplate().replace("@PluginName@", getPluginName());
    parentPath = QDir::toNativeSeparators(parentPath);

    QDir dir(parentPath);
    dir.mkpath(parentPath);

    parentPath = parentPath + QDir::separator() + m_FileName;

    //Write to file
    QFile f(parentPath);
    if ( f.open(QIODevice::WriteOnly | QIODevice::Text) )
    {
      QTextStream out(&f);
      out << contents;
    }
  }
}
ExecutionOptions::ExecutionOptions (int ac, char **av, Description *desc, Driver *driver)
{

	static int verbose_flag; //Flag set by `--verbose`
	pluginPath = "";
	pluginCmd = false;
	passRef = "";
	pluginPos = PASS_POS_UNKNOWN;
	handlingOkay = true;

	static option long_options[] =
		{
			//These options set a flag
			{ "verbose", no_argument, &verbose_flag, 1 },
			{ "brief", no_argument, &verbose_flag, 0 },

			//These options don't set a flag. We distinguish them by their indices
			{ "asm", no_argument, 0, 'c' },			//Assembly inline
			{ "list-passes", no_argument, 0, 'l' },	//List of passes currently used
			{ "file-number", required_argument, 0, 'n' },	//Number of file to proceed
			{ "help", no_argument, 0, 'h' },				//Help
			{ "version", no_argument, 0, 'v' },	//Version of the tool
			{ "fplugin", required_argument, 0, 'f' }, 	//Plugin path
			{ 0, 0, 0, 0 }
		};

	//getopt_long stores the option index here
	int option_index = 0;
	int opt;

	//Detect the end of the options
	while ((opt = getopt_long (ac, av, "cln:hvf:", long_options, &option_index)) != -1)
	{
		switch (opt)
		{
			case 0:
				//If this option set a flag, do nothing else now
				if (long_options[option_index].flag != 0)
				{
					break;
				}

				std::cout << "option " << long_options[option_index].name;

				if (optarg)
				{
					std::cout << " with arg " << optarg << std::endl;
				}
				break;

			case 'c':
				{
					if (desc != NULL)
					{
						//Set the c extension to the output
						desc->setOutputExtension (".c");

						//Inlinig the assembly code
						desc->setAsmVolatile (true);
					}
				}
				break;

			case 'l':
				{
					if (driver != NULL)
					{
						PassEngine *currentPassEngine = driver->getPassEngine ();
						std::list<Pass*> currentListPasses;
						currentListPasses = currentPassEngine->getListPasses ();

						//There no passes if size is 0
						if (currentListPasses.size () == 0)
						{
							Logging::log (1, "Warning: PassEngine has no passes, it is stopping", NULL);
							return;
						}

						std::cout << "The list of passes currenty used by the driver: " << std::endl;

						//Print the list of passes currently used
						for (std::list<Pass *>::iterator it = currentListPasses.begin (); it != currentListPasses.end (); it++)
						{
							Pass *p = *it;
							std::cerr << "-> " << p->getName () << std::endl;
						}
					}
				}
				break;

			case 'h':
				{
					differentOptions ();
				}
				break;

			case 'v':
				{
					std::cout << "\033[1mMicro-creator version: 1.0\033[0m" << std::endl;
				}
				break;

			case 'n':
				{
					std::istringstream iss (optarg);
					int startCounter;

					//Register it
					iss >> startCounter;

					desc->setFileCounterStart (startCounter);
				}
				break;

			case 'f': //Plugin execution option
				{
					//Get the name of the plugin and the path to this plugin
					std::string pluginStr = "";

					if (getPluginName (optarg, pluginStr) == false)
					{
						return;
					}

					//Open the shared library
					void* plugin = dlopen (pluginStr.c_str (), RTLD_LAZY);

					if (!plugin)
					{
						std::cerr << "Cannot load library : " << dlerror () << std::endl;
						return;
					}

					void (*pluginInit) (Driver*, Description*);
					pluginInit = (void(*) (Driver*, Description*)) dlsym (plugin, "pluginInit");

					//Paranoid
const					char *dlsym_error = dlerror ();

					if (dlsym_error)
					{
						std::cerr << "Cannot load symbol initPlugin: " << dlsym_error << std::endl;
						return;
					}

					if ((driver != NULL) && (desc != NULL))
					{
						pluginInit (driver, desc);
					}
				}
				break;

			default: // Do nothing
				break;
		}

		//We report the final status resulting from `--verbose` and `--brief`
		if (desc != NULL)
		{
			if (verbose_flag == 1)
			{
				desc->setVerbose (true);
			}
			else
			{
				desc->setVerbose (false);
			}
		}
	}
}
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
void PMFileGenerator::generateOutputWithFilterNames(QSet<QString> names)
{
  //  qDebug() << "PMFileGenerator::generateOutput" << "\n";
  if (doesGenerateOutput() == false)
  {
    return;
  }

  //Get text feature values from widget
  QString pluginName = getPluginName();
  QString pluginDir = getOutputDir();

  if (pluginName.isEmpty() == true || pluginDir.isEmpty() == true)
  {
    return;
  }

  //  QString classNameLowerCase = m_ClassName.toLower();

  //Open file
  QFile rfile(getCodeTemplateResourcePath());
  if (rfile.open(QIODevice::ReadOnly | QIODevice::Text))
  {
    QTextStream in(&rfile);
    QString text = in.readAll();

    text.replace("@PluginName@", pluginName);
    QFileInfo fi(m_FileName);
    QString className = fi.baseName();
    text.replace("@ClassName@", className);
    text.replace("@MD_FILE_NAME@", m_FileName);
    text.replace("@ClassNameLowerCase@", className.toLower());
    text.replace("@FilterGroup@", pluginName);
    text.replace("@FilterSubgroup@", pluginName);

    if (names.isEmpty() == false)
    {
      if (getFileName() == "TestFileLocations.h.in")
      {
        QString replaceStr = createReplacementString(TESTFILELOCATIONS, names);
        text.replace("@Namespaces@", replaceStr);   // Replace token for Test/TestFileLocations.h.in file
      }
      else if (getFileName() == "CMakeLists.txt")
      {
        QString replaceStr = createReplacementString(CMAKELISTS, names);
        text.replace("@AddTestText@", replaceStr);    // Replace token for Test/CMakeLists.txt file
      }
    }
    else
    {
      text.replace("\n  @Namespaces@\n", "");   // Replace token for Test/TestFileLocations.h.in file
      text.replace("\n@AddTestText@\n", "");    // Replace token for Test/CMakeLists.txt file
    }

    QString parentPath = getOutputDir() + QDir::separator() + getPathTemplate().replace("@PluginName@", getPluginName());
    parentPath = QDir::toNativeSeparators(parentPath);

    QDir dir(parentPath);
    dir.mkpath(parentPath);

    parentPath = parentPath + QDir::separator() + m_FileName;
    //Write to file
    QFile f(parentPath);
    if (f.open(QIODevice::WriteOnly | QIODevice::Text))
    {
      QTextStream out(&f);
      out << text;
    }
  }
}
Example #20
0
//==============================================================================
void Project::createPropertyEditors (Array <PropertyComponent*>& props)
{
    props.add (new TextPropertyComponent (getProjectName(), "Project Name", 256, false));
    props.getLast()->setTooltip ("The name of the project.");

    props.add (new TextPropertyComponent (getVersion(), "Project Version", 16, false));
    props.getLast()->setTooltip ("The project's version number, This should be in the format major.minor.point");

    const char* projectTypes[] = { "Application (GUI)", "Application (Non-GUI)", "Audio Plug-in", "Static Library", 0 };
    const char* projectTypeValues[] = { application, commandLineApp, audioPlugin, library, 0 };
    props.add (new ChoicePropertyComponent (getProjectType(), "Project Type", StringArray (projectTypes), Array<var> (projectTypeValues)));

    const char* linkageTypes[] = { "Not linked to Juce", "Linked to Juce Static Library", "Include Juce Amalgamated Files", "Include Juce Source Code Directly (In a single file)", "Include Juce Source Code Directly (Split across several files)", 0 };
    const char* linkageTypeValues[] = { notLinkedToJuce, useLinkedJuce, useAmalgamatedJuce, useAmalgamatedJuceViaSingleTemplate, useAmalgamatedJuceViaMultipleTemplates, 0 };
    props.add (new ChoicePropertyComponent (getJuceLinkageModeValue(), "Juce Linkage Method", StringArray (linkageTypes), Array<var> (linkageTypeValues)));
    props.getLast()->setTooltip ("The method by which your project will be linked to Juce.");

    props.add (new TextPropertyComponent (getBundleIdentifier(), "Bundle Identifier", 256, false));
    props.getLast()->setTooltip ("A unique identifier for this product, mainly for use in Mac builds. It should be something like 'com.yourcompanyname.yourproductname'");

    {
        OwnedArray<Project::Item> images;
        findAllImageItems (images);

        StringArray choices;
        Array<var> ids;

        choices.add ("<None>");
        ids.add (var::null);
        choices.add (String::empty);
        ids.add (var::null);

        for (int i = 0; i < images.size(); ++i)
        {
            choices.add (images.getUnchecked(i)->getName().toString());
            ids.add (images.getUnchecked(i)->getID());
        }

        props.add (new ChoicePropertyComponent (getSmallIconImageItemID(), "Icon (small)", choices, ids));
        props.getLast()->setTooltip ("Sets an icon to use for the executable.");

        props.add (new ChoicePropertyComponent (getBigIconImageItemID(), "Icon (large)", choices, ids));
        props.getLast()->setTooltip ("Sets an icon to use for the executable.");
    }

    if (isAudioPlugin())
    {
        props.add (new BooleanPropertyComponent (shouldBuildVST(), "Build VST", "Enabled"));
        props.getLast()->setTooltip ("Whether the project should produce a VST plugin.");
        props.add (new BooleanPropertyComponent (shouldBuildAU(), "Build AudioUnit", "Enabled"));
        props.getLast()->setTooltip ("Whether the project should produce an AudioUnit plugin.");
        props.add (new BooleanPropertyComponent (shouldBuildRTAS(), "Build RTAS", "Enabled"));
        props.getLast()->setTooltip ("Whether the project should produce an RTAS plugin.");
    }

    if (isAudioPlugin())
    {
        props.add (new TextPropertyComponent (getPluginName(), "Plugin Name", 128, false));
        props.getLast()->setTooltip ("The name of your plugin (keep it short!)");
        props.add (new TextPropertyComponent (getPluginDesc(), "Plugin Description", 256, false));
        props.getLast()->setTooltip ("A short description of your plugin.");

        props.add (new TextPropertyComponent (getPluginManufacturer(), "Plugin Manufacturer", 256, false));
        props.getLast()->setTooltip ("The name of your company (cannot be blank).");
        props.add (new TextPropertyComponent (getPluginManufacturerCode(), "Plugin Manufacturer Code", 4, false));
        props.getLast()->setTooltip ("A four-character unique ID for your company. Note that for AU compatibility, this must contain at least one upper-case letter!");
        props.add (new TextPropertyComponent (getPluginCode(), "Plugin Code", 4, false));
        props.getLast()->setTooltip ("A four-character unique ID for your plugin. Note that for AU compatibility, this must contain at least one upper-case letter!");

        props.add (new TextPropertyComponent (getPluginChannelConfigs(), "Plugin Channel Configurations", 256, false));
        props.getLast()->setTooltip ("This is the set of input/output channel configurations that your plugin can handle.  The list is a comma-separated set of pairs of values in the form { numInputs, numOutputs }, and each "
                                     "pair indicates a valid configuration that the plugin can handle. So for example, {1, 1}, {2, 2} means that the plugin can be used in just two configurations: either with 1 input "
                                     "and 1 output, or with 2 inputs and 2 outputs.");

        props.add (new BooleanPropertyComponent (getPluginIsSynth(), "Plugin is a Synth", "Is a Synth"));
        props.getLast()->setTooltip ("Enable this if you want your plugin to be treated as a synth or generator. It doesn't make much difference to the plugin itself, but some hosts treat synths differently to other plugins.");

        props.add (new BooleanPropertyComponent (getPluginWantsMidiInput(), "Plugin Midi Input", "Plugin wants midi input"));
        props.getLast()->setTooltip ("Enable this if you want your plugin to accept midi messages.");

        props.add (new BooleanPropertyComponent (getPluginProducesMidiOut(), "Plugin Midi Output", "Plugin produces midi output"));
        props.getLast()->setTooltip ("Enable this if your plugin is going to produce midi messages.");

        props.add (new BooleanPropertyComponent (getPluginSilenceInProducesSilenceOut(), "Silence", "Silence in produces silence out"));
        props.getLast()->setTooltip ("Enable this if your plugin has no tail - i.e. if passing a silent buffer to it will always result in a silent buffer being produced.");

        props.add (new TextPropertyComponent (getPluginTailLengthSeconds(), "Tail Length (in seconds)", 12, false));
        props.getLast()->setTooltip ("This indicates the length, in seconds, of the plugin's tail. This information may or may not be used by the host.");

        props.add (new BooleanPropertyComponent (getPluginEditorNeedsKeyFocus(), "Key Focus", "Plugin editor requires keyboard focus"));
        props.getLast()->setTooltip ("Enable this if your plugin needs keyboard input - some hosts can be a bit funny about keyboard focus..");

        props.add (new TextPropertyComponent (getPluginAUExportPrefix(), "Plugin AU Export Prefix", 64, false));
        props.getLast()->setTooltip ("A prefix for the names of exported entry-point functions that the component exposes - typically this will be a version of your plugin's name that can be used as part of a C++ token.");

        props.add (new TextPropertyComponent (getPluginAUCocoaViewClassName(), "Plugin AU Cocoa View Name", 64, false));
        props.getLast()->setTooltip ("In an AU, this is the name of Cocoa class that creates the UI. Some hosts bizarrely display the class-name, so you might want to make it reflect your plugin. But the name must be "
                                     "UNIQUE to this exact version of your plugin, to avoid objective-C linkage mix-ups that happen when different plugins containing the same class-name are loaded simultaneously.");

        props.add (new TextPropertyComponent (getPluginRTASCategory(), "Plugin RTAS Category", 64, false));
        props.getLast()->setTooltip ("(Leave this blank if your plugin is a synth). This is one of the RTAS categories from FicPluginEnums.h, such as: ePlugInCategory_None, ePlugInCategory_EQ, ePlugInCategory_Dynamics, "
                                     "ePlugInCategory_PitchShift, ePlugInCategory_Reverb, ePlugInCategory_Delay, "
                                     "ePlugInCategory_Modulation, ePlugInCategory_Harmonic, ePlugInCategory_NoiseReduction, "
                                     "ePlugInCategory_Dither, ePlugInCategory_SoundField");
    }

    props.add (new TextPropertyComponent (getProjectPreprocessorDefs(), "Preprocessor definitions", 32768, false));
    props.getLast()->setTooltip ("Extra preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace or commas to separate the items - to include a space or comma in a definition, precede it with a backslash.");

    for (int i = props.size(); --i >= 0;)
        props.getUnchecked(i)->setPreferredHeight (22);
}
Example #21
0
bool PluginManager::isLoaded(const std::string& pluginName) const{
    return libraries.find(getPluginName(pluginName)) != libraries.end();
}
Example #22
0
void Project::setMissingDefaultValues()
{
    if (! projectRoot.hasProperty (Ids::id_))
        projectRoot.setProperty (Ids::id_, createAlphaNumericUID(), 0);

    // Create main file group if missing
    if (! projectRoot.getChildWithName (Tags::projectMainGroup).isValid())
    {
        Item mainGroup (*this, ValueTree (Tags::projectMainGroup));
        projectRoot.addChild (mainGroup.getNode(), 0, 0);
    }

    getMainGroup().initialiseNodeValues();

    if (getDocumentTitle().isEmpty())
        setTitle ("Juce Project");

    if (! projectRoot.hasProperty (Ids::projectType))
        getProjectType() = application;

    if (! projectRoot.hasProperty (Ids::version))
        getVersion() = "1.0.0";

    if (! projectRoot.hasProperty (Ids::juceLinkage))
        getJuceLinkageModeValue() = useAmalgamatedJuceViaMultipleTemplates;

    const String juceFolderPath (getRelativePathForFile (StoredSettings::getInstance()->getLastKnownJuceFolder()));

    // Create configs group
    if (! projectRoot.getChildWithName (Tags::configurations).isValid())
    {
        projectRoot.addChild (ValueTree (Tags::configurations), 0, 0);
        createDefaultConfigs();
    }

    if (! projectRoot.getChildWithName (Tags::exporters).isValid())
        createDefaultExporters();

    const String sanitisedProjectName (CodeHelpers::makeValidIdentifier (getProjectName().toString(), false, true, false));

    if (! projectRoot.hasProperty (Ids::buildVST))
    {
        shouldBuildVST() = true;
        shouldBuildRTAS() = false;
        shouldBuildAU() = true;

        getPluginName() = getProjectName().toString();
        getPluginDesc() = getProjectName().toString();
        getPluginManufacturer() = "yourcompany";
        getPluginManufacturerCode() = "Manu";
        getPluginCode() = "Plug";
        getPluginChannelConfigs() = "{1, 1}, {2, 2}";
        getPluginIsSynth() = false;
        getPluginWantsMidiInput() = false;
        getPluginProducesMidiOut() = false;
        getPluginSilenceInProducesSilenceOut() = false;
        getPluginTailLengthSeconds() = 0;
        getPluginEditorNeedsKeyFocus() = false;
        getPluginAUExportPrefix() = sanitisedProjectName + "AU";
        getPluginAUCocoaViewClassName() = sanitisedProjectName + "AU_V1";
        getPluginRTASCategory() = String::empty;
    }

    if (! projectRoot.hasProperty (Ids::bundleIdentifier))
        setBundleIdentifierToDefault();
}
Example #23
0
void closePlugin(const std::string& pluginPath)
{
  SiconosSharedLibrary::closePlugin(getPluginName(pluginPath));
}
void RenderSettingsDialog::apply(SceneContext *ctx) {
	Scene *scene = new Scene(ctx->scene);
	ref<Sensor> oldSensor = scene->getSensor();
	Film *oldFilm = oldSensor->getFilm();
	Properties filmProps = oldSensor->getFilm()->getProperties();
	ref<PluginManager> pluginMgr = PluginManager::getInstance();

	/* Temporarily set up a new file resolver */
	ref<Thread> thread = Thread::getThread();
	ref<FileResolver> oldResolver = thread->getFileResolver();
	ref<FileResolver> newResolver = oldResolver->clone();
	newResolver->prependPath(fs::absolute(scene->getSourceFile()).parent_path());
	thread->setFileResolver(newResolver);

	/* Configure the reconstruction filter */
	Properties rFilterProps(getPluginName(ui->rFilterBox));
	if (m_rFilterNode != NULL)
		m_rFilterNode->putProperties(rFilterProps);
	ref<ReconstructionFilter> rFilter = static_cast<ReconstructionFilter *>
		(pluginMgr->createObject(MTS_CLASS(ReconstructionFilter), rFilterProps));
	rFilter->configure();

	/* Configure the sampler */
	Properties samplerProps(getPluginName(ui->samplerBox));
	if (m_samplerNode != NULL)
		m_samplerNode->putProperties(samplerProps);
	ref<Sampler> sampler = static_cast<Sampler *>
		(pluginMgr->createObject(MTS_CLASS(Sampler), samplerProps));
	sampler->configure();

	/* Configure the integrator */
	Properties integratorProps(getPluginName(ui->integratorBox));
	if (m_integratorNode != NULL)
		m_integratorNode->putProperties(integratorProps);
	ref<Integrator> integrator = static_cast<Integrator *>
		(pluginMgr->createObject(MTS_CLASS(Integrator), integratorProps));
	integrator->configure();

	if (ui->icBox->isChecked()) {
		Properties icProps("irrcache");
		if (m_icNode != NULL)
			m_icNode->putProperties(icProps);
		ref<Integrator> ic = static_cast<Integrator *>
			(pluginMgr->createObject(MTS_CLASS(Integrator), icProps));
		ic->addChild(integrator);
		ic->configure();
		integrator = ic;
	}

	if (ui->aiBox->isChecked()) {
		Properties aiProps("adaptive");
		if (m_aiNode != NULL)
			m_aiNode->putProperties(aiProps);
		ref<Integrator> ai = static_cast<Integrator *>
			(pluginMgr->createObject(MTS_CLASS(Integrator), aiProps));
		ai->addChild(integrator);
		ai->configure();
		integrator = ai;
	}

	QStringList resolution = ui->resolutionBox->currentText().split('x');
	SAssert(resolution.size() == 2);
	Vector2i cropSize(
		std::max(1, resolution[0].toInt()),
		std::max(1, resolution[1].toInt()));

	/* Configure the film */
	Vector2i oldSize = oldFilm->getSize();
	Vector2i oldCropSize = oldFilm->getCropSize();
	Point2i oldCropOffset = oldFilm->getCropOffset();

	Vector2i size(math::roundToInt((oldSize.x * cropSize.x / (Float) oldCropSize.x)),
			      math::roundToInt((oldSize.y * cropSize.y / (Float) oldCropSize.y)));

	Point2i cropOffset(math::roundToInt((oldCropOffset.x * cropSize.x / (Float) oldCropSize.x)),
			           math::roundToInt((oldCropOffset.y * cropSize.y / (Float) oldCropSize.y)));

	filmProps.setInteger("width", size.x, false);
	filmProps.setInteger("height", size.y, false);

	/* g-pt and g-bdpt only work with multifilm. */
	if (getPluginName(ui->integratorBox) == "gbdpt" || getPluginName(ui->integratorBox) == "gpt")
		filmProps.setPluginName("multifilm");
	else
		filmProps.setPluginName("hdrfilm");

	if (size.x != cropSize.x || size.y != cropSize.y || cropOffset.x != 0 || cropOffset.y != 0) {
		filmProps.setInteger("cropWidth", cropSize.x, false);
		filmProps.setInteger("cropHeight", cropSize.y, false);
		filmProps.setInteger("cropOffsetX", cropOffset.x, false);
		filmProps.setInteger("cropOffsetY", cropOffset.y, false);
	} else {
		filmProps.removeProperty("cropWidth");
		filmProps.removeProperty("cropHeight");
		filmProps.removeProperty("cropOffsetX");
		filmProps.removeProperty("cropOffsetY");
	}

	ctx->originalSize = cropSize;

	ref<Film> film = static_cast<Film *> (pluginMgr->createObject(
			MTS_CLASS(Film), filmProps));
	film->addChild(rFilter);
	film->configure();

	if (cropSize.x != ctx->framebuffer->getWidth() ||
		cropSize.y != ctx->framebuffer->getHeight()) {
		ctx->framebuffer = new Bitmap(Bitmap::ERGBA, Bitmap::EFloat32, cropSize);
		ctx->framebuffer->clear();
		ctx->mode = EPreview;
	}

	/* Configure the sensor */
	Properties sensorProps = oldSensor->getProperties();

	if (oldSensor->getClass()->derivesFrom(MTS_CLASS(PerspectiveCamera))) {
		sensorProps.removeProperty("focalLength");
		sensorProps.setString("fovAxis", "y", false);
		sensorProps.setFloat("fov",
			static_cast<const PerspectiveCamera *>(oldSensor.get())->getYFov(), false);
	}

	ref<Sensor> newSensor = static_cast<Sensor *>
		(pluginMgr->createObject(MTS_CLASS(Sensor), sensorProps));
	newSensor->addChild(sampler);
	newSensor->addChild(film);
	newSensor->setMedium(oldSensor->getMedium());
	newSensor->configure();

	/* Update the scene with the newly constructed elements */
	scene->removeSensor(oldSensor);
	scene->addSensor(newSensor);
	scene->setSensor(newSensor);

	scene->setSampler(sampler);
	scene->setIntegrator(integrator);
	scene->configure();

	ctx->scene = scene;
	thread->setFileResolver(oldResolver);
}
Example #25
0
QString TrashPlugin::getTitle(QString)
{
    return getPluginName();
}
Example #26
0
void Project::createAudioPluginPropertyEditors (PropertyListBuilder& props)
{
    props.add (new BooleanPropertyComponent (shouldBuildVST(), "Build VST", "Enabled"),
               "Whether the project should produce a VST plugin.");
    props.add (new BooleanPropertyComponent (shouldBuildVST3(), "Build VST3", "Enabled"),
               "Whether the project should produce a VST3 plugin.");
    props.add (new BooleanPropertyComponent (shouldBuildAU(), "Build AudioUnit", "Enabled"),
               "Whether the project should produce an AudioUnit plugin.");
    props.add (new BooleanPropertyComponent (shouldBuildAUv3(), "Build AudioUnit v3", "Enabled"),
               "Whether the project should produce an AudioUnit version 3 plugin.");
    props.add (new BooleanPropertyComponent (shouldBuildRTAS(), "Build RTAS", "Enabled"),
               "Whether the project should produce an RTAS plugin.");
    props.add (new BooleanPropertyComponent (shouldBuildAAX(), "Build AAX", "Enabled"),
               "Whether the project should produce an AAX plugin.");

    /* TODO: this property editor is temporarily disabled because right now we build standalone if and only if
       we also build AUv3. However as soon as targets are supported on non-Xcode exporters as well, we should
       re-enable this option and allow to build the standalone plug-in independently from AUv3.
    */
    // props.add (new BooleanPropertyComponent (shouldBuildStandalone(), "Build Standalone", "Enabled"),
    //            "Whether the project should produce a standalone version of the plugin. Required for AUv3.");

    props.add (new TextPropertyComponent (getPluginName(), "Plugin Name", 128, false),
               "The name of your plugin (keep it short!)");
    props.add (new TextPropertyComponent (getPluginDesc(), "Plugin Description", 256, false),
               "A short description of your plugin.");

    props.add (new TextPropertyComponent (getPluginManufacturer(), "Plugin Manufacturer", 256, false),
               "The name of your company (cannot be blank).");
    props.add (new TextPropertyComponent (getPluginManufacturerCode(), "Plugin Manufacturer Code", 4, false),
               "A four-character unique ID for your company. Note that for AU compatibility, this must contain at least one upper-case letter!");
    props.add (new TextPropertyComponent (getPluginCode(), "Plugin Code", 4, false),
               "A four-character unique ID for your plugin. Note that for AU compatibility, this must contain at least one upper-case letter!");

    props.add (new TextPropertyComponent (getPluginChannelConfigs(), "Plugin Channel Configurations", 1024, false),
               "This list is a comma-separated set list in the form {numIns, numOuts} and each pair indicates a valid plug-in "
               "configuration. For example {1, 1}, {2, 2} means that the plugin can be used either with 1 input and 1 output, "
               "or with 2 inputs and 2 outputs. If your plug-in requires side-chains, aux output buses etc., then you must leave "
               "this field empty and override the setPreferredBusArrangement method in your AudioProcessor.");

    props.add (new BooleanPropertyComponent (getPluginIsSynth(), "Plugin is a Synth", "Is a Synth"),
               "Enable this if you want your plugin to be treated as a synth or generator. It doesn't make much difference to the plugin itself, but some hosts treat synths differently to other plugins.");

    props.add (new BooleanPropertyComponent (getPluginWantsMidiInput(), "Plugin Midi Input", "Plugin wants midi input"),
               "Enable this if you want your plugin to accept midi messages.");

    props.add (new BooleanPropertyComponent (getPluginProducesMidiOut(), "Plugin Midi Output", "Plugin produces midi output"),
               "Enable this if your plugin is going to produce midi messages.");

    props.add (new BooleanPropertyComponent (getPluginIsMidiEffectPlugin(), "Midi Effect Plugin", "Plugin is a midi effect plugin"),
               "Enable this if your plugin only processes midi and no audio.");

    props.add (new BooleanPropertyComponent (getPluginEditorNeedsKeyFocus(), "Key Focus", "Plugin editor requires keyboard focus"),
               "Enable this if your plugin needs keyboard input - some hosts can be a bit funny about keyboard focus..");

    props.add (new TextPropertyComponent (getPluginAUExportPrefix(), "Plugin AU Export Prefix", 64, false),
               "A prefix for the names of exported entry-point functions that the component exposes - typically this will be a version of your plugin's name that can be used as part of a C++ token.");

    props.add (new TextPropertyComponent (getPluginAUMainType(), "Plugin AU Main Type", 128, false),
               "In an AU, this is the value that is set as JucePlugin_AUMainType. Leave it blank unless you want to use a custom value.");

    props.add (new TextPropertyComponent (getPluginVSTCategory(), "VST Category", 64, false),
               "In a VST, this is the value that is set as JucePlugin_VSTCategory. Leave it blank unless you want to use a custom value.");

    props.add (new TextPropertyComponent (getPluginRTASCategory(), "Plugin RTAS Category", 64, false),
               "(Leave this blank if your plugin is a synth). This is one of the RTAS categories from FicPluginEnums.h, such as: ePlugInCategory_None, ePlugInCategory_EQ, ePlugInCategory_Dynamics, "
               "ePlugInCategory_PitchShift, ePlugInCategory_Reverb, ePlugInCategory_Delay, "
               "ePlugInCategory_Modulation, ePlugInCategory_Harmonic, ePlugInCategory_NoiseReduction, "
               "ePlugInCategory_Dither, ePlugInCategory_SoundField");

    props.add (new TextPropertyComponent (getPluginAAXCategory(), "Plugin AAX Category", 64, false),
               "This is one of the categories from the AAX_EPlugInCategory enum");

    props.add (new TextPropertyComponent (getAAXIdentifier(), "Plugin AAX Identifier", 256, false),
               "The value to use for the JucePlugin_AAXIdentifier setting");
}
Example #27
0
QString SystrayPlugin::getName(QString)
{
    return getPluginName();
}