private Dictionary<string, string> GenerateVTable(Definitions.ClassDefinition classDefinition)
 {
     Dictionary<string, string> VTable;
     if (classDefinition.ClassType.BaseClassType == null)
     {
         VTable = new Dictionary<string,string>();
         for (int x = 0; x < classDefinition.Methods.Count; x++)
         {
             string MethodName = classDefinition.Methods.ItemAt(x).Name;
             VTable.Add(MethodName, classDefinition.Name);
         }
     }
     else
     {
         VTable = GenerateVTable(Analysis.Environment.Classes.Lookup(classDefinition.ClassType.BaseClassType.Name));
         for (int x = 0; x < classDefinition.Methods.Count; x++)
         {
             string MethodName = classDefinition.Methods.ItemAt(x).Name;
             if (VTable.ContainsKey(MethodName))
                 VTable[MethodName] = classDefinition.Name;
             else
                 VTable.Add(MethodName, classDefinition.Name);
         }
     }
     return VTable;
 }
        public override void DeployModel(object modelHost, Definitions.DefinitionBase model)
        {
            var listItemModelHost = modelHost.WithAssertAndCast<ListItemFieldValueModelHost>("modelHost", value => value.RequireNotNull());
            var fieldValue = model.WithAssertAndCast<ListItemFieldValueDefinition>("model", value => value.RequireNotNull());

            ProcessFieldValue(listItemModelHost, listItemModelHost.CurrentItem, fieldValue);
        }
Exemplo n.º 3
0
 public DefinitionType(Definitions.DefinitionType sourceDefinition)
     : this()
 {
     this.definition_id = sourceDefinition.id;
     this.version = sourceDefinition.version;
     this.criteria = new CriteriaType(sourceDefinition.criteria);
 }
Exemplo n.º 4
0
 //private string projectTemplate;
 public string GenerateDataObject(Definitions.DataTable table, out string designerCode, List<string> newTypeList)
 {
     var model = new
     {
         ApplicationStartupPath = ApplicationStartupPath,
         CodeNamespace = CodeNamespace,
         Table = table,
         NewTypeList = newTypeList
     };
     if (string.IsNullOrEmpty(this.tableTemplate))
     {
         string tableTemplate = ReadTemplateFile(DATAOBJECT_FILENAME);
         RazorEngine.Razor.Compile(tableTemplate, "tableTemplate");
         this.tableTemplate = tableTemplate;
     }
     string tableCode = RazorEngine.Razor.Run(model, "tableTemplate");
     //string tableCode = RazorEngine.Razor.Parse(tableTemplate, model);
     if (string.IsNullOrEmpty(this.designerTemplate))
     {
         string designerTemplate = ReadTemplateFile(DATAOBJECT_DESIGNER_FILENAME);
         RazorEngine.Razor.Compile(designerTemplate, "designerTemplate");
         this.designerTemplate = designerTemplate;
     }
     //designerCode = RazorEngine.Razor.Parse(designerTemplate, model);
     designerCode = RazorEngine.Razor.Run(model, "designerTemplate");
     return tableCode;
 }
Exemplo n.º 5
0
        public static void Report(Definitions.LogTypes level, string message)
        {
            if (message == string.Empty)
                return;

            var lvl = string.Empty;

            switch (level)
            {
                case Definitions.LogTypes.Info:
                    lvl = "I";
                    break;
                case Definitions.LogTypes.Warning:
                    lvl = "W";
                    break;
                case Definitions.LogTypes.Error:
                    lvl = "E";
                    break;
                case Definitions.LogTypes.Other:
                    lvl = "O";
                    break;
                default:
                    lvl = string.Empty;
                    break;
            }

            var line = "[{0}]: {1}".F(lvl, message);
            Console.WriteLine(line);
        }
Exemplo n.º 6
0
 // C'tor
 internal Player(Definitions.GameDef g, string name, byte id, ulong pkey)
 {
     // Init fields
     this.name = name; this.Id = id; this.PublicKey = pkey;
     // Register the player
     all.Add(this);
     OnPropertyChanged("Color");
     // Create the color brushes
     solidBrush = new System.Windows.Media.SolidColorBrush(Color);
     solidBrush.Freeze();
     transparentBrush = new System.Windows.Media.SolidColorBrush(Color);
     transparentBrush.Opacity = 0.4;
     transparentBrush.Freeze();
     OnPropertyChanged("Brush");
     OnPropertyChanged("TransparentBrush");
     // Create counters
     counters = new Counter[g.PlayerDefinition.Counters != null ? g.PlayerDefinition.Counters.Length : 0];
     for (int i = 0; i < Counters.Length; i++)
         Counters[i] = new Counter(this, g.PlayerDefinition.Counters[i]);
       // Create variables
       Variables = new Dictionary<string, int>();
       foreach (var varDef in g.Variables.Where(v => !v.Global))
     Variables.Add(varDef.Name, varDef.DefaultValue);
     // Create a hand, if any
     if (g.PlayerDefinition.Hand != null)
         hand = new Hand(this, g.PlayerDefinition.Hand);
     // Create groups
     groups = new Group[g.PlayerDefinition.Groups != null ? g.PlayerDefinition.Groups.Length + 1 : 1];
     groups[0] = hand;
     for (int i = 1; i < IndexedGroups.Length; i++)
         groups[i] = new Pile(this, g.PlayerDefinition.Groups[i - 1]);
     // Raise the event
     if (PlayerAdded != null) PlayerAdded(null, new PlayerEventArgs(this));
 }
        public override void DeployModel(object modelHost, Definitions.DefinitionBase model)
        {
            var list = modelHost.WithAssertAndCast<List>("modelHost", value => value.RequireNotNull());
            var listItemModel = model.WithAssertAndCast<ListItemDefinition>("model", value => value.RequireNotNull());

            ValidateModel(list, listItemModel);
        }
Exemplo n.º 8
0
 public override void OnAddReferencedAssemblies(List<string> refList, Definitions.IProcessDefinition process)
 {
     if (process.RootTable.FieldList.Any(x => x.ColumnType == ColumnTypes.GageRR))
     {
         refList.Add("Cebos.Veyron.QualityManagement.dll");
     }
 }
Exemplo n.º 9
0
        /// <summary>
        /// Adds the editable root control specific methods.
        /// </summary>
        /// <param name="code">The code.</param>
        /// <param name="process">The process.</param>
        public override void AddEditableRootControlSpecificMethods(StringBuilder code, Definitions.IProcessDefinition process)
        {
            base.AddEditableRootControlSpecificMethods(code, process);

            if (process.RootTable.FieldList.All(x => x.ColumnType != ColumnTypes.SPCChart))
                return;

            code.AppendFormat(@"
        public static ChartPanel GetSampleDataForSPC(string spcFieldName, {0}Edit model, ChartTypesEnum chartType, ChartPanel chartDescriptor, bool isForExpressions)
        {{
            var spcFieldValue = model.GetValueByPropertyName(spcFieldName);

            if (string.IsNullOrEmpty(spcFieldValue))
                return null;

            XElement xml;
            try
            {{
                xml = XElement.Parse(spcFieldValue);
                if (!xml.HasAttributes)
                    return null;
            }}
            catch (System.Xml.XmlException)
            {{
                return null;
            }}

            var sampleSettings = model.GetValueByPropertyName(string.Format(""{{0}}_SampleSettings"", xml.Attribute(""SampleFieldName"").Value));

            return GetSampleDataCommand.Execute(spcFieldName, spcFieldValue, model, sampleSettings, chartType, chartDescriptor, isForExpressions);
        }}", process.Name);
        }
 public static void ClientCheck2(Definitions.Clientdefinition sys)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create       (0x2005);
     Writer.Byte(1);
     Writer.Byte(0);
     Writer.Byte(1);
     Writer.Byte(0x47);
     Writer.Byte(1);
     Writer.Byte(5);
     Writer.Byte(0);
     Writer.Byte(0);
     Writer.Byte(0);
     Writer.Byte(2);
     sys.client.Send(Writer.GetBytes());
     Writer = new PacketWriter();
     Writer.Create(0x6005);
     Writer.Byte(3);
     Writer.Byte(0);
     Writer.Byte(2);
     Writer.Byte(0);
     Writer.Byte(2);
     sys.client.Send(Writer.GetBytes());
     Writer = new PacketWriter();
     Writer.Create(0xA100);
     Writer.Byte(1);
     Writer.Byte(0);
     sys.client.Send(Writer.GetBytes());
 }
Exemplo n.º 11
0
 public TestType(Definitions.TestType test) : this()
 {
     this.test_id = test.id;
     this.check = test.check;
     this.check_existence = test.check_existence;
     this.state_operator = test.state_operator;
     this.version = test.version;
 }
Exemplo n.º 12
0
 public Serverentry(short ident, string hostname, string bootfile, IPAddress address, Definitions.BootServerTypes type = Definitions.BootServerTypes.PXEBootstrapServer)
 {
     this.ident = ident;
     this.bootfile = bootfile;
     this.hostname = hostname;
     this.address = address;
     this.type = type;
 }
Exemplo n.º 13
0
 public SecurityEnforcer(Persistence.IPersister persister, ISecurityManager security, Definitions.IDefinitionManager definitions, Web.IUrlParser urlParser, Web.IWebContext webContext)
 {
     this.webContext = webContext;
     this.persister = persister;
     this.security = security;
     this.definitions = definitions;
     this.urlParser = urlParser;
 }
Exemplo n.º 14
0
		/// <summary>
		/// Returns the offset of the specified DHCP option in the Packet.
		/// </summary>
		/// <param name="packet">The DHCP Packet</param>
		/// <param name="option">The DHCP Option</param>
		/// <returns>This function returns 0 if the DHCP option is not in the packet.</returns>
		public static int GetOptionOffset(ref DHCPPacket packet, Definitions.DHCPOptionEnum option)
		{
			for (var i = 0; i < packet.Data.Length; i++)
				if (packet.Data[i] == Convert.ToInt32(option))
					return i;

			return 0;
		}
Exemplo n.º 15
0
 internal Card(Player owner, int id, ulong key, Definitions.CardDef def, Data.CardModel model, bool mySecret)
     : base(owner)
 {
     this.id = id;
       this.Type = new CardIdentity(id) { alias = false, key = key, model = model, mySecret = mySecret };
       definition = def;
       All.Add(id, this);
 }
Exemplo n.º 16
0
        /// <summary>
        /// Called when generator needs to fill process EditableRoot class interfaces.
        /// </summary>
        /// <param name="process">The process.</param>
        /// <returns>Array of EditableRoot interfaces./&gt;.</returns>
        public override Type[] GetEditableRootInterfaces(Definitions.IProcessDefinition process)
        {
            var interfaces = new List<Type>();

            if (process.RootTable.FieldList.Any(f => f.ColumnType == ColumnTypes.Approval))
                interfaces.Add(typeof(IApprovable));

            return interfaces.ToArray();
        }
Exemplo n.º 17
0
	void GameOver(int result, Definitions.ResultType resultType = Definitions.ResultType.NA) {
		if (!gameOver) {
			gameOver = true;
			if (OnGameOver != null) {
				OnGameOver (result, resultType);
			}
			whitePlayer.Deactivate ();
			blackPlayer.Deactivate ();
		}
	}
Exemplo n.º 18
0
 protected override void OnParseInfo(TypeDeclaration type, Definitions.ContentType definition)
 {
     var info = definition.Info;
     info.Alias = type.Name.CamelCase();
     info.Name = AttributeValue(type, "DisplayName", type.Name.SplitPascalCase());
     info.Description = AttributeValue(type, "Description", null);
     info.Master = FindMaster(type, Configuration).CamelCase();
     info.AllowAtRoot = BoolFieldValue(type, "AllowAtRoot");
     info.Icon = StringFieldValue(type, "icon", "folder.gif");
     info.Thumbnail = StringFieldValue(type, "thumbnail", "folder.png");
 }
Exemplo n.º 19
0
		public TemplateInfo(Definitions.ItemDefinition d)
			: this()
		{
			Title = d.Title;
			Description = d.Description;
			Discriminator = d.Discriminator;
			ToolTip = d.ToolTip;
			IconUrl = d.IconUrl;
			IconClass = d.IconClass;
			TypeName = d.ItemType.Name;
			TemplateKey = d.TemplateKey;
		}
Exemplo n.º 20
0
		public static byte[] GetOptionValue(byte[] data, Definitions.DHCPOptionEnum option)
		{
			for (var i = 0; i < data.Length; i++)
				if (Convert.ToInt32(data[i]) == Convert.ToInt32(option))
				{
					var value = new byte[Convert.ToInt32(data[i + 1])];
					Functions.CopyTo(ref data, i + 2, ref value, 0, value.Length);

					return value;
				}

			return new byte[1] { byte.MaxValue };
		}
Exemplo n.º 21
0
		public static byte[] SetDHCPOption(Definitions.DHCPOptionEnum option, byte[] value, bool includesendoption = false)
		{
			var opt = new byte[(2 + value.Length)];
			var len = Convert.ToByte(value.Length);
			opt[0] = Convert.ToByte(option);

			if (includesendoption)
				len += 1;

			opt[1] = len;
			Functions.CopyTo(ref value, 0, ref opt, 2, opt.Length - 2);

			return opt;
		}
Exemplo n.º 22
0
        /// <summary>
        /// Adds extra properties to EditableRoot.
        /// </summary>
        /// <param name="code">The source code under generation.</param>
        /// <param name="process">Current process.</param>
        public override void AddEditClassProperties(System.Text.StringBuilder code, Definitions.IProcessDefinition process)
        {
            base.AddEditClassProperties(code, process);

            code.AppendFormat(@"
        public static readonly PropertyInfo<Cebos.Veyron.SharedTypes.ApprovalOverrideMemberList> OverrideMembersProperty = RegisterProperty<Cebos.Veyron.SharedTypes.ApprovalOverrideMemberList>(c => c.OverrideMembers);

        public Cebos.Veyron.SharedTypes.ApprovalOverrideMemberList OverrideMembers
        {{
            get {{ return GetProperty(OverrideMembersProperty); }}
        }}

        Cebos.Veyron.SharedTypes.ApprovalOverrideMemberList Cebos.Veyron.SharedTypes.IApprovalEdit.OverrideMembers
        {{
            get {{ return OverrideMembers; }}
        }}

#if !SILVERLIGHT

        public void SetOverrideMembers(IEnumerable<Cebos.Veyron.SharedTypes.ApprovalOverrideMember> collection)
        {{
            LoadProperty(OverrideMembersProperty, Cebos.Veyron.SharedTypes.ApprovalOverrideMemberList.GetApprovalOverrideMemberList(collection));
        }}

        void Cebos.Veyron.SharedTypes.IApprovalEdit.SetOverrideMembers(IEnumerable<Cebos.Veyron.SharedTypes.ApprovalOverrideMember> collection)
        {{
            SetOverrideMembers(collection);
        }}

#endif

        public static readonly PropertyInfo<bool> SkipMembersUpdateProperty = RegisterProperty<bool>(c => c.SkipMembersUpdate);

        public bool SkipMembersUpdate
        {{
            get {{ return GetProperty(SkipMembersUpdateProperty); }}
            set {{ SetProperty(SkipMembersUpdateProperty, value); }}
        }}

        Cebos.Veyron.SharedTypes.IEditableRootList<Cebos.Veyron.SharedTypes.IApprovalMemberResultEdit> Cebos.Veyron.SharedTypes.IApprovalEdit.MemberResults
        {{
            get {{ return MemberResults; }}
        }}

        Cebos.Veyron.SharedTypes.IEditableRootList<Cebos.Veyron.SharedTypes.IApprovalLevelResult> Cebos.Veyron.SharedTypes.IApprovalEdit.LevelResults
        {{
            get {{ return LevelResults; }}
        }}
");
        }
Exemplo n.º 23
0
 // C'tor for global items
 internal Player(Definitions.GameDef g)
 {
     var globalDef = g.GlobalDefinition;
     // Register the player
     all.Add(this);
     // Init fields
     name = "Global"; Id = 0; PublicKey = 0;
     // Create counters
     counters = new Counter[globalDef.Counters != null ? globalDef.Counters.Length : 0];
     for (int i = 0; i < Counters.Length; i++)
         Counters[i] = new Counter(this, globalDef.Counters[i]);
     // Create global's player groups
     groups = new Pile[globalDef.Groups != null ? g.GlobalDefinition.Groups.Length + 1 : 0];
     for (int i = 1; i < IndexedGroups.Length; i++)
         groups[i] = new Pile(this, globalDef.Groups[i - 1]);
 }
Exemplo n.º 24
0
 public override void OnAfter_AddClassProperties(StringBuilder code, Definitions.IProcessDefinition process, bool isInfoProperty)
 {
     if (!isInfoProperty)
     {
         foreach (var field in process.RootTable.FieldList.Where(x => x.ColumnType == ColumnTypes.GageRR))
         {
             code.AppendFormat(@"
 public static readonly PropertyInfo<{0}MsaEdit> {0}_MemberProperty = RegisterProperty<{0}MsaEdit>(p => p.{0}_Member, RelationshipTypes.Child);
 public {0}MsaEdit {0}_Member
 {{
     get {{ return GetProperty({0}_MemberProperty); }}
 }}
 ", field.SystemName);
         }
     }
 }
Exemplo n.º 25
0
        /// <summary>
        /// Called when [after_ editable root_ data portal_ create].
        /// </summary>
        /// <param name="code">The code.</param>
        /// <param name="process">The process.</param>
        public override void OnAfter_EditableRoot_DataPortal_Create(StringBuilder code, Definitions.IProcessDefinition process)
        {
            base.OnAfter_EditableRoot_DataPortal_Create(code, process);

            foreach (var spcField in process.RootTable.FieldList.Where(x => x.ColumnType == ColumnTypes.SPCChart))
            {
                var spcSettings = new XElement("SpcSettings",
                    new XAttribute("ChartHeightMultiplier", 1.0),
                    new XAttribute("PointsToDisplay", string.Empty),
                    new XAttribute("SubgroupSizeFieldName", string.Empty),
                    new XAttribute("USLFieldName", string.Empty),
                    new XAttribute("LSLFieldName", string.Empty),
                    new XAttribute("UCLFieldName", string.Empty),
                    new XAttribute("LCLFieldName", string.Empty),
                    new XAttribute("PickDateFieldName", string.Empty),
                    new XAttribute("DateTimeFormat", DateTimeFormat.DateTime.ToString()),
                    new XAttribute("SampleFilterGuid", string.Empty),
                    new XAttribute("SampleFilterDefinition", string.Empty),
                    new XAttribute("ManualSettingOfCLs", string.Empty));
                spcSettings.SetAttributeValue("SampleFieldName", spcField.SPCSampleFieldName);

                if (spcField.SPCOptions != null)
                {
                    spcSettings.SetAttributeValue("ChartHeightMultiplier", spcField.SPCOptions.ChartHeightMultiplier.ToString(CultureInfo.InvariantCulture));
                    spcSettings.SetAttributeValue("PointsToDisplay", spcField.SPCOptions.PointsToDisplay);
                    spcSettings.SetAttributeValue("SubgroupSizeFieldName", spcField.SPCOptions.SubgroupSizeFieldName);
                    spcSettings.SetAttributeValue("USLFieldName", spcField.SPCOptions.USLFieldName);
                    spcSettings.SetAttributeValue("LSLFieldName", spcField.SPCOptions.LSLFieldName);
                    spcSettings.SetAttributeValue("UCLFieldName", spcField.SPCOptions.UCLFieldName);
                    spcSettings.SetAttributeValue("LCLFieldName", spcField.SPCOptions.LCLFieldName);
                    spcSettings.SetAttributeValue("PickDateFieldName", spcField.SPCOptions.PickDateFieldName);

                    var dateField = process.RootTable.FieldList.FirstOrDefault(x => x.SystemName == spcField.SPCOptions.PickDateFieldName);
                    if (dateField != null)
                        spcSettings.SetAttributeValue("DateTimeFormat", dateField.DateTimeFormat.ToString());

                    spcSettings.SetAttributeValue("SampleFilterGuid", spcField.SPCOptions.SampleFilterGuid);
                    spcSettings.SetAttributeValue("SampleFilterDefinition", string.IsNullOrEmpty(spcField.SPCOptions.SampleFilterDefinition) ? string.Empty : AssemblyGeneratorBase.TranslateFilterDefinition(spcField.SPCOptions.SampleFilterDefinition, process).Replace("\"\"", "'"));
                    spcSettings.SetAttributeValue("ManualSettingOfCLs", spcField.SPCOptions.ManualSettingOfCLs);
                }

                code.AppendFormat(@"
            LoadProperty({0}Property, @""{1}"");
            ", spcField.SystemName, spcSettings.ToString().Replace("\"", "\"\""));
            }
        }
Exemplo n.º 26
0
        public override void OnAfter_EditableRoot_DataPortal_Create(StringBuilder code, Definitions.IProcessDefinition process)
        {
            foreach (var gageField in process.RootTable.FieldList.Where(x => x.ColumnType == ColumnTypes.GageRR))
            {
                var gageSettings = new XElement("GageRRSettings",
                    new XAttribute("GageRRSourceProcessId", 0),
                    new XAttribute("GageRRSourceProcessSysName", string.Empty),
                    new XAttribute("GageRRDataProcessSysName", string.Empty),
                    new XAttribute("SampleFilterGuid", Guid.Empty),
                    new XAttribute("SampleFilterDefinition", string.Empty),
                    new XAttribute("ChecklistFieldName", string.Empty),
                    new XAttribute("SampleFieldName", string.Empty),
                    new XAttribute("AppraiserFieldName", string.Empty),
                    new XAttribute("TrialFieldName", string.Empty),
                    new XAttribute("NumberOfAppraisers", 2),
                    new XAttribute("NumberOfTrials", 2),
                    new XAttribute("UseDataGroupingFilter", Boolean.FalseString.ToLower()));

                if (gageField.GageRROptions != null)
                {
                    gageSettings.SetAttributeValue("GageRRSourceProcessId", gageField.GageRROptions.GageRRSourceProcessId ?? 0);
                    gageSettings.SetAttributeValue("GageRRSourceProcessSysName", gageField.GageRROptions.GageRRSourceProcessSysName);
                    gageSettings.SetAttributeValue("GageRRDataProcessSysName", gageField.GageRROptions.GageRRDataProcessSysName);
                    gageSettings.SetAttributeValue("SampleFilterGuid", gageField.GageRROptions.SampleFilterGuid);
                    gageSettings.SetAttributeValue("SampleFilterDefinition", string.IsNullOrEmpty(gageField.GageRROptions.SampleFilterDefinition)
                        ? string.Empty
                        : AssemblyGeneratorBase.TranslateFilterDefinition(gageField.GageRROptions.SampleFilterDefinition, process).Replace("\"\"", "'"));
                    gageSettings.SetAttributeValue("ChecklistFieldName", gageField.GageRROptions.ChecklistFieldName);
                    gageSettings.SetAttributeValue("SampleFieldName", gageField.GageRROptions.SampleFieldName);
                    gageSettings.SetAttributeValue("AppraiserFieldName", gageField.GageRROptions.AppraiserFieldName);
                    gageSettings.SetAttributeValue("TrialFieldName", gageField.GageRROptions.TrialFieldName);
                    gageSettings.SetAttributeValue("NumberOfAppraisers", gageField.GageRROptions.NumberOfAppraisers);
                    gageSettings.SetAttributeValue("NumberOfTrials", gageField.GageRROptions.NumberOfTrials);
                    gageSettings.SetAttributeValue("UseDataGroupingFilter", gageField.GageRROptions.UseDataGroupingFilter);
                }

                code.AppendFormat(@"
            LoadProperty({0}_SettingsProperty, @""{1}"");

            LoadProperty({0}_MemberProperty, {0}MsaEdit.CreateNew());
            if ({0}_Member != null)
                {0}_Member.Settings = {0}_Settings;
            ", gageField.SystemName, gageSettings.ToString().Replace("\"", "\"\""));
            }
        }
        /// <summary>
        /// Add address
        /// </summary>
        /// <param name="address"></param>
        public void AddAddress(Definitions.Address address)
        {
            Log.DebugFormat("Received Request for AddAddress with following values {0}", address);

            using (EducationalInstitutionDbContext context = new EducationalInstitutionDbContext())
            {
                context.Addresses.Add(new Address()
                {
                    City = address.City,
                    Country = address.Country,
                    State = address.State,
                    StreetLine1 = address.StreetLine1,
                    StreetLine2 = address.StreetLine2
                });
                context.SaveChanges();
            }
            Log.Debug("Processed Request for Add Address");
        }
