-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Fernando
committed
May 3, 2022
1 parent
95f800c
commit 67fb863
Showing
74 changed files
with
66 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
.vs | ||
bin | ||
obj | ||
debug | ||
*.ini | ||
|
@@ -15,6 +14,3 @@ debug | |
*.dia~ | ||
*.props | ||
Debug | ||
Docs/Generated | ||
old | ||
output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace PTMC | ||
{ | ||
public class Compiler | ||
{ | ||
public bool Success { get; private set; } = false; | ||
|
||
public void Run(string ptmlSourceFile) | ||
{ | ||
string outputFolder = Environment.CurrentDirectory; | ||
string outputExeFileName = Path.GetFileNameWithoutExtension(ptmlSourceFile) + ".exe"; | ||
string outputExePath = Path.Combine(outputFolder, outputExeFileName); | ||
|
||
var psi = new ProcessStartInfo(Environment.CurrentDirectory + "\\mingw\\bin\\gcc"); | ||
psi.UseShellExecute = false; | ||
psi.EnvironmentVariables["PATH"] = Environment.CurrentDirectory + "\\mingw\\bin"; | ||
psi.Arguments = $"-static-libgcc api.c main.c -o \"{outputExePath}\" -lmingw32 -lSDL2main -lSDL2 -mwindows"; | ||
Process.Start(psi); | ||
|
||
string sdlFilePath = Path.Combine(outputFolder, "SDL2.dll"); | ||
if (!File.Exists(sdlFilePath)) | ||
File.Copy("SDL2.dll", sdlFilePath); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace PTMC | ||
{ | ||
public class Transpiler | ||
{ | ||
public bool Success { get; private set; } = false; | ||
|
||
public void Run(string ptmlSourceFile) | ||
{ | ||
var file = File.ReadAllLines(ptmlSourceFile); | ||
|
||
foreach (var line in file) | ||
{ | ||
} | ||
} | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.