仿真平台内核初版 -tlib库 包含<sparc arm riscv powerPC>

This commit is contained in:
liuwb
2026-02-07 20:43:43 +08:00
parent de61f9e2b0
commit b3117648be
9748 changed files with 4309137 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
<Project>
<PropertyGroup>
<InMonoDevelopTree>true</InMonoDevelopTree>
<TargetFrameworks>net472</TargetFrameworks>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,97 @@
// Main.cs
//
// Author:
// Luís Reis <luiscubal@gmail.com>
// Vsevolod Kukol <sevoku@microsoft.com>
//
// Copyright (c) 2012 Luís Reis
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using Samples;
using Xwt;
namespace WpfTest
{
class MainClass
{
[STAThread]
public static void Main(string[] args)
{
/*
WORKAROUND for Xwt.WebView on Windows using WPF:
The WPF WebView Backend is based on System.Windows.Controls.WebView
which runs in IE7 emulation mode by default. This behaviour can only be
changed by modifying the Windows registry, which is not part of the Xwt
API. See https://msdn.microsoft.com/de-de/library/ee330730.aspx#browser_emulation
for more information.
Uncomment the next line to set different IE Emulation modes
*/
//WebViewEmulationMode = IEEmulationMode.IE11;
App.Run (ToolkitType.Wpf);
}
/// <summary>
/// Gets or sets the System.Windows.Controls.WebView Emulation mode
/// </summary>
/// <remarks>This is a simple example on how to change the WebView emulation mode</remarks>
public static IEEmulationMode WebViewEmulationMode
{
get
{
var regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION", true);
if (regKey == null)
return IEEmulationMode.Default;
string myProgramName = System.IO.Path.GetFileName(System.Reflection.Assembly.GetEntryAssembly().Location);
var currentValue = regKey.GetValue(myProgramName);
return currentValue != null ? (IEEmulationMode)currentValue : IEEmulationMode.Default;
}
set
{
var regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION", true);
if (regKey == null)
regKey = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(@"Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BEHAVIORS", Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree);
string executableName = System.IO.Path.GetFileName(System.Reflection.Assembly.GetEntryAssembly().Location);
var currentValue = regKey.GetValue(executableName);
if (currentValue == null || (int)currentValue != (int)value)
regKey.SetValue(executableName, (int)value, Microsoft.Win32.RegistryValueKind.DWord);
}
}
/// <summary>Internet Explorer Emulation Modes</summary>
/// <remarks>https://msdn.microsoft.com/de-de/library/ee330730.aspx#browser_emulation</remarks>
public enum IEEmulationMode
{
IE7 = 0x00001b58,
IE8 = 0x00001f40,
IE8Force = 0x000022b8,
IE9 = 0x00002328,
IE9Force = 0x0000270f,
IE10 = 0x00002710,
IE10Force = 0x00002711,
IE11 = 0x00002af8,
IE11Force = 0x00002af9,
Default = IE7,
}
}
}

View File

@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{E41F4448-15C3-4E95-B310-FD333FDF5D2F}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WpfTest</RootNamespace>
<AssemblyName>WpfTest</AssemblyName>
<FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>True</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
<WarningLevel>4</WarningLevel>
<Optimize>False</Optimize>
<LangVersion>6</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>True</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules>
<WarningLevel>4</WarningLevel>
<DebugSymbols>true</DebugSymbols>
<LangVersion>6</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>True</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
<WarningLevel>4</WarningLevel>
<Optimize>False</Optimize>
<LangVersion>6</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>True</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules>
<WarningLevel>4</WarningLevel>
<DebugSymbols>true</DebugSymbols>
<LangVersion>6</LangVersion>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Xwt.WPF\Xwt.WPF.csproj">
<Project>{C93D746E-1586-4D4F-B411-BF5A966E6A08}</Project>
<Name>Xwt.WPF</Name>
</ProjectReference>
<ProjectReference Include="..\..\Xwt\Xwt.csproj">
<Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
<Name>Xwt</Name>
</ProjectReference>
<ProjectReference Include="..\Samples\Samples.csproj">
<Project>{88C04B85-B69B-47B4-AB9F-64F6DD4E0897}</Project>
<Name>Samples</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>