Exemplo n.º 28
0
        public object Create(string value, Definitions.IDefinition definition)
        {
            _renderer.Settings = Settings.Copy();
            definition.TransformSettings(_renderer.Settings);

            if (!definition.IsDataValid(value))
                throw new BarcodeException();

            var codes = definition.GetCodes(value);
            var dt = definition.GetDisplayText(value);

            if (definition.IsChecksumRequired || _renderer.Settings.IsChecksumCalculated)
                dt = definition.AddChecksum(dt, codes);

            _renderer.Definition = definition;

            return _renderer.Render(codes, dt);
        }
        public override void DeployModel(object modelHost, Definitions.DefinitionBase model)
        {
            var listItemModelHost = modelHost.WithAssertAndCast<ListItemModelHost>("modelHost", value => value.RequireNotNull());
            var definition = model.WithAssertAndCast<ListItemFieldValuesDefinition>("model", value => value.RequireNotNull());

            var spObject = listItemModelHost.HostListItem;

            var assert = ServiceFactory.AssertService
                            .NewAssert(definition, spObject)
                                  .ShouldNotBeNull(spObject);

            if (definition.Values.Count > 0)
            {
                assert.ShouldBeEqual((p, s, d) =>
                {
                    var srcProp = s.GetExpressionValue(def => def.Values);

                    var isValid = true;

                    foreach (var value in definition.Values)
                    {
                        if (spObject[value.FieldName].ToString() != value.Value.ToString())
                        {
                            isValid = false;
                            break;
                        }
                    }

                    return new PropertyValidationResult
                    {
                        Tag = p.Tag,
                        Src = srcProp,
                        Dst = null,
                        IsValid = isValid
                    };
                });
            }
            else
            {
                assert.SkipProperty(m => m.Values, "Values.Count == 0. Skipping");
            }
        }
Exemplo n.º 30
0
        public static int GetGamesCountFromLibrary(Definitions.List.LibraryList Library)
        {
            try
            {
                // Define an int for total game count
                int gameCount = 0;

                // Get *.acf file count from library path
                gameCount += Directory.GetFiles(Library.Directory, "*.acf", SearchOption.TopDirectoryOnly).Length;

                // If library is a backup library
                if (Library.Backup)
                    // Also get *.zip file count from backup library path
                    gameCount += Directory.GetFiles(Library.Directory, "*.zip", SearchOption.TopDirectoryOnly).Length;

                // return total game count we have found
                return gameCount;
            }
            catch { return 0; }
        }
Exemplo n.º 31
0
 /// <summary>Retrieves allowed item definitions.</summary>
 /// <param name="parentItem">The parent item.</param>
 /// <param name="user">The user to restrict access for.</param>
 /// <returns>Item definitions allowed by zone, parent restrictions and security.</returns>
 public virtual IEnumerable <ItemDefinition> GetAllowedDefinitions(ContentItem parentItem, IPrincipal user)
 {
     return(Definitions.GetAllowedChildren(parentItem)
            .Where(d => d.Enabled && d.AllowedIn != Integrity.AllowedZones.None && d.Enabled)
            .WhereAuthorized(Security, user, parentItem));
 }
Exemplo n.º 32
0
    public Engine(TargetInfo Target)
    {
        SharedPCHHeaderFile = "Runtime/Engine/Public/Engine.h";

        PublicIncludePathModuleNames.AddRange(new string[] { "Renderer" });

        PrivateIncludePaths.AddRange(
            new string[] {
            "Developer/DerivedDataCache/Public",
            "Runtime/Online/OnlineSubsystem/Public",
            "Runtime/Online/OnlineSubsystemUtils/Public",
            "Developer/SynthBenchmark/Public",
            "Runtime/Engine/Private",
        }
            );

        PrivateIncludePathModuleNames.AddRange(
            new string[] {
            "CrashTracker",
            "OnlineSubsystem",
            "TargetPlatform",
            "ImageWrapper",
            "HeadMountedDisplay",
            "Advertising"
        }
            );

        if (Target.Configuration != UnrealTargetConfiguration.Shipping)
        {
            PrivateIncludePathModuleNames.AddRange(new string[] { "TaskGraph" });
        }

        PublicDependencyModuleNames.AddRange(
            new string[] {
            "Core",
            "CoreUObject",
            "Json",
            "Slate",
            "InputCore",
            "Messaging",
            "RenderCore",
            "RHI",
            "ShaderCore",
            "AssetRegistry",                     // Here until FAssetData is moved to engine
            "EngineMessages",
            "EngineSettings",
            "SynthBenchmark",
            "AIModule",
            "VectorVM",
            "DatabaseSupport",
        }
            );

        PrivateDependencyModuleNames.AddRange(
            new string[] {
            "AppFramework",
            "Networking",
            "Sockets",
            "SlateCore",
            "SlateReflector",
            "VectorVM",
            "Landscape"
        }
            );

        CircularlyReferencedDependentModules.Add("AIModule");
        CircularlyReferencedDependentModules.Add("Landscape");

        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
            "MovieSceneCore",
            "MovieSceneCoreTypes",
            "HeadMountedDisplay",
            "StreamingPauseRendering",
            "UMG",
        }
            );

        if (Target.Type != TargetRules.TargetType.Server)
        {
            PrivateIncludePathModuleNames.AddRange(
                new string[] {
                "SlateRHIRenderer",
            }
                );

            DynamicallyLoadedModuleNames.AddRange(
                new string[] {
                "SlateRHIRenderer",
            }
                );
        }
        ;

        if (UEBuildConfiguration.bBuildDeveloperTools)
        {
            // Add "BlankModule" so that it gets compiled as an example and will be maintained and tested.  This can be removed
            // at any time if needed.  The module isn't actually loaded by the engine so there is no runtime cost.
            DynamicallyLoadedModuleNames.Add("BlankModule");

            if (Target.Type != TargetRules.TargetType.Server)
            {
                PrivateIncludePathModuleNames.Add("MeshUtilities");
                DynamicallyLoadedModuleNames.Add("MeshUtilities");

                PrivateDependencyModuleNames.AddRange(
                    new string[] {
                    "ImageCore",
                    "RawMesh"
                });
            }

            if (Target.Configuration != UnrealTargetConfiguration.Shipping && Target.Configuration != UnrealTargetConfiguration.Test && Target.Type != TargetRules.TargetType.Server)
            {
                PrivateDependencyModuleNames.Add("CollisionAnalyzer");
                CircularlyReferencedDependentModules.Add("CollisionAnalyzer");

                PrivateDependencyModuleNames.Add("LogVisualizer");
                CircularlyReferencedDependentModules.Add("LogVisualizer");
            }

            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                DynamicallyLoadedModuleNames.AddRange(
                    new string[] {
                    "WindowsTargetPlatform",
                    "WindowsNoEditorTargetPlatform",
                    "WindowsServerTargetPlatform",
                    "WindowsClientTargetPlatform",
                }
                    );
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                DynamicallyLoadedModuleNames.AddRange(
                    new string[] {
                    "MacTargetPlatform",
                    "MacNoEditorTargetPlatform",
                    "MacServerTargetPlatform",
                    "MacClientTargetPlatform"
                }
                    );
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux)
            {
                DynamicallyLoadedModuleNames.AddRange(
                    new string[] {
                    "LinuxTargetPlatform",
                    "LinuxNoEditorTargetPlatform",
                    "LinuxServerTargetPlatform",
                }
                    );
            }
        }

        DynamicallyLoadedModuleNames.AddRange(
            new string[] {
            "Analytics",
            "AnalyticsET",
            "OnlineSubsystem",
            "OnlineSubsystemUtils",
            "Advertising"
        }
            );

        if (!UEBuildConfiguration.bBuildDedicatedServer)
        {
            DynamicallyLoadedModuleNames.AddRange(
                new string[] {
                "CrashTracker",
                "ImageWrapper",
                "GameLiveStreaming"
            }
                );
        }

        if (!UEBuildConfiguration.bBuildRequiresCookedData && UEBuildConfiguration.bCompileAgainstEngine)
        {
            DynamicallyLoadedModuleNames.AddRange(
                new string[] {
                "DerivedDataCache",
                "TargetPlatform"
            }
                );
        }

        if (UEBuildConfiguration.bBuildEditor == true)
        {
            PublicDependencyModuleNames.AddRange(
                new string[] {
                "UnrealEd",
                "Kismet"
            }
                ); // @todo api: Only public because of WITH_EDITOR and UNREALED_API

            CircularlyReferencedDependentModules.AddRange(
                new string[] {
                "UnrealEd",
                "Kismet"
            }
                );

            PrivateIncludePathModuleNames.Add("TextureCompressor");
            PrivateIncludePaths.Add("Developer/TextureCompressor/Public");
        }

        SetupModulePhysXAPEXSupport(Target);
        if (UEBuildConfiguration.bCompilePhysX && UEBuildConfiguration.bRuntimePhysicsCooking)
        {
            DynamicallyLoadedModuleNames.Add("PhysXFormats");
            PrivateIncludePathModuleNames.Add("PhysXFormats");
        }


        SetupModuleBox2DSupport(Target);

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32))
        {
            AddThirdPartyPrivateStaticDependencies(Target,
                                                   "UEOgg",
                                                   "Vorbis",
                                                   "VorbisFile",
                                                   "libOpus"
                                                   );

            if (UEBuildConfiguration.bCompileLeanAndMeanUE == false)
            {
                AddThirdPartyPrivateStaticDependencies(Target, "DirectShow");
            }

            // Head Mounted Display support
//            PrivateIncludePathModuleNames.AddRange(new string[] { "HeadMountedDisplay" });
//            DynamicallyLoadedModuleNames.AddRange(new string[] { "HeadMountedDisplay" });
        }

        if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32")
        {
            AddThirdPartyPrivateStaticDependencies(Target,
                                                   "UEOgg",
                                                   "Vorbis",
                                                   "VorbisFile"
                                                   );
        }
        if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture != "-win32")
        {
            PublicDependencyModuleNames.Add("HTML5JS");
        }

        if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            AddThirdPartyPrivateStaticDependencies(Target,
                                                   "UEOgg",
                                                   "Vorbis",
                                                   "libOpus"
                                                   );
            PublicFrameworks.AddRange(new string[] { "AVFoundation", "CoreVideo", "CoreMedia" });
        }

        if (Target.Platform == UnrealTargetPlatform.Android)
        {
            AddThirdPartyPrivateStaticDependencies(Target,
                                                   "UEOgg",
                                                   "Vorbis",
                                                   "VorbisFile"
                                                   );
        }

        if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            AddThirdPartyPrivateStaticDependencies(Target,
                                                   "UEOgg",
                                                   "Vorbis",
                                                   "VorbisFile",
                                                   "libOpus"
                                                   );
        }

        if (UEBuildConfiguration.bCompileRecast)
        {
            PrivateDependencyModuleNames.Add("Navmesh");
            Definitions.Add("WITH_RECAST=1");
        }
        else
        {
            // Because we test WITH_RECAST in public Engine header files, we need to make sure that modules
            // that import us also have this definition set appropriately.  Recast is a private dependency
            // module, so it's definitions won't propagate to modules that import Engine.
            Definitions.Add("WITH_RECAST=0");
        }
    }
Exemplo n.º 33
0
        private Lumberjacking()
        {
            HarvestResource[] res;
            HarvestVein[]     veins;

            var lumber = new HarvestDefinition
            {
                BankWidth                 = 4,
                BankHeight                = 3,
                MinTotal                  = 20,
                MaxTotal                  = 45,
                MinRespawn                = TimeSpan.FromMinutes(20.0),
                MaxRespawn                = TimeSpan.FromMinutes(30.0),
                Skill                     = SkillName.Lumberjacking,
                Tiles                     = m_TreeTiles,
                MaxRange                  = 2,
                ConsumedPerHarvest        = 10,
                ConsumedPerFeluccaHarvest = 20,
                EffectActions             = new[] { 13 },
                EffectSounds              = new[] { 0x13E },
                EffectCounts              = Core.AOS ? new[] { 1 } : new[] { 1, 2, 2, 2, 3 },
                EffectDelay               = TimeSpan.FromSeconds(1.6),
                EffectSoundDelay          = TimeSpan.FromSeconds(0.9),
                NoResourcesMessage        = 500493, // There's not enough wood here to harvest.
                FailMessage               = 500495, // You hack at the tree for a while, but fail to produce any useable wood.
                OutOfRangeMessage         = 500446, // That is too far away.
                PackFullMessage           = 500497, // You can't place any wood into your backpack!
                ToolBrokeMessage          = 500499  // You broke your axe.
            };

            if (Core.ML)
            {
                res = new[]
                {
                    new HarvestResource(00.0, 00.0, 100.0, 1072540, typeof(Log)),
                    new HarvestResource(65.0, 25.0, 105.0, 1072541, typeof(OakLog)),
                    new HarvestResource(80.0, 40.0, 120.0, 1072542, typeof(AshLog)),
                    new HarvestResource(95.0, 55.0, 135.0, 1072543, typeof(YewLog)),
                    new HarvestResource(100.0, 60.0, 140.0, 1072544, typeof(HeartwoodLog)),
                    new HarvestResource(100.0, 60.0, 140.0, 1072545, typeof(BloodwoodLog)),
                    new HarvestResource(100.0, 60.0, 140.0, 1072546, typeof(FrostwoodLog))
                };

                veins = new[]
                {
                    new HarvestVein(490, 0.0, res[0], null),   // Ordinary Logs
                    new HarvestVein(300, 0.5, res[1], res[0]), // Oak
                    new HarvestVein(100, 0.5, res[2], res[0]), // Ash
                    new HarvestVein(050, 0.5, res[3], res[0]), // Yew
                    new HarvestVein(030, 0.5, res[4], res[0]), // Heartwood
                    new HarvestVein(020, 0.5, res[5], res[0]), // Bloodwood
                    new HarvestVein(010, 0.5, res[6], res[0])  // Frostwood
                };

                lumber.BonusResources = new[]
                {
                    new BonusHarvestResource(0, 83.9, null, null), // Nothing
                    new BonusHarvestResource(100, 10.0, 1072548, typeof(BarkFragment)),
                    new BonusHarvestResource(100, 03.0, 1072550, typeof(LuminescentFungi)),
                    new BonusHarvestResource(100, 02.0, 1072547, typeof(SwitchItem)),
                    new BonusHarvestResource(100, 01.0, 1072549, typeof(ParasiticPlant)),
                    new BonusHarvestResource(100, 00.1, 1072551, typeof(BrilliantAmber))
                };
            }
            else
            {
                res = new[]
                {
                    new HarvestResource(00.0, 00.0, 100.0, 500498, typeof(Log))
                };

                veins = new[]
                {
                    new HarvestVein(1000, 0.0, res[0], null)
                };
            }

            lumber.Resources = res;
            lumber.Veins     = veins;

            lumber.RaceBonus      = Core.ML;
            lumber.RandomizeVeins = Core.ML;

            Definitions.Add(lumber);
        }
        private async void UpdateViewModel()
        {
            var profile = AppState.Data.Profile;

            if (!AppState.Data.DefinitionsLoaded || profile == null)
            {
                return;
            }

            viewIsUpdating = true;
            triumphs.Clear();

            PresentationNodeDef = await Definitions.GetPresentationNode(presentationNodeHash);

            if (PresentationNodeDef == null)
            {
                return;
            }

            foreach (var childRecord in PresentationNodeDef.Children.Records)
            {
                var recordDefinition = await Definitions.GetRecord(childRecord.RecordHash);

                var triumph = new Triumph
                {
                    Definition = recordDefinition,
                    Hash       = childRecord.RecordHash,
                    Objectives = new List <Objective>(),
                    Record     = Triumph.FindRecordInProfileOrDefault(childRecord.RecordHash.ToString(), profile)
                };

                if (triumph.Record == null)
                {
                    Log.Info($"Triumph {childRecord.RecordHash} is missing its record from profile data");
                }

                var objectives = triumph.Record?.Objectives ?? new List <DestinyObjectiveProgress>();

                var hasIntervalObjectives = (triumph.Record?.IntervalObjectives?.Count ?? 0) > 0;
                var intervalObjectives    = hasIntervalObjectives
                    ? triumph.Record.IntervalObjectives
                    : new List <DestinyObjectiveProgress>();
                var allIntervalsComplete = intervalObjectives.All(v => v.Complete);

                var remainingIntervalObjectives = intervalObjectives.Where(v => !v.Complete);

                objectives.AddRange(remainingIntervalObjectives);
                if (hasIntervalObjectives && allIntervalsComplete)
                {
                    objectives.Add(intervalObjectives.LastOrDefault());
                }

                foreach (var objectiveProgress in objectives)
                {
                    if (objectiveProgress == null)
                    {
                        continue;
                    }

                    var obj = new Objective {
                        Progress = objectiveProgress
                    };
                    await obj.PopulateDefinition();

                    triumph.Objectives.Add(obj);
                }

                triumphs.Add(triumph);
            }

            viewIsUpdating = false;

            UpdateSelection();
        }
Exemplo n.º 35
0
    public Ansel(TargetInfo Target)
    {
        string NvCameraSDKSourcePath = ThirdPartyPath + "NVAnselSDK/";

        string NvCameraSDKIncPath = NvCameraSDKSourcePath + "include/";

        PublicSystemIncludePaths.Add(NvCameraSDKIncPath);

        string NvCameraSDKLibPath = NvCameraSDKSourcePath + "lib/";

        PublicLibraryPaths.Add(NvCameraSDKLibPath);

        bool FoundAnselDirs = true;

        if (!Directory.Exists(NvCameraSDKSourcePath))
        {
            System.Console.WriteLine(string.Format("Ansel SDK source path not found: {0}", NvCameraSDKSourcePath));
            FoundAnselDirs = false;
        }

        string LibName;

        if ((Target.Platform == UnrealTargetPlatform.Win64 ||
             Target.Platform == UnrealTargetPlatform.Win32) &&
            FoundAnselDirs)
        {
            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                LibName = "AnselSDK64";
            }
            else
            {
                LibName = "AnselSDK32";
            }

            bool HaveDebugLib = File.Exists(BinariesPath + LibName + "d" + ".dll");

            if (HaveDebugLib &&
                Target.Configuration == UnrealTargetConfiguration.Debug &&
                BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
            {
                LibName += "d";
            }

            PublicAdditionalLibraries.Add(Path.Combine(LibraryPath, LibName + ".lib"));

            string DLLName = LibName + ".dll";
            PublicDelayLoadDLLs.Add(DLLName);
            RuntimeDependencies.Add(new RuntimeDependency("BinariesPath" + DLLName));

            Definitions.Add("WITH_ANSEL=1");
            Definitions.Add("ANSEL_DLL=" + DLLName);
        }
        else
        {
            Definitions.Add("WITH_ANSEL=0");
            Definitions.Add("ANSEL_DLL=");
        }

        PrivateDependencyModuleNames.AddRange(new string[]
        {
            "Core",
            "CoreUObject",
            "SlateCore",
            "Engine",
        });

        PublicDependencyModuleNames.Add("Engine");
    }
        private GoldPanning()
        {
            HarvestResource[] res;
            HarvestVein[]     veins;

            #region GoldPanning
            HarvestDefinition nugget = new HarvestDefinition();

            // Resource banks are every 8x8 tiles
            nugget.BankWidth  = 8;
            nugget.BankHeight = 8;

            // Every bank holds from 5 to 10 nuggets
            nugget.MinTotal = 5;
            nugget.MaxTotal = 10;

            // A resource bank will respawn its content every 10 to 20 minutes
            nugget.MinRespawn = TimeSpan.FromMinutes(10.0);
            nugget.MaxRespawn = TimeSpan.FromMinutes(20.0);

            // Skill checking is done on the Fishing skill
            nugget.Skill = SkillName.Fishing;

            // Set the list of harvestable tiles
            nugget.Tiles       = m_WaterTiles;
            nugget.RangedTiles = true;

            // Players must be within 2 tiles to harvest
            nugget.MaxRange = 2;

            // One nugget per harvest action
            nugget.ConsumedPerHarvest        = 1;
            nugget.ConsumedPerFeluccaHarvest = 1;

            // The panning
            nugget.EffectActions    = new int[] { 32 };
            nugget.EffectSounds     = new int[0];
            nugget.EffectCounts     = new int[] { 1 };
            nugget.EffectDelay      = TimeSpan.Zero;
            nugget.EffectSoundDelay = TimeSpan.FromSeconds(8.0);

            nugget.NoResourcesMessage     = "There don't seem to be any nuggets left here.";       // There don't seem to be any nuggets left here.
            nugget.FailMessage            = "You pan for a while, but fail to find any nuggets.";  // You pan for a while, but fail to find any nuggets.
            nugget.TimedOutOfRangeMessage = "You need to be closer to the water for panning!";     // You need to be closer to the water for panning!
            nugget.OutOfRangeMessage      = "You need to be closer to the water for panning!";     // You need to be closer to the water for panning!
            nugget.PackFullMessage        = "You dont have room in your pack for another nugget."; // You dont have room in your pack for another nugget.
            nugget.ToolBrokeMessage       = "You wore out your gold pan.";                         // You wore out your gold pan.

            res = new HarvestResource[]
            {
                new HarvestResource(75.0, 70.0, 125.0, "You put a small gold nugget in your pack.", typeof(SmallGoldNugget)),
                new HarvestResource(90.0, 75.0, 135.0, "You put a medium gold nugget in your pack.", typeof(MediumGoldNugget)),
                new HarvestResource(105.0, 90.0, 145.0, "You put a large gold nugget in your pack.", typeof(LargeGoldNugget))
            };

            veins = new HarvestVein[]
            {
                new HarvestVein(70.0, 0.0, res[0], null),
                new HarvestVein(20.0, 0.5, res[1], res[0]),
                new HarvestVein(10.0, 0.5, res[2], res[0])
            };

            nugget.Resources = res;
            nugget.Veins     = veins;

            if (Core.ML)
            {
                nugget.BonusResources = new BonusHarvestResource[]
                {
                    new BonusHarvestResource(0, 88.0, null, null),                              //Nothing
                    new BonusHarvestResource(100, 2.0, 1072562, typeof(BlueDiamond)),
                    new BonusHarvestResource(100, 2.0, 1072567, typeof(DarkSapphire)),
                    new BonusHarvestResource(100, 2.0, 1072570, typeof(EcruCitrine)),
                    new BonusHarvestResource(100, 2.0, 1072564, typeof(FireRuby)),
                    new BonusHarvestResource(100, 2.0, 1072566, typeof(PerfectEmerald)),
                    new BonusHarvestResource(100, 2.0, 1072568, typeof(Turquoise))
                };
            }

            m_Definition = nugget;
            Definitions.Add(nugget);
            #endregion
        }
