本文整理汇总了C++中ProjectExporter类的典型用法代码示例。如果您正苦于以下问题:C++ ProjectExporter类的具体用法?C++ ProjectExporter怎么用?C++ ProjectExporter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ProjectExporter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
ProjectExporter* ProjectExporter::createNewExporter (Project& project, const int index)
{
ProjectExporter* exp = nullptr;
switch (index)
{
case 0: exp = new XCodeProjectExporter (project, ValueTree (XCodeProjectExporter ::getValueTreeTypeName (false)), false); break;
case 1: exp = new XCodeProjectExporter (project, ValueTree (XCodeProjectExporter ::getValueTreeTypeName (true)), true); break;
case 2: exp = new MSVCProjectExporterVC2005 (project, ValueTree (MSVCProjectExporterVC2005::getValueTreeTypeName())); break;
case 3: exp = new MSVCProjectExporterVC2008 (project, ValueTree (MSVCProjectExporterVC2008::getValueTreeTypeName())); break;
case 4: exp = new MSVCProjectExporterVC2010 (project, ValueTree (MSVCProjectExporterVC2010::getValueTreeTypeName())); break;
case 5: exp = new MSVCProjectExporterVC2012 (project, ValueTree (MSVCProjectExporterVC2012::getValueTreeTypeName())); break;
case 6: exp = new MSVCProjectExporterVC2013 (project, ValueTree (MSVCProjectExporterVC2013::getValueTreeTypeName())); break;
case 7: exp = new MakefileProjectExporter (project, ValueTree (MakefileProjectExporter ::getValueTreeTypeName())); break;
case 8: exp = new AndroidProjectExporter (project, ValueTree (AndroidProjectExporter ::getValueTreeTypeName())); break;
case 9: exp = new CodeBlocksProjectExporter (project, ValueTree (CodeBlocksProjectExporter::getValueTreeTypeName())); break;
default: jassertfalse; return 0;
}
exp->createDefaultConfigs();
exp->createDefaultModulePaths();
return exp;
}
示例2: switch
ProjectExporter* ProjectExporter::createNewExporter (Project& project, const int index)
{
ProjectExporter* exp = nullptr;
switch (index)
{
case 0: exp = new XCodeProjectExporter (project, ValueTree (XCodeProjectExporter::getValueTreeTypeName (false)), false); break;
case 1: exp = new XCodeProjectExporter (project, ValueTree (XCodeProjectExporter::getValueTreeTypeName (true)), true); break;
case 2: exp = new MSVCProjectExporterVC6 (project, ValueTree (MSVCProjectExporterVC6::getValueTreeTypeName())); break;
case 3: exp = new MSVCProjectExporterVC2005 (project, ValueTree (MSVCProjectExporterVC2005::getValueTreeTypeName())); break;
case 4: exp = new MSVCProjectExporterVC2008 (project, ValueTree (MSVCProjectExporterVC2008::getValueTreeTypeName())); break;
case 5: exp = new MSVCProjectExporterVC2010 (project, ValueTree (MSVCProjectExporterVC2010::getValueTreeTypeName())); break;
case 6: exp = new MakefileProjectExporter (project, ValueTree (MakefileProjectExporter::getValueTreeTypeName())); break;
case 7: exp = new AndroidProjectExporter (project, ValueTree (AndroidProjectExporter::getValueTreeTypeName())); break;
default: jassertfalse; return 0;
}
File juceFolder (StoredSettings::getInstance()->getLastKnownJuceFolder());
File target (exp->getTargetFolder());
if (FileHelpers::shouldPathsBeRelative (juceFolder.getFullPathName(), project.getFile().getFullPathName()))
exp->getJuceFolder() = juceFolder.getRelativePathFrom (project.getFile().getParentDirectory());
else
exp->getJuceFolder() = juceFolder.getFullPathName();
exp->createLibraryModules();
return exp;
}
示例3: switch
ProjectExporter* ProjectExporter::createNewExporter (Project& project, const int index)
{
ProjectExporter* exp = nullptr;
switch (index)
{
case 0: exp = new XCodeProjectExporter (project, ValueTree (XCodeProjectExporter ::getValueTreeTypeName (false)), false); break;
case 1: exp = new XCodeProjectExporter (project, ValueTree (XCodeProjectExporter ::getValueTreeTypeName (true)), true); break;
case 2: exp = new MSVCProjectExporterVC2005 (project, ValueTree (MSVCProjectExporterVC2005::getValueTreeTypeName())); break;
case 3: exp = new MSVCProjectExporterVC2008 (project, ValueTree (MSVCProjectExporterVC2008::getValueTreeTypeName())); break;
case 4: exp = new MSVCProjectExporterVC2010 (project, ValueTree (MSVCProjectExporterVC2010::getValueTreeTypeName())); break;
case 5: exp = new MSVCProjectExporterVC2012 (project, ValueTree (MSVCProjectExporterVC2012::getValueTreeTypeName())); break;
case 6: exp = new MSVCProjectExporterVC2013 (project, ValueTree (MSVCProjectExporterVC2013::getValueTreeTypeName())); break;
case 7: exp = new MakefileProjectExporter (project, ValueTree (MakefileProjectExporter ::getValueTreeTypeName())); break;
case 8: exp = new AndroidProjectExporter (project, ValueTree (AndroidProjectExporter ::getValueTreeTypeName())); break;
case 9: exp = new CodeBlocksProjectExporter (project, ValueTree (CodeBlocksProjectExporter::getValueTreeTypeName())); break;
default: jassertfalse; return 0;
}
File juceFolder (ModuleList::getLocalModulesFolder (&project));
File target (exp->getTargetFolder());
if (FileHelpers::shouldPathsBeRelative (juceFolder.getFullPathName(), project.getFile().getFullPathName()))
exp->getJuceFolderValue() = FileHelpers::getRelativePathFrom (juceFolder, project.getFile().getParentDirectory());
else
exp->getJuceFolderValue() = juceFolder.getFullPathName();
exp->createDefaultConfigs();
return exp;
}
示例4: addBrowseableCode
void LibraryModule::addBrowseableCode (ProjectExporter& exporter, const Array<File>& compiled, const File& localModuleFolder) const
{
if (sourceFiles.isEmpty())
findBrowseableFiles (localModuleFolder, sourceFiles);
Project::Item sourceGroup (Project::Item::createGroup (exporter.getProject(), getID(), "__mainsourcegroup" + getID(), false));
const RelativePath moduleFromProject (exporter.getModuleFolderRelativeToProject (getID()));
auto moduleHeader = moduleInfo.getHeader();
for (auto& sourceFile : sourceFiles)
{
auto pathWithinModule = FileHelpers::getRelativePathFrom (sourceFile, localModuleFolder);
// (Note: in exporters like MSVC we have to avoid adding the same file twice, even if one of those instances
// is flagged as being excluded from the build, because this overrides the other and it fails to compile)
if ((exporter.canCopeWithDuplicateFiles() || ! compiled.contains (sourceFile)) && sourceFile != moduleHeader)
addFileWithGroups (sourceGroup,
moduleFromProject.getChildFile (pathWithinModule),
pathWithinModule);
}
sourceGroup.sortAlphabetically (true, true);
sourceGroup.addFileAtIndex (moduleHeader, -1, false);
exporter.getModulesGroup().state.addChild (sourceGroup.state.createCopy(), -1, nullptr);
}
示例5: addBrowsableCode
void LibraryModule::addBrowsableCode (ProjectExporter& exporter, ProjectSaver& projectSaver,
const Array<File>& compiled, const File& localModuleFolder) const
{
if (sourceFiles.size() == 0)
findBrowseableFiles (localModuleFolder, sourceFiles);
Project::Item sourceGroup (Project::Item::createGroup (exporter.getProject(), getID(), "__mainsourcegroup" + getID()));
const RelativePath moduleFromProject (exporter.getModuleFolderRelativeToProject (getID(), projectSaver));
for (int i = 0; i < sourceFiles.size(); ++i)
{
const String pathWithinModule (FileHelpers::getRelativePathFrom (sourceFiles.getReference(i), localModuleFolder));
// (Note: in exporters like MSVC we have to avoid adding the same file twice, even if one of those instances
// is flagged as being excluded from the build, because this overrides the other and it fails to compile)
if (exporter.canCopeWithDuplicateFiles() || ! compiled.contains (sourceFiles.getReference(i)))
addFileWithGroups (sourceGroup,
moduleFromProject.getChildFile (pathWithinModule),
pathWithinModule);
}
sourceGroup.addFile (localModuleFolder.getChildFile (FileHelpers::getRelativePathFrom (moduleInfo.manifestFile,
moduleInfo.getFolder())), -1, false);
sourceGroup.addFile (getModuleHeaderFile (localModuleFolder), -1, false);
exporter.getModulesGroup().state.addChild (sourceGroup.state.createCopy(), -1, nullptr);
}
示例6: prepareExporter
void prepareExporter (ProjectExporter& exporter) const
{
exporter.xcodeIsBundle = true;
exporter.xcodeCreatePList = true;
exporter.xcodeFileType = "wrapper.cfbundle";
exporter.xcodeBundleExtension = ".plugin";
exporter.xcodeProductType = "com.apple.product-type.bundle";
exporter.xcodeProductInstallPath = "$(HOME)/Library/Internet Plug-Ins//";
{
XmlElement mimeTypesKey ("key");
mimeTypesKey.setText ("WebPluginMIMETypes");
XmlElement mimeTypesEntry ("dict");
const String exeName (exporter.getProject().getProjectFilenameRoot().toLowerCase());
mimeTypesEntry.createNewChildElement ("key")->setText ("application/" + exeName + "-plugin");
XmlElement* d = mimeTypesEntry.createNewChildElement ("dict");
d->createNewChildElement ("key")->setText ("WebPluginExtensions");
d->createNewChildElement ("array")
->createNewChildElement ("string")->setText (exeName);
d->createNewChildElement ("key")->setText ("WebPluginTypeDescription");
d->createNewChildElement ("string")->setText (exporter.getProject().getTitle());
exporter.xcodeExtraPListEntries.add (mimeTypesKey);
exporter.xcodeExtraPListEntries.add (mimeTypesEntry);
}
exporter.msvcTargetSuffix = ".dll";
exporter.msvcIsDLL = true;
exporter.msvcExtraPreprocessorDefs.set ("_CRT_SECURE_NO_WARNINGS", "");
exporter.makefileIsDLL = true;
}
示例7: areCompatibleExporters
static bool areCompatibleExporters (const ProjectExporter& p1, const ProjectExporter& p2)
{
return (p1.isVisualStudio() && p2.isVisualStudio())
|| (p1.isXcode() && p2.isXcode())
|| (p1.isLinux() && p2.isLinux())
|| (p1.isAndroid() && p2.isAndroid())
|| (p1.isCodeBlocks() && p2.isCodeBlocks());
}
示例8: fileTargetMatches
static bool fileTargetMatches (ProjectExporter& exporter, const String& target)
{
if (exporter.isXcode()) return exporterTargetMatches ("xcode", target);
if (exporter.isWindows()) return exporterTargetMatches ("msvc", target);
if (exporter.isLinux()) return exporterTargetMatches ("linux", target);
if (exporter.isAndroid()) return exporterTargetMatches ("android", target);
if (exporter.isCodeBlocks()) return exporterTargetMatches ("mingw", target);
return target.isEmpty();
}
示例9: prepareExporter
void LibraryModule::prepareExporter (ProjectExporter& exporter, ProjectSaver& projectSaver) const
{
Project& project = exporter.getProject();
exporter.addToExtraSearchPaths (exporter.getModuleFolderRelativeToProject (getID()).getParentDirectory());
const String extraDefs (moduleInfo.getPreprocessorDefs().trim());
if (extraDefs.isNotEmpty())
exporter.getExporterPreprocessorDefs() = exporter.getExporterPreprocessorDefsString() + "\n" + extraDefs;
{
Array<File> compiled;
const File localModuleFolder = project.getModules().shouldCopyModuleFilesLocally (getID()).getValue()
? project.getLocalModuleFolder (getID())
: moduleInfo.getFolder();
findAndAddCompiledUnits (exporter, &projectSaver, localModuleFolder, compiled);
if (project.getModules().shouldShowAllModuleFilesInProject (getID()).getValue())
addBrowseableCode (exporter, compiled, localModuleFolder);
}
if (isVSTPluginHost (project)) VSTHelpers::addVSTFolderToPath (exporter, false);
if (isVST3PluginHost (project)) VSTHelpers::addVSTFolderToPath (exporter, true);
if (exporter.isXcode())
{
if (isAUPluginHost (project))
exporter.xcodeFrameworks.addTokens ("AudioUnit CoreAudioKit", false);
const String frameworks (moduleInfo.moduleInfo [exporter.isOSX() ? "OSXFrameworks" : "iOSFrameworks"].toString());
exporter.xcodeFrameworks.addTokens (frameworks, ", ", StringRef());
parseAndAddLibs (exporter.xcodeLibs, moduleInfo.moduleInfo [exporter.isOSX() ? "OSXLibs" : "iOSLibs"].toString());
}
else if (exporter.isLinux())
{
parseAndAddLibs (exporter.linuxLibs, moduleInfo.moduleInfo ["LinuxLibs"].toString());
}
else if (exporter.isCodeBlocksWindows())
{
parseAndAddLibs (exporter.mingwLibs, moduleInfo.moduleInfo ["mingwLibs"].toString());
}
if (moduleInfo.isPluginClient())
{
if (shouldBuildVST (project).getValue()) VSTHelpers::prepareExporter (exporter, projectSaver, false);
if (shouldBuildVST3 (project).getValue()) VSTHelpers::prepareExporter (exporter, projectSaver, true);
if (shouldBuildAU (project).getValue()) AUHelpers::prepareExporter (exporter, projectSaver);
if (shouldBuildAAX (project).getValue()) AAXHelpers::prepareExporter (exporter, projectSaver);
if (shouldBuildRTAS (project).getValue()) RTASHelpers::prepareExporter (exporter, projectSaver);
}
}
示例10: fileShouldBeAdded
static bool fileShouldBeAdded (ProjectExporter& exporter, const var& properties)
{
if (! fileTargetMatches (exporter, properties["target"].toString()))
return false;
if (properties["RTASOnly"] && ! shouldBuildRTAS (exporter.getProject()).getValue())
return false;
if (properties["AudioUnitOnly"] && ! shouldBuildAU (exporter.getProject()).getValue())
return false;
return true;
}
示例11: createPropertyEditors
void LibraryModule::createPropertyEditors (ProjectExporter& exporter, PropertyListBuilder& props) const
{
if (isVSTPluginHost (exporter.getProject())
&& ! (moduleInfo.isPluginClient() && shouldBuildVST (exporter.getProject()).getValue()))
VSTHelpers::createVSTPathEditor (exporter, props);
if (moduleInfo.isPluginClient())
{
if (shouldBuildVST (exporter.getProject()).getValue()) VSTHelpers::createPropertyEditors (exporter, props);
if (shouldBuildRTAS (exporter.getProject()).getValue()) RTASHelpers::createPropertyEditors (exporter, props);
if (shouldBuildAAX (exporter.getProject()).getValue()) AAXHelpers::createPropertyEditors (exporter, props);
}
}
示例12: createExporter
ProjectExporter* ProjectExporter::createExporter (Project& project, const ValueTree& settings)
{
ProjectExporter* exp = MSVCProjectExporterVC6::createForSettings (project, settings);
if (exp == nullptr) exp = MSVCProjectExporterVC2005::createForSettings (project, settings);
if (exp == nullptr) exp = MSVCProjectExporterVC2008::createForSettings (project, settings);
if (exp == nullptr) exp = MSVCProjectExporterVC2010::createForSettings (project, settings);
if (exp == nullptr) exp = XCodeProjectExporter::createForSettings (project, settings);
if (exp == nullptr) exp = MakefileProjectExporter::createForSettings (project, settings);
if (exp == nullptr) exp = AndroidProjectExporter::createForSettings (project, settings);
jassert (exp != nullptr);
exp->createLibraryModules();
return exp;
}
示例13: prepareExporter
void prepareExporter (ProjectExporter& exporter) const
{
exporter.xcodeCreatePList = false;
if (exporter.getSetting (Ids::libraryType) == 2)
{
exporter.xcodeFileType = "compiled.mach-o.dylib";
exporter.xcodeProductType = "com.apple.product-type.library.dynamic";
exporter.xcodeBundleExtension = ".dylib";
}
else
{
exporter.xcodeFileType = "archive.ar";
exporter.xcodeProductType = "com.apple.product-type.library.static";
}
exporter.xcodeProductInstallPath = String::empty;
exporter.makefileTargetSuffix = ".so";
exporter.msvcTargetSuffix = exporter.getSetting (Ids::libraryType) == 2 ? ".dll" : ".lib";
exporter.msvcExtraPreprocessorDefs.set ("_LIB", "");
}
示例14: findAndAddCompiledUnits
void LibraryModule::findAndAddCompiledUnits (ProjectExporter& exporter,
ProjectSaver* projectSaver,
Array<File>& result,
ProjectType::Target::Type forTarget) const
{
for (auto& cu : getAllCompileUnits (forTarget))
{
if (cu.isNeededForExporter (exporter))
{
auto localFile = exporter.getProject().getGeneratedCodeFolder()
.getChildFile (cu.getFilenameForProxyFile());
result.add (localFile);
if (projectSaver != nullptr)
projectSaver->addFileToGeneratedGroup (localFile);
}
}
}
示例15:
bool LibraryModule::CompileUnit::isNeededForExporter (ProjectExporter& exporter) const
{
if ((hasSuffix (file, "_OSX") && ! exporter.isOSX())
|| (hasSuffix (file, "_iOS") && ! exporter.isiOS())
|| (hasSuffix (file, "_Windows") && ! exporter.isWindows())
|| (hasSuffix (file, "_Linux") && ! exporter.isLinux())
|| (hasSuffix (file, "_Android") && ! exporter.isAndroid()))
return false;
auto targetType = Project::getTargetTypeFromFilePath (file, false);
if (targetType != ProjectType::Target::unspecified && ! exporter.shouldBuildTargetType (targetType))
return false;
return exporter.usesMMFiles() ? isCompiledForObjC
: isCompiledForNonObjC;
}