芯跳模块改为电容改为使用任务12
app编译后自动上传到服务器
This commit is contained in:
@@ -2,7 +2,7 @@ import shutil
|
||||
import sys
|
||||
import os
|
||||
import prebuild as time
|
||||
|
||||
import mysql
|
||||
|
||||
|
||||
# 定义app和boot文件路径(没有尾缀)
|
||||
@@ -11,7 +11,9 @@ BOOT_FILE_SRC = "./Objects/boot/checker_gen1_boot"
|
||||
# APP_FILE_DST = "./Objects/checker_gen1_app"
|
||||
APP_FILE_DST = "./python/file/checker_gen1_app"
|
||||
BOOT_FILE_DST = "./Objects/checker_gen1_boot"
|
||||
|
||||
# 定义数据库存储目录
|
||||
SQL_APP_SAVE_PATH = "checker_gen1_app"
|
||||
SQL_BOOT_SAVE_PATH = "checker_gen1_boot"
|
||||
|
||||
# 找到指定后缀的文件
|
||||
def find_type(fix:str):
|
||||
@@ -142,6 +144,9 @@ 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)
|
||||
boot=BOOT_FILE_SRC+".bin"
|
||||
boot_dst=BOOT_FILE_DST+"_"+date+".bin"
|
||||
if os.path.exists(boot):
|
||||
@@ -156,6 +161,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)
|
||||
else:
|
||||
print("please build bootloader to create boot file")
|
||||
if __name__=="__main__":
|
||||
|
Reference in New Issue
Block a user