Exemplo n.º 37
0
    public PhysX(TargetInfo Target)
    {
        Type = ModuleType.External;

        // Determine which kind of libraries to link against
        PhysXLibraryMode LibraryMode   = GetPhysXLibraryMode(Target.Configuration);
        string           LibrarySuffix = GetPhysXLibrarySuffix(LibraryMode);

        Definitions.Add("WITH_PHYSX=1");
        if (UEBuildConfiguration.bCompileAPEX == false)
        {
            // Since APEX is dependent on PhysX, if APEX is not being include, set the flag properly.
            // This will properly cover the case where PhysX is compiled but APEX is not.
            Definitions.Add("WITH_APEX=0");
        }
        if (UEBuildConfiguration.bCompilePhysXVehicle == false)
        {
            // Since PhysX Vehicle is dependent on PhysX, if Vehicle is not being include, set the flag properly.
            // This will properly cover the case where PhysX is compiled but Vehicle is not.
            Definitions.Add("WITH_VEHICLE=0");
        }

        string PhysXVersion = "PhysX-3.3";

        string PhysXDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/" + PhysXVersion + "/";

        string PhysXLibDir = PhysXDir + "lib/";

        PublicSystemIncludePaths.AddRange(
            new string[] {
            PhysXDir + "include",
            PhysXDir + "include/foundation",
            PhysXDir + "include/cooking",
            PhysXDir + "include/common",
            PhysXDir + "include/extensions",
            PhysXDir + "include/geometry",
            PhysXDir + "include/vehicle"
        }
            );

        // Libraries and DLLs for windows platform
        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/windows");

            PhysXLibDir += "Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(PhysXLibDir);

            string[] StaticLibrariesX64 = new string[] {
                "PhysX3{0}_x64.lib",
                "PhysX3Extensions{0}.lib",
                "PhysX3Cooking{0}_x64.lib",
                "PhysX3Common{0}_x64.lib",
                "PhysX3Vehicle{0}.lib",
                "PxTask{0}.lib",
                "PhysXVisualDebuggerSDK{0}.lib",
                "PhysXProfileSDK{0}.lib"
            };

            string[] DelayLoadDLLsX64 = new string[] {
                "PhysX3{0}_x64.dll",
                "PhysX3Cooking{0}_x64.dll",
                "PhysX3Common{0}_x64.dll"
            };

            string[] RuntimeDependenciesX64 = new string[] {
                "PhysX3{0}_x64.dll",
                "PhysX3Gpu{0}_x64.dll",
                "PhysX3Common{0}_x64.dll",
                "PhysX3Cooking{0}_x64.dll",
            };

            foreach (string Lib in StaticLibrariesX64)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }

            foreach (string DLL in DelayLoadDLLsX64)
            {
                PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix));
            }
            PublicDelayLoadDLLs.Add("nvToolsExt64_1.dll");

            string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/{0}/Win64/VS{1}/", PhysXVersion, WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string DLL in RuntimeDependenciesX64)
            {
                RuntimeDependencies.Add(new RuntimeDependency(PhysXBinariesDir + String.Format(DLL, LibrarySuffix)));
            }
            RuntimeDependencies.Add(new RuntimeDependency(PhysXBinariesDir + "nvToolsExt64_1.dll"));
            RuntimeDependencies.Add(new RuntimeDependency(PhysXBinariesDir + "PhysXDevice64.dll"));
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32 || (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32"))
        {
            PublicIncludePaths.Add(PhysXDir + "include/foundation/windows");

            PhysXLibDir += "Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(PhysXLibDir);

            string[] StaticLibrariesX86 = new string[] {
                "PhysX3{0}_x86.lib",
                "PhysX3Extensions{0}.lib",
                "PhysX3Cooking{0}_x86.lib",
                "PhysX3Common{0}_x86.lib",
                "PhysX3Vehicle{0}.lib",
                "PxTask{0}.lib",
                "PhysXVisualDebuggerSDK{0}.lib",
                "PhysXProfileSDK{0}.lib"
            };

            string[] DelayLoadDLLsX86 = new string[] {
                "PhysX3{0}_x86.dll",
                "PhysX3Cooking{0}_x86.dll",
                "PhysX3Common{0}_x86.dll"
            };

            string[] RuntimeDependenciesX86 = new string[] {
                "PhysX3{0}_x86.dll",
                "PhysX3Gpu{0}_x86.dll",
                "PhysX3Common{0}_x86.dll",
                "PhysX3Cooking{0}_x86.dll",
            };

            foreach (string Lib in StaticLibrariesX86)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }

            foreach (string DLL in DelayLoadDLLsX86)
            {
                PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix));
            }
            PublicDelayLoadDLLs.Add("nvToolsExt32_1.dll");

            string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/{0}/Win32/VS{1}/", PhysXVersion, WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string DLL in RuntimeDependenciesX86)
            {
                RuntimeDependencies.Add(new RuntimeDependency(PhysXBinariesDir + String.Format(DLL, LibrarySuffix)));
            }
            RuntimeDependencies.Add(new RuntimeDependency(PhysXBinariesDir + "nvToolsExt32_1.dll"));
            RuntimeDependencies.Add(new RuntimeDependency(PhysXBinariesDir + "PhysXDevice.dll"));
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix");

            PhysXLibDir += "/osx64";
            PublicLibraryPaths.Add(PhysXLibDir);

            string[] StaticLibrariesMac = new string[] {
                PhysXLibDir + "/libLowLevel{0}.a",
                PhysXLibDir + "/libLowLevelCloth{0}.a",
                PhysXLibDir + "/libPhysX3{0}.a",
                PhysXLibDir + "/libPhysX3CharacterKinematic{0}.a",
                PhysXLibDir + "/libPhysX3Extensions{0}.a",
                PhysXLibDir + "/libPhysX3Cooking{0}.a",
                PhysXLibDir + "/libPhysX3Common{0}.a",
                PhysXLibDir + "/libPhysX3Vehicle{0}.a",
                PhysXLibDir + "/libPxTask{0}.a",
                PhysXLibDir + "/libPhysXVisualDebuggerSDK{0}.a",
                PhysXLibDir + "/libPhysXProfileSDK{0}.a",
                PhysXLibDir + "/libPvdRuntime{0}.a",
                PhysXLibDir + "/libSceneQuery{0}.a",
                PhysXLibDir + "/libSimulationController{0}.a"
            };

            foreach (string Lib in StaticLibrariesMac)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix");
            PublicLibraryPaths.Add(PhysXLibDir + "Android/ARMv7");
            PublicLibraryPaths.Add(PhysXLibDir + "Android/x86");
            PublicLibraryPaths.Add(PhysXLibDir + "Android/arm64");
            PublicLibraryPaths.Add(PhysXLibDir + "Android/x64");

            string[] StaticLibrariesAndroid = new string[] {
                "LowLevel{0}",
                "LowLevelCloth{0}",
                "PhysX3{0}",
                "PhysX3CharacterKinematic{0}",
                "PhysX3Extensions{0}",
                // "PhysX3Cooking{0}", // not needed until Apex
                "PhysX3Common{0}",
                "PhysX3Vehicle{0}",
                "PxTask{0}",
                "PhysXVisualDebuggerSDK{0}",
                "PhysXProfileSDK{0}",
                "PvdRuntime{0}",
                "SceneQuery{0}",
                "SimulationController{0}",
            };

            // the "shipping" don't need the nvTools library
            if (LibraryMode != PhysXLibraryMode.Shipping || !bShippingBuildsActuallyUseShippingPhysXLibraries)
            {
                PublicAdditionalLibraries.Add("nvToolsExt");
            }

            foreach (string Lib in StaticLibrariesAndroid)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            PhysXLibDir += "/Linux/" + Target.Architecture;

            PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix");
            PublicLibraryPaths.Add(PhysXLibDir);

            string[] StaticLibrariesLinux = new string[] {
                "rt",
                "LowLevel{0}",
                "LowLevelCloth{0}",
                "PhysX3{0}",
                "PhysX3CharacterKinematic{0}",
                "PhysX3Extensions{0}",
                "PhysX3Cooking{0}",
                "PhysX3Common{0}",
                "PhysX3Vehicle{0}",
                "PxTask{0}",
                "PhysXVisualDebuggerSDK{0}",
                "PhysXProfileSDK{0}",
                "PvdRuntime{0}",
                "SceneQuery{0}",
                "SimulationController{0}",
            };

            if (LibraryMode == PhysXLibraryMode.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
            {
                //@TODO: Needed?
                PublicAdditionalLibraries.Add("m");
            }

            foreach (string Lib in StaticLibrariesLinux)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix");

            PhysXLibDir = Path.Combine(PhysXLibDir, "IOS/");
            PublicLibraryPaths.Add(PhysXLibDir);

            string[] PhysXLibs = new string[]
            {
                "LowLevel",
                "LowLevelCloth",
                "PhysX3",
                "PhysX3CharacterKinematic",
                "PhysX3Common",
                // "PhysX3Cooking", // not needed until Apex
                "PhysX3Extensions",
                "PhysX3Vehicle",
                "PxTask",
                "PhysXVisualDebuggerSDK",
                "PhysXProfileSDK",
                "PvdRuntime",
                "SceneQuery",
                "SimulationController",
            };

            foreach (string PhysXLib in PhysXLibs)
            {
                PublicAdditionalLibraries.Add(PhysXLib + LibrarySuffix);
                PublicAdditionalShadowFiles.Add(Path.Combine(PhysXLibDir, "lib" + PhysXLib + LibrarySuffix + ".a"));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/unix");

            PhysXLibDir = Path.Combine(PhysXLibDir, "HTML5/");

            string[] PhysXLibs = new string[]
            {
                "LowLevel",
                "LowLevelCloth",
                "PhysX3",
                "PhysX3CharacterKinematic",
                "PhysX3Common",
                "PhysX3Cooking",
                "PhysX3Extensions",
                "PxTask",
                "PhysXVisualDebuggerSDK",
                "PhysXProfileSDK",
                "PvdRuntime",
                "SceneQuery",
                "SimulationController",
            };

            foreach (var lib in PhysXLibs)
            {
                if (!lib.Contains("Cooking") || Target.IsCooked == false)
                {
                    PublicAdditionalLibraries.Add(PhysXLibDir + lib + (UEBuildConfiguration.bCompileForSize ? "_Oz" : "") + ".bc");
                }
            }

            if (UEBuildConfiguration.bCompilePhysXVehicle)
            {
                string[] PhysXVehicleLibs = new string[]
                {
                    "PhysX3Vehicle",
                };

                foreach (var lib in PhysXVehicleLibs)
                {
                    if (!lib.Contains("Cooking") || Target.IsCooked == false)
                    {
                        PublicAdditionalLibraries.Add(PhysXLibDir + lib + (UEBuildConfiguration.bCompileForSize ? "_Oz" : "") + ".bc");
                    }
                }
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            PublicSystemIncludePaths.Add(PhysXDir + "include/foundation/PS4");
            PublicLibraryPaths.Add(PhysXDir + "lib/PS4");

            string[] StaticLibrariesPS4 = new string[] {
                "PhysX3{0}",
                "PhysX3Extensions{0}",
                "PhysX3Cooking{0}",
                "PhysX3Common{0}",
                "PhysX3Vehicle{0}",
                "PxTask{0}",
                "PhysXVisualDebuggerSDK{0}",
                "PhysXProfileSDK{0}"
            };

            foreach (string Lib in StaticLibrariesPS4)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            PublicSystemIncludePaths.Add("include/foundation/xboxone");
            PublicLibraryPaths.Add(PhysXDir + "Lib/XboxOne");

            string[] StaticLibrariesXB1 = new string[] {
                "PhysX3{0}.lib",
                "PhysX3Extensions{0}.lib",
                "PhysX3Cooking{0}.lib",
                "PhysX3Common{0}.lib",
                "PhysX3Vehicle{0}.lib",
                "PxTask{0}.lib",
                "PhysXVisualDebuggerSDK{0}.lib",
                "PhysXProfileSDK{0}.lib"
            };

            foreach (string Lib in StaticLibrariesXB1)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }
        }
    }
Exemplo n.º 38
0
        private Lumberjacking()
        {
            HarvestResource[] res;
            HarvestVein[]     veins;

            #region Lumberjacking
            HarvestDefinition lumber = new HarvestDefinition();

            // Resource banks are every 4x3 tiles
            lumber.BankWidth  = 4;
            lumber.BankHeight = 3;

            // Every bank holds from 8 to 19 uses
            lumber.MinTotal = 8;
            lumber.MaxTotal = 19;

            // A resource bank will respawn its content every 10 to 12 minutes
            lumber.MinRespawn = TimeSpan.FromMinutes(10.0);
            lumber.MaxRespawn = TimeSpan.FromMinutes(12.0);

            // Skill checking is done on the Lumberjacking skill
            lumber.Skill = SkillName.Lumberjacking;

            // Set the list of harvestable tiles
            lumber.Tiles = m_TreeTiles;

            // Players must be within 2 tiles to harvest
            lumber.MaxRange = 2;

            // Ten logs per harvest action
            lumber.ConsumedPerHarvest        = 10;
            lumber.ConsumedPerFeluccaHarvest = 20;

            // The chopping effect
            lumber.EffectActions    = new int[] { 13 };
            lumber.EffectSounds     = new int[] { 0x13E };
            lumber.EffectCounts     = new int[] { 1 };
            lumber.EffectDelay      = TimeSpan.FromSeconds(1.6);
            lumber.EffectSoundDelay = TimeSpan.FromSeconds(0.9);

            lumber.NoResourcesMessage = 500493;      // There's not enough wood here to harvest.
            lumber.FailMessage        = 500495;      // You hack at the tree for a while, but fail to produce any useable wood.
            lumber.OutOfRangeMessage  = 500446;      // That is too far away.
            lumber.PackFullMessage    = 500497;      // You can't place any wood into your backpack!
            lumber.ToolBrokeMessage   = 500499;      // You broke your axe.

            res = new HarvestResource[]
            {
                new HarvestResource(00.0, 00.0, 100.0, 1072540, typeof(Log)),
                new HarvestResource(65.0, 25.0, 105.0, 1072541, typeof(OakLog)),
                new HarvestResource(80.0, 40.0, 120.0, 1072542, typeof(AshLog)),
                new HarvestResource(95.0, 55.0, 135.0, 1072543, typeof(YewLog)),
                new HarvestResource(100.0, 60.0, 140.0, 1072544, typeof(HeartwoodLog)),
                new HarvestResource(100.0, 60.0, 140.0, 1072545, typeof(BloodwoodLog)),
                new HarvestResource(100.0, 60.0, 140.0, 1072546, typeof(FrostwoodLog))
            };

            veins = new HarvestVein[]
            {
                new HarvestVein(49.0, res[0]),                           // Ordinary Logs
                new HarvestVein(30.0, res[1]),                           // Oak
                new HarvestVein(10.0, res[2]),                           // Ash
                new HarvestVein(05.0, res[3]),                           // Yew
                new HarvestVein(03.0, res[4]),                           // Heartwood
                new HarvestVein(02.0, res[5]),                           // Bloodwood
                new HarvestVein(01.0, res[6]),                           // Frostwood
            };

            lumber.BonusResources = new BonusHarvestResource[]
            {
                new BonusHarvestResource(0, 83.8, null, null),                           // Nothing
                new BonusHarvestResource(100, 10.0, 1072548, typeof(BarkFragment)),
                new BonusHarvestResource(100, 03.0, 1072550, typeof(LuminescentFungi)),
                new BonusHarvestResource(100, 02.0, 1072547, typeof(SwitchItem)),
                new BonusHarvestResource(100, 01.0, 1072549, typeof(ParasiticPlant)),
                new BonusHarvestResource(100, 00.1, 1072551, typeof(BrilliantAmber)),
                new BonusHarvestResource(100, 00.1, 1113756, typeof(CrystalShards), Map.TerMur),
            };

            lumber.Resources = res;
            lumber.Veins     = veins;

            lumber.RaceBonus      = true;
            lumber.RandomizeVeins = true;

            m_Definition = lumber;
            Definitions.Add(lumber);
            #endregion
        }
