1 Star 0 Fork 201

Grey.Tu/pikascript

forked from 李昂/pikapython 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
SConscript 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
满鉴霆 提交于 2021-12-06 21:04 . Update SConscript
# 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('bsp')
myremove('document')
myremove('examples')
myremove('package')
myremove('port')
myremove('src')
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:
src = src + Glob(os.path.join(root,dir,'*.c'))
inc = inc + [os.path.join(root,dir)]
group = DefineGroup('pikascript', src, depend = ['PKG_USING_PIKASCRIPT'], CPPPATH = inc)
Return('group')
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/tu-hongli/pikascript.git
[email protected]:tu-hongli/pikascript.git
tu-hongli
pikascript
pikascript
master

搜索帮助