Fixed compilation of generated D files from protoc

This commit is contained in:
Tristan B. Velloza Kildaire 2021-08-28 11:55:34 +02:00
parent 4557a8c550
commit 70c78d37ff
6 changed files with 18 additions and 7 deletions

Binary file not shown.

10
cleanUp.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
# File to fix import paths for the generated D modules
protoCodeFile=source/libdnet/protobuf/dnet.d
# Fix up
cat $protoCodeFile | sed -e "s/source.libdnet.protobuf./ /" > tmpFile
# This thing got whacky
mv tmpFile $protoCodeFile

View File

@ -13,7 +13,8 @@
"name": "libdnet",
"targetPath": "bin",
"targetType": "library",
"preBuildCommands": ["protoc --plugin=\"$HOME/.dub/packages/protobuf-0.6.2/protobuf/protoc_gen_d/../build/protoc-gen-d\" source/libdnet/protobuf/dnet.proto --d_out=source/libdnet/protobuf/."
"preBuildCommands": ["protoc --plugin=\"$HOME/.dub/packages/protobuf-0.6.2/protobuf/protoc_gen_d/../build/protoc-gen-d\" source/libdnet/protobuf/dnet.proto --d_out=source/libdnet/protobuf/.",
"chmod +x ./cleanUp.sh",
"./cleanUp.sh"
]
}

View File

@ -1,13 +1,13 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: source/libdnet/protobuf/dnet.proto
// source: dnet.proto
module dnet;
import google.protobuf;
import source.libdnet.protobuf.account;
import source.libdnet.protobuf.channel;
import source.libdnet.protobuf.server;
import source.libdnet.protobuf.property;
import account;
import channel;
import server;
import property;
enum protocVersion = 3014000;