private void OnGUI() { using (new EditorGUILayout.VerticalScope(GUI.skin.box)) { _archType = (ArchitectureType)EditorGUILayout.EnumPopup("Architecture Type", _archType); } using (new EditorGUILayout.VerticalScope(GUI.skin.box)) { _baseScriptPath = EditorGUILayout.TextField("Base script path", _baseScriptPath); _nameSpaceName = EditorGUILayout.TextField("Namespace name", _nameSpaceName); if (GUILayout.Button("Build Project")) { GenerateAssemblyDefinitions(); } } GUILayout.Space(10); using (new EditorGUILayout.VerticalScope(GUI.skin.box)) { EditorGUI.BeginDisabledGroup(_archType == ArchitectureType.Pattern2); _className = EditorGUILayout.TextField("Class Name", _className); if (GUILayout.Button("Generate Codes")) { GenerateCodes(); } EditorGUI.EndDisabledGroup(); } }
public TargetType( PlatformType platform, ArchitectureType architecture) { this.Platform = platform; this.Architecture = architecture; }
private void OnEnable() { _archType = (ArchitectureType)Enum.ToObject(typeof(ArchitectureType), EditorPrefs.GetInt("CAGEN_ARCHTYPE", 0)); _baseScriptPath = EditorPrefs.GetString("CAGEN_BASEPATH", "Assets/Scripts"); _nameSpaceName = EditorPrefs.GetString("CAGEN_NAMESPACE", "ProjectBlue.ProductName"); _className = EditorPrefs.GetString("CAGEN_CLASSNAME", "SampleClass"); }
protected BaseToolchain( Profile profile, ArchitectureType architectureType) { this.m_Profile = profile; this.ArchitectureType = architectureType; }
public GradleProjectGenerator(String SolutionName, Project Project, List <ProjectReference> ProjectReferences, PathString InputDirectory, PathString OutputDirectory, PathString SolutionOutputDirectory, String BuildGradleTemplateText, OperatingSystemType HostOperatingSystem, ArchitectureType HostArchitecture, OperatingSystemType TargetOperatingSystem, ArchitectureType?TargetArchitecture, ToolchainType Toolchain, CompilerType Compiler, CLibraryType CLibrary, CLibraryForm CLibraryForm, CppLibraryType CppLibrary, CppLibraryForm CppLibraryForm, ConfigurationType?ConfigurationType, PathString AndroidNdk) { this.SolutionName = SolutionName; this.ProjectName = Project.Name.Split(':').First(); this.Project = Project; this.ProjectReferences = ProjectReferences; this.InputDirectory = InputDirectory.FullPath; this.OutputDirectory = OutputDirectory.FullPath; this.SolutionOutputDirectory = SolutionOutputDirectory.FullPath; this.BuildGradleTemplateText = BuildGradleTemplateText; this.HostOperatingSystem = HostOperatingSystem; this.HostArchitecture = HostArchitecture; this.TargetOperatingSystem = TargetOperatingSystem; this.TargetArchitecture = TargetArchitecture; if (!TargetArchitecture.HasValue) { throw new NotSupportedException("ArchitectureTypeIsNull"); } this.Toolchain = Toolchain; this.Compiler = Compiler; this.CLibrary = CLibrary; this.CLibraryForm = CLibraryForm; this.CppLibrary = CppLibrary; this.CppLibraryForm = CppLibraryForm; this.ConfigurationType = ConfigurationType; this.AndroidNdk = AndroidNdk; }
protected BasePlatform( Profile profile, ArchitectureType architectureType) { this.ArchitectureType = architectureType; this.m_Profile = profile; }
protected BaseWindowsPlatform( Profile profile, ArchitectureType architectureType) : base( profile, architectureType) { }
public MockToolchain( Profile profile, ArchitectureType architectureType) : base( profile, architectureType) { }
public MockPlatform( Profile profile, ArchitectureType architectureType) : base( profile, architectureType) { }
public LinuxPlatformFactory( ArchitectureType architectureType, ToolchainType toolchainType) : base( PlatformType.Linux, architectureType, toolchainType) { }
public UniversalWindowsPlatformFactory( ArchitectureType architectureType, ToolchainType toolchainType) : base( PlatformType.UniversalWindows, architectureType, toolchainType) { }
protected BasePlatformFactory( PlatformType platformType, ArchitectureType architectureType, ToolchainType toolchainType) { this.PlatformType = platformType; this.ArchitectureType = architectureType; this.ToolchainType = toolchainType; }
public AndroidPlatformFactory( ArchitectureType architectureType, ToolchainType toolchainType) : base( PlatformType.Android, architectureType, toolchainType) { }
public AndroidPlatform( Profile profile, ArchitectureType architectureType) : base( profile, architectureType) { this.m_Settings = profile.GetSection <AndroidPlatformSettings>(); }
public SlnGenerator(String SolutionName, String SolutionId, List <ProjectReference> ProjectReferences, PathString OutputDirectory, String SlnTemplateText, OperatingSystemType TargetOperatingSystem, ArchitectureType TargetArchitecture) { this.SolutionName = SolutionName; this.SolutionId = SolutionId; this.ProjectReferences = ProjectReferences; this.OutputDirectory = OutputDirectory.FullPath; this.TargetOperatingSystem = TargetOperatingSystem; this.TargetArchitecture = TargetArchitecture; this.SlnTemplateText = SlnTemplateText; }
public static bool Is64Bit(this ArchitectureType self) { switch (self) { case ArchitectureType.X64: case ArchitectureType.ARM64: return(true); } throw new ArgumentOutOfRangeException(nameof(self)); }
public static String GetTargetTripletString(ArchitectureType Architecture) { if (Architecture == ArchitectureType.armv7a) { return("arm-linux-androideabi"); } else { return(GetNdkArchitectureString(Architecture) + "-linux-android"); } }
public MsvcToolchain( Profile profile, ArchitectureType architectureType) : base( profile, architectureType) { this.m_Settings = profile.GetSection <MsvcToolchainSettings>(); var vsInstances = VisualStudioToolchainProvider.Instances; var vsInstance = vsInstances.First(x => x.Toolkit == this.m_Settings.Toolkit); var architectureMnemonic = MapArchitectureType(this.ArchitectureType); var root = Path.Combine(vsInstance.Location, "VC", "Tools", "MSVC", vsInstance.Toolset); this.RootPath = Path.Combine(root, "bin", HostPathPrefix, architectureMnemonic); this.CompilerExecutable = Path.Combine(this.RootPath, "cl.exe"); this.CompilerExtraFiles = new[] { Path.Combine(this.RootPath, "1033", "clui.dll"), Path.Combine(this.RootPath, "1033", "mspft140ui.dll"), Path.Combine(this.RootPath, "atlprov.dll"), Path.Combine(this.RootPath, "c1.dll"), Path.Combine(this.RootPath, "c1xx.dll"), Path.Combine(this.RootPath, "c2.dll"), Path.Combine(this.RootPath, "msobj140.dll"), Path.Combine(this.RootPath, "mspdb140.dll"), Path.Combine(this.RootPath, "mspdbcore.dll"), Path.Combine(this.RootPath, "mspdbsrv.exe"), Path.Combine(this.RootPath, "mspft140.dll"), Path.Combine(this.RootPath, "msvcp140.dll"), Path.Combine(this.RootPath, "tbbmalloc.dll"), Path.Combine(this.RootPath, "vcruntime140.dll"), }; this.LinkerExecutable = Path.Combine(this.RootPath, "link.exe"); this.LibrarianExecutable = Path.Combine(this.RootPath, "lib.exe"); this.IncludePaths = new[] { Path.Combine(vsInstance.Location, "VC", "Tools", "MSVC", vsInstance.Toolset, "include"), Path.Combine(vsInstance.Location, "VC", "Tools", "MSVC", vsInstance.Toolset, "atlmfc", "include"), Path.Combine(vsInstance.Location, "VC", "Auxiliary", "VS", "include"), }; this.LibraryPaths = new[] { Path.Combine(vsInstance.Location, "VC", "Tools", "MSVC", vsInstance.Toolset, "lib", architectureMnemonic), }; }
/// <summary> /// Gets an assembler based on the system architecture. /// </summary> /// <param name="architectureType">The system architecture.</param> /// <returns>An object implementing IAssembler based on the system architecture.</returns> public static IAssembler GetAssembler(ArchitectureType architectureType) { switch (architectureType) { case ArchitectureType.x86_64: return(new Fasm32Assembler()); default: throw new Exception("Assembler not supported for specified architecture"); } }
public ConfigurationContext( PlatformType platform, ArchitectureType architecture, BuildType build, ConfigurationType configuration) { this.Platform = platform; this.Architecture = architecture; this.Build = build; this.Configuration = configuration; }
public UniversalWindowsPlatform( Profile profile, ArchitectureType architectureType) : base( profile, architectureType) { this.m_Settings = profile.GetSection <UniversalWindowsPlatformSettings>(); var version = this.m_Settings.WindowsSdkVersion; this.InitializeBasePaths(version); }
internal static string ToSerializedValue(this ArchitectureType value) { switch (value) { case ArchitectureType.Amd64: return("Amd64"); case ArchitectureType.Arm32v7: return("Arm32v7"); } return(null); }
public AbiMapping( ArchitectureType architecture, string toolchain, string platform, int bitness, string libDirectory) { this.Architecture = architecture; this.Toolchain = toolchain; this.Platform = platform; this.Bitness = bitness; this.LibDirectory = libDirectory; }
/// <summary> /// Get a human readable version of the requirement /// </summary> /// <returns></returns> public string GetDescription() { VersionType versionType = GetVersionType(); ServicePackType servicePackType = GetServicePackType(); ProductType productType = GetProductType(); ArchitectureType architectureType = GetArchitectureType(); IncludeType includeType = GetIncludeType(); string format = GetDescriptionFormat(versionType, servicePackType, productType, architectureType, includeType); string version = GetVersionString(); string servicePack = GetServicePackVersionString(); return(string.Format(format, NamedVersion, version, servicePack)); }
protected static string MapArchitectureType(ArchitectureType architectureType) { switch (architectureType) { case ArchitectureType.ARM64: return("arm64"); case ArchitectureType.X64: return("x64"); } throw new ArgumentOutOfRangeException(nameof(architectureType)); }
public TargetTuple( PlatformType platformType, ArchitectureType architectureType, ToolchainType toolchainType, ConfigurationType configurationType, ConfigurationFlavour configurationFlavour) { this.PlatformType = platformType; this.ArchitectureType = architectureType; this.ToolchainType = toolchainType; this.ConfigurationType = configurationType; this.ConfigurationFlavour = configurationFlavour; }
/// <summary> /// Gets an object for assembling and disassembling instructions on the current platform. /// </summary> /// <returns>Returns an object for assembling and disassembling instructions based on the system architecture.</returns> public static IArchitecture GetArchitecture() { // For now, x86/64 is all that is supported. If this changes, we will need to determine the architecture here ArchitectureType architectureType = ArchitectureType.x86_64; switch (architectureType) { case ArchitectureType.x86_64: return(new Architecture86_64()); default: throw new Exception("Unsupported Architecture Specified"); } }
// Use this for initialization public static IEnumerator Generate(System.Random rand) { ArchitectureFactory architectureFactory = new ArchitectureFactory(); Architecture.direction dir; foreach (Room room in Map.roomObjs) { if (room.roomType == roomType.common) { yield return(new WaitForSecondsRealtime(0.25f)); for (int i = 0; i < 3; i++) { ArchitectureType type = (ArchitectureType)rand.Next(0, 4); Architecture arch = architectureFactory.CreateArchitecture(type); arch.randomGen = rand; dir = arch.GetRandom(); arch.Create(room, dir); } //int createPool = Random.Range(0, 6);//20% //if (createPool == 0) //{ // Pools pool = ScriptableObject.CreateInstance("Pools") as Pools; // dir = pool.GetRandom(); // pool.Create(room, dir); //} int createCuts = rand.Next(0, 2);//50% if (createCuts == 0) { Cuts cuts = new Cuts(); cuts.randomGen = rand; dir = cuts.GetRandom(); cuts.Create(room, dir); } } } yield return(0); }
public LinuxPlatform( Profile profile, ArchitectureType architectureType) : base( profile, architectureType) { this.m_Settings = profile.GetSection <LinuxPlatformSettings>(); // Default include paths this.IncludePaths = new string[] { }; // Default library paths this.LibraryPaths = new string[] { }; }
public static bool Is64Bit(this ArchitectureType value) { switch (value) { case ArchitectureType.X64: case ArchitectureType.ARMv8: case ArchitectureType.PPC64: return(true); case ArchitectureType.X86: case ArchitectureType.ARMv7: return(false); } throw new Exception($@"Unknown ArchitectureType {value}"); }
public static String ProgramFolder(ArchitectureType type, String pattern) { String path = (type == ArchitectureType.x86) ? ProgramFilesx86 : ProgramFilesx64; return Directory.GetDirectories(path, pattern).FirstOrDefault(); }
/// <summary> /// Locates the appropriate format string for the requirement type /// </summary> /// <param name="versionType"></param> /// <param name="spType"></param> /// <param name="productType"></param> /// <param name="architectureType"></param> /// <param name="includeType"></param> /// <returns></returns> private string GetDescriptionFormat(VersionType versionType, ServicePackType spType, ProductType productType, ArchitectureType architectureType, IncludeType includeType) { return DescriptionFormats[(int)versionType, (int)spType, (int)productType, (int)architectureType, (int)includeType]; }