Skip to content

Commit b5eaec0

Browse files
committed
Try more Windows fix?
1 parent 06b126a commit b5eaec0

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

scripts/build.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ def protoencode_single(self, name, srcs: Targets, proto, symbol):
3030
ins=srcs,
3131
outs=[f"={name}.cc"],
3232
deps=[r],
33-
commands=["$[deps[0]] $[ins] $[outs] " + symbol],
33+
commands=[
34+
# Materialise symbolic links (for Windows).
35+
"cp -L $[ins[0]] $[ins[0]].real",
36+
"mv $[ins[0]].real $[ins[0]]",
37+
"$[deps[0]] $[ins] $[outs] " + symbol
38+
],
3439
label="PROTOENCODE",
3540
)
3641

scripts/protoencode.cc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,7 @@ int main(int argc, const char* argv[])
7272
{
7373
PROTO message;
7474

75-
std::string filename = argv[1];
76-
#if defined _WIN32
77-
for (char& b : filename)
78-
if (b == '/')
79-
b = '\\';
80-
#endif
81-
std::ifstream input(filename);
75+
std::ifstream input(argv[1]);
8276
if (!input)
8377
{
8478
perror("couldn't open input file");

0 commit comments

Comments
 (0)