-
-
Save AngryAnt/16c548412cdf1dba30140e8cdd97dc64 to your computer and use it in GitHub Desktop.
Perl utility script for generating a protobuf-net serialiser from .proto definitions.
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
print ("Generating debugger protocol from .proto definitions\n"); | |
my $generatedFile = "Behave.Debugger.Protocol.cs"; | |
RunWithSystemMono ( | |
"$checkoutRoot/Tools/Protobuf-net/protogen/protogen.exe", | |
"-d", | |
"-i:" . File::Spec->rel2abs ("$checkoutRoot/Source/Core/Debugger/Protocol.proto"), | |
"-o:$generatedFile", | |
"-ns:Behave.Debugging" | |
) 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