Exemplo n.º 39
0
    public Engine(ReadOnlyTargetRules Target) : base(Target)
    {
        PrivatePCHHeaderFile = "Private/EnginePrivatePCH.h";

        SharedPCHHeaderFile = "Public/EngineSharedPCH.h";

        PublicIncludePathModuleNames.AddRange(new string[] { "Renderer", "PacketHandler", "NetworkReplayStreaming", "AudioMixer" });

        PrivateIncludePaths.AddRange(
            new string[] {
            "Developer/DerivedDataCache/Public",
            "Runtime/SynthBenchmark/Public",
            "Runtime/Engine/Private",
        }
            );

        PrivateIncludePathModuleNames.AddRange(
            new string[] {
            "TargetPlatform",
            "ImageWrapper",
            "HeadMountedDisplay",
            "Advertising",
            "NetworkReplayStreaming",
            "MovieSceneCapture",
            "AutomationWorker",
            "MovieSceneCapture",
            "DesktopPlatform",
        }
            );

        if (Target.Configuration != UnrealTargetConfiguration.Shipping)
        {
            PrivateIncludePathModuleNames.AddRange(new string[] { "TaskGraph" });
        }

        if (Target.Configuration != UnrealTargetConfiguration.Shipping)
        {
            PrivateIncludePathModuleNames.AddRange(
                new string[] {
                "SlateReflector",
            }
                );

            DynamicallyLoadedModuleNames.AddRange(
                new string[] {
                "SlateReflector",
            }
                );
        }

        PublicDependencyModuleNames.AddRange(
            new string[] {
            "Core",
            "CoreUObject",
            "Json",
            "SlateCore",
            "Slate",
            "InputCore",
            "Messaging",
            "RenderCore",
            "RHI",
            "ShaderCore",
            "UtilityShaders",
            "AssetRegistry",     // Here until FAssetData is moved to engine
            "EngineMessages",
            "EngineSettings",
            "SynthBenchmark",
            "GameplayTags",
            "AIModule",
            "DatabaseSupport",
            "PacketHandler",
            "HardwareSurvey",
        }
            );

        if (Target.Type == TargetType.Editor)
        {
            PrivateIncludePathModuleNames.AddRange(new string[] { "CrashTracker" });
            DynamicallyLoadedModuleNames.AddRange(new string[] { "CrashTracker" });
            PublicDependencyModuleNames.AddRange(
                new string[] {
            }
                );
        }


        PrivateDependencyModuleNames.AddRange(
            new string[] {
            "AppFramework",
            "Networking",
            "Sockets",
            "Landscape",
            "UMG",
            "Projects",
            "MaterialShaderQualitySettings",
            "CinematicCamera",
            "Analytics",
            "AnalyticsET"
        }
            );

        if (Target.Configuration != UnrealTargetConfiguration.Shipping)
        {
            PrivateIncludePathModuleNames.Add("Localization");
            DynamicallyLoadedModuleNames.Add("Localization");
        }

        // to prevent "causes WARNING: Non-editor build cannot depend on non-redistributable modules."
        if (Target.Type == TargetType.Editor)
        {
            // for now we depend on this
            PrivateDependencyModuleNames.Add("RawMesh");
        }

        bool bVariadicTemplatesSupported = true;

        if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            // Use reflection to allow type not to exist if console code is not present
            System.Type XboxOnePlatformType = System.Type.GetType("UnrealBuildTool.XboxOnePlatform,UnrealBuildTool");
            if (XboxOnePlatformType != null)
            {
                System.Object VersionName = XboxOnePlatformType.GetMethod("GetVisualStudioCompilerVersionName").Invoke(null, null);
                if (VersionName.ToString().Equals("2012"))
                {
                    bVariadicTemplatesSupported = false;
                }
            }

            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "libOpus"
                                                         );
        }

        if (bVariadicTemplatesSupported)
        {
            PrivateIncludePathModuleNames.AddRange(
                new string[] {
                "MessagingRpc",
                "PortalRpc",
                "PortalServices",
            }
                );

            if (Target.Type == TargetType.Editor)
            {
                // these modules require variadic templates
                PrivateDependencyModuleNames.AddRange(
                    new string[] {
                    "MessagingRpc",
                    "PortalRpc",
                    "PortalServices",
                }
                    );
            }
        }

        CircularlyReferencedDependentModules.Add("GameplayTags");
        CircularlyReferencedDependentModules.Add("AIModule");
        CircularlyReferencedDependentModules.Add("Landscape");
        CircularlyReferencedDependentModules.Add("UMG");
        CircularlyReferencedDependentModules.Add("MaterialShaderQualitySettings");
        CircularlyReferencedDependentModules.Add("CinematicCamera");

        // The AnimGraphRuntime module is not needed by Engine proper, but it is loaded in LaunchEngineLoop.cpp,
        // and needs to be listed in an always-included module in order to be compiled into standalone games
        DynamicallyLoadedModuleNames.Add("AnimGraphRuntime");
        // So does Geometry Cache
        DynamicallyLoadedModuleNames.Add("GeometryCache");

        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
            "ActorSequence",
            "MovieScene",
            "MovieSceneCapture",
            "MovieSceneTracks",
            "HeadMountedDisplay",
            "StreamingPauseRendering",
            "Niagara",
        }
            );

        PrivateIncludePathModuleNames.Add("LightPropagationVolumeRuntime");

        if (Target.Type != TargetType.Server)
        {
            PrivateIncludePathModuleNames.AddRange(
                new string[] {
                "SlateNullRenderer",
                "SlateRHIRenderer"
            }
                );

            DynamicallyLoadedModuleNames.AddRange(
                new string[] {
                "SlateNullRenderer",
                "SlateRHIRenderer"
            }
                );
        }

        if (Target.Type == TargetType.Server || Target.Type == TargetType.Editor)
        {
            PrivateDependencyModuleNames.Add("PerfCounters");
        }

        if (UEBuildConfiguration.bBuildDeveloperTools)
        {
            // Add "BlankModule" so that it gets compiled as an example and will be maintained and tested.  This can be removed
            // at any time if needed.  The module isn't actually loaded by the engine so there is no runtime cost.
            DynamicallyLoadedModuleNames.Add("BlankModule");

            if (Target.Type != TargetType.Server)
            {
                PrivateIncludePathModuleNames.Add("MeshUtilities");
                DynamicallyLoadedModuleNames.Add("MeshUtilities");

                PrivateDependencyModuleNames.AddRange(
                    new string[] {
                    "ImageCore",
                    "RawMesh"
                });
            }

            if (Target.Configuration != UnrealTargetConfiguration.Shipping && Target.Configuration != UnrealTargetConfiguration.Test && Target.Type != TargetType.Server)
            {
                PrivateDependencyModuleNames.Add("CollisionAnalyzer");
                CircularlyReferencedDependentModules.Add("CollisionAnalyzer");

                PrivateDependencyModuleNames.Add("LogVisualizer");
                CircularlyReferencedDependentModules.Add("LogVisualizer");
            }

            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                DynamicallyLoadedModuleNames.AddRange(
                    new string[] {
                    "WindowsTargetPlatform",
                    "WindowsNoEditorTargetPlatform",
                    "WindowsServerTargetPlatform",
                    "WindowsClientTargetPlatform",
                    "AllDesktopTargetPlatform",
                }
                    );
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                DynamicallyLoadedModuleNames.AddRange(
                    new string[] {
                    "MacTargetPlatform",
                    "MacNoEditorTargetPlatform",
                    "MacServerTargetPlatform",
                    "MacClientTargetPlatform",
                    "AllDesktopTargetPlatform",
                }
                    );
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux)
            {
                DynamicallyLoadedModuleNames.AddRange(
                    new string[] {
                    "LinuxTargetPlatform",
                    "LinuxNoEditorTargetPlatform",
                    "LinuxServerTargetPlatform",
                    "LinuxClientTargetPlatform",
                    "AllDesktopTargetPlatform",
                }
                    );
            }
        }

        DynamicallyLoadedModuleNames.AddRange(
            new string[] {
            "NetworkReplayStreaming",
            "NullNetworkReplayStreaming",
            "HttpNetworkReplayStreaming",
            "Advertising"
        }
            );

        if (Target.Type != TargetType.Server)
        {
            DynamicallyLoadedModuleNames.AddRange(
                new string[] {
                "ImageWrapper",
                "GameLiveStreaming"
            }
                );
        }

        WhitelistRestrictedFolders.Add("Private/NotForLicensees");

        if (!UEBuildConfiguration.bBuildRequiresCookedData && UEBuildConfiguration.bCompileAgainstEngine)
        {
            DynamicallyLoadedModuleNames.AddRange(
                new string[] {
                "DerivedDataCache",
                "TargetPlatform",
                "DesktopPlatform"
            }
                );
        }

        if (UEBuildConfiguration.bBuildEditor == true)
        {
            PublicDependencyModuleNames.AddRange(
                new string[] {
                "UnrealEd",
                "Kismet"
            }
                ); // @todo api: Only public because of WITH_EDITOR and UNREALED_API

            CircularlyReferencedDependentModules.AddRange(
                new string[] {
                "UnrealEd",
                "Kismet"
            }
                );

            PrivateIncludePathModuleNames.Add("TextureCompressor");
            PrivateIncludePaths.Add("Developer/TextureCompressor/Public");

            PrivateIncludePathModuleNames.Add("HierarchicalLODUtilities");
            DynamicallyLoadedModuleNames.Add("HierarchicalLODUtilities");

            DynamicallyLoadedModuleNames.Add("AnimationModifiers");
        }

        SetupModulePhysXAPEXSupport(Target);
        if (UEBuildConfiguration.bCompilePhysX && (UEBuildConfiguration.bBuildEditor || UEBuildConfiguration.bRuntimePhysicsCooking))
        {
            DynamicallyLoadedModuleNames.Add("PhysXFormats");
            PrivateIncludePathModuleNames.Add("PhysXFormats");
        }

        if (UEBuildConfiguration.bCompilePhysX)
        {
            // Engine public headers need to know about some types (enums etc.)
            PublicIncludePathModuleNames.Add("ClothingSystemRuntimeInterface");
            PublicDependencyModuleNames.Add("ClothingSystemRuntimeInterface");

            if (UEBuildConfiguration.bBuildEditor)
            {
                PrivateDependencyModuleNames.Add("ClothingSystemEditorInterface");
                PrivateIncludePathModuleNames.Add("ClothingSystemEditorInterface");
            }
        }

        SetupModuleBox2DSupport(Target);

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32))
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "UEOgg",
                                                         "Vorbis",
                                                         "VorbisFile",
                                                         "libOpus"
                                                         );

            // Head Mounted Display support
//            PrivateIncludePathModuleNames.AddRange(new string[] { "HeadMountedDisplay" });
//            DynamicallyLoadedModuleNames.AddRange(new string[] { "HeadMountedDisplay" });
        }

        if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32")
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "UEOgg",
                                                         "Vorbis",
                                                         "VorbisFile"
                                                         );
        }
        if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture != "-win32")
        {
            PublicDependencyModuleNames.Add("HTML5JS");
        }

        if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "UEOgg",
                                                         "Vorbis",
                                                         "libOpus"
                                                         );
            PublicFrameworks.AddRange(new string[] { "AVFoundation", "CoreVideo", "CoreMedia" });
        }

        if (Target.Platform == UnrealTargetPlatform.Android)
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "UEOgg",
                                                         "Vorbis",
                                                         "VorbisFile"
                                                         );
        }

        if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "UEOgg",
                                                         "Vorbis",
                                                         "VorbisFile",
                                                         "libOpus"
                                                         );
        }

        if (UEBuildConfiguration.bCompileRecast)
        {
            PrivateDependencyModuleNames.Add("Navmesh");
            Definitions.Add("WITH_RECAST=1");
        }
        else
        {
            // Because we test WITH_RECAST in public Engine header files, we need to make sure that modules
            // that import this also have this definition set appropriately.  Recast is a private dependency
            // module, so it's definitions won't propagate to modules that import Engine.
            Definitions.Add("WITH_RECAST=0");
        }

        // Add a reference to the stats HTML files referenced by UEngine::DumpFPSChartToHTML. Previously staged by CopyBuildToStagingDirectory.
        if (UEBuildConfiguration.bBuildEditor || Target.Configuration != UnrealTargetConfiguration.Shipping)
        {
            RuntimeDependencies.Add("$(EngineDir)/Content/Stats/...", StagedFileType.UFS);
        }

        DynamicallyLoadedModuleNames.Add("Niagara");
    }
Exemplo n.º 40
0
    public OodleHandlerComponent(ReadOnlyTargetRules Target) : base(Target)
    {
        BinariesSubFolder = "NotForLicensees";

        PrivateIncludePaths.Add("OodleHandlerComponent/Private");

        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "PacketHandler",
            "Core",
            "CoreUObject",
            "Engine"
        });


        bool   bHaveOodleSDK = false;
        string OodleNotForLicenseesLibDir = "";

        // Check the NotForLicensees folder first
        if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
        {
            OodleNotForLicenseesLibDir = System.IO.Path.Combine(Target.UEThirdPartySourceDirectory, "..", "..",
                                                                "Plugins", "Runtime", "PacketHandlers", "CompressionComponents", "Oodle", "Source", "ThirdParty", "NotForLicensees",
                                                                "Oodle", "215", "win", "lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            OodleNotForLicenseesLibDir = System.IO.Path.Combine(Target.UEThirdPartySourceDirectory, "..", "..",
                                                                "Plugins", "Runtime", "PacketHandlers", "CompressionComponents", "Oodle", "Source", "ThirdParty", "NotForLicensees",
                                                                "Oodle", "215", "linux", "lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            OodleNotForLicenseesLibDir = System.IO.Path.Combine(Target.UEThirdPartySourceDirectory, "..", "..",
                                                                "Plugins", "Runtime", "PacketHandlers", "CompressionComponents", "Oodle", "Source", "ThirdParty", "NotForLicensees",
                                                                "Oodle", "215", "ps4", "lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            OodleNotForLicenseesLibDir = System.IO.Path.Combine(Target.UEThirdPartySourceDirectory, "..", "..",
                                                                "Plugins", "Runtime", "PacketHandlers", "CompressionComponents", "Oodle", "Source", "ThirdParty", "NotForLicensees",
                                                                "Oodle", "215", "XboxOne", "lib");
        }

        if (OodleNotForLicenseesLibDir.Length > 0)
        {
            try
            {
                bHaveOodleSDK = System.IO.Directory.Exists(OodleNotForLicenseesLibDir);
            }
            catch (System.Exception)
            {
            }
        }

        if (bHaveOodleSDK)
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target, "Oodle");
            PublicIncludePathModuleNames.Add("Oodle");
            Definitions.Add("HAS_OODLE_SDK=1");
        }
        else
        {
            Definitions.Add("HAS_OODLE_SDK=0");
        }
    }
    public LandscapeEditor(TargetInfo Target)
    {
        PrivateDependencyModuleNames.AddRange(
            new string[] {
            "Core",
            "CoreUObject",
            "Slate",
            "SlateCore",
            "EditorStyle",
            "Engine",
            "Landscape",
            "RenderCore",
            "RHI",
            "InputCore",
            "UnrealEd",
            "PropertyEditor",
            "ImageWrapper",
            "EditorWidgets",
            "Foliage",
            "ViewportInteraction",
            "VREditor",
        }
            );

        PrivateIncludePathModuleNames.AddRange(
            new string[] {
            "MainFrame",
            "DesktopPlatform",
            "ContentBrowser",
            "AssetTools",
            "LevelEditor"
        }
            );

        DynamicallyLoadedModuleNames.AddRange(
            new string[] {
            "MainFrame",
            "DesktopPlatform",
        }
            );

        if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
        {
            // VS2015 updated some of the CRT definitions but not all of the Windows SDK has been updated to match.
            // Microsoft provides this shim library to enable building with VS2015 until they fix everything up.
            //@todo: remove when no longer neeeded (no other code changes should be necessary).
            if (WindowsPlatform.bNeedsLegacyStdioDefinitionsLib)
            {
                PublicAdditionalLibraries.Add("legacy_stdio_definitions.lib");
            }
        }

        // KissFFT is used by the smooth tool.
        if (UEBuildConfiguration.bCompileLeanAndMeanUE == false &&
            (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.Linux))
        {
            AddEngineThirdPartyPrivateStaticDependencies(Target, "Kiss_FFT");
        }
        else
        {
            Definitions.Add("WITH_KISSFFT=0");
        }
    }
