调用upload工具上传服务器
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
|
@@ -2,7 +2,7 @@ import shutil
|
||||
import sys
|
||||
import os
|
||||
import prebuild as time
|
||||
import mysql
|
||||
# import mysql
|
||||
|
||||
|
||||
# 定义app和boot文件路径(没有尾缀)
|
||||
@@ -144,9 +144,12 @@ def main():
|
||||
with open(dst,"wb") as f:
|
||||
f.write(data)
|
||||
print(dst+' create app file success.')
|
||||
sql=mysql.sql()
|
||||
if(sql.init(SQL_APP_SAVE_PATH)==True):
|
||||
sql.insert(dst)
|
||||
readback=os.popen("upload "+SQL_APP_SAVE_PATH+" "+dst).readlines()
|
||||
for i in readback:
|
||||
print(i)
|
||||
# sql=mysql.sql()
|
||||
# if(sql.init(SQL_APP_SAVE_PATH)==True):
|
||||
# sql.insert(dst)
|
||||
boot=BOOT_FILE_SRC+".bin"
|
||||
boot_dst=BOOT_FILE_DST+"_"+date+".bin"
|
||||
if os.path.exists(boot):
|
||||
@@ -161,9 +164,9 @@ def main():
|
||||
with open(boot_dst,"wb") as f:
|
||||
f.write(d)
|
||||
print(boot_dst+" create boot file success.")
|
||||
sql=mysql.sql()
|
||||
if(sql.init(SQL_BOOT_SAVE_PATH)==True):
|
||||
sql.insert(boot_dst)
|
||||
# sql=mysql.sql()
|
||||
# if(sql.init(SQL_BOOT_SAVE_PATH)==True):
|
||||
# sql.insert(boot_dst)
|
||||
else:
|
||||
print("please build bootloader to create boot file")
|
||||
if __name__=="__main__":
|
||||
|
Reference in New Issue
Block a user