lyhzzz пре 3 дана
родитељ
комит
d80926890b

+ 0 - 2
src/main/java/com/fdkankan/fusion/common/util/ShellCmd.java

@@ -22,8 +22,6 @@ public class ShellCmd {
 
 	public  static String LAS_TO_BIN = CacheUtil.settingEntity.getBuildCallPath()+ File.separator +"PotreeConverter.bat %s %s ''";
 
-	public static  String osgbTob3dmCmd = CacheUtil.settingEntity.getBuildCallPath()+ File.separator +"3dtile"+File.separator  + "3dtile.exe -f osgb -i " +
-			"%s -o %s";
 	public static  String osgbTob3dmCmd2 = CacheUtil.settingEntity.getBuildCallPath()+ File.separator +"3dtile"+File.separator  + "ConvertApp.exe  -f OSGB -m false -i " +
 			"%s -o %s";
 	public static  String ffmpegCmd = CacheUtil.settingEntity.getBuildCallPath()+ File.separator   + "ffmpeg.exe ";

+ 8 - 0
src/main/java/com/fdkankan/fusion/common/util/ShellUtil.java

@@ -4,6 +4,7 @@ import cn.hutool.core.io.FileUtil;
 import cn.hutool.core.io.file.FileReader;
 import com.alibaba.fastjson.JSONObject;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.SystemUtils;
 
 import java.io.*;
 import java.util.regex.Matcher;
@@ -25,6 +26,13 @@ public class ShellUtil {
         long startTime = System.currentTimeMillis();
 
         try {
+            if(!SystemUtils.IS_OS_WINDOWS){
+                cmd = cmd.replaceAll("7za.exe","7zz");
+                cmd = cmd.replaceAll("ConvertApp.exe","run_convert.sh");
+                cmd = cmd.replaceAll(".exe","");
+                cmd = cmd.replaceAll(".bat",".sh");
+                cmd = "bash "+ cmd;
+            }
             // 执行命令, 返回一个子进程对象(命令在子进程中执行)
             log.info("执行cmd:{}",cmd);
             process = Runtime.getRuntime().exec(cmd);