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: 6d35827)
raw | patch | inline | side by side (parent: 6d35827)
author | Doni Pracner <quinnuendo@gmail.com> | |
Thu, 13 Mar 2014 18:07:43 +0000 (19:07 +0100) | ||
committer | Doni Pracner <quinnuendo@gmail.com> | |
Thu, 13 Mar 2014 18:07:43 +0000 (19:07 +0100) |
com/quemaster/ant/m2/m2compile.java | [new file with mode: 0644] | patch | blob |
svetovid/m2compile.java | [deleted file] | patch | blob | history |
diff --git a/com/quemaster/ant/m2/m2compile.java b/com/quemaster/ant/m2/m2compile.java
--- /dev/null
@@ -0,0 +1,51 @@
+package com.quemaster.ant.m2;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+import java.io.*;
+
+public class m2compile extends Task {
+ private String module="program";
+ 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;
+ try{
+ ProcessBuilder pb = new ProcessBuilder(
+ "wine", "xc", "=make", "=all", module);
+ pb.directory(dir);
+ pb.inheritIO();
+
+ Process p = pb.start();
+ p.waitFor();
+ exit = p.exitValue();
+
+ }catch (Exception ex) {
+ throw new BuildException(ex);
+ }
+ if (exit != 0)
+ throw new BuildException("compilation ended with code "+exit);
+ }
+
+ public void setModule(String msg) {
+ this.module = msg;
+ }
+
+ public void setDir(File msg) {
+ this.dir = msg;
+ }
+
+ public static void main(String[] args){
+ m2compile m = new m2compile();
+
+ m.execute();
+ }
+}
diff --git a/svetovid/m2compile.java b/svetovid/m2compile.java
--- a/svetovid/m2compile.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package svetovid;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-
-import java.io.*;
-
-public class m2compile extends Task {
- private String module="program";
- 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;
- try{
- ProcessBuilder pb = new ProcessBuilder(
- "wine", "xc", "=make", "=all", module);
- pb.directory(dir);
- pb.inheritIO();
-
- Process p = pb.start();
- p.waitFor();
- exit = p.exitValue();
-
- }catch (Exception ex) {
- throw new BuildException(ex);
- }
- if (exit != 0)
- throw new BuildException("compilation ended with code "+exit);
- }
-
- public void setModule(String msg) {
- this.module = msg;
- }
-
- public void setDir(File msg) {
- this.dir = msg;
- }
-
- public static void main(String[] args){
- m2compile m = new m2compile();
-
- m.execute();
- }
-}