Skip to content

Instantly share code, notes, and snippets.


AngryAnt/ Secret

Created Feb 17, 2017
What would you like to do?
Perl utility script for generating a protobuf-net serialiser from .proto definitions.
print ("Generating debugger protocol from .proto definitions\n");
my $generatedFile = "Behave.Debugger.Protocol.cs";
RunWithSystemMono (
"-i:" . File::Spec->rel2abs ("$checkoutRoot/Source/Core/Debugger/Protocol.proto"),
) and die ("Failed to generate debugger protocol");
print ("Patching generated classes from public to internal\n");
my $generatedContents = read_file ($generatedFile);
$generatedContents =~ s/public partial class/internal partial class/g;
write_file ($generatedFile, $generatedContents);
print ("Protocol ready\n");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment