c part ready to go
This commit is contained in:
3
Setup/.gitignore
vendored
Normal file
3
Setup/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
build
|
||||
recovery
|
||||
BeefSapce_user.toml
|
||||
5
Setup/BeefProj.toml
Normal file
5
Setup/BeefProj.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
FileVersion = 1
|
||||
|
||||
[Project]
|
||||
Name = "Cpp2Beef.Setup"
|
||||
StartupObject = "Cpp2Beef.Setup.Program"
|
||||
5
Setup/BeefSpace.toml
Normal file
5
Setup/BeefSpace.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
FileVersion = 1
|
||||
Projects = {"Cpp2Beef.Setup" = {Path = "."}}
|
||||
|
||||
[Workspace]
|
||||
StartupProject = "Cpp2Beef.Setup"
|
||||
27
Setup/src/Program.bf
Normal file
27
Setup/src/Program.bf
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user