Exemplo n.º 42
0
    public PhysX(TargetInfo Target)
    {
        Type = ModuleType.External;

        // Determine which kind of libraries to link against
        PhysXLibraryMode LibraryMode   = GetPhysXLibraryMode(Target.Configuration);
        string           LibrarySuffix = GetPhysXLibrarySuffix(LibraryMode);

        Definitions.Add("WITH_PHYSX=1");
        if (UEBuildConfiguration.bCompileAPEX == false)
        {
            // Since APEX is dependent on PhysX, if APEX is not being include, set the flag properly.
            // This will properly cover the case where PhysX is compiled but APEX is not.
            Definitions.Add("WITH_APEX=0");
        }

        if (LibraryMode == PhysXLibraryMode.Shipping)
        {
            Definitions.Add("WITH_PHYSX_RELEASE=1");
        }
        else
        {
            Definitions.Add("WITH_PHYSX_RELEASE=0");
        }

        string PhysXVersion    = "PhysX_3.4";
        string PxSharedVersion = "PxShared";

        string PhysXDir    = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/" + PhysXVersion + "/";
        string PxSharedDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/" + PxSharedVersion + "/";

        string PhysXLibDir    = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/Lib/";
        string PxSharedLibDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/Lib/";

        string PhysXIncludeDir    = PhysXDir + "Include/";
        string PxSharedIncludeDir = PxSharedDir + "include/";

        if (Target.Platform == UnrealTargetPlatform.Switch)
        {
            // all physx includes in a Switch subdir
            PhysXIncludeDir    = PhysXIncludeDir + "Switch/";
            PxSharedIncludeDir = PxSharedIncludeDir + "Switch/";
        }


        PublicSystemIncludePaths.AddRange(
            new string[] {
            PxSharedIncludeDir,
            PxSharedIncludeDir + "cudamanager",
            PxSharedIncludeDir + "filebuf",
            PxSharedIncludeDir + "foundation",
            PxSharedIncludeDir + "pvd",
            PxSharedIncludeDir + "task",
            PhysXIncludeDir,
            PhysXIncludeDir + "foundation",
            PhysXIncludeDir + "cooking",
            PhysXIncludeDir + "common",
            PhysXIncludeDir + "extensions",
            PhysXIncludeDir + "geometry"
        }
            );

        // Libraries and DLLs for windows platform
        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PhysXLibDir    += "Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            PxSharedLibDir += "Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(PhysXLibDir);
            PublicLibraryPaths.Add(PxSharedLibDir);

            string[] StaticLibrariesX64 = new string[] {
                "PhysX3{0}_x64.lib",
                "PhysX3Extensions{0}_x64.lib",
                "PhysX3Cooking{0}_x64.lib",
                "PhysX3Common{0}_x64.lib",
                "PsFastXml{0}_x64.lib",
                "PxFoundation{0}_x64.lib",
                "PxPvdSDK{0}_x64.lib",
                "PxTask{0}_x64.lib",
            };

            string[] DelayLoadDLLsX64 = new string[] {
                "PxFoundation{0}_x64.dll",
                "PxPvdSDK{0}_x64.dll",
                "PhysX3{0}_x64.dll",
                "PhysX3Cooking{0}_x64.dll",
                "PhysX3Common{0}_x64.dll",
            };

            string[] PxSharedRuntimeDependenciesX64 = new string[] {
                "PxFoundation{0}_x64.dll",
                "PxPvdSDK{0}_x64.dll",
            };

            foreach (string Lib in StaticLibrariesX64)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }

            foreach (string DLL in DelayLoadDLLsX64)
            {
                PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix));
            }

            string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/Win64/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string DLL in DelayLoadDLLsX64)
            {
                string FileName = PhysXBinariesDir + String.Format(DLL, LibrarySuffix);
                RuntimeDependencies.Add(FileName, StagedFileType.NonUFS);
                RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS);
            }

            if (LibrarySuffix != "")
            {
                Definitions.Add("UE_PHYSX_SUFFIX=" + LibrarySuffix);
            }

            string PxSharedBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/Win64/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string DLL in PxSharedRuntimeDependenciesX64)
            {
                RuntimeDependencies.Add(new RuntimeDependency(PxSharedBinariesDir + String.Format(DLL, LibrarySuffix)));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32 || (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32"))
        {
            PhysXLibDir    += "Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            PxSharedLibDir += "Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(PhysXLibDir);
            PublicLibraryPaths.Add(PxSharedLibDir);

            string[] StaticLibrariesX86 = new string[] {
                "PhysX3{0}_x86.lib",
                "PhysX3Extensions{0}_x86.lib",
                "PhysX3Cooking{0}_x86.lib",
                "PhysX3Common{0}_x86.lib",
                "PsFastXml{0}_x86.lib",
                "PxFoundation{0}_x86.lib",
                "PxPvdSDK{0}_x86.lib",
                "PxTask{0}_x86.lib",
            };

            string[] DelayLoadDLLsX86 = new string[] {
                "PxFoundation{0}_x86.dll",
                "PxPvdSDK{0}_x86.dll",
                "PhysX3{0}_x86.dll",
                "PhysX3Cooking{0}_x86.dll",
                "PhysX3Common{0}_x86.dll"
            };

            foreach (string Lib in StaticLibrariesX86)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }

            foreach (string DLL in DelayLoadDLLsX86)
            {
                PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix));
            }

            string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/Win32/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string DLL in DelayLoadDLLsX86)
            {
                string FileName = PhysXBinariesDir + String.Format(DLL, LibrarySuffix);
                RuntimeDependencies.Add(FileName, StagedFileType.NonUFS);
                RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS);
            }

            if (LibrarySuffix != "")
            {
                Definitions.Add("UE_PHYSX_SUFFIX=" + LibrarySuffix);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PhysXLibDir    += "Mac";
            PxSharedLibDir += "Mac";
            PublicLibraryPaths.Add(PhysXLibDir);
            PublicLibraryPaths.Add(PxSharedLibDir);

            string[] StaticLibrariesMac = new string[] {
                PhysXLibDir + "/libLowLevel{0}.a",
                PhysXLibDir + "/libLowLevelCloth{0}.a",
                PhysXLibDir + "/libPhysX3Extensions{0}.a",
                PhysXLibDir + "/libSceneQuery{0}.a",
                PhysXLibDir + "/libSimulationController{0}.a",
                PxSharedLibDir + "/libPxTask{0}.a",
                PxSharedLibDir + "/libPsFastXml{0}.a"
            };

            foreach (string Lib in StaticLibrariesMac)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }

            string[] DynamicLibrariesMac = new string[] {
                "/libPhysX3{0}.dylib",
                "/libPhysX3Cooking{0}.dylib",
                "/libPhysX3Common{0}.dylib",
                "/libPxFoundation{0}.dylib",
                "/libPxPvdSDK{0}.dylib",
            };

            string PhysXBinariesDir = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "PhysX/Mac";
            foreach (string Lib in DynamicLibrariesMac)
            {
                string LibraryPath = PhysXBinariesDir + String.Format(Lib, LibrarySuffix);
                PublicDelayLoadDLLs.Add(LibraryPath);
                RuntimeDependencies.Add(new RuntimeDependency(LibraryPath));
            }

            if (LibrarySuffix != "")
            {
                Definitions.Add("UE_PHYSX_SUFFIX=" + LibrarySuffix);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            PublicLibraryPaths.Add(PhysXLibDir + "Android/ARMv7");
            PublicLibraryPaths.Add(PhysXLibDir + "Android/x86");
            PublicLibraryPaths.Add(PhysXLibDir + "Android/ARM64");
            PublicLibraryPaths.Add(PhysXLibDir + "Android/x64");

            PublicLibraryPaths.Add(PxSharedLibDir + "Android/ARMv7");
            PublicLibraryPaths.Add(PxSharedLibDir + "Android/x86");
            PublicLibraryPaths.Add(PxSharedLibDir + "Android/arm64");
            PublicLibraryPaths.Add(PxSharedLibDir + "Android/x64");

            string[] StaticLibrariesAndroid = new string[] {
                "LowLevel{0}",
                "LowLevelAABB{0}",
                "LowLevelCloth{0}",
                "LowLevelDynamics{0}",
                "LowLevelParticles{0}",
                "PhysX3{0}",
                "PhysX3Extensions{0}",
                // "PhysX3Cooking{0}", // not needed until Apex
                "PhysX3Common{0}",
                //"PhysXVisualDebuggerSDK{0}",
                "SceneQuery{0}",
                "SimulationController{0}",
                "PxFoundation{0}",
                "PxTask{0}",
                "PxPvdSDK{0}",
                "PsFastXml{0}"
            };

            //if you are shipping, and you actually want the shipping libs, you do not need this lib
            if (!(LibraryMode == PhysXLibraryMode.Shipping && BuildConfiguration.bUseShippingPhysXLibraries))
            {
//				PublicAdditionalLibraries.Add("nvToolsExt");
            }

            foreach (string Lib in StaticLibrariesAndroid)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            PhysXLibDir    += "/Linux/" + Target.Architecture;
            PxSharedLibDir += "/Linux/" + Target.Architecture;

            PublicLibraryPaths.Add(PhysXLibDir);
            PublicLibraryPaths.Add(PxSharedLibDir);

            string[] StaticLibrariesPhysXLinux = new string[] {
                "rt",
                "LowLevel{0}",
                "LowLevelAABB{0}",
                "LowLevelCloth{0}",
                "LowLevelDynamics{0}",
                "LowLevelParticles{0}",
                "PhysX3{0}",
                "PhysX3Extensions{0}",
                "PhysX3Cooking{0}",
                "PhysX3Common{0}",
                "SceneQuery{0}",
                "SimulationController{0}",
                "PxFoundation{0}",
                "PxTask{0}",
                "PxPvdSDK{0}",
                "PsFastXml{0}"
            };

            foreach (string Lib in StaticLibrariesPhysXLinux)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }

            if (UEBuildConfiguration.bCompileAPEX)
            {
                string[] StaticLibrariesApexLinux = new string[] {
                    "NvParameterized{0}",
                    "RenderDebug{0}"
                };

                foreach (string Lib in StaticLibrariesApexLinux)
                {
                    PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
                }
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            PhysXLibDir    = Path.Combine(PhysXLibDir, "IOS/");
            PxSharedLibDir = Path.Combine(PxSharedLibDir, "IOS/");
            PublicLibraryPaths.Add(PhysXLibDir);
            PublicLibraryPaths.Add(PxSharedLibDir);

            string[] PhysXLibs = new string[]
            {
                "LowLevel",
                "LowLevelAABB",
                "LowLevelCloth",
                "LowLevelDynamics",
                "LowLevelParticles",
                "PhysX3",
                "PhysX3Common",
                // "PhysX3Cooking", // not needed until Apex
                "PhysX3Extensions",
                "SceneQuery",
                "SimulationController",
                "PxFoundation",
                "PxTask",
                "PxPvdSDK",
                "PsFastXml"
            };

            foreach (string PhysXLib in PhysXLibs)
            {
                PublicAdditionalLibraries.Add(PhysXLib + LibrarySuffix);
                PublicAdditionalShadowFiles.Add(Path.Combine(PhysXLibDir, "lib" + PhysXLib + LibrarySuffix + ".a"));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.TVOS)
        {
            PhysXLibDir    = Path.Combine(PhysXLibDir, "TVOS/");
            PxSharedLibDir = Path.Combine(PxSharedLibDir, "TVOS/");
            PublicLibraryPaths.Add(PhysXLibDir);
            PublicLibraryPaths.Add(PxSharedLibDir);

            string[] PhysXLibs = new string[]
            {
                "LowLevel",
                "LowLevelAABB",
                "LowLevelCloth",
                "LowLevelDynamics",
                "LowLevelParticles",
                "PhysX3",
                "PhysX3Common",
                // "PhysX3Cooking", // not needed until Apex
                "PhysX3Extensions",
                "SceneQuery",
                "SimulationController",
                "PxFoundation",
                "PxTask",
                "PxPvdSDK",
                "PsFastXml"
            };

            foreach (string PhysXLib in PhysXLibs)
            {
                PublicAdditionalLibraries.Add(PhysXLib + LibrarySuffix);
                PublicAdditionalShadowFiles.Add(Path.Combine(PhysXLibDir, "lib" + PhysXLib + LibrarySuffix + ".a"));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            PhysXLibDir    = Path.Combine(PhysXLibDir, "HTML5/");
            PxSharedLibDir = Path.Combine(PxSharedLibDir, "HTML5/");

            string[] PhysXLibs = new string[]
            {
                "LowLevel",
                "LowLevelAABB",
                "LowLevelCloth",
                "LowLevelDynamics",
                "LowLevelParticles",
                "PhysX3",
                "PhysX3CharacterKinematic",
                "PhysX3Common",
                "PhysX3Cooking",
                "PhysX3Extensions",
                //"PhysXVisualDebuggerSDK",
                "SceneQuery",
                "SimulationController",
                "PxFoundation",
                "PxTask",
                "PxPvdSDK",
                "PsFastXml"
            };

            foreach (var lib in PhysXLibs)
            {
                if (!lib.Contains("Cooking") || Target.IsCooked == false)
                {
                    PublicAdditionalLibraries.Add(PhysXLibDir + lib + (UEBuildConfiguration.bCompileForSize ? "_Oz" : "") + ".bc");
                }
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            PublicLibraryPaths.Add(PhysXLibDir + "PS4");

            string[] StaticLibrariesPS4 = new string[] {
                "PhysX3{0}",
                "PhysX3Extensions{0}",
                "PhysX3Cooking{0}",
                "PhysX3Common{0}",
                "LowLevel{0}",
                "LowLevelAABB{0}",
                "LowLevelCloth{0}",
                "LowLevelDynamics{0}",
                "LowLevelParticles{0}",
                "SceneQuery{0}",
                "SimulationController{0}",
                "PxFoundation{0}",
                "PxTask{0}",
                "PxPvdSDK{0}",
                "PsFastXml{0}"
            };

            foreach (string Lib in StaticLibrariesPS4)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            Definitions.Add("PX_PHYSX_STATIC_LIB=1");
            Definitions.Add("_XBOX_ONE=1");

            PublicLibraryPaths.Add(Path.Combine(PhysXLibDir, "XboxOne\\VS" + WindowsPlatform.GetVisualStudioCompilerVersionName()));

            string[] StaticLibrariesXB1 = new string[] {
                "PhysX3{0}.lib",
                "PhysX3Extensions{0}.lib",
                "PhysX3Cooking{0}.lib",
                "PhysX3Common{0}.lib",
                "LowLevel{0}.lib",
                "LowLevelAABB{0}.lib",
                "LowLevelCloth{0}.lib",
                "LowLevelDynamics{0}.lib",
                "LowLevelParticles{0}.lib",
                "SceneQuery{0}.lib",
                "SimulationController{0}.lib",
                "PxFoundation{0}.lib",
                "PxTask{0}.lib",
                "PxPvdSDK{0}.lib",
                "PsFastXml{0}.lib"
            };

            foreach (string Lib in StaticLibrariesXB1)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Switch)
        {
            PublicLibraryPaths.Add(PhysXLibDir + "Switch");
            PublicLibraryPaths.Add(PxSharedLibDir + "Switch");

            string[] StaticLibrariesSwitch = new string[] {
                "LowLevel",
                "LowLevelAABB",
                "LowLevelCloth",
                "LowLevelDynamics",
                "LowLevelParticles",
                "PhysX3",
                "PhysX3Common",
                // "PhysX3Cooking", // not needed until Apex
                "PhysX3Extensions",
                "SceneQuery",
                "SimulationController",
                "PxFoundation",
                "PxTask",
                "PxPvdSDK",
                "PsFastXml"
            };

            foreach (string Lib in StaticLibrariesSwitch)
            {
                PublicAdditionalLibraries.Add(Lib + LibrarySuffix);
            }
        }
    }
Exemplo n.º 43
0
        /// <summary>
        /// Indicates whether the current object is equal to another object of the same type.
        /// </summary>
        /// <returns>
        /// true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false.
        /// </returns>
        /// <param name="other">An object to compare with this object.</param>
        public virtual bool Equals(IJsonSchema other)
        {
            var schema = other as JsonSchema07;

            if (ReferenceEquals(null, schema))
            {
                return(false);
            }
            if (ReferenceEquals(this, schema))
            {
                return(true);
            }
            if (BooleanSchemaDefinition != schema.BooleanSchemaDefinition)
            {
                return(false);
            }
            if (Id != schema.Id)
            {
                return(false);
            }
            if (Schema != schema.Schema)
            {
                return(false);
            }
            if (Comment != schema.Comment)
            {
                return(false);
            }
            if (Title != schema.Title)
            {
                return(false);
            }
            if (Description != schema.Description)
            {
                return(false);
            }
            if (!Equals(Default, schema.Default))
            {
                return(false);
            }
            if (ReadOnly != schema.ReadOnly)
            {
                return(false);
            }
            if (MultipleOf != schema.MultipleOf)
            {
                return(false);
            }
            if (Maximum != schema.Maximum)
            {
                return(false);
            }
            if (ExclusiveMaximum != schema.ExclusiveMaximum)
            {
                return(false);
            }
            if (Minimum != schema.Minimum)
            {
                return(false);
            }
            if (ExclusiveMinimum != schema.ExclusiveMinimum)
            {
                return(false);
            }
            if (MaxLength != schema.MaxLength)
            {
                return(false);
            }
            if (MinLength != schema.MinLength)
            {
                return(false);
            }
            if (Pattern != schema.Pattern)
            {
                return(false);
            }
            if (!Equals(AdditionalItems, schema.AdditionalItems))
            {
                return(false);
            }
            if (!Equals(Items, schema.Items))
            {
                return(false);
            }
            if (MaxItems != schema.MaxItems)
            {
                return(false);
            }
            if (MinItems != schema.MinItems)
            {
                return(false);
            }
            if (UniqueItems != schema.UniqueItems)
            {
                return(false);
            }
            if (!Equals(Contains, schema.Contains))
            {
                return(false);
            }
            if (!Equals(AdditionalProperties, schema.AdditionalProperties))
            {
                return(false);
            }
            if (!Definitions.ContentsEqual(schema.Definitions))
            {
                return(false);
            }
            if (!Properties.ContentsEqual(schema.Properties))
            {
                return(false);
            }
            if (!PatternProperties.ContentsEqual(PatternProperties))
            {
                return(false);
            }
            if (!Dependencies.ContentsEqual(schema.Dependencies))
            {
                return(false);
            }
            if (Const != schema.Const)
            {
                return(false);
            }
            if (!Enum.ContentsEqual(schema.Enum))
            {
                return(false);
            }
            if (!Equals(Type, schema.Type))
            {
                return(false);
            }
            if (!AllOf.ContentsEqual(schema.AllOf))
            {
                return(false);
            }
            if (!AnyOf.ContentsEqual(schema.AnyOf))
            {
                return(false);
            }
            if (!OneOf.ContentsEqual(schema.OneOf))
            {
                return(false);
            }
            if (!Equals(Not, schema.Not))
            {
                return(false);
            }
            if (!Equals(Format, schema.Format))
            {
                return(false);
            }
            if (!Required.ContentsEqual(schema.Required))
            {
                return(false);
            }
            if (!Examples.ContentsEqual(schema.Examples))
            {
                return(false);
            }
            return(Dependencies.ContentsEqual(schema.Dependencies));
        }
Exemplo n.º 44
0
        private Librarian()
        {
            HarvestResource[] res;
            HarvestVein[]     veins;

            #region Librarian
            HarvestDefinition library = new HarvestDefinition();
            library.BankWidth               = 1;
            library.BankHeight              = 1;
            library.MinTotal                = 1;
            library.MaxTotal                = 2;
            library.MinRespawn              = TimeSpan.FromMinutes(50.0);
            library.MaxRespawn              = TimeSpan.FromMinutes(70.0);
            library.Skill                   = SkillName.Inscribe;
            library.Tiles                   = m_LibraryTiles;
            library.MaxRange                = 1;
            library.ConsumedPerHarvest      = 1;
            library.ConsumedPerLodorHarvest = 1;
            library.EffectActions           = new int[] { 4 };
            library.EffectSounds            = new int[] { 0x55, 0x4F };
            library.EffectCounts            = new int[] { 1 };
            library.EffectDelay             = TimeSpan.FromSeconds(0.0);
            library.EffectSoundDelay        = TimeSpan.FromSeconds(0.1);
            library.NoResourcesMessage      = 501756;  // Nothing worth taking.
            library.FailMessage             = 501756;  // Nothing worth taking.
            library.OutOfRangeMessage       = 500446;  // That is too far away.
            library.PackFullMessage         = 500720;  // You don't have enough room in your backpack!
            library.ToolBrokeMessage        = 1044038; // You broke your tool.

            res = new HarvestResource[]
            {
                new HarvestResource(00.0, 00.0, 100.0, "", typeof(BlankScroll)),
                new HarvestResource(65.0, 25.0, 105.0, "", typeof(BlueBook)),
                new HarvestResource(70.0, 30.0, 110.0, "", typeof(SomeRandomNote)),
                new HarvestResource(75.0, 35.0, 115.0, "", typeof(ScrollClue)),
                new HarvestResource(80.0, 40.0, 120.0, "", typeof(LibraryScroll1)),
                new HarvestResource(85.0, 45.0, 125.0, "", typeof(LibraryScroll2)),
                new HarvestResource(90.0, 50.0, 130.0, "", typeof(LibraryScroll3)),
                new HarvestResource(95.0, 55.0, 135.0, "", typeof(LibraryScroll4)),
                new HarvestResource(99.0, 59.0, 139.0, "", typeof(LibraryScroll5)),
                new HarvestResource(100.1, 69.0, 140.0, "", typeof(LibraryScroll6))
            };

            veins = new HarvestVein[]
            {
                new HarvestVein(45.0, 0.0, res[0], res[0]),
                new HarvestVein(15.0, 0.5, res[1], res[0]),
                new HarvestVein(11.0, 0.5, res[2], res[0]),
                new HarvestVein(08.0, 0.5, res[3], res[0]),
                new HarvestVein(06.0, 0.5, res[4], res[0]),
                new HarvestVein(05.0, 0.5, res[5], res[0]),
                new HarvestVein(04.0, 0.5, res[6], res[0]),
                new HarvestVein(03.0, 0.5, res[7], res[0]),
                new HarvestVein(02.0, 0.5, res[8], res[0]),
                new HarvestVein(01.0, 0.5, res[9], res[0])
            };

            if (Core.ML)
            {
                library.BonusResources = new BonusHarvestResource[]
                {
                    new BonusHarvestResource(0, 80.0, null, null),                              //Nothing
                    new BonusHarvestResource(40, 10.0, 1074542, typeof(LoreBook)),
                    new BonusHarvestResource(60, 5.0, 1074542, typeof(DDRelicScrolls)),
                    new BonusHarvestResource(60, 5.0, 1074542, typeof(DDRelicBook))
                };
            }

            library.RandomizeVeins = Core.ML;

            library.Resources = res;
            library.Veins     = veins;

            m_Definition = library;
            Definitions.Add(library);
            #endregion
        }
Exemplo n.º 45
0
        private Fishing()
        {
            HarvestResource[] res;
            HarvestVein[]     veins;

            #region Fishing
            HarvestDefinition fish = new HarvestDefinition();

            // Resource banks are every 8x8 tiles
            fish.BankWidth  = 8;
            fish.BankHeight = 8;

            // Every bank holds from 5 to 15 fish
            fish.MinTotal = 5;
            fish.MaxTotal = 15;

            // A resource bank will respawn its content every 10 to 20 minutes
            fish.MinRespawn = TimeSpan.FromMinutes(10.0);
            fish.MaxRespawn = TimeSpan.FromMinutes(20.0);

            // Skill checking is done on the Fishing skill
            fish.Skill = SkillName.Fishing;

            // Set the list of harvestable tiles
            fish.Tiles       = m_WaterTiles;
            fish.RangedTiles = true;

            // Players must be within 4 tiles to harvest
            fish.MaxRange = 4;

            // One fish per harvest action
            fish.ConsumedPerHarvest        = 1;
            fish.ConsumedPerFeluccaHarvest = 1;

            // The fishing
            fish.EffectActions    = new int[] { 12 };
            fish.EffectSounds     = new int[0];
            fish.EffectCounts     = new int[] { 1 };
            fish.EffectDelay      = TimeSpan.Zero;
            fish.EffectSoundDelay = TimeSpan.FromSeconds(8.0);

            fish.NoResourcesMessage     = 503172;  // The fish don't seem to be biting here.
            fish.FailMessage            = 503171;  // You fish a while, but fail to catch anything.
            fish.TimedOutOfRangeMessage = 500976;  // You need to be closer to the water to fish!
            fish.OutOfRangeMessage      = 500976;  // You need to be closer to the water to fish!
            fish.PackFullMessage        = 503176;  // You do not have room in your backpack for a fish.
            fish.ToolBrokeMessage       = 503174;  // You broke your fishing pole.

            res = new HarvestResource[]
            {
                new HarvestResource(00.0, 00.0, 100.0, 1043297, typeof(Fish))
            };

            veins = new HarvestVein[]
            {
                new HarvestVein(100.0, 0.0, res[0], null)
            };

            fish.Resources = res;
            fish.Veins     = veins;

            m_Definition = fish;
            Definitions.Add(fish);
            #endregion
        }
Exemplo n.º 46
0
        public JanusExporter(ReadOnlyTargetRules Target) : base(Target)
        {
            // fbx
            string FBXSDKDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "FBX/2016.1.1/";

            PublicIncludePaths.AddRange(
                new string[] {
                FBXSDKDir + "include",
                FBXSDKDir + "include/fbxsdk",
            }
                );

            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                string FBxLibPath = FBXSDKDir + "lib/vs" + WindowsPlatform.GetVisualStudioCompilerVersionName() + "/";

                FBxLibPath += "x64/release/";
                PublicLibraryPaths.Add(FBxLibPath);

                PublicAdditionalLibraries.Add("libfbxsdk.lib");

                // We are using DLL versions of the FBX libraries
                Definitions.Add("FBXSDK_SHARED");

                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/Win64/libfbxsdk.dll"));
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                string LibDir = FBXSDKDir + "lib/clang/release/";
                PublicAdditionalLibraries.Add(LibDir + "libfbxsdk.dylib");
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux)
            {
                string LibDir = FBXSDKDir + "lib/gcc4/" + Target.Architecture + "/release/";
                if (!Directory.Exists(LibDir))
                {
                    string Err = string.Format("FBX SDK not found in {0}", LibDir);
                    System.Console.WriteLine(Err);
                    throw new BuildException(Err);
                }

                PublicAdditionalLibraries.Add(LibDir + "/libfbxsdk.a");

                /* There is a bug in fbxarch.h where is doesn't do the check
                 * for clang under linux */
                Definitions.Add("FBXSDK_COMPILER_CLANG");

                // libfbxsdk has been built against libstdc++ and as such needs this library
                PublicAdditionalLibraries.Add("stdc++");
            }

            PrivateIncludePaths.AddRange(
                new string[] {
                "Developer/JanusExporter/Private",
                // ... add other private include paths required here ...
            }
                );

            PublicDependencyModuleNames.AddRange(
                new string[]
            {
                "Core",
                "CoreUObject",
                "Engine",
                "Slate",
                "UnrealEd",
                "UElibPNG",
                "MaterialUtilities",
                "RenderCore",
                "RHI"
            }
                );

            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
                "Engine",
                "InputCore",
                "SlateCore",
                "PropertyEditor",
                "LevelEditor",
                "MaterialUtilities",
                "RenderCore",
                "RHI",
                "MovieScene"
            }
                );

            DynamicallyLoadedModuleNames.AddRange(
                new string[]
            {
                // ... add any modules that your module loads dynamically here ...
            }
                );

            //AddThirdPartyPrivateStaticDependencies(Target, "FBX");

            // openexr
            if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Mac)
            {
                bool   bDebug = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT);
                string LibDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "openexr/Deploy/lib/";
                string Platform;
                switch (Target.Platform)
                {
                case UnrealTargetPlatform.Win64:
                    Platform = "x64";
                    LibDir  += "VS" + WindowsPlatform.GetVisualStudioCompilerVersionName() + "/";
                    break;

                case UnrealTargetPlatform.Win32:
                    Platform = "Win32";
                    LibDir  += "VS" + WindowsPlatform.GetVisualStudioCompilerVersionName() + "/";
                    break;

                case UnrealTargetPlatform.Mac:
                    Platform = "Mac";
                    bDebug   = false;
                    break;

                default:
                    return;
                }
                LibDir = LibDir + "/" + Platform;
                LibDir = LibDir + "/Static" + (bDebug ? "Debug" : "Release");
                PublicLibraryPaths.Add(LibDir);

                if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
                {
                    PublicAdditionalLibraries.AddRange(
                        new string[] {
                        "Half.lib",
                        "Iex.lib",
                        "IlmImf.lib",
                        "IlmThread.lib",
                        "Imath.lib",
                    }
                        );
                }
                else if (Target.Platform == UnrealTargetPlatform.Mac)
                {
                    PublicAdditionalLibraries.AddRange(
                        new string[] {
                        LibDir + "/libHalf.a",
                        LibDir + "/libIex.a",
                        LibDir + "/libIlmImf.a",
                        LibDir + "/libIlmThread.a",
                        LibDir + "/libImath.a",
                    }
                        );
                }

                PublicSystemIncludePaths.AddRange(
                    new string[] {
                    UEBuildConfiguration.UEThirdPartySourceDirectory + "openexr/Deploy/include",
                }
                    );
            }

            // ZLIB
            string zlibPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "zlib/v1.2.8/";

            // TODO: recompile for consoles and mobile platforms
            string OldzlibPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "zlib/zlib-1.2.5/";

            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                string platform = "/Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
                PublicIncludePaths.Add(zlibPath + "include" + platform);
                PublicLibraryPaths.Add(zlibPath + "lib" + platform);
                PublicAdditionalLibraries.Add("zlibstatic.lib");
            }

            else if (Target.Platform == UnrealTargetPlatform.Win32 ||
                     (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32")) // simulator
            {
                string platform = "/Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
                PublicIncludePaths.Add(zlibPath + "include" + platform);
                PublicLibraryPaths.Add(zlibPath + "lib" + platform);
                PublicAdditionalLibraries.Add("zlibstatic.lib");
            }

            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                string platform = "/Mac/";
                PublicIncludePaths.Add(zlibPath + "include" + platform);
                // OSX needs full path
                PublicAdditionalLibraries.Add(zlibPath + "lib" + platform + "libz.a");
            }

            else if (Target.Platform == UnrealTargetPlatform.IOS ||
                     Target.Platform == UnrealTargetPlatform.TVOS)
            {
                PublicIncludePaths.Add(OldzlibPath + "inc");
                PublicAdditionalLibraries.Add("z");
            }

            else if (Target.Platform == UnrealTargetPlatform.Android)
            {
                PublicIncludePaths.Add(OldzlibPath + "inc");
                PublicAdditionalLibraries.Add("z");
            }

            else if (Target.Platform == UnrealTargetPlatform.HTML5)
            {
                string OpimizationSuffix = "";
                if (UEBuildConfiguration.bCompileForSize)
                {
                    OpimizationSuffix = "_Oz";
                }
                else
                {
                    if (Target.Configuration == UnrealTargetConfiguration.Development)
                    {
                        OpimizationSuffix = "_O2";
                    }
                    else if (Target.Configuration == UnrealTargetConfiguration.Shipping)
                    {
                        OpimizationSuffix = "_O3";
                    }
                }
                PublicIncludePaths.Add(OldzlibPath + "Inc");
                PublicAdditionalLibraries.Add(OldzlibPath + "Lib/HTML5/zlib" + OpimizationSuffix + ".bc");
            }

            else if (Target.Platform == UnrealTargetPlatform.Linux)
            {
                string platform = "/Linux/" + Target.Architecture;
                PublicIncludePaths.Add(zlibPath + "include" + platform);
                PublicAdditionalLibraries.Add(zlibPath + "/lib/" + platform + ((Target.LinkType == TargetLinkType.Monolithic) ? "/libz" : "/libz_fPIC") + ".a");
            }

            else if (Target.Platform == UnrealTargetPlatform.PS4)
            {
                PublicIncludePaths.Add(OldzlibPath + "Inc");
                PublicLibraryPaths.Add(OldzlibPath + "Lib/PS4");
                PublicAdditionalLibraries.Add("z");
            }
            else if (Target.Platform == UnrealTargetPlatform.XboxOne)
            {
                // Use reflection to allow type not to exist if console code is not present
                System.Type XboxOnePlatformType = System.Type.GetType("UnrealBuildTool.XboxOnePlatform,UnrealBuildTool");
                if (XboxOnePlatformType != null)
                {
                    System.Object VersionName = XboxOnePlatformType.GetMethod("GetVisualStudioCompilerVersionName").Invoke(null, null);
                    PublicIncludePaths.Add(OldzlibPath + "Inc");
                    PublicLibraryPaths.Add(OldzlibPath + "Lib/XboxOne/VS" + VersionName.ToString());
                    PublicAdditionalLibraries.Add("zlib125_XboxOne.lib");
                }
            }
            else if (Target.Platform == UnrealTargetPlatform.Switch)
            {
                PublicIncludePaths.Add(OldzlibPath + "inc");
                PublicAdditionalLibraries.Add(System.IO.Path.Combine(OldzlibPath, "Lib/Switch/libz.a"));
            }
        }
