c part ready to go

This commit is contained in:
Rune
2026-02-22 15:25:43 +01:00
parent 397c0e320c
commit 806f27381a
17 changed files with 674 additions and 43 deletions

3
Setup/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
build
recovery
BeefSapce_user.toml

5
Setup/BeefProj.toml Normal file
View File

@@ -0,0 +1,5 @@
FileVersion = 1
[Project]
Name = "Cpp2Beef.Setup"
StartupObject = "Cpp2Beef.Setup.Program"

5
Setup/BeefSpace.toml Normal file
View File

@@ -0,0 +1,5 @@
FileVersion = 1
Projects = {"Cpp2Beef.Setup" = {Path = "."}}
[Workspace]
StartupProject = "Cpp2Beef.Setup"

27
Setup/src/Program.bf Normal file
View File

@@ -0,0 +1,27 @@
using System;
using System.IO;
namespace Cpp2Beef.Setup;
static class Program
{
[CLink] static extern int32 system(char8*);
static void RunCommand(char8* cmd)
{
Console.WriteLine($"> {StringView(cmd)}");
if (system(cmd) != 0)
Runtime.FatalError("Command failed");
}
public static int Main(String[] args)
{
RunCommand("beefbuild -workspace=\"../CxxBuilder\" -config=Release");
String setCxxBuilderExe = scope .(512);
Path.GetAbsolutePath("../CxxBuilder/dist/CxxBuilder", Directory.GetCurrentDirectory(..scope .(128)), setCxxBuilderExe);
#if BF_PLATFORM_WINDOWS
setCxxBuilderExe.Append(".exe");
#endif
File.WriteAllText("../CxxBuilder/dist/CxxBuilderPath.txt", setCxxBuilderExe);
return 0;
}
}