Use template

This commit is contained in:
Rune
2026-03-11 19:55:29 +01:00
parent 97e8446b96
commit 0d1ef97b9c
7 changed files with 13 additions and 127 deletions

View File

@@ -2,9 +2,9 @@ FileVersion = 1
Dependencies = {corlib = "*", "Clang-C.git" = "*", "Cpp2Beef.git" = {Git = "https://git.unicon-gmbh.de/BeefBindings/Cpp2Beef.git"}}
[Project]
Name = "<ProjectName>.Setup"
StartupObject = "<ProjectName>.Setup.Program"
DefaultNamespace = "<ProjectName>.Setup"
Name = "Glfw.Setup"
StartupObject = "Glfw.Setup.Program"
DefaultNamespace = "Glfw.Setup"
[Configs.Debug.Win32]
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]

View File

@@ -1,6 +1,6 @@
FileVersion = 1
Projects = {"<ProjectName>.Setup" = {Path = "."}, "Cpp2Beef.git" = {Git = "https://git.unicon-gmbh.de/BeefBindings/Cpp2Beef.git"}}
Projects = {"Glfw.Setup" = {Path = "."}, "Cpp2Beef.git" = {Git = "https://git.unicon-gmbh.de/BeefBindings/Cpp2Beef.git"}}
ExtraPlatforms = ["Linux32", "Linux64", "macOS"]
[Workspace]
StartupProject = "<ProjectName>.Setup"
StartupProject = "Glfw.Setup"

View File

@@ -6,9 +6,9 @@ using System.Diagnostics;
using Cpp2Beef;
using LibClang;
namespace <ProjectName>.Setup;
namespace Glfw.Setup;
class <ProjectName>Generator : Cpp2BeefGenerator, this(Span<char8*> args)
class GlfwGenerator : Cpp2BeefGenerator, this(Span<char8*> args)
{
protected override Span<char8*> Args => args;
protected override Flags Flags => .None;
@@ -19,7 +19,7 @@ class <ProjectName>Generator : Cpp2BeefGenerator, this(Span<char8*> args)
using System;
using System.Interop;
namespace <ProjectName>;
namespace Glfw;
""");
@@ -46,7 +46,7 @@ class Program
public static int Main(String[] args)
{
scope <ProjectName>Generator(char8*[?]("--language=c")).Generate(TODO, null);
scope GlfwGenerator(char8*[?]("--language=c")).Generate(TODO, null);
return 0;
}
}