QMakeData( Bam.Core.DependencyNode node) { this.OwningNode = node; this.OSXApplicationBundle = false; this.CCFlags = new Bam.Core.StringArray(); this.CustomPathVariables = new System.Collections.Generic.Dictionary <string, Bam.Core.StringArray>(); this.CustomRules = null; this.CXXFlags = new Bam.Core.StringArray(); this.Defines = new Bam.Core.StringArray(); this.DestDir = null; this.Headers = new Bam.Core.StringArray(); this.IncludePaths = new Bam.Core.StringArray(); this.Libraries = new Bam.Core.LocationArray(); this.ExternalLibraries = new Bam.Core.StringArray(); this.LinkFlags = new Bam.Core.StringArray(); this.Merged = false; this.MocDir = null; this.ObjectiveSources = new Bam.Core.StringArray(); this.ObjectsDir = null; this.Output = OutputType.Undefined; this.PostLink = new Bam.Core.StringArray(); this.PriPaths = new Bam.Core.StringArray(); this.RPathDir = new Bam.Core.StringArray(); this.QtModules = new Bam.Core.StringArray(); this.Sources = new Bam.Core.StringArray(); this.Target = string.Empty; this.VersionMajor = string.Empty; this.VersionMinor = string.Empty; this.VersionPatch = string.Empty; this.WinRCFiles = new Bam.Core.StringArray(); }
SetDefaultOptionValues( Bam.Core.DependencyNode node) { base.SetDefaultOptionValues(node); // TODO: think I can move this to GccCommon, but it misses out the C++ include paths for some reason (see Test9-dev) var target = node.Target; var gccToolset = target.Toolset as GccCommon.Toolset; var machineType = gccToolset.GccDetail.Target; var cxxIncludePath = gccToolset.GccDetail.GxxIncludePath; if (!System.IO.Directory.Exists(cxxIncludePath)) { throw new Bam.Core.Exception("Gcc C++ include path '{0}' does not exist. Is g++ installed?", cxxIncludePath); } var cxxIncludePath2 = System.String.Format("{0}/{1}", cxxIncludePath, machineType); if (!System.IO.Directory.Exists(cxxIncludePath2)) { throw new Bam.Core.Exception("Gcc C++ include path '{0}' does not exist. Is g++ installed?", cxxIncludePath2); } var cCompilerOptions = this as C.ICCompilerOptions; cCompilerOptions.SystemIncludePaths.Add(cxxIncludePath); cCompilerOptions.SystemIncludePaths.Add(cxxIncludePath2); GccCommon.CxxCompilerOptionCollection.ExportedDefaults(this, node); }
SetDelegates( Bam.Core.DependencyNode node) { this["Defines"].PrivateData = new PrivateData(DefinesCommandLineProcessor); this["IncludePaths"].PrivateData = new PrivateData(IncludePathsCommandLineProcessor); this["SystemIncludePaths"].PrivateData = new PrivateData(SystemIncludePathsCommandLineProcessor); this["OutputType"].PrivateData = new PrivateData(OutputTypeCommandLineProcessor); this["DebugSymbols"].PrivateData = new PrivateData(DebugSymbolsCommandLineProcessor); this["WarningsAsErrors"].PrivateData = new PrivateData(WarningsAsErrorsCommandLineProcessor); this["IgnoreStandardIncludePaths"].PrivateData = new PrivateData(IgnoreStandardIncludePathsCommandLineProcessor); this["Optimization"].PrivateData = new PrivateData(OptimizationCommandLineProcessor); this["CustomOptimization"].PrivateData = new PrivateData(CustomOptimizationCommandLineProcessor); this["TargetLanguage"].PrivateData = new PrivateData(TargetLanguageCommandLineProcessor); this["ShowIncludes"].PrivateData = new PrivateData(ShowIncludesCommandLineProcessor); this["AdditionalOptions"].PrivateData = new PrivateData(AdditionalOptionsCommandLineProcessor); this["OmitFramePointer"].PrivateData = new PrivateData(OmitFramePointerCommandLineProcessor); this["DisableWarnings"].PrivateData = new PrivateData(DisableWarningsCommandLineProcessor); this["CharacterSet"].PrivateData = new PrivateData(CharacterSetCommandLineProcessor); this["LanguageStandard"].PrivateData = new PrivateData(LanguageStandardCommandLineProcessor); this["Undefines"].PrivateData = new PrivateData(UndefinesCommandLineProcessor); this["AllWarnings"].PrivateData = new PrivateData(AllWarningsCommandLineProcessor); this["StrictDiagnostics"].PrivateData = new PrivateData(StrictDiagnosticsCommandLineProcessor); this["EnableRemarks"].PrivateData = new PrivateData(EnableRemarksCommandLineProcessor); this["StrictAliasing"].PrivateData = new PrivateData(StrictAliasingCommandLineProcessor); this["PositionIndependentCode"].PrivateData = new PrivateData(PositionIndependentCodeCommandLineProcessor); this["InlineFunctions"].PrivateData = new PrivateData(InlineFunctionsCommandLineProcessor); this["SixtyFourBit"].PrivateData = new PrivateData(SixtyFourBitCommandLineProcessor); }
SetDefaultOptionValues( Bam.Core.DependencyNode node) { base.SetDefaultOptionValues(node); (this as ICCompilerOptions).Visibility = EVisibility.Hidden; }
SetDefaultOptionValues( Bam.Core.DependencyNode node) { base.SetDefaultOptionValues(node); // TODO: can this be moved to MingwCommon? (difference in root C folders) var target = node.Target; var mingwToolset = target.Toolset as MingwCommon.Toolset; var cCompilerOptions = this as C.ICCompilerOptions; // using [0] as we want the one in the root include folder var cppIncludePath = System.IO.Path.Combine(mingwToolset.MingwDetail.IncludePaths[0], "c++"); cCompilerOptions.SystemIncludePaths.Add(cppIncludePath); var cppIncludePath2 = System.IO.Path.Combine(cppIncludePath, mingwToolset.MingwDetail.Version); cCompilerOptions.SystemIncludePaths.Add(cppIncludePath2); // TODO: commenting these two lines out reveals an error on Mingw Test9-dev var cppIncludePath3 = System.IO.Path.Combine(cppIncludePath2, mingwToolset.MingwDetail.Target); cCompilerOptions.SystemIncludePaths.Add(cppIncludePath3); }
SetDefaultOptionValues( Bam.Core.DependencyNode node) { base.SetDefaultOptionValues(node); // requires gcc 4.0, and only works on ELFs, but doesn't seem to do any harm (this as ICCompilerOptions).Visibility = EVisibility.Hidden; }
ExportedDefaults( Bam.Core.BaseOptionCollection options, Bam.Core.DependencyNode node) { var cInterfaceOptions = options as C.ICCompilerOptions; cInterfaceOptions.TargetLanguage = C.ETargetLanguage.Cxx; var cxxInterfaceOptions = options as C.ICxxCompilerOptions; cxxInterfaceOptions.ExceptionHandler = C.Cxx.EExceptionHandler.Disabled; }
SetNodeSpecificData( Bam.Core.DependencyNode node) { var locationMap = node.Module.Locations; var pListDirLoc = locationMap[XmlModule.OutputDir] as Bam.Core.ScaffoldLocation; if (!pListDirLoc.IsValid) { pListDirLoc.SetReference(locationMap[Bam.Core.State.ModuleBuildDirLocationKey]); } base.SetNodeSpecificData(node); }
SetDelegates( Bam.Core.DependencyNode node) { // Property 'CFBundleName' is value only - no delegates // Property 'CFBundleDisplayName' is value only - no delegates // Property 'CFBundleIdentifier' is value only - no delegates // Property 'CFBundleVersion' is value only - no delegates // Property 'CFBundleSignature' is value only - no delegates // Property 'CFBundleExecutable' is value only - no delegates // Property 'CFBundleShortVersionString' is value only - no delegates // Property 'LSMinimumSystemVersion' is value only - no delegates // Property 'NSHumanReadableCopyright' is value only - no delegates // Property 'NSMainNibFile' is value only - no delegates // Property 'NSPrincipalClass' is value only - no delegates }
SetDefaultOptionValues( Bam.Core.DependencyNode owningNode) { var options = this as IOSXPlistOptions; options.CFBundleName = null; options.CFBundleDisplayName = null; options.CFBundleIdentifier = null; options.CFBundleVersion = null; options.CFBundleSignature = "????"; options.CFBundleExecutable = null; // TODO: CFBundleDocumentTypes options.CFBundleShortVersionString = null; options.LSMinimumSystemVersion = null; options.NSHumanReadableCopyright = null; options.NSMainNibFile = null; options.NSPrincipalClass = null; }
SetNodeSpecificData( Bam.Core.DependencyNode node) { var locationMap = node.Module.Locations; var outputDirLoc = locationMap[TextFileModule.OutputDir] as Bam.Core.ScaffoldLocation; if (!outputDirLoc.IsValid) { outputDirLoc.SetReference(locationMap[Bam.Core.State.ModuleBuildDirLocationKey]); } var outputFileLoc = locationMap[TextFileModule.OutputFile] as Bam.Core.ScaffoldLocation; if (!outputFileLoc.IsValid) { outputFileLoc.SpecifyStub(outputDirLoc, "_sysconfigdata.py", Bam.Core.Location.EExists.WillExist); } base.SetNodeSpecificData(node); }
SetDefaultOptionValues( Bam.Core.DependencyNode node) { base.SetDefaultOptionValues(node); // TODO: can this be moved to MingwCommon? (difference in root C folders) var target = node.Target; var mingwToolset = target.Toolset as MingwCommon.Toolset; var cCompilerOptions = this as C.ICCompilerOptions; // using [1] as we want the one in the lib folder var cppIncludePath = System.IO.Path.Combine(mingwToolset.MingwDetail.IncludePaths[1], "c++"); cCompilerOptions.SystemIncludePaths.Add(cppIncludePath); var cppIncludePath2 = System.IO.Path.Combine(cppIncludePath, mingwToolset.MingwDetail.Target); cCompilerOptions.SystemIncludePaths.Add(cppIncludePath2); MingwCommon.CxxCompilerOptionCollection.ExportedDefaults(this, node); }
SetDefaultOptionValues( Bam.Core.DependencyNode node) { var compilerInterface = this as ICCompilerOptions; compilerInterface.AllWarnings = true; compilerInterface.StrictDiagnostics = true; compilerInterface.EnableRemarks = true; base.SetDefaultOptionValues(node); var cOptions = this as C.ICCompilerOptions; // there is too much of a headache with include paths to enable this! cOptions.IgnoreStandardIncludePaths = false; var target = node.Target; compilerInterface.SixtyFourBit = Bam.Core.OSUtilities.Is64Bit(target); if (target.HasConfiguration(Bam.Core.EConfiguration.Debug)) { compilerInterface.StrictAliasing = false; compilerInterface.InlineFunctions = false; } else { compilerInterface.StrictAliasing = true; compilerInterface.InlineFunctions = true; } compilerInterface.PositionIndependentCode = false; var compilerTool = target.Toolset.Tool(typeof(C.ICompilerTool)) as C.ICompilerTool; cOptions.SystemIncludePaths.AddRange(compilerTool.IncludePaths((Bam.Core.BaseTarget)target)); cOptions.TargetLanguage = C.ETargetLanguage.C; }
XmlWriterOptionCollection( Bam.Core.DependencyNode owningNode) : base(owningNode) { }
ObjCCompilerOptionCollection( Bam.Core.DependencyNode node) : base(node) { }
SetDelegates( Bam.Core.DependencyNode node) { base.SetDelegates(node); this["ExceptionHandler"].PrivateData = new ComposerXECommon.PrivateData(ExceptionHandlerCommandLineProcessor); }
SetDefaultOptionValues( Bam.Core.DependencyNode node) { base.SetDefaultOptionValues(node); ComposerXECommon.CxxCompilerOptionCollection.ExportedDefaults(this, node); }
SetDefaultOptionValues( Bam.Core.DependencyNode node) { base.SetDefaultOptionValues(node); ExportedDefaults(this, node); }
TextFileOptionCollection( Bam.Core.DependencyNode owningNode) : base(owningNode) { }
SetDelegates( Bam.Core.DependencyNode node) { base.SetDelegates(node); this["Visibility"].PrivateData = new ComposerXECommon.PrivateData(VisibilityCommandLineProcessor); }
SetDefaultOptionValues( Bam.Core.DependencyNode owningNode) { }
FinalizeOptions( Bam.Core.DependencyNode node) { var locationMap = node.Module.Locations; var pListFileLoc = locationMap[XmlModule.OutputFile] as Bam.Core.ScaffoldLocation; if (!pListFileLoc.IsValid) { pListFileLoc.SpecifyStub(locationMap[XmlModule.OutputDir], "Info.plist", Bam.Core.ScaffoldLocation.EExists.WillExist); } // TODO: move this into the Module itself // the plist file is relative to the main executable if (null == node.ExternalDependents) { throw new Bam.Core.Exception("PList generation must be dependent upon the executable associated with it"); } var dependentNode = node.ExternalDependents[0]; var exeFileLoc = dependentNode.Module.Locations[C.Application.OutputFile]; var primaryOutputPath = exeFileLoc.GetSinglePath(); var options = node.Module.Options as IOSXPlistOptions; // some other defaults if (null == options.CFBundleName) { options.CFBundleName = node.UniqueModuleName; } if (null == options.CFBundleExecutable) { options.CFBundleExecutable = System.IO.Path.GetFileNameWithoutExtension(primaryOutputPath); } if (null == options.CFBundleDisplayName) { options.CFBundleDisplayName = node.UniqueModuleName; } // now generate the XML document var xmlModule = node.Module as XmlModule; var dictEl = (xmlModule as XmlUtilities.OSXPlistModule).DictElement; if (null != options.CFBundleName) { AddKeyToDict(xmlModule.Document, dictEl, "CFBundleName"); AddStringToDict(xmlModule.Document, dictEl, options.CFBundleName); } if (null != options.CFBundleDisplayName) { AddKeyToDict(xmlModule.Document, dictEl, "CFBundleDisplayName"); AddStringToDict(xmlModule.Document, dictEl, options.CFBundleDisplayName); } if (null != options.CFBundleIdentifier) { AddKeyToDict(xmlModule.Document, dictEl, "CFBundleIdentifier"); AddStringToDict(xmlModule.Document, dictEl, options.CFBundleIdentifier); } if (null != options.CFBundleVersion) { AddKeyToDict(xmlModule.Document, dictEl, "CFBundleVersion"); AddStringToDict(xmlModule.Document, dictEl, options.CFBundleVersion); } AddKeyToDict(xmlModule.Document, dictEl, "CFBundlePackageType"); AddStringToDict(xmlModule.Document, dictEl, "APPL"); if (null != options.CFBundleSignature) { AddKeyToDict(xmlModule.Document, dictEl, "CFBundleSignature"); AddStringToDict(xmlModule.Document, dictEl, options.CFBundleSignature); } if (null != options.CFBundleExecutable) { AddKeyToDict(xmlModule.Document, dictEl, "CFBundleExecutable"); AddStringToDict(xmlModule.Document, dictEl, options.CFBundleExecutable); } if (null != options.CFBundleShortVersionString) { AddKeyToDict(xmlModule.Document, dictEl, "CFBundleShortVersionString"); AddStringToDict(xmlModule.Document, dictEl, options.CFBundleShortVersionString); } if (null != options.LSMinimumSystemVersion) { AddKeyToDict(xmlModule.Document, dictEl, "LSMinimumSystemVersion"); AddStringToDict(xmlModule.Document, dictEl, options.LSMinimumSystemVersion); } if (null != options.NSHumanReadableCopyright) { AddKeyToDict(xmlModule.Document, dictEl, "NSHumanReadableCopyright"); AddStringToDict(xmlModule.Document, dictEl, options.NSHumanReadableCopyright); } if (null != options.NSMainNibFile) { AddKeyToDict(xmlModule.Document, dictEl, "NSMainNibFile"); AddStringToDict(xmlModule.Document, dictEl, options.NSMainNibFile); } if (null != options.NSPrincipalClass) { AddKeyToDict(xmlModule.Document, dictEl, "NSPrincipalClass"); AddStringToDict(xmlModule.Document, dictEl, options.NSPrincipalClass); } }
SetDelegates( Bam.Core.DependencyNode owningNode) { }
LinkerOptionCollection( Bam.Core.DependencyNode node) : base(node) { }