gitweb on Svarog
projekti pod git sistemom za održavanje verzija -- projects under the git version control system
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a744468)
raw | patch | inline | side by side (parent: a744468)
author | Doni Pracner <quinnuendo@gmail.com> | |
Thu, 13 Mar 2014 19:18:33 +0000 (20:18 +0100) | ||
committer | Doni Pracner <quinnuendo@gmail.com> | |
Thu, 13 Mar 2014 19:18:33 +0000 (20:18 +0100) |
com/quemaster/ant/m2/m2compile.java | patch | blob | history |
index 6d43534b6e8c996d4873e1969f6d438195ce2a91..5ba7a9eb0c84544db735fc7db9f48de13d90ff56 100644 (file)
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.condition.Os;
+import java.util.ArrayList;
import java.io.*;
private File dir=null;
- // needs to recognize whether it's linux or not
// needs to check wheter the compilation is needed
// based on the timestamps of the exe and mod
// The method executing the task
public void execute() throws BuildException {
int exit = -1;
+ ArrayList<String> list = new ArrayList<String>();
+ if (!Os.isFamily(Os.FAMILY_WINDOWS))
+ list.add("wine");
+ list.add("xc");
+ list.add("=make");
+ list.add("=all");
+ list.add(module);
try{
- ProcessBuilder pb = new ProcessBuilder(
- "wine", "xc", "=make", "=all", module);
+ ProcessBuilder pb = new ProcessBuilder(list);
pb.directory(dir);
pb.inheritIO();