migrate to new Cpp2Beef
This commit is contained in:
@@ -1,11 +1,71 @@
|
||||
FileVersion = 1
|
||||
Dependencies = {corlib = "*", corlib = "*"}
|
||||
|
||||
[Project]
|
||||
Name = "Expat"
|
||||
TargetType = "BeefLib"
|
||||
StartupObject = "Expat.Program"
|
||||
|
||||
[Dependencies]
|
||||
corlib = "*"
|
||||
corlib = "*"
|
||||
"CxxBuildTool.git" = {Git = "https://git.unicon-gmbh.de/Rune/CxxBuildTool.git"}
|
||||
|
||||
[Configs.Debug.Win64]
|
||||
LibPaths = ["$(BuildDir)/libexpat.lib"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"src=$(ProjectDir)/libexpat/expat/lib\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) \\\"cflags=-I$(ProjectDir)/expat_config\\\" config=$(Configuration) output=libexpat\")"]
|
||||
|
||||
[Configs.Debug.Win32]
|
||||
LibPaths = ["$(BuildDir)/libexpat.lib"]
|
||||
|
||||
[Configs.Debug.Linux32]
|
||||
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||
|
||||
[Configs.Debug.Linux64]
|
||||
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||
|
||||
[Configs.Debug.macOS]
|
||||
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||
|
||||
[Configs.Release.Win32]
|
||||
LibPaths = ["$(BuildDir)/libexpat.lib"]
|
||||
|
||||
[Configs.Release.Win64]
|
||||
LibPaths = ["$(BuildDir)/libexpat.lib"]
|
||||
|
||||
[Configs.Release.Linux32]
|
||||
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||
|
||||
[Configs.Release.Linux64]
|
||||
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||
|
||||
[Configs.Release.macOS]
|
||||
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||
|
||||
[Configs.Paranoid.Win32]
|
||||
LibPaths = ["$(BuildDir)/libexpat.lib"]
|
||||
|
||||
[Configs.Paranoid.Win64]
|
||||
LibPaths = ["$(BuildDir)/libexpat.lib"]
|
||||
|
||||
[Configs.Paranoid.Linux32]
|
||||
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||
|
||||
[Configs.Paranoid.Linux64]
|
||||
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||
|
||||
[Configs.Paranoid.macOS]
|
||||
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||
|
||||
[Configs.Test.Win32]
|
||||
LibPaths = ["$(BuildDir)/libexpat.lib"]
|
||||
|
||||
[Configs.Test.Win64]
|
||||
LibPaths = ["$(BuildDir)/libexpat.lib"]
|
||||
|
||||
[Configs.Test.Linux32]
|
||||
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||
|
||||
[Configs.Test.Linux64]
|
||||
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||
|
||||
[Configs.Test.macOS]
|
||||
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
FileVersion = 1
|
||||
Projects = {Expat = {Path = "."}}
|
||||
ExtraPlatforms = ["Linux32", "Linux64", "macOS"]
|
||||
|
||||
[Workspace]
|
||||
StartupProject = "Expat"
|
||||
|
||||
[Projects]
|
||||
Expat = {Path = "."}
|
||||
"CxxBuildTool.git" = {Git = "https://git.unicon-gmbh.de/Rune/CxxBuildTool.git"}
|
||||
|
||||
6
BeefSpace_Lock.toml
Normal file
6
BeefSpace_Lock.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
FileVersion = 1
|
||||
|
||||
[Locks."CxxBuildTool.git".Git]
|
||||
URL = "https://git.unicon-gmbh.de/Rune/CxxBuildTool.git"
|
||||
Tag = ""
|
||||
Hash = "b64a6221b8cb235a5e040c8597365dabeef849ca"
|
||||
@@ -1,66 +1,9 @@
|
||||
FileVersion = 1
|
||||
Dependencies = {corlib = "*", "Cpp2Beef.git" = {Git = "https://git.unicon-gmbh.de/BeefBindings/Cpp2Beef.git"}}
|
||||
|
||||
[Project]
|
||||
Name = "Expat.Setup"
|
||||
StartupObject = "Expat.Setup.Program"
|
||||
|
||||
[Configs.Debug.Win32]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Debug.Win64]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Debug.Linux32]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Debug.Linux64]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Debug.macOS]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Release.Win32]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Release.Win64]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Release.Linux32]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Release.Linux64]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Release.macOS]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Paranoid.Win32]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Paranoid.Win64]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Paranoid.Linux32]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Paranoid.Linux64]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Paranoid.macOS]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Test.Win32]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Test.Win64]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Test.Linux32]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Test.Linux64]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Test.macOS]
|
||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
||||
[Dependencies]
|
||||
corlib = "*"
|
||||
"Cpp2Beef.git" = {Git = "https://git.unicon-gmbh.de/Rune/Cpp2Beef.git"}
|
||||
@@ -1,6 +1,9 @@
|
||||
FileVersion = 1
|
||||
Projects = {"Expat.Setup" = {Path = "."}, "Cpp2Beef.git" = {Git = "https://git.unicon-gmbh.de/BeefBindings/Cpp2Beef.git"}}
|
||||
ExtraPlatforms = ["Linux32", "Linux64", "macOS"]
|
||||
|
||||
[Workspace]
|
||||
StartupProject = "Expat.Setup"
|
||||
|
||||
[Projects]
|
||||
"Expat.Setup" = {Path = "."}
|
||||
"Cpp2Beef.git" = {Git = "https://git.unicon-gmbh.de/Rune/Cpp2Beef.git"}
|
||||
|
||||
@@ -6,6 +6,6 @@ Tag = ""
|
||||
Hash = "86db0167f15d08a63a91a19e46f983a5511bac1a"
|
||||
|
||||
[Locks."Cpp2Beef.git".Git]
|
||||
URL = "https://git.unicon-gmbh.de/BeefBindings/Cpp2Beef.git"
|
||||
URL = "https://git.unicon-gmbh.de/Rune/Cpp2Beef.git"
|
||||
Tag = ""
|
||||
Hash = "69ed2da6254b9d76d0dd48cf20eb6174dde903e2"
|
||||
Hash = "91ddcd4f79cf6df28adff5abfc59cbdc489c7deb"
|
||||
|
||||
@@ -21,20 +21,6 @@ class ExpatGenerator : Cpp2BeefGenerator, this(Span<char8*> args)
|
||||
|
||||
namespace Expat;
|
||||
|
||||
static class XML
|
||||
{
|
||||
public typealias Char = c_char;
|
||||
public typealias LChar = c_char;
|
||||
public typealias Index = c_long;
|
||||
public typealias Size = c_ulong;
|
||||
|
||||
public struct Bool : c_uchar
|
||||
{
|
||||
public static operator bool(Self b) => b != FALSE;
|
||||
public static operator Self(bool b) => b ? TRUE : FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
""") ~ delete _;
|
||||
|
||||
|
||||
30
src/Expat.bf
30
src/Expat.bf
@@ -5,20 +5,6 @@ using System.Interop;
|
||||
|
||||
namespace Expat;
|
||||
|
||||
static class XML
|
||||
{
|
||||
public typealias Char = c_char;
|
||||
public typealias LChar = c_char;
|
||||
public typealias Index = c_long;
|
||||
public typealias Size = c_ulong;
|
||||
|
||||
public struct Bool : c_uchar
|
||||
{
|
||||
public static operator bool(Self b) => b != FALSE;
|
||||
public static operator Self(bool b) => b ? TRUE : FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
extension XML
|
||||
{
|
||||
/*
|
||||
@@ -193,15 +179,15 @@ public const let FALSE = ((Bool)0);
|
||||
The EMPTY, ANY, and MIXED types will only occur at top level.
|
||||
*/
|
||||
|
||||
public typealias Content = cp;
|
||||
[CRepr] public struct cp; public typealias Content = cp;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[CRepr] public struct cp {
|
||||
public Content_Type type;
|
||||
public Content_Quant quant;
|
||||
public Char* name;
|
||||
public c_uint numchildren;
|
||||
public Content* children;
|
||||
}
|
||||
|
||||
/* This is called for an element declaration. See above for
|
||||
description of the model argument. It's the user code's responsibility
|
||||
|
||||
33
src/Library.bf
Normal file
33
src/Library.bf
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Interop;
|
||||
|
||||
using CxxBuildTool;
|
||||
|
||||
namespace Expat;
|
||||
|
||||
static class XML
|
||||
{
|
||||
public typealias Char = c_char;
|
||||
public typealias LChar = c_char;
|
||||
public typealias Index = c_long;
|
||||
public typealias Size = c_ulong;
|
||||
|
||||
public struct Bool : c_uchar
|
||||
{
|
||||
public static operator bool(Self b) => b != FALSE;
|
||||
public static operator Self(bool b) => b ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
[OnCompile(.TypeDone)]
|
||||
private static void Build()
|
||||
{
|
||||
if (!Compiler.IsBuilding) return;
|
||||
CxxBuildTool.Ninja(Compiler.ProjectDir + "/libexpat/expat/lib", Compiler.BuildDir + "/" + Compiler.ProjectName, "libexpat", "-I" + Compiler.ProjectDir + "/expat_config",
|
||||
"xmlparse.c",
|
||||
"xmlrole.c",
|
||||
"xmltok.c",
|
||||
"xmltok_impl.c",
|
||||
"xmltok_ns.c"
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user