mirror of
https://github.com/raylib-cs/raylib-cs
synced 2025-06-30 19:03:42 -04:00
Project tidying
- Project now uses AnyCPU. - Fixed assembly info and renamed Raylib-cs project to Generator. - Removed resources folder and dlls. - Improving current manual bindings.
This commit is contained in:
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||
</startup>
|
||||
</configuration>
|
@ -1,69 +0,0 @@
|
||||
using CppSharp;
|
||||
using CppSharp.AST;
|
||||
using CppSharp.Generators;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Raylibcs
|
||||
{
|
||||
/// <summary>
|
||||
/// Generates the bindings for raylib(WIP)
|
||||
/// ConsoleDriver.Run(new SampleLibrary());
|
||||
/// </summary>
|
||||
public class SampleLibrary : ILibrary
|
||||
{
|
||||
void ILibrary.Setup(Driver driver)
|
||||
{
|
||||
var options = driver.Options;
|
||||
options.GeneratorKind = GeneratorKind.CSharp;
|
||||
options.OutputDir = Path.Combine(Environment.CurrentDirectory, "Raylib-cs");
|
||||
options.Verbose = true;
|
||||
// options.UseHeaderDirectories = true;
|
||||
|
||||
var module = options.AddModule("raylib");
|
||||
module.IncludeDirs.Add("C:\\raylib\\raylib\\src");
|
||||
module.Headers.Add("raylib.h");
|
||||
// module.Headers.Add("rlgl.h");
|
||||
// module.Headers.Add("raymath.h");
|
||||
module.LibraryDirs.Add("C:\\raylib\\raylib\\projects\\VS2017\\x64\\Debug.DLL");
|
||||
module.Libraries.Add("raylib.lib");
|
||||
// module.OutputNamespace = "Raylib";
|
||||
// module.internalNamespace = "rl";
|
||||
}
|
||||
|
||||
void ILibrary.SetupPasses(Driver driver)
|
||||
{
|
||||
// driver.Context.TranslationUnitPasses.RenameDeclsUpperCase(RenameTargets.Any);
|
||||
// driver.AddTranslationUnitPass(new FunctionToInstanceMethodPass());
|
||||
// driver.AddTranslationUnitPass(new CheckOperatorsOverloadsPass());
|
||||
/*driver.Context.TranslationUnitPasses.RemovePrefix("FLAG_");
|
||||
driver.Context.TranslationUnitPasses.RemovePrefix("KEY_");
|
||||
driver.Context.TranslationUnitPasses.RemovePrefix("MOUSE_");
|
||||
driver.Context.TranslationUnitPasses.RemovePrefix("GAMEPAD_");
|
||||
driver.Context.TranslationUnitPasses.RemovePrefix("GAMEPAD_PS3_");
|
||||
driver.Context.TranslationUnitPasses.RemovePrefix("GAMEPAD_PS3_AXIS_");
|
||||
driver.Context.TranslationUnitPasses.RemovePrefix("GAMEPAD_XBOX_AXIS_");
|
||||
driver.Context.TranslationUnitPasses.RemovePrefix("GAMEPAD_ANDORID_");*/
|
||||
}
|
||||
|
||||
public void Preprocess(Driver driver, ASTContext ctx)
|
||||
{
|
||||
ctx.SetNameOfEnumWithMatchingItem("KEY_UNKOWN", "Key");
|
||||
ctx.GenerateEnumFromMacros("Flag", "FLAG_(.*)");
|
||||
ctx.GenerateEnumFromMacros("Key", "KEY_(.*)");
|
||||
ctx.GenerateEnumFromMacros("Mouse", "MOUSE_(.*)");
|
||||
ctx.GenerateEnumFromMacros("Gamepad", "GAMEPAD_(.*)");
|
||||
ctx.GenerateEnumFromMacros("GamepadPS3", "GAMEPAD_PS3_(.*)");
|
||||
ctx.GenerateEnumFromMacros("GamepadPS3Axis", "GAMEPAD_PS3_AXIS_(.*)");
|
||||
ctx.GenerateEnumFromMacros("GamepadXbox", "GAMEPAD_XBOX_(.*)");
|
||||
ctx.GenerateEnumFromMacros("GamepadXboxAxis", "GAMEPAD_XBOX_AXIS_(.*)");
|
||||
ctx.GenerateEnumFromMacros("GamepadAndroid", "GAMEPAD_ANDROID_(.*)");
|
||||
// TODO: MaxTouchPoints, MaxShaderLocations, MaxMateiralMaps
|
||||
}
|
||||
|
||||
public void Postprocess(Driver driver, ASTContext ctx)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
using System;
|
||||
using CppSharp;
|
||||
|
||||
namespace Raylibcs
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Raylib-cs binding generator");
|
||||
ConsoleDriver.Run(new SampleLibrary());
|
||||
Console.WriteLine("Press enter to exit");
|
||||
Console.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Raylibcs")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Raylibcs")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("3b25d9d6-17a6-4a32-b9d1-c637002bd554")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -1,126 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{3B25D9D6-17A6-4A32-B9D1-C637002BD554}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Raylibcs</RootNamespace>
|
||||
<AssemblyName>Raylibcs</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</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>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</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>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CppSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>packages\CppSharp.0.8.20\lib\CppSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CppSharp.AST, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>packages\CppSharp.0.8.20\lib\CppSharp.AST.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CppSharp.Generator, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>packages\CppSharp.0.8.20\lib\CppSharp.Generator.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CppSharp.Parser, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>packages\CppSharp.0.8.20\lib\CppSharp.Parser.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CppSharp.Parser.CLI, Version=0.0.0.0, Culture=neutral, processorArchitecture=AMD64">
|
||||
<HintPath>packages\CppSharp.0.8.20\lib\CppSharp.Parser.CLI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CppSharp.Parser.CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>packages\CppSharp.0.8.20\lib\CppSharp.Parser.CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CppSharp.Runtime, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>packages\CppSharp.0.8.20\lib\CppSharp.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Generator.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="packages\Baseclass.Contrib.Nuget.Output.2.4.3\build\Baseclass.Contrib.Nuget.Output.targets" Condition="Exists('packages\Baseclass.Contrib.Nuget.Output.2.4.3\build\Baseclass.Contrib.Nuget.Output.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('packages\Baseclass.Contrib.Nuget.Output.2.4.3\build\Baseclass.Contrib.Nuget.Output.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Baseclass.Contrib.Nuget.Output.2.4.3\build\Baseclass.Contrib.Nuget.Output.targets'))" />
|
||||
</Target>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@ -1,51 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27703.2035
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExampleApplication", "..\ExampleApplication\ExampleApplication.csproj", "{A2B3BBC8-3D48-46DD-B3CF-263F554E4474}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raylib-cs", "Raylib-cs.csproj", "{3B25D9D6-17A6-4A32-B9D1-C637002BD554}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A2B3BBC8-3D48-46DD-B3CF-263F554E4474}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A2B3BBC8-3D48-46DD-B3CF-263F554E4474}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A2B3BBC8-3D48-46DD-B3CF-263F554E4474}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A2B3BBC8-3D48-46DD-B3CF-263F554E4474}.Debug|x64.Build.0 = Debug|x64
|
||||
{A2B3BBC8-3D48-46DD-B3CF-263F554E4474}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{A2B3BBC8-3D48-46DD-B3CF-263F554E4474}.Debug|x86.Build.0 = Debug|x86
|
||||
{A2B3BBC8-3D48-46DD-B3CF-263F554E4474}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A2B3BBC8-3D48-46DD-B3CF-263F554E4474}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A2B3BBC8-3D48-46DD-B3CF-263F554E4474}.Release|x64.ActiveCfg = Release|x64
|
||||
{A2B3BBC8-3D48-46DD-B3CF-263F554E4474}.Release|x64.Build.0 = Release|x64
|
||||
{A2B3BBC8-3D48-46DD-B3CF-263F554E4474}.Release|x86.ActiveCfg = Release|x86
|
||||
{A2B3BBC8-3D48-46DD-B3CF-263F554E4474}.Release|x86.Build.0 = Release|x86
|
||||
{3B25D9D6-17A6-4A32-B9D1-C637002BD554}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3B25D9D6-17A6-4A32-B9D1-C637002BD554}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3B25D9D6-17A6-4A32-B9D1-C637002BD554}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{3B25D9D6-17A6-4A32-B9D1-C637002BD554}.Debug|x64.Build.0 = Debug|x64
|
||||
{3B25D9D6-17A6-4A32-B9D1-C637002BD554}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{3B25D9D6-17A6-4A32-B9D1-C637002BD554}.Debug|x86.Build.0 = Debug|x86
|
||||
{3B25D9D6-17A6-4A32-B9D1-C637002BD554}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3B25D9D6-17A6-4A32-B9D1-C637002BD554}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3B25D9D6-17A6-4A32-B9D1-C637002BD554}.Release|x64.ActiveCfg = Release|x64
|
||||
{3B25D9D6-17A6-4A32-B9D1-C637002BD554}.Release|x64.Build.0 = Release|x64
|
||||
{3B25D9D6-17A6-4A32-B9D1-C637002BD554}.Release|x86.ActiveCfg = Release|x86
|
||||
{3B25D9D6-17A6-4A32-B9D1-C637002BD554}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {78DCF9A2-1328-489A-8B03-F0BFB29EC58F}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Baseclass.Contrib.Nuget.Output" version="2.4.3" targetFramework="net461" />
|
||||
<package id="CppSharp" version="0.8.20" targetFramework="net461" developmentDependency="true" />
|
||||
</packages>
|
Reference in New Issue
Block a user