Skip to content

Commit a4b2496

Browse files
committed
自动恢复文件夹结构,防止有用户自己乱删文件
1 parent c0cb93a commit a4b2496

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

LuaApi.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
工具Lua环境为Lua 5.3版本,可直接使用原生自带功能。
44

5+
**重要**:本软件引擎使用了腾讯的xlua框架,你可以直接调用c#的底层函数
6+
57
## 发送处理脚本与Lua脚本运行区,可用接口的区别
68

79
发送处理脚本,不可用定时器/任务接口,也不可用log/print接口。

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,16 @@ sys.timerLoopStart(log.info,1000,"timer test")
104104

105105
## 已知问题与待添加的功能(请大家反馈,谢谢!)
106106

107-
- [ ] bug:快速大量lua任务回调会有概率性报错(主分支)
108-
- [ ] bug:使用nlua作为框架时,会在调用协程代码时报错(nlua分支代码)
109-
- [ ] bug:使用vJine.Lua作为框架时,会出现加载失败的情况,原因不明(主分支)
107+
- [x] ~~bug:快速大量lua任务回调会有概率性报错(主分支)~~
108+
- [x] ~~bug:使用nlua作为框架时,会在调用协程代码时报错(nlua分支代码)~~
109+
- [x] ~~bug:使用vJine.Lua作为框架时,会出现加载失败的情况,原因不明(主分支)~~
110110
- [ ] bug:某些条件下(比如Air720重启),COM口消失后不会被释放,导致无法再次开启该COM口,只能重启软件
111111

112112
## 常见问题
113113

114114
### 升级的时候要替换哪几个文件?
115115

116-
由于我直接使用了GitHub/Gitee服务器作为release网站,所以也没搞全自动升级,需要自己手动下载
117-
118-
只需要备份自己的`user_script_run``user_script_send_convert`文件夹里的自定义脚本就可以了。如果需要,还可以备份`log`目录。把他们全都扔到新版本软件里覆盖就行了。
116+
点升级就行了,一键升级
119117

120118
## 开源
121119

llcom/Tools/Global.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,21 @@ class Global
2828
/// </summary>
2929
public static void Initial()
3030
{
31+
if (!Directory.Exists("core_script"))
32+
{
33+
System.Windows.MessageBox.Show("core_script文件夹丢失!请确保没有乱删文件!如无法恢复,请去官网重新下载该软件。");
34+
Environment.Exit(1);
35+
}
36+
if (!Directory.Exists("logs"))
37+
Directory.CreateDirectory("logs");
38+
if (!Directory.Exists("user_script_run"))
39+
Directory.CreateDirectory("user_script_run");
40+
if (!Directory.Exists("user_script_send_convert"))
41+
Directory.CreateDirectory("user_script_send_convert");
42+
if (!Directory.Exists("user_script_run\\logs"))
43+
Directory.CreateDirectory("user_script_run\\logs");
44+
45+
3146
//导入之前的配置文件
3247
if (Properties.Settings.Default.UpgradeRequired)
3348
{

0 commit comments

Comments
 (0)