调用upload工具上传服务器
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -14,4 +14,5 @@ __pycache__/
|
|||||||
python/build/
|
python/build/
|
||||||
python/dist/
|
python/dist/
|
||||||
*.xlsx
|
*.xlsx
|
||||||
*.json
|
*.json
|
||||||
|
quest_info.txt
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define BUILD_DATE "2023-09-11 17:34:56"
|
#define BUILD_DATE "2023-09-15 10:16:52"
|
||||||
#define SOFT_VERSION "0.11"
|
#define SOFT_VERSION "0.11"
|
||||||
|
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@ import shutil
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import prebuild as time
|
import prebuild as time
|
||||||
import mysql
|
# import mysql
|
||||||
|
|
||||||
|
|
||||||
# 定义app和boot文件路径(没有尾缀)
|
# 定义app和boot文件路径(没有尾缀)
|
||||||
@@ -144,9 +144,12 @@ def main():
|
|||||||
with open(dst,"wb") as f:
|
with open(dst,"wb") as f:
|
||||||
f.write(data)
|
f.write(data)
|
||||||
print(dst+' create app file success.')
|
print(dst+' create app file success.')
|
||||||
sql=mysql.sql()
|
readback=os.popen("upload "+SQL_APP_SAVE_PATH+" "+dst).readlines()
|
||||||
if(sql.init(SQL_APP_SAVE_PATH)==True):
|
for i in readback:
|
||||||
sql.insert(dst)
|
print(i)
|
||||||
|
# sql=mysql.sql()
|
||||||
|
# if(sql.init(SQL_APP_SAVE_PATH)==True):
|
||||||
|
# sql.insert(dst)
|
||||||
boot=BOOT_FILE_SRC+".bin"
|
boot=BOOT_FILE_SRC+".bin"
|
||||||
boot_dst=BOOT_FILE_DST+"_"+date+".bin"
|
boot_dst=BOOT_FILE_DST+"_"+date+".bin"
|
||||||
if os.path.exists(boot):
|
if os.path.exists(boot):
|
||||||
@@ -161,9 +164,9 @@ def main():
|
|||||||
with open(boot_dst,"wb") as f:
|
with open(boot_dst,"wb") as f:
|
||||||
f.write(d)
|
f.write(d)
|
||||||
print(boot_dst+" create boot file success.")
|
print(boot_dst+" create boot file success.")
|
||||||
sql=mysql.sql()
|
# sql=mysql.sql()
|
||||||
if(sql.init(SQL_BOOT_SAVE_PATH)==True):
|
# if(sql.init(SQL_BOOT_SAVE_PATH)==True):
|
||||||
sql.insert(boot_dst)
|
# sql.insert(boot_dst)
|
||||||
else:
|
else:
|
||||||
print("please build bootloader to create boot file")
|
print("please build bootloader to create boot file")
|
||||||
if __name__=="__main__":
|
if __name__=="__main__":
|
||||||
|
Reference in New Issue
Block a user