代码拉取完成,页面将自动刷新
同步操作将从 李昂/pikapython 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# RT-Thread building script for bridge
import os, shutil
import subprocess
from building import *
def pikascript_init():
cwd = GetCurrentDir()
def mycopyfile(srcfile,dstfile):
if not os.path.isfile(srcfile):
pass
else:
fpath,fname=os.path.split(dstfile)
if not os.path.exists(fpath):
os.makedirs(fpath)
shutil.copyfile(srcfile,dstfile)
mycopyfile(cwd + '/port/rt-thread/main.py', cwd + '/main.py')
mycopyfile(cwd + '/port/rt-thread/pikaPackage.exe', cwd + '/pikaPackage.exe')
mycopyfile(cwd + '/port/rt-thread/requestment.txt', cwd + '/requestment.txt')
def myremove(path):
all_path = cwd + '\\' + path
os.popen('del ' + all_path + ' /F /Q /S')
os.popen('rd ' + all_path + ' /Q /S')
myremove('assets')
myremove('docker')
myremove('bsp')
myremove('document')
myremove('examples')
myremove('package')
myremove('port')
myremove('src')
myremove('test')
myremove('tools')
myremove('.github')
myremove('.git')
myremove('.vscode')
myremove('.gitattributes')
myremove('.gitignore')
myremove('logo.txt')
myremove('packages.toml')
os.system(cwd + '/' + 'pikaPackage.exe')
os.system(cwd + '/' + 'rust-msc-latest-win10.exe')
# init pikascript
pikascript_init()
# init argument
cwd = GetCurrentDir()
group = []
src = []
inc = []
# add file and path
for root, dirs, files in os.walk(cwd):
for dir in dirs:
print(dir)
src = Glob(os.path.join(root,dir,'*.c'))
inc = [os.path.join(root,dir)]
group += DefineGroup(dir, src, depend = ['PKG_USING_PIKASCRIPT'], CPPPATH = inc)
Return('group')
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。