Exemplo n.º 47
0
    public HoudiniEngineEditor(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = PCHUsageMode.UseSharedPCHs;
        bool   bIsRelease     = true;
        string HFSPath        = "";
        string HoudiniVersion = "16.5.530";

        // Check if we are compiling on unsupported platforms.
        if (Target.Platform != UnrealTargetPlatform.Win64 &&
            Target.Platform != UnrealTargetPlatform.Mac &&
            Target.Platform != UnrealTargetPlatform.Linux)
        {
            string Err = string.Format("Houdini Engine Runtime: Compiling on unsupported platform.");
            System.Console.WriteLine(Err);
            throw new BuildException(Err);
        }

        if (bIsRelease)
        {
            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                // We first check if Houdini Engine is installed.
                string HPath = "C:/Program Files/Side Effects Software/Houdini Engine " + HoudiniVersion;
                if (!Directory.Exists(HPath))
                {
                    // If Houdini Engine is not installed, we check for Houdini installation.
                    HPath = "C:/Program Files/Side Effects Software/Houdini " + HoudiniVersion;
                    if (!Directory.Exists(HPath))
                    {
                        if (!Directory.Exists(HFSPath))
                        {
                            string Err = string.Format("Houdini Engine : Please install Houdini or Houdini Engine {0}", HoudiniVersion);
                            System.Console.WriteLine(Err);
                        }
                    }
                    else
                    {
                        HFSPath = HPath;
                    }
                }
                else
                {
                    HFSPath = HPath;
                }
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                string HPath = "/Applications/Houdini/Houdini" + HoudiniVersion + "/Frameworks/Houdini.framework/Versions/Current/Resources";
                if (!Directory.Exists(HPath))
                {
                    if (!Directory.Exists(HFSPath))
                    {
                        string Err = string.Format("Houdini Engine : Please install Houdini {0}", HoudiniVersion);
                        System.Console.WriteLine(Err);
                    }
                }
                else
                {
                    HFSPath = HPath;
                }
            }
            else
            {
                HFSPath = System.Environment.GetEnvironmentVariable("HFS");
                System.Console.WriteLine("Linux - found HFS:" + HFSPath);
            }
        }

        string HAPIIncludePath = "";

        if (HFSPath != "")
        {
            HAPIIncludePath = HFSPath + "/toolkit/include/HAPI";

            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                Definitions.Add("HOUDINI_ENGINE_HFS_PATH_DEFINE=" + HFSPath);
            }
        }

        if (HAPIIncludePath != "")
        {
            PublicIncludePaths.Add(HAPIIncludePath);

            // Add the custom include path as well in case the toolkit path doesn't exist yet.
            PublicIncludePaths.Add(HFSPath + "/custom/houdini/include/HAPI");
        }

        PublicIncludePaths.AddRange(
            new string[] {
            "HoudiniEngineRuntime/Public/HAPI",
            "HoudiniEngineRuntime/Public",
            "HoudiniEngineEditor/Public"
        }
            );

        PrivateIncludePaths.AddRange(
            new string[] {
            "HoudiniEngineEditor/Private",
            "HoudiniEngineRuntime/Private"
        }
            );

        PrivateIncludePathModuleNames.AddRange(
            new string[] {
            "PlacementMode"
        }
            );

        // Add common dependencies.
        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "CoreUObject",
            "HoudiniEngineRuntime",
            "Slate",
            "SlateCore",
            "Landscape"
        }
            );

        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "AppFramework",
            "AssetTools",
            "ContentBrowser",
            "DesktopWidgets",
            "EditorStyle",
            "EditorWidgets",
            "Engine",
            "InputCore",
            "LevelEditor",
            "MainFrame",
            "Projects",
            "PropertyEditor",
            "RHI",
            "RawMesh",
            "RenderCore",
            "ShaderCore",
            "TargetPlatform",
            "UnrealEd",
            "ApplicationCore",
        }
            );

        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
            "PlacementMode",
        }
            );
    }
Exemplo n.º 48
0
        private Lumberjacking()
        {
            HarvestResource[] res;
            HarvestVein[]     veins;

            #region Lumberjacking
            HarvestDefinition lumber = new HarvestDefinition();

            // Resource banks are every 4x3 tiles
            lumber.BankWidth  = 4;
            lumber.BankHeight = 3;

            // Every bank holds from 20 to 45 logs
            lumber.MinTotal = 15;
            lumber.MaxTotal = 15;

            // A resource bank will respawn its content every 20 to 30 minutes
            lumber.MinRespawn = TimeSpan.FromMinutes(35.0);
            lumber.MaxRespawn = TimeSpan.FromMinutes(55.0);

            // Skill checking is done on the Lumberjacking skill
            lumber.Skill = SkillName.Lumberjacking;

            // Set the list of harvestable tiles
            lumber.Tiles = m_TreeTiles;

            // Players must be within 2 tiles to harvest
            lumber.MaxRange = 4;

            // Ten logs per harvest action
            lumber.ConsumedPerHarvest        = 1;
            lumber.ConsumedPerFeluccaHarvest = 4;

            // The chopping effect
            lumber.EffectActions       = new int[] { 13 };
            lumber.EffectActionsRiding = new int[] { 29 };
            lumber.EffectSounds        = new int[] { 0x13E };
            lumber.EffectCounts        = (Core.AOS ? new int[] { 1 } : new int[] { 1, 2, 2, 2, 3 });
            lumber.EffectDelay         = TimeSpan.FromSeconds(1.0);
            lumber.EffectSoundDelay    = TimeSpan.FromSeconds(0.5);

            lumber.NoResourcesMessage = 500493;      // There's not enough wood here to harvest.
            lumber.FailMessage        = 500495;      // You hack at the tree for a while, but fail to produce any useable wood.
            lumber.OutOfRangeMessage  = 500446;      // That is too far away.
            lumber.PackFullMessage    = 500497;      // You can't place any wood into your backpack!
            lumber.ToolBrokeMessage   = 500499;      // You broke your axe.

            if (Core.ML)
            {
                res = new HarvestResource[]
                {
                    new HarvestResource(00.0, 00.0, 100.0, 1072540, typeof(Log)),
                    new HarvestResource(65.0, 25.0, 105.0, 1072541, typeof(OakLog)),
                    new HarvestResource(70.0, 30.0, 110.0, "You chop some mahogany logs and put them into your backpack.", typeof(MahoganyLog)),
                    new HarvestResource(80.0, 40.0, 120.0, 1072542, typeof(AshLog)),
                    new HarvestResource(85.0, 45.0, 125.0, "You chop some cedar logs and put them into your backpack.", typeof(CedarLog)),
                    new HarvestResource(90.0, 50.0, 130.0, "You chop some willow logs and put them into your backpack.", typeof(WillowLog)),
                    new HarvestResource(95.0, 55.0, 135.0, 1072543, typeof(YewLog)),
                    new HarvestResource(97.5, 60.0, 140.0, 1072544, typeof(HeartwoodLog)),
                    new HarvestResource(99.0, 60.0, 140.0, "You chop some myst wood logs and put them into your backpack.", typeof(MystWoodLog)),
                    new HarvestResource(100.0, 60.0, 140.0, 1072545, typeof(BloodwoodLog)),
                    new HarvestResource(100.0, 60.0, 140.0, 1072546, typeof(FrostwoodLog)),
                };


                veins = new HarvestVein[]
                {
                    new HarvestVein(35.0, 0.0, res[0], null),     // Ordinary Logs
                    new HarvestVein(18.0, 0.5, res[1], res[0]),   // Oak
                    new HarvestVein(10.0, 0.5, res[2], res[0]),   // Mahogany
                    new HarvestVein(08.0, 0.5, res[3], res[0]),   // Ash
                    new HarvestVein(07.0, 0.5, res[4], res[0]),   // Cedar
                    new HarvestVein(06.0, 0.5, res[5], res[0]),   // Willow
                    new HarvestVein(05.5, 0.5, res[6], res[0]),   // Yew
                    new HarvestVein(03.5, 0.5, res[7], res[0]),   // Heartwood
                    new HarvestVein(03.0, 0.5, res[8], res[0]),   // Mystwood
                    new HarvestVein(02.5, 0.5, res[9], res[0]),   // Bloodwood
                    new HarvestVein(01.5, 0.5, res[10], res[0]),  // Frostwood
                };

                lumber.BonusResources = new BonusHarvestResource[]
                {
                    new BonusHarvestResource(0, 83.9, null, null),                              //Nothing
                    new BonusHarvestResource(100, 10.0, 1072548, typeof(BarkFragment)),
                    new BonusHarvestResource(100, 03.0, 1072550, typeof(LuminescentFungi)),
                    new BonusHarvestResource(100, 02.0, 1072547, typeof(SwitchItem)),
                    new BonusHarvestResource(100, 01.0, 1072549, typeof(ParasiticPlant)),
                    new BonusHarvestResource(100, 00.1, 1072551, typeof(BrilliantAmber))
                };
            }
            else
            {
                res = new HarvestResource[]
                {
                    new HarvestResource(00.0, 00.0, 100.0, 1072540, typeof(Log)),
                    new HarvestResource(65.0, 25.0, 105.0, 1072541, typeof(OakLog)),
                    new HarvestResource(70.0, 30.0, 110.0, "You chop some mahogany logs and put them into your backpack.", typeof(MahoganyLog)),
                    new HarvestResource(80.0, 40.0, 120.0, 1072542, typeof(AshLog)),
                    new HarvestResource(85.0, 45.0, 125.0, "You chop some cedar logs and put them into your backpack.", typeof(CedarLog)),
                    new HarvestResource(90.0, 50.0, 130.0, "You chop some willow logs and put them into your backpack.", typeof(WillowLog)),
                    new HarvestResource(95.0, 55.0, 135.0, 1072543, typeof(YewLog)),
                    new HarvestResource(97.5, 60.0, 140.0, 1072544, typeof(HeartwoodLog)),
                    new HarvestResource(99.0, 60.0, 140.0, "You chop some myst wood logs and put them into your backpack.", typeof(MystWoodLog)),
                    new HarvestResource(100.0, 60.0, 140.0, 1072545, typeof(BloodwoodLog)),
                    new HarvestResource(100.0, 60.0, 140.0, 1072546, typeof(FrostwoodLog)),
                };

                veins = new HarvestVein[]
                {
                    new HarvestVein(35.0, 0.0, res[0], null),     // Ordinary Logs
                    new HarvestVein(18.0, 0.5, res[1], res[0]),   // Oak
                    new HarvestVein(10.0, 0.5, res[2], res[0]),   // Mahogany
                    new HarvestVein(08.0, 0.5, res[3], res[0]),   // Ash
                    new HarvestVein(07.0, 0.5, res[4], res[0]),   // Cedar
                    new HarvestVein(06.0, 0.5, res[5], res[0]),   // Willow
                    new HarvestVein(05.5, 0.5, res[6], res[0]),   // Yew
                    new HarvestVein(03.5, 0.5, res[7], res[0]),   // Heartwood
                    new HarvestVein(03.0, 0.5, res[8], res[0]),   // Mystwood
                    new HarvestVein(02.5, 0.5, res[9], res[0]),   // Bloodwood
                    new HarvestVein(01.5, 0.5, res[10], res[0]),  // Frostwood
                };
            }

            lumber.Resources = res;
            lumber.Veins     = veins;

            lumber.RaceBonus = Core.ML;

            m_Definition = lumber;
            Definitions.Add(lumber);
            #endregion
        }
    public ICU(TargetInfo Target)
    {
        Type = ModuleType.External;

        bool bNeedsDlls = false;

        string ICUVersion  = "icu4c-53_1";
        string ICURootPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "ICU/" + ICUVersion + "/";

        // Includes
        PublicSystemIncludePaths.Add(ICURootPath + "include" + "/");

        string PlatformFolderName = Target.Platform.ToString();

        string TargetSpecificPath = ICURootPath + PlatformFolderName + "/";

        if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32") // simulator
        {
            TargetSpecificPath = ICURootPath + "Win32/";
        }

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32) ||
            (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32") // simulator
            )
        {
            string VSVersionFolderName = "VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            TargetSpecificPath += VSVersionFolderName + "/";

            string[] LibraryNameStems =
            {
                "dt",                   // Data
                "uc",                   // Unicode Common
                "in",                   // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };
            string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) ?
                                        "d" : string.Empty;

            // Library Paths
            PublicLibraryPaths.Add(TargetSpecificPath + "lib" + "/");

            EICULinkType ICULinkType = Target.IsMonolithic ? EICULinkType.Static : EICULinkType.Dynamic;
            switch (ICULinkType)
            {
            case EICULinkType.Static:
                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "sicu" + Stem + LibraryNamePostfix + "." + "lib";
                    PublicAdditionalLibraries.Add(LibraryName);
                }
                break;

            case EICULinkType.Dynamic:
                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "icu" + Stem + LibraryNamePostfix + "." + "lib";
                    PublicAdditionalLibraries.Add(LibraryName);
                }

                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "icu" + Stem + LibraryNamePostfix + "53" + "." + "dll";
                    PublicDelayLoadDLLs.Add(LibraryName);
                }

                if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
                {
                    string BinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/ICU/{0}/{1}/VS{2}/", ICUVersion, Target.Platform.ToString(), WindowsPlatform.GetVisualStudioCompilerVersionName());
                    foreach (string Stem in LibraryNameStems)
                    {
                        string LibraryName = BinariesDir + String.Format("icu{0}{1}53.dll", Stem, LibraryNamePostfix);
                        RuntimeDependencies.Add(new RuntimeDependency(LibraryName));
                    }
                }

                bNeedsDlls = true;

                break;
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux || Target.Platform == UnrealTargetPlatform.Android)
        {
            string StaticLibraryExtension = "a";

            switch (Target.Platform)
            {
            case UnrealTargetPlatform.Linux:
                TargetSpecificPath += Target.Architecture + "/";
                break;

            case UnrealTargetPlatform.Android:
                PublicLibraryPaths.Add(TargetSpecificPath + "ARMv7/lib");
                PublicLibraryPaths.Add(TargetSpecificPath + "ARM64/lib");
                PublicLibraryPaths.Add(TargetSpecificPath + "x86/lib");
                PublicLibraryPaths.Add(TargetSpecificPath + "x64/lib");
                break;
            }

            string[] LibraryNameStems =
            {
                "data",                 // Data
                "uc",                   // Unicode Common
                "i18n",                 // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };
            string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) ?
                                        "d" : string.Empty;

            // Library Paths
            // Temporarily? only link statically on Linux too
            //EICULinkType ICULinkType = (Target.Platform == UnrealTargetPlatform.Android || Target.IsMonolithic) ? EICULinkType.Static : EICULinkType.Dynamic;
            EICULinkType ICULinkType = EICULinkType.Static;
            switch (ICULinkType)
            {
            case EICULinkType.Static:
                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "icu" + Stem + LibraryNamePostfix;
                    if (Target.Platform == UnrealTargetPlatform.Android)
                    {
                        // we will filter out in the toolchain
                        PublicAdditionalLibraries.Add(LibraryName);                                 // Android requires only the filename.
                    }
                    else
                    {
                        PublicAdditionalLibraries.Add(TargetSpecificPath + "lib/" + "lib" + LibraryName + "." + StaticLibraryExtension);     // Linux seems to need the path, not just the filename.
                    }
                }
                break;

            case EICULinkType.Dynamic:
                if (Target.Platform == UnrealTargetPlatform.Linux)
                {
                    string PathToBinary = String.Format("$(EngineDir)/Binaries/ThirdParty/ICU/{0}/{1}/{2}/", ICUVersion, Target.Platform.ToString(),
                                                        Target.Architecture);

                    foreach (string Stem in LibraryNameStems)
                    {
                        string LibraryName = "icu" + Stem + LibraryNamePostfix;
                        string LibraryPath = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "ICU/icu4c-53_1/Linux/" + Target.Architecture + "/";

                        PublicLibraryPaths.Add(LibraryPath);
                        PublicAdditionalLibraries.Add(LibraryName);

                        // add runtime dependencies (for staging)
                        RuntimeDependencies.Add(new RuntimeDependency(PathToBinary + "lib" + LibraryName + ".so"));
                        RuntimeDependencies.Add(new RuntimeDependency(PathToBinary + "lib" + LibraryName + ".so.53"));      // version-dependent
                    }
                }
                break;
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.IOS || Target.Platform == UnrealTargetPlatform.TVOS)
        {
            string StaticLibraryExtension  = "a";
            string DynamicLibraryExtension = "dylib";

            string[] LibraryNameStems =
            {
                "data",                 // Data
                "uc",                   // Unicode Common
                "i18n",                 // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };
            string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) ?
                                        "d" : string.Empty;

            EICULinkType ICULinkType = (Target.Platform == UnrealTargetPlatform.IOS || Target.IsMonolithic) ? EICULinkType.Static : EICULinkType.Dynamic;
            // Library Paths
            switch (ICULinkType)
            {
            case EICULinkType.Static:
                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "libicu" + Stem + LibraryNamePostfix + "." + StaticLibraryExtension;
                    PublicAdditionalLibraries.Add(TargetSpecificPath + "lib/" + LibraryName);
                    PublicAdditionalShadowFiles.Add(TargetSpecificPath + "lib/" + LibraryName);
                }
                break;

            case EICULinkType.Dynamic:
                foreach (string Stem in LibraryNameStems)
                {
                    if (Target.Platform == UnrealTargetPlatform.Mac)
                    {
                        string LibraryName = "libicu" + Stem + ".53.1" + LibraryNamePostfix + "." + DynamicLibraryExtension;
                        string LibraryPath = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "ICU/icu4c-53_1/Mac/" + LibraryName;

                        PublicDelayLoadDLLs.Add(LibraryPath);
                        PublicAdditionalShadowFiles.Add(LibraryPath);
                        RuntimeDependencies.Add(new RuntimeDependency(LibraryPath));
                    }
                }

                bNeedsDlls = true;

                break;
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            // we don't bother with debug libraries on HTML5. Mainly because debugging isn't viable on html5 currently
            string StaticLibraryExtension = "bc";

            string[] LibraryNameStems =
            {
                "data",                 // Data
                "uc",                   // Unicode Common
                "i18n",                 // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };

            string OpimizationSuffix = "";
            if (UEBuildConfiguration.bCompileForSize)
            {
                OpimizationSuffix = "_Oz";
            }
            else
            {
                if (Target.Configuration == UnrealTargetConfiguration.Development)
                {
                    OpimizationSuffix = "_O2";
                }
                else if (Target.Configuration == UnrealTargetConfiguration.Shipping)
                {
                    OpimizationSuffix = "_O3";
                }
            }

            foreach (string Stem in LibraryNameStems)
            {
                string LibraryName = "libicu" + Stem + OpimizationSuffix + "." + StaticLibraryExtension;
                PublicAdditionalLibraries.Add(TargetSpecificPath + LibraryName);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            string   LibraryNamePrefix = "sicu";
            string[] LibraryNameStems  =
            {
                "dt",                   // Data
                "uc",                   // Unicode Common
                "in",                   // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };
            string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug) ?
                                        "d" : string.Empty;
            string LibraryExtension = "lib";
            foreach (string Stem in LibraryNameStems)
            {
                string LibraryName = ICURootPath + "PS4/lib/" + LibraryNamePrefix + Stem + LibraryNamePostfix + "." + LibraryExtension;
                PublicAdditionalLibraries.Add(LibraryName);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Switch)
        {
            string   LibraryNamePrefix = "sicu";
            string[] LibraryNameStems  =
            {
                "dt",                       // Data
                "uc",                       // Unicode Common
                "in",                       // Internationalization
                "le",                       // Layout Engine
                "lx",                       // Layout Extensions
                "io"                        // Input/Output
            };
            string LibraryNamePostfix = ""; //(Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) ? "d" : string.Empty;
            string LibraryExtension   = "a";
            foreach (string Stem in LibraryNameStems)
            {
                string LibraryName = ICURootPath + "Switch/lib/" + LibraryNamePrefix + Stem + LibraryNamePostfix + "." + LibraryExtension;
                PublicAdditionalLibraries.Add(LibraryName);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            // Use reflection to allow type not to exist if console code is not present
            System.Type XboxOnePlatformType = System.Type.GetType("UnrealBuildTool.XboxOnePlatform,UnrealBuildTool");
            if (XboxOnePlatformType != null)
            {
                string   LibraryNamePrefix = "sicu";
                string[] LibraryNameStems  =
                {
                    "dt",                       // Data
                    "uc",                       // Unicode Common
                    "in",                       // Internationalization
                    "le",                       // Layout Engine
                    "lx",                       // Layout Extensions
                    "io"                        // Input/Output
                };
                string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) ?
                                            "d" : string.Empty;
                string LibraryExtension = "lib";
                foreach (string Stem in LibraryNameStems)
                {
                    System.Object VersionName = XboxOnePlatformType.GetMethod("GetVisualStudioCompilerVersionName").Invoke(null, null);
                    string        LibraryName = ICURootPath + "XboxOne/VS" + VersionName.ToString() + "/lib/" + LibraryNamePrefix + Stem + LibraryNamePostfix + "." + LibraryExtension;
                    PublicAdditionalLibraries.Add(LibraryName);
                }
            }
        }

        // common defines
        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32) ||
            (Target.Platform == UnrealTargetPlatform.Linux) ||
            (Target.Platform == UnrealTargetPlatform.Android) ||
            (Target.Platform == UnrealTargetPlatform.Mac) ||
            (Target.Platform == UnrealTargetPlatform.IOS) ||
            (Target.Platform == UnrealTargetPlatform.TVOS) ||
            (Target.Platform == UnrealTargetPlatform.PS4) ||
            (Target.Platform == UnrealTargetPlatform.XboxOne) ||
            (Target.Platform == UnrealTargetPlatform.HTML5) ||
            (Target.Platform == UnrealTargetPlatform.Switch)
            )
        {
            // Definitions
            Definitions.Add("U_USING_ICU_NAMESPACE=0");              // Disables a using declaration for namespace "icu".
            Definitions.Add("U_STATIC_IMPLEMENTATION");              // Necessary for linking to ICU statically.
            Definitions.Add("U_NO_DEFAULT_INCLUDE_UTF_HEADERS=1");   // Disables unnecessary inclusion of headers - inclusions are for ease of use.
            Definitions.Add("UNISTR_FROM_CHAR_EXPLICIT=explicit");   // Makes UnicodeString constructors for ICU character types explicit.
            Definitions.Add("UNISTR_FROM_STRING_EXPLICIT=explicit"); // Makes UnicodeString constructors for "char"/ICU string types explicit.
            Definitions.Add("UCONFIG_NO_TRANSLITERATION=1");         // Disables declarations and compilation of unused ICU transliteration functionality.
        }

        if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            // Definitions
            Definitions.Add("ICU_NO_USER_DATA_OVERRIDE=1");
            Definitions.Add("U_PLATFORM=U_PF_ORBIS");
        }

        if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            // Definitions
            Definitions.Add("ICU_NO_USER_DATA_OVERRIDE=1");
            Definitions.Add("U_PLATFORM=U_PF_DURANGO");
        }

        Definitions.Add("NEEDS_ICU_DLLS=" + (bNeedsDlls ? "1" : "0"));
    }
