|
@@ -6,7 +6,6 @@ import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.date.TimeInterval;
|
|
|
import cn.hutool.core.exceptions.ExceptionUtil;
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
-import cn.hutool.core.util.RuntimeUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.core.util.ZipUtil;
|
|
|
import cn.hutool.http.HttpUtil;
|
|
@@ -126,12 +125,6 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
private String exeContent;
|
|
|
@Value("${download.config.exe-content-v3}")
|
|
|
private String exeContentV3;
|
|
|
- @Value("${download.config.command-name}")
|
|
|
- private String commandName;
|
|
|
- @Value("${download.config.command-content}")
|
|
|
- private String commandContent;
|
|
|
- @Value("${download.config.command-content-v3}")
|
|
|
- private String commandContentV3;
|
|
|
|
|
|
@Autowired
|
|
|
private RedisUtil redisUtil;
|
|
@@ -483,16 +476,11 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
|
|
|
private void zipBat(String num, String version) throws Exception{
|
|
|
String batContent = String.format(this.exeContent, num);
|
|
|
- String commandContent = String.format(this.commandContent, num);
|
|
|
if("v3".equals(version)){
|
|
|
batContent = String.format(this.exeContentV3, num);
|
|
|
- commandContent = String.format(this.commandContentV3, num);
|
|
|
}
|
|
|
+// this.zipBytes(out, exeName, batContent.getBytes());
|
|
|
FileUtil.writeUtf8String(batContent, String.format(this.sourceLocal, num, exeName));
|
|
|
- FileUtil.writeUtf8String(commandContent, String.format(this.sourceLocal, num, commandName));
|
|
|
- RuntimeUtil.exec("chmod a+x " + String.format(this.sourceLocal, num, commandName));
|
|
|
- RuntimeUtil.exec("chmod a+x " + String.format(this.sourceLocal, num, "http_darwin"));
|
|
|
-
|
|
|
|
|
|
//更新进度为90%
|
|
|
this.updateProgress(new BigDecimal("0.9").divide(new BigDecimal("0.8"), 6, BigDecimal.ROUND_HALF_UP), num,
|