Merge pull request #139 from Lorenzooone/build_info_branch
Add option to get the build date
This commit is contained in:
commit
188ac3ae75
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ScriptTool
|
||||
{
|
||||
static class PreProcessStrings
|
||||
{
|
||||
private static string date_command_str = "\\date";
|
||||
private static DateTime currentTime = DateTime.UtcNow;
|
||||
|
||||
public static string PrepareMainText(string m12Strings)
|
||||
{
|
||||
string result = m12Strings.Replace(date_command_str, currentTime.ToString());
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -440,6 +440,9 @@ namespace ScriptTool
|
|||
// Get the strings
|
||||
string m12Strings = File.ReadAllText(Path.Combine(options.WorkingDirectory, "m12-strings-english.txt"));
|
||||
|
||||
// Preprocess the strings
|
||||
m12Strings = PreProcessStrings.PrepareMainText(m12Strings);
|
||||
|
||||
// Compile
|
||||
m12Compiler.ScanString(m12Strings, ref referenceAddress, ebCharLookup, false);
|
||||
referenceAddress = baseAddress;
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue