openHASP/tools/linux_build_extra.py
2021-03-05 16:43:58 +01:00

20 lines
583 B
Python

Import("env", "projenv")
# Override unused "upload" to execute compiled binary
from SCons.Script import AlwaysBuild
AlwaysBuild(env.Alias("build", "$BUILD_DIR/${PROGNAME}", "$BUILD_DIR/${PROGNAME}"))
# Add custom target to explorer
env.AddTarget(
name = "execute",
dependencies = "$BUILD_DIR/${PROGNAME}",
actions = "$BUILD_DIR/${PROGNAME}",
# actions = 'cmd.exe /C "start cmd.exe /C $BUILD_DIR\${PROGNAME}.exe"',
title = "Execute",
description = "Build and execute",
group="General"
)
#print('=====================================')
#print(env.Dump())