|
@@ -40,31 +40,25 @@ public class AuthLicenseUtil {
|
|
}
|
|
}
|
|
|
|
|
|
public static void createLicense() {
|
|
public static void createLicense() {
|
|
- new Thread() {
|
|
|
|
- @Override
|
|
|
|
- public void run() {
|
|
|
|
- try {
|
|
|
|
- File file = new File(licensePath);
|
|
|
|
- if(!file.exists()){
|
|
|
|
- file.mkdirs();
|
|
|
|
- }
|
|
|
|
- File caches = new File(licensePath + File.separator+ "caches");
|
|
|
|
- FileUtil.del(caches);
|
|
|
|
- File results = new File(licensePath + File.separator+ "results");
|
|
|
|
- FileUtil.del(results);
|
|
|
|
-
|
|
|
|
- JSONObject licenseDataJson = new JSONObject();
|
|
|
|
- licenseDataJson.put("split_type", "SPLIT_V23");
|
|
|
|
- licenseDataJson.put("skybox_type", "SKYBOX_V5");
|
|
|
|
- FileUtils.writeFile(licensePath + File.separator + "data.json", licenseDataJson.toString());
|
|
|
|
- ShellUtil.execCmd(String.format(cmd,licensePath));
|
|
|
|
- }
|
|
|
|
- catch (Exception e) {
|
|
|
|
- log.error("createLicense-error:",e);
|
|
|
|
- }
|
|
|
|
|
|
+ try {
|
|
|
|
+ File file = new File(licensePath);
|
|
|
|
+ if(!file.exists()){
|
|
|
|
+ file.mkdirs();
|
|
}
|
|
}
|
|
- }.start();
|
|
|
|
|
|
+ File caches = new File(licensePath + File.separator+ "caches");
|
|
|
|
+ FileUtil.del(caches);
|
|
|
|
+ File results = new File(licensePath + File.separator+ "results");
|
|
|
|
+ FileUtil.del(results);
|
|
|
|
|
|
|
|
+ JSONObject licenseDataJson = new JSONObject();
|
|
|
|
+ licenseDataJson.put("split_type", "SPLIT_V23");
|
|
|
|
+ licenseDataJson.put("skybox_type", "SKYBOX_V5");
|
|
|
|
+ FileUtils.writeFile(licensePath + File.separator + "data.json", licenseDataJson.toString());
|
|
|
|
+ ShellUtil.execCmd(String.format(cmd,licensePath));
|
|
|
|
+ }
|
|
|
|
+ catch (Exception e) {
|
|
|
|
+ log.error("createLicense-error:",e);
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|