From 51ece5388b6abdb1cc4544870ffa63db95766f31 Mon Sep 17 00:00:00 2001 From: ranchuan Date: Fri, 15 Sep 2023 10:19:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E7=94=A8upload=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=9C=8D=E5=8A=A1=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- source/main/compiler_info.h | 2 +- source/mycopy.py | 17 ++++++++++------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 380ab00..d0146ba 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ __pycache__/ python/build/ python/dist/ *.xlsx -*.json \ No newline at end of file +*.json +quest_info.txt diff --git a/source/main/compiler_info.h b/source/main/compiler_info.h index 4d98832..2ea4197 100644 --- a/source/main/compiler_info.h +++ b/source/main/compiler_info.h @@ -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" diff --git a/source/mycopy.py b/source/mycopy.py index fe2943d..cb0d536 100644 --- a/source/mycopy.py +++ b/source/mycopy.py @@ -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__":