Exemplo n.º 50
0
    public GoogleTest(TargetInfo Target)
    {
        Type = ModuleType.External;

        string RootPath             = UEBuildConfiguration.UEThirdPartySourceDirectory + "GoogleTest/";
        string DefaultConfiguration = "MinSizeRel";

        // Includes
        PublicSystemIncludePaths.Add(RootPath + "include/");

        // Libraries
        string PartialLibraryPath = "lib/" + Target.Platform.ToString() + "/";
        string LibraryPath        = RootPath;

        if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
        {
            PartialLibraryPath += "VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();

            if (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
            {
                PartialLibraryPath += "/Debug";
            }
            else
            {
                PartialLibraryPath += "/" + DefaultConfiguration;
            }

            //if (!Target.IsMonolithic)
            //{
            //    PartialLibraryPath += "_Shared";
            //}

            PartialLibraryPath += "/";
            LibraryPath        += PartialLibraryPath;
            //i.e. Engine\Source\ThirdParty\GoogleTest\lib\Win64\VS2013\MinSizeRel_Shared\ 

            // I was unable to get non-monolithic windows builds working without crashing within the
            // time box I was given for the integration. The workaround is to ensure that all tests
            // are included in the same dll when building monolithic, otherwise error messages
            // will not be routed properly.

            // We should re-investigate this integration problem in the future, as more teams want to
            // adopt usage of the library

            //if (!Target.IsMonolithic)
            //{
            //    PublicAdditionalLibraries.Add("gmock_main.lib");
            //    RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/GoogleTest/" + PartialLibraryPath + "gmock_main.dll"));
            //}
            //else
            //{
            PublicAdditionalLibraries.Add("gtest.lib");
            PublicAdditionalLibraries.Add("gmock.lib");
            PublicAdditionalLibraries.Add("gmock_main.lib");
            //}
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            if (Target.IsMonolithic)
            {
                PartialLibraryPath += DefaultConfiguration + "/";
                LibraryPath        += PartialLibraryPath;

                PublicAdditionalLibraries.Add(LibraryPath + "libgtest.a");
                PublicAdditionalLibraries.Add(LibraryPath + "libgmock.a");
                PublicAdditionalLibraries.Add(LibraryPath + "libgmock_main.a");
            }
            else
            {
                PartialLibraryPath += DefaultConfiguration + "_Shared/";
                LibraryPath        += PartialLibraryPath;

                PublicAdditionalLibraries.Add(LibraryPath + "libgmock_main.dylib");
            }
        }

        PublicLibraryPaths.Add(LibraryPath);

        // The including module will also need these enabled
        Definitions.Add("WITH_GOOGLE_MOCK=1");
        Definitions.Add("WITH_GOOGLE_TEST=1");

        Definitions.Add("GTEST_HAS_POSIX_RE=0");

        if (!Target.IsMonolithic)
        {
            //Definitions.Add("GTEST_LINKED_AS_SHARED_LIBRARY=1");
        }
    }
Exemplo n.º 51
0
 private T AddDefinition <T>(T definition) where T : ISettingDefinition
 {
     Definitions.Add(definition);
     return(definition);
 }
Exemplo n.º 52
0
    public UnrealEd(ReadOnlyTargetRules Target) : base(Target)
    {
        PrivatePCHHeaderFile = "Private/UnrealEdPrivatePCH.h";

        SharedPCHHeaderFile = "Public/UnrealEdSharedPCH.h";

        PrivateIncludePaths.AddRange(
            new string[]
        {
            "Editor/UnrealEd/Private",
            "Editor/UnrealEd/Private/Settings",
            "Editor/PackagesDialog/Public",
            "Developer/DerivedDataCache/Public",
            "Developer/TargetPlatform/Public",
        }
            );

        PrivateIncludePathModuleNames.AddRange(
            new string[]
        {
            "AssetRegistry",
            "AssetTools",
            "BehaviorTreeEditor",
            "ClassViewer",
            "ContentBrowser",
            "CrashTracker",
            "DerivedDataCache",
            "DesktopPlatform",
            "EnvironmentQueryEditor",
            "GameProjectGeneration",
            "ProjectTargetPlatformEditor",
            "ImageWrapper",
            "MainFrame",
            "MaterialEditor",
            "MergeActors",
            "MeshUtilities",
            "Messaging",
            "MovieSceneCapture",
            "NiagaraEditor",
            "PlacementMode",
            "Settings",
            "SettingsEditor",
            "SuperSearch",
            "AudioEditor",
            "ViewportSnapping",
            "SourceCodeAccess",
            "ReferenceViewer",
            "IntroTutorials",
            "OutputLog",
            "Landscape",
            "Niagara",
            "SizeMap",
            "LocalizationService",
            "HierarchicalLODUtilities",
            "MessagingRpc",
            "PortalRpc",
            "PortalServices",
            "BlueprintNativeCodeGen",
            "ViewportInteraction",
            "VREditor",
            "Persona",
            "ClothingSystemEditorInterface",
        }
            );

        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "BspMode",
            "Core",
            "CoreUObject",
            "DirectoryWatcher",
            "Documentation",
            "Engine",
            "Json",
            "Projects",
            "SandboxFile",
            "Slate",
            "SlateCore",
            "EditorStyle",
            "SourceControl",
            "UnrealEdMessages",
            "AIModule",
            "GameplayDebugger",
            "BlueprintGraph",
            "Http",
            "UnrealAudio",
            "FunctionalTesting",
            "AutomationController",
            "Internationalization",
            "AudioEditor",
        }
            );

        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "LevelSequence",
            "AnimGraph",
            "AppFramework",
            "BlueprintGraph",
            "CinematicCamera",
            "DesktopPlatform",
            "EditorStyle",
            "EngineSettings",
            "InputCore",
            "InputBindingEditor",
            "LauncherServices",
            "MaterialEditor",
            "MessageLog",
            "NetworkFileSystem",
            "PakFile",
            "PropertyEditor",
            "Projects",
            "RawMesh",
            "RenderCore",
            "RHI",
            "ShaderCore",
            "Sockets",
            "SourceControlWindows",
            "StatsViewer",
            "SwarmInterface",
            "TargetPlatform",
            "TargetDeviceServices",
            "EditorWidgets",
            "GraphEditor",
            "Kismet",
            "InternationalizationSettings",
            "JsonUtilities",
            "Landscape",
            "HeadMountedDisplay",
            "MeshPaint",
            "Foliage",
            "VectorVM",
            "TreeMap",
            "MaterialUtilities",
            "Localization",
            "LocalizationService",
            "AddContentDialog",
            "GameProjectGeneration",
            "HierarchicalLODUtilities",
            "Analytics",
            "AnalyticsET",
            "PluginWarden",
            "PixelInspectorModule",
            "MovieScene",
            "MovieSceneTracks",
            "ViewportInteraction",
            "VREditor",
            "ClothingSystemEditor",
            "ClothingSystemRuntime"
        }
            );

        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
            "CrashTracker",
            "FontEditor",
            "StaticMeshEditor",
            "TextureEditor",
            "Cascade",
            "UMGEditor",
            "Matinee",
            "AssetRegistry",
            "AssetTools",
            "ClassViewer",
            "CollectionManager",
            "ContentBrowser",
            "CurveTableEditor",
            "DataTableEditor",
            "DestructibleMeshEditor",
            "EditorSettingsViewer",
            "LandscapeEditor",
            "KismetCompiler",
            "DetailCustomizations",
            "ComponentVisualizers",
            "MainFrame",
            "LevelEditor",
            "PackagesDialog",
            "Persona",
            "PhAT",
            "ProjectLauncher",
            "DeviceManager",
            "SettingsEditor",
            "SessionFrontend",
            "Sequencer",
            "StringTableEditor",
            "SuperSearch",
            "GeometryMode",
            "TextureAlignMode",
            "FoliageEdit",
            "PackageDependencyInfo",
            "ImageWrapper",
            "Blutility",
            "IntroTutorials",
            "WorkspaceMenuStructure",
            "PlacementMode",
            "NiagaraEditor",
            "MeshUtilities",
            "MergeActors",
            "ProjectSettingsViewer",
            "ProjectTargetPlatformEditor",
            "PListEditor",
            "BehaviorTreeEditor",
            "EnvironmentQueryEditor",
            "ViewportSnapping",
            "UserFeedback",
            "GameplayTasksEditor",
            "UndoHistory",
            "SourceCodeAccess",
            "ReferenceViewer",
            "EditorLiveStreaming",
            "HotReload",
            "IOSPlatformEditor",
            "HTML5PlatformEditor",
            "SizeMap",
            "PortalProxies",
            "PortalServices",
            "GeometryCacheEd",
            "BlueprintNativeCodeGen",
            "AnimationModifiers",
        }
            );

        if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.Linux)
        {
            DynamicallyLoadedModuleNames.Add("AndroidPlatformEditor");
        }

        CircularlyReferencedDependentModules.AddRange(
            new string[]
        {
            "GraphEditor",
            "Kismet",
            "AudioEditor"
        }
            );


        // Add include directory for Lightmass
        PublicIncludePaths.Add("Programs/UnrealLightmass/Public");

        PublicIncludePathModuleNames.AddRange(
            new string[] {
            "UserFeedback",
            "CollectionManager",
            "BlueprintGraph",
            "AddContentDialog",
            "MeshUtilities"
        }
            );

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32))
        {
            PublicDependencyModuleNames.Add("XAudio2");
            PublicDependencyModuleNames.Add("AudioMixerXAudio2");
            PublicDependencyModuleNames.Add("UnrealAudioXAudio2");

            AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                         "UEOgg",
                                                         "Vorbis",
                                                         "VorbisFile",
                                                         "DX11Audio"
                                                         );
        }

        if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicDependencyModuleNames.Add("UnrealAudioCoreAudio");
        }

        if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            PublicDependencyModuleNames.Add("ALAudio");
        }

        AddEngineThirdPartyPrivateStaticDependencies(Target,
                                                     "HACD",
                                                     "VHACD",
                                                     "FBX",
                                                     "FreeType2"
                                                     );

        SetupModulePhysXAPEXSupport(Target);

        if (UEBuildConfiguration.bCompileRecast)
        {
            PrivateDependencyModuleNames.Add("Navmesh");
            Definitions.Add("WITH_RECAST=1");
        }
        else
        {
            Definitions.Add("WITH_RECAST=0");
        }
    }
public class HoudiniEngineEditor : ModuleRules
{
    public HoudiniEngineEditor( ReadOnlyTargetRules Target )
        : base(Target)
    {
        PCHUsage = PCHUsageMode.UseSharedPCHs;

        // Check if we are compiling on unsupported platforms.
        if( Target.Platform != UnrealTargetPlatform.Win64 &&
            Target.Platform != UnrealTargetPlatform.Mac &&
            Target.Platform != UnrealTargetPlatform.Linux )
        {
            string Err = string.Format( "Houdini Engine Runtime: Compiling on unsupported platform." );
            System.Console.WriteLine( Err );
            throw new BuildException( Err );
        }

        // Find HFS
        string HFSPath = GetHFSPath();
        HFSPath = HFSPath.Replace("\\", "/");
        if( HFSPath != "" )
        {
            PlatformID buildPlatformId = Environment.OSVersion.Platform;
            if ( buildPlatformId == PlatformID.Win32NT )
            {
                Definitions.Add("HOUDINI_ENGINE_HFS_PATH_DEFINE=" + HFSPath);
            }
        }

        // Find the HAPI include directory
        string HAPIIncludePath = HFSPath + "/toolkit/include/HAPI";
        if (!Directory.Exists(HAPIIncludePath))
        {
            // Try the custom include path as well in case the toolkit path doesn't exist yet.
            HAPIIncludePath = HFSPath + "/custom/houdini/include/HAPI";

            if (!Directory.Exists(HAPIIncludePath))
            {
                System.Console.WriteLine(string.Format("Couldnt find the HAPI include folder!"));
                HAPIIncludePath = "";
            }
        }

        if (HAPIIncludePath != "")
            PublicIncludePaths.Add(HAPIIncludePath);

        // Get the plugin path
        string PluginPath = Path.Combine( ModuleDirectory, "../../" );
        PluginPath = Utils.MakePathRelativeTo(PluginPath, Target.RelativeEnginePath);

        PublicIncludePaths.AddRange(
            new string[] {
                "HoudiniEngineRuntime/Public/HAPI",
                "HoudiniEngineRuntime/Public",
                "HoudiniEngineEditor/Public"
            }
        );

        PrivateIncludePaths.AddRange(
            new string[] {
                "HoudiniEngineEditor/Private",
                "HoudiniEngineRuntime/Private"
            }
        );

        PrivateIncludePathModuleNames.AddRange(
            new string[] {
                "PlacementMode"
            }
        );

        // Add common dependencies.
        PublicDependencyModuleNames.AddRange(
            new string[]
            {
                "Core",
                "CoreUObject",
                "HoudiniEngineRuntime",
                "Slate",
                "SlateCore",
                "Landscape"
            }
        );

        PrivateDependencyModuleNames.AddRange(
            new string[]
            {
                "AppFramework",
                "AssetTools",
                "ContentBrowser",
                "DesktopWidgets",
                "EditorStyle",
                "EditorWidgets",
                "Engine",
                "InputCore",
                "LevelEditor",
                "MainFrame",
                "Projects",
                "PropertyEditor",
                "RHI",
                "RawMesh",
                "RenderCore",
                "ShaderCore",
                "TargetPlatform",
                "UnrealEd",
                "ApplicationCore",
            }
        );

        DynamicallyLoadedModuleNames.AddRange(
            new string[]
            {
                "PlacementMode",
            }
Exemplo n.º 54
0
        public bool LoadPCL(ReadOnlyTargetRules Target)
        {
            bool isLibrarySupported = false;

            //bool bDebug = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT);

            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                isLibrarySupported = true;

                //string PlatformString = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64" : "x86";

                // Explicitly name the used libraries

                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_atomic-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_chrono-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_container-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_contract-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_coroutine-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_date_time-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_exception-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_fiber-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_filesystem-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_graph-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_iostreams-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_locale-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_log_setup-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_log-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_math_c99f-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_math_c99l-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_math_c99-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_math_tr1f-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_math_tr1l-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_math_tr1-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_system-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_thread-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_timer-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_prg_exec_monitor-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_random-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_program_options-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_regex-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_serialization-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_stacktrace_noop-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_stacktrace_windbg-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_stacktrace_windbg_cached-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_system-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_test_exec_monitor-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_type_erasure-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_wave-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_wserialization-vc142-mt-x64-1_71.lib"));
                PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "Boost/lib/libboost_unit_test_framework-vc142-mt-x64-1_71.lib"));


                //PublicAdditionalLibraries.Add(Path.Combine(ModulePath, "PCL_181/lib/pcl_visualization_release.lib"));
            }

            if (isLibrarySupported)
            {
                PublicIncludePaths.Add(Path.Combine(ModulePath, "Boost/include/boost-1_71"));


                //PublicIncludePaths.Add(Path.Combine(ModulePath, "FLANN/include"));
                //PublicIncludePaths.Add(Path.Combine(ModulePath, "VTK/include/vtk-8.0"));

                // Not sure if needed
                Definitions.Add("_CRT_SECURE_NO_WARNINGS=1");
                Definitions.Add("BOOST_DISABLE_ABI_HEADERS=1");

                // Needed configurations in order to run Boost
                bUseRTTI          = true;
                bEnableExceptions = true;
                //bEnableUndefinedIdentifierWarnings = false;
            }


            Definitions.Add(string.Format("WITH_BOOST_BINDING={0}", isLibrarySupported ? 1 : 0));

            return(isLibrarySupported);
        }
Exemplo n.º 55
0
    public UnrealEnginePython(TargetInfo Target)
#endif
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
        string enableUnityBuild = System.Environment.GetEnvironmentVariable("UEP_ENABLE_UNITY_BUILD");

        bFasterWithoutUnity = string.IsNullOrEmpty(enableUnityBuild);

        PublicIncludePaths.AddRange(
            new string[] {
            "UnrealEnginePython/Public",
            // ... add public include paths required here ...
        }
            );


        PrivateIncludePaths.AddRange(
            new string[] {
            "UnrealEnginePython/Private",
            // ... add other private include paths required here ...
        }
            );


        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "Sockets",
            "Networking"
            // ... add other public dependencies that you statically link with here ...
        }
            );


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "CoreUObject",
            "Engine",
            "InputCore",
            "Slate",
            "SlateCore",
            "MovieScene",
            "LevelSequence",
            "HTTP",
            "UMG",
            "AppFramework",
            "RHI",
            "Voice",
            "RenderCore",
            "MovieSceneCapture",
            "Landscape",
            "Foliage",
            // ... add private dependencies that you statically link with here ...
        }
            );


#if WITH_FORWARDED_MODULE_RULES_CTOR
        BuildVersion Version;
        if (BuildVersion.TryRead(BuildVersion.GetDefaultFileName(), out Version))
        {
            if (Version.MinorVersion >= 18)
            {
                PrivateDependencyModuleNames.Add("ApplicationCore");
            }
        }
#endif


        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
            // ... add any modules that your module loads dynamically here ...
        }
            );

#if WITH_FORWARDED_MODULE_RULES_CTOR
        if (Target.bBuildEditor)
#else
        if (UEBuildConfiguration.bBuildEditor)
#endif
        {
            PrivateDependencyModuleNames.AddRange(new string[] {
                "UnrealEd",
                "LevelEditor",
                "BlueprintGraph",
                "Projects",
                "Sequencer",
                "SequencerWidgets",
                "AssetTools",
                "LevelSequenceEditor",
                "MovieSceneTools",
                "MovieSceneTracks",
                "CinematicCamera",
                "EditorStyle",
                "GraphEditor",
                "UMGEditor",
                "AIGraph",
                "RawMesh",
                "DesktopWidgets",
                "EditorWidgets",
                "FBX",
                "Persona",
                "PropertyEditor",
                "LandscapeEditor",
                "MaterialEditor"
            });
        }

        if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        {
            if (pythonHome == "")
            {
                pythonHome = DiscoverPythonPath(windowsKnownPaths);
                if (pythonHome == "")
                {
                    throw new System.Exception("Unable to find Python installation");
                }
            }
            System.Console.WriteLine("Using Python at: " + pythonHome);
            PublicIncludePaths.Add(pythonHome);
            string libPath = GetWindowsPythonLibFile(pythonHome);
            PublicLibraryPaths.Add(Path.GetDirectoryName(libPath));
            PublicAdditionalLibraries.Add(libPath);
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            if (pythonHome == "")
            {
                pythonHome = DiscoverPythonPath(macKnownPaths);
                if (pythonHome == "")
                {
                    throw new System.Exception("Unable to find Python installation");
                }
            }
            System.Console.WriteLine("Using Python at: " + pythonHome);
            PublicIncludePaths.Add(pythonHome);
            string libPath = GetMacPythonLibFile(pythonHome);
            PublicLibraryPaths.Add(Path.GetDirectoryName(libPath));
            PublicDelayLoadDLLs.Add(libPath);
            Definitions.Add(string.Format("UNREAL_ENGINE_PYTHON_ON_MAC"));
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            if (pythonHome == "")
            {
                string includesPath = DiscoverLinuxPythonIncludesPath();
                if (includesPath == null)
                {
                    throw new System.Exception("Unable to find Python includes, please add a search path to linuxKnownIncludesPaths");
                }
                string libsPath = DiscoverLinuxPythonLibsPath();
                if (libsPath == null)
                {
                    throw new System.Exception("Unable to find Python libs, please add a search path to linuxKnownLibsPaths");
                }
                PublicIncludePaths.Add(includesPath);
                PublicAdditionalLibraries.Add(libsPath);
            }
            else
            {
                string[] items = pythonHome.Split(';');
                PublicIncludePaths.Add(items[0]);
                PublicAdditionalLibraries.Add(items[1]);
            }
            Definitions.Add(string.Format("UNREAL_ENGINE_PYTHON_ON_LINUX"));
        }
    }
