Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the runtime paths to work in windows #1268

Merged
merged 1 commit into from
Sep 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contributors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,4 @@ YYYY/MM/DD, github id, Full name, email
2016/03/27, beardlybread, Bradley Steinbacher, bradley.j.steinbacher@gmail.com
2016/03/29, msteiger, Martin Steiger, antlr@martin-steiger.de
2016/03/28, gagern, Martin von Gagern, gagern@ma.tum.de
2016/08/19, andjo403, Andreas Jonson, andjo403@hotmail.com
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,9 @@ public boolean createProject() {
throw new RuntimeException("C# runtime project file not found!");
}
String runtimeProjPath = runtimeProj.getPath();
if(isWindows()){
runtimeProjPath = runtimeProjPath.replaceFirst("/", "");
}
XPathExpression exp = XPathFactory.newInstance().newXPath()
.compile("/Project/ItemGroup/ProjectReference[@Include='" + runtimeName + "']");
Element node = (Element)exp.evaluate(prjXml, XPathConstants.NODE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,16 @@ private String locateRuntime() {
if ( runtimeSrc==null ) {
throw new RuntimeException("Cannot find JavaScript runtime");
}
if(isWindows()){
return runtimeSrc.getPath().replaceFirst("/", "");
}
return runtimeSrc.getPath();
}

private boolean isWindows() {
return System.getProperty("os.name").toLowerCase().contains("windows");
}

public void testErrors(String[] pairs, boolean printTree) {
for (int i = 0; i < pairs.length; i += 2) {
String input = pairs[i];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,16 @@ protected String locateRuntime(String targetName) {
if ( runtimeSrc==null ) {
throw new RuntimeException("Cannot find "+targetName+" runtime");
}
if(isWindows()){
return runtimeSrc.getPath().replaceFirst("/", "");
}
return runtimeSrc.getPath();
}

private boolean isWindows() {
return System.getProperty("os.name").toLowerCase().contains("windows");
}

public void testErrors(String[] pairs, boolean printTree) {
for (int i = 0; i < pairs.length; i+=2) {
String input = pairs[i];
Expand Down