Exemplo n.º 56
0
    public Core(TargetInfo Target)
    {
        SharedPCHHeaderFile = "Runtime/Core/Public/Core.h";

        PublicIncludePaths.AddRange(
            new string[] {
            "Runtime/Core/Public",
            "Runtime/Core/Public/Internationalization",
            "Runtime/Core/Public/Async",
            "Runtime/Core/Public/Concurrency",
            "Runtime/Core/Public/Containers",
            "Runtime/Core/Public/Delegates",
            "Runtime/Core/Public/GenericPlatform",
            "Runtime/Core/Public/HAL",
            "Runtime/Core/Public/Logging",
            "Runtime/Core/Public/Math",
            "Runtime/Core/Public/Misc",
            "Runtime/Core/Public/Modules",
            "Runtime/Core/Public/Modules/Boilerplate",
            "Runtime/Core/Public/ProfilingDebugging",
            "Runtime/Core/Public/Serialization",
            "Runtime/Core/Public/Serialization/Json",
            "Runtime/Core/Public/Serialization/Csv",
            "Runtime/Core/Public/Stats",
            "Runtime/Core/Public/Templates",
            "Runtime/Core/Public/UObject",
        }
            );

        PrivateIncludePaths.AddRange(
            new string[] {
            "Developer/DerivedDataCache/Public",
            "Developer/SynthBenchmark/Public",
            "Runtime/Core/Private",
            "Runtime/Core/Private/Misc",
            "Runtime/Core/Private/Serialization/Json",
            "Runtime/Core/Private/Internationalization",
            "Runtime/Core/Private/Internationalization/Cultures",
            "Runtime/Analytics/Public",
        }
            );

        PrivateIncludePathModuleNames.AddRange(
            new string[] {
            "TargetPlatform",
            "DerivedDataCache",
            "InputDevice",
            "Analytics"
        }
            );

        if (UEBuildConfiguration.bBuildEditor == true)
        {
            DynamicallyLoadedModuleNames.Add("SourceCodeAccess");
        }

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32))
        {
            PublicIncludePaths.Add("Runtime/Core/Public/Windows");
            AddThirdPartyPrivateStaticDependencies(Target,
                                                   "zlib");

            AddThirdPartyPrivateStaticDependencies(Target,
                                                   "IntelTBB",
                                                   "XInput"
                                                   );
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicIncludePaths.AddRange(new string[] { "Runtime/Core/Public/Apple", "Runtime/Core/Public/Mac" });
            AddThirdPartyPrivateStaticDependencies(Target,
                                                   "IntelTBB",
                                                   "zlib",
                                                   "OpenGL"
                                                   );
            PublicFrameworks.AddRange(new string[] { "Cocoa", "Carbon", "IOKit" });

            if (UEBuildConfiguration.bBuildEditor == true)
            {
                PublicAdditionalLibraries.Add("/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/Current/MultitouchSupport");
            }
            PublicAdditionalLibraries.Add("/System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/Current/CoreSymbolication");
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            PublicIncludePaths.AddRange(new string[] { "Runtime/Core/Public/Apple", "Runtime/Core/Public/IOS" });
            AddThirdPartyPrivateStaticDependencies(Target,
                                                   "zlib"
                                                   );
            PublicFrameworks.AddRange(new string[] { "UIKit", "Foundation", "AudioToolbox", "AVFoundation", "GameKit", "StoreKit", "CoreVideo", "CoreMedia", "CoreMotion" });

            bool bSupportAdvertising = true;

            if (bSupportAdvertising)
            {
                PublicFrameworks.AddRange(new string[] { "iAD", "CoreGraphics" });
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            PublicIncludePaths.Add("Runtime/Core/Public/Android");
            AddThirdPartyPrivateStaticDependencies(Target,
                                                   "zlib"
                                                   );
        }
        else if ((Target.Platform == UnrealTargetPlatform.Linux))
        {
            PublicIncludePaths.Add("Runtime/Core/Public/Linux");
            AddThirdPartyPrivateStaticDependencies(Target,
                                                   "zlib",
                                                   "jemalloc",
                                                   "elftoolchain",
                                                   "SDL2"
                                                   );

            // We need FreeType2 and GL for the Splash, but only in the Editor
            if (Target.Type == TargetRules.TargetType.Editor)
            {
                AddThirdPartyPrivateStaticDependencies(Target, "FreeType2");
                AddThirdPartyPrivateStaticDependencies(Target, "OpenGL");
            }

            /* [RCL] 2014-09-18: disabling SteamController temporarily until redist/deployment problems are cleared
             * // add steam controller dependency for game and client only
             * if (UEBuildConfiguration.bCompileAgainstEngine == true &&
             * (Target.Type == TargetRules.TargetType.Game || Target.Type == TargetRules.TargetType.Client) &&
             * UEBuildConfiguration.bCompileSteamOSS)
             * {
             * AddThirdPartyPrivateStaticDependencies(Target, "SteamController");
             * }
             */
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32")
        {
            PublicIncludePaths.Add("Runtime/Core/Public/HTML5");
            AddThirdPartyPrivateStaticDependencies(Target, "SDL");
            AddThirdPartyPrivateStaticDependencies(Target, "OpenAL");
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture != "-win32")
        {
            PrivateDependencyModuleNames.Add("HTML5JS");
        }


        if ((UEBuildConfiguration.bIncludeADO == true) || (UEBuildConfiguration.bCompileAgainstEngine == true))
        {
            AddThirdPartyPrivateStaticDependencies(Target, "ADO");
        }

        if (UEBuildConfiguration.bCompileICU == true)
        {
            AddThirdPartyPrivateStaticDependencies(Target, "ICU");
        }
        Definitions.Add("UE_ENABLE_ICU=" + (UEBuildConfiguration.bCompileICU ? "1" : "0")); // Enable/disable (=1/=0) ICU usage in the codebase. NOTE: This flag is for use while integrating ICU and will be removed afterward.

        Definitions.Add("WITH_STEAMWORKS=" + (UEBuildConfiguration.bCompileSteamOSS ? "1" : "0"));

        // If we're compiling with the engine, then add Core's engine dependencies
        if (UEBuildConfiguration.bCompileAgainstEngine == true)
        {
            if (!UEBuildConfiguration.bBuildRequiresCookedData)
            {
                DynamicallyLoadedModuleNames.AddRange(new string[] { "DerivedDataCache" });
            }
        }


        // On Windows platform, VSPerfExternalProfiler.cpp needs access to "VSPerf.h".  This header is included with Visual Studio, but it's not in a standard include path.
        if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64)
        {
            var VisualStudioVersionNumber = "11.0";
            var SubFolderName             = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64/PerfSDK" : "PerfSDK";

            string PerfIncludeDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), String.Format("Microsoft Visual Studio {0}/Team Tools/Performance Tools/{1}", VisualStudioVersionNumber, SubFolderName));

            if (File.Exists(Path.Combine(PerfIncludeDirectory, "VSPerf.h")))
            {
                PrivateIncludePaths.Add(PerfIncludeDirectory);
                Definitions.Add("WITH_VS_PERF_PROFILER=1");
            }
        }


        if ((Target.Platform == UnrealTargetPlatform.XboxOne) ||
            (Target.Platform == UnrealTargetPlatform.WinRT) ||
            (Target.Platform == UnrealTargetPlatform.WinRT_ARM))
        {
            Definitions.Add("WITH_DIRECTXMATH=1");
        }
        else if ((Target.Platform == UnrealTargetPlatform.Win64) ||
                 (Target.Platform == UnrealTargetPlatform.Win32))
        {
            // To enable this requires Win8 SDK
            Definitions.Add("WITH_DIRECTXMATH=0");  // Enable to test on Win64/32.

            //PublicDependencyModuleNames.AddRange(  // Enable to test on Win64/32.
            //    new string[] {
            //    "DirectXMath"
            //});
        }
        else
        {
            Definitions.Add("WITH_DIRECTXMATH=0");
        }
    }
Exemplo n.º 57
0
        private Mining()
        {
            OreAndStone = new HarvestDefinition
            {
                BankWidth                 = 8,
                BankHeight                = 8,
                MinTotal                  = 10,
                MaxTotal                  = 34,
                MinRespawn                = TimeSpan.FromMinutes(10.0),
                MaxRespawn                = TimeSpan.FromMinutes(20.0),
                Skill                     = SkillName.Mining,
                Tiles                     = m_MountainAndCaveTiles,
                MaxRange                  = 2,
                ConsumedPerHarvest        = 1,
                ConsumedPerFeluccaHarvest = 2,
                EffectActions             = new[] { 11 },
                EffectSounds              = new[] { 0x125, 0x126 },
                EffectCounts              = new[] { 1 },
                EffectDelay               = TimeSpan.FromSeconds(1.6),
                EffectSoundDelay          = TimeSpan.FromSeconds(0.9),
                NoResourcesMessage        = 503040,  // There is no metal here to mine.
                DoubleHarvestMessage      = 503042,  // Someone has gotten to the metal before you.
                TimedOutOfRangeMessage    = 503041,  // You have moved too far away to continue mining.
                OutOfRangeMessage         = 500446,  // That is too far away.
                FailMessage               = 503043,  // You loosen some rocks but fail to find any useable ore.
                PackFullMessage           = 1010481, // Your backpack is full, so the ore you mined is lost.
                ToolBrokeMessage          = 1044038  // You have worn out your tool!
            };

            HarvestResource[] res =
            {
                new HarvestResource(00.0,      00.0, 100.0, 1007072, typeof(IronOre), typeof(Granite)),
                new HarvestResource(
                    65.0,
                    25.0,
                    105.0,
                    1007073,
                    typeof(DullCopperOre),
                    typeof(DullCopperGranite),
                    typeof(DullCopperElemental)
                    ),
                new HarvestResource(
                    70.0,
                    30.0,
                    110.0,
                    1007074,
                    typeof(ShadowIronOre),
                    typeof(ShadowIronGranite),
                    typeof(ShadowIronElemental)
                    ),
                new HarvestResource(
                    75.0,
                    35.0,
                    115.0,
                    1007075,
                    typeof(CopperOre),
                    typeof(CopperGranite),
                    typeof(CopperElemental)
                    ),
                new HarvestResource(
                    80.0,
                    40.0,
                    120.0,
                    1007076,
                    typeof(BronzeOre),
                    typeof(BronzeGranite),
                    typeof(BronzeElemental)
                    ),
                new HarvestResource(
                    85.0,
                    45.0,
                    125.0,
                    1007077,
                    typeof(GoldOre),
                    typeof(GoldGranite),
                    typeof(GoldenElemental)
                    ),
                new HarvestResource(
                    90.0,
                    50.0,
                    130.0,
                    1007078,
                    typeof(AgapiteOre),
                    typeof(AgapiteGranite),
                    typeof(AgapiteElemental)
                    ),
                new HarvestResource(
                    95.0,
                    55.0,
                    135.0,
                    1007079,
                    typeof(VeriteOre),
                    typeof(VeriteGranite),
                    typeof(VeriteElemental)
                    ),
                new HarvestResource(
                    99.0,
                    59.0,
                    139.0,
                    1007080,
                    typeof(ValoriteOre),
                    typeof(ValoriteGranite),
                    typeof(ValoriteElemental)
                    )
            };

            HarvestVein[] veins =
            {
                new HarvestVein(496, 0.0, res[0], null),   // Iron
                new HarvestVein(112, 0.5, res[1], res[0]), // Dull Copper
                new HarvestVein(098, 0.5, res[2], res[0]), // Shadow Iron
                new HarvestVein(084, 0.5, res[3], res[0]), // Copper
                new HarvestVein(070, 0.5, res[4], res[0]), // Bronze
                new HarvestVein(056, 0.5, res[5], res[0]), // Gold
                new HarvestVein(042, 0.5, res[6], res[0]), // Agapite
                new HarvestVein(028, 0.5, res[7], res[0]), // Verite
                new HarvestVein(014, 0.5, res[8], res[0])  // Valorite
            };

            OreAndStone.Resources = res;
            OreAndStone.Veins     = veins;

            if (Core.ML)
            {
                OreAndStone.BonusResources = new[]
                {
                    new BonusHarvestResource(0, 99.4, null, null), // Nothing
                    new BonusHarvestResource(100, .1, 1072562, typeof(BlueDiamond)),
                    new BonusHarvestResource(100, .1, 1072567, typeof(DarkSapphire)),
                    new BonusHarvestResource(100, .1, 1072570, typeof(EcruCitrine)),
                    new BonusHarvestResource(100, .1, 1072564, typeof(FireRuby)),
                    new BonusHarvestResource(100, .1, 1072566, typeof(PerfectEmerald)),
                    new BonusHarvestResource(100, .1, 1072568, typeof(Turquoise))
                }
            }
            ;

            OreAndStone.RaceBonus      = Core.ML;
            OreAndStone.RandomizeVeins = Core.ML;

            Definitions.Add(OreAndStone);

            Sand = new HarvestDefinition
            {
                BankWidth                 = 8,
                BankHeight                = 8,
                MinTotal                  = 6,
                MaxTotal                  = 12,
                MinRespawn                = TimeSpan.FromMinutes(10.0),
                MaxRespawn                = TimeSpan.FromMinutes(20.0),
                Skill                     = SkillName.Mining,
                Tiles                     = m_SandTiles,
                MaxRange                  = 2,
                ConsumedPerHarvest        = 1,
                ConsumedPerFeluccaHarvest = 1,
                EffectActions             = new[] { 11 },
                EffectSounds              = new[] { 0x125, 0x126 },
                EffectCounts              = new[] { 6 },
                EffectDelay               = TimeSpan.FromSeconds(1.6),
                EffectSoundDelay          = TimeSpan.FromSeconds(0.9),
                NoResourcesMessage        = 1044629, // There is no sand here to mine.
                DoubleHarvestMessage      = 1044629, // There is no sand here to mine.
                TimedOutOfRangeMessage    = 503041,  // You have moved too far away to continue mining.
                OutOfRangeMessage         = 500446,  // That is too far away.
                FailMessage               = 1044630, // You dig for a while but fail to find any of sufficient quality for glassblowing.
                PackFullMessage           = 1044632, // Your backpack can't hold the sand, and it is lost!
                ToolBrokeMessage          = 1044038  // You have worn out your tool!
            };

            res = new[]
            {
                new HarvestResource(100.0, 70.0, 400.0, 1044631, typeof(Sand))
            };

            veins = new[]
            {
                new HarvestVein(1000, 0.0, res[0], null)
            };

            Sand.Resources = res;
            Sand.Veins     = veins;

            Definitions.Add(Sand);
        }
Exemplo n.º 58
0
        /// <summary>
        /// Converts an object to a <see cref="JsonValue"/>.
        /// </summary>
        /// <param name="serializer">The <see cref="JsonSerializer"/> instance to use for additional serialization of values.</param>
        /// <returns>The <see cref="JsonValue"/> representation of the object.</returns>
        public virtual JsonValue ToJson(JsonSerializer serializer)
        {
            if (BooleanSchemaDefinition != null)
            {
                return(BooleanSchemaDefinition);
            }

            serializer = serializer ?? _schemaSerializer;

            var json = new JsonObject();

            if (!string.IsNullOrWhiteSpace(Schema))
            {
                json["$schema"] = Schema;
            }
            if (Id != null)
            {
                json["$id"] = Id;
            }
            if (Comment != null)
            {
                json["$comment"] = Comment;
            }
            if (Title != null)
            {
                json["title"] = Title;
            }
            if (!string.IsNullOrWhiteSpace(Description))
            {
                json["description"] = Description;
            }
            if (Definitions != null)
            {
                json["definitions"] = Definitions.ToJson(serializer);
            }
            if (ReadOnly.HasValue)
            {
                json["readOnly"] = ReadOnly;
            }
            if (Type != JsonSchemaType.NotDefined)
            {
                var array = Type.ToJson();
                if (array.Type == JsonValueType.Array)
                {
                    array.Array.EqualityStandard = ArrayEquality.ContentsEqual;
                }
                json["type"] = array;
            }
            if (Properties != null)
            {
                json["properties"] = Properties.ToJson(serializer);
            }
            if (Maximum.HasValue)
            {
                json["maximum"] = Maximum;
            }
            if (ExclusiveMaximum.HasValue)
            {
                json["exclusiveMaximum"] = ExclusiveMaximum;
            }
            if (Minimum.HasValue)
            {
                json["minimum"] = Minimum;
            }
            if (ExclusiveMinimum.HasValue)
            {
                json["exclusiveMinimum"] = ExclusiveMinimum;
            }
            if (MultipleOf.HasValue)
            {
                json["multipleOf"] = MultipleOf;
            }
            if (MaxLength.HasValue)
            {
                json["maxLength"] = MaxLength;
            }
            if (MinLength.HasValue)
            {
                json["minLength"] = MinLength;
            }
            if (Pattern != null)
            {
                json["pattern"] = Pattern;
            }
            if (AdditionalItems != null)
            {
                json["additionalItems"] = AdditionalItems.ToJson(serializer);
            }
            if (Items != null)
            {
                json["items"] = Items.ToJson(serializer);
            }
            if (MaxItems.HasValue)
            {
                json["maxItems"] = MinItems;
            }
            if (MinItems.HasValue)
            {
                json["minItems"] = MinItems;
            }
            if (UniqueItems ?? false)
            {
                json["uniqueItems"] = UniqueItems;
            }
            if (Contains != null)
            {
                json["contains"] = Contains.ToJson(serializer);
            }
            if (MaxProperties.HasValue)
            {
                json["maxProperties"] = MaxProperties;
            }
            if (MinProperties.HasValue)
            {
                json["minProperties"] = MinProperties;
            }
            if (Required != null)
            {
                json["required"] = Required.ToJson();
            }
            if (AdditionalProperties != null)
            {
                json["additionalProperties"] = AdditionalProperties.ToJson(serializer);
            }
            if (PatternProperties != null && PatternProperties.Any())
            {
                json["patternProperties"] = PatternProperties.ToDictionary(kvp => kvp.Key.ToString(), kvp => kvp.Value).ToJson(serializer);
            }
            if (Dependencies != null && Dependencies.Any())
            {
                var jsonDependencies = new JsonObject();
                foreach (var dependency in Dependencies)
                {
                    jsonDependencies[dependency.PropertyName] = dependency.GetJsonData();
                }
                json["dependencies"] = jsonDependencies;
            }
            if (PropertyNames != null)
            {
                json["propertyNames"] = PropertyNames.ToJson(serializer);
            }
            if (Const != null)
            {
                json["const"] = Const;
            }
            if (Enum != null)
            {
                var array = Enum.ToJson(serializer);
                array.Array.EqualityStandard = ArrayEquality.ContentsEqual;
                json["enum"] = Enum.ToJson(serializer);
            }
            if (Format != null)
            {
                json["format"] = Format.Key;
            }
            if (ContentMediaType != null)
            {
                json["contentMediaType"] = ContentMediaType;
            }
            if (ContentEncoding != null)
            {
                json["contentEncoding"] = serializer.Serialize(ContentEncoding);
            }
            if (If != null)
            {
                json["if"] = If.ToJson(serializer);
            }
            if (Then != null)
            {
                json["then"] = Then.ToJson(serializer);
            }
            if (Else != null)
            {
                json["else"] = Else.ToJson(serializer);
            }
            if (AllOf != null)
            {
                var array = AllOf.Select(s => s.ToJson(serializer)).ToJson();
                array.EqualityStandard = ArrayEquality.ContentsEqual;
                json["allOf"]          = array;
            }
            if (AnyOf != null)
            {
                var array = AnyOf.Select(s => s.ToJson(serializer)).ToJson();
                array.EqualityStandard = ArrayEquality.ContentsEqual;
                json["anyOf"]          = array;
            }
            if (OneOf != null)
            {
                var array = OneOf.Select(s => s.ToJson(serializer)).ToJson();
                array.EqualityStandard = ArrayEquality.ContentsEqual;
                json["oneOf"]          = array;
            }
            if (Not != null)
            {
                json["not"] = Not.ToJson(serializer);
            }
            if (Default != null)
            {
                json["default"] = Default;
            }
            if (Examples != null)
            {
                json["examples"] = Examples;
            }
            if (ExtraneousDetails != null)
            {
                foreach (var kvp in ExtraneousDetails.Where(kvp => !_definedProperties.Contains(kvp.Key)))
                {
                    json[kvp.Key] = kvp.Value;
                }
            }
            return(json);
        }
    public HoudiniEngineEditor(TargetInfo Target)
    {
        bool   bIsRelease     = true;
        string HFSPath        = "";
        string HoudiniVersion = "15.0.413";

        // Check if we are compiling on unsupported platforms.
        if (Target.Platform != UnrealTargetPlatform.Win64 &&
            Target.Platform != UnrealTargetPlatform.Mac)
        {
            string Err = string.Format("Houdini Engine Runtime: Compiling on unsupported platform.");
            System.Console.WriteLine(Err);
            throw new BuildException(Err);
        }

        if (bIsRelease)
        {
            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                // We first check if Houdini Engine is installed.
                string HPath = "C:/Program Files/Side Effects Software/Houdini Engine " + HoudiniVersion;
                if (!Directory.Exists(HPath))
                {
                    // If Houdini Engine is not installed, we check for Houdini installation.
                    HPath = "C:/Program Files/Side Effects Software/Houdini " + HoudiniVersion;
                    if (!Directory.Exists(HPath))
                    {
                        if (!Directory.Exists(HFSPath))
                        {
                            string Err = string.Format("Houdini Engine : Please install Houdini or Houdini Engine {0}", HoudiniVersion);
                            System.Console.WriteLine(Err);
                        }
                    }
                    else
                    {
                        HFSPath = HPath;
                    }
                }
                else
                {
                    HFSPath = HPath;
                }
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                string HPath = "/Library/Frameworks/Houdini.framework/Versions/" + HoudiniVersion + "/Resources";
                if (!Directory.Exists(HPath))
                {
                    if (!Directory.Exists(HFSPath))
                    {
                        string Err = string.Format("Houdini Engine : Please install Houdini {0}", HoudiniVersion);
                        System.Console.WriteLine(Err);
                    }
                }
                else
                {
                    HFSPath = HPath;
                }
            }
        }

        string HAPIIncludePath = "";

        if (HFSPath != "")
        {
            HAPIIncludePath = HFSPath + "/toolkit/include/HAPI";

            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                Definitions.Add("HOUDINI_ENGINE_HFS_PATH_DEFINE=" + HFSPath);
            }
        }

        if (HAPIIncludePath != "")
        {
            PublicIncludePaths.Add(HAPIIncludePath);
        }

        PublicIncludePaths.AddRange(
            new string[] {
            "HoudiniEngineRuntime/Public/HAPI",
            "HoudiniEngineRuntime/Public",
            "HoudiniEngineEditor/Public"
        }
            );

        PrivateIncludePaths.AddRange(
            new string[] {
            "HoudiniEngineEditor/Private",
            "HoudiniEngineRuntime/Private"
        }
            );

        // Add common dependencies.
        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "CoreUObject",
            "Engine",
            "RenderCore",
            "ShaderCore",
            "InputCore",
            "RHI",
            "AssetTools",
            "UnrealEd",
            "Slate",
            "SlateCore",
            "Projects",
            "PropertyEditor",
            "ContentBrowser",
            "RawMesh",
            "TargetPlatform",
            "LevelEditor",
            "MainFrame",
            "EditorStyle",
            "EditorWidgets",
            "AppFramework",
            "DesktopWidgets",
            "HoudiniEngineRuntime"
        }
            );

        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            // ... add private dependencies that you statically link with here ...
        }
            );

        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
            // ... add any modules that your module loads dynamically here ...
        }
            );
    }
Exemplo n.º 60
0
 /// <summary>Retrieves allowed item definitions.</summary>
 /// <param name="parentItem">The parent item.</param>
 /// <param name="zoneName">The zone where children would be placed.</param>
 /// <param name="user">The user to restrict access for.</param>
 /// <returns>Item definitions allowed by zone, parent restrictions and security.</returns>
 public virtual IEnumerable <ItemDefinition> GetAllowedDefinitions(ContentItem parentItem, string zoneName, IPrincipal user)
 {
     return(Definitions.GetAllowedChildren(parentItem, zoneName)
            .WhereAuthorized(Security, user, parentItem));
 }