windows_build_extra.py 680 B

123456789101112131415161718192021222324252627
  1. Import("env")
  2. env.Append(
  3. LINKFLAGS=[
  4. "-static",
  5. "-static-libgcc",
  6. "-static-libstdc++"
  7. ]
  8. )
  9. # Override unused "upload" to execute compiled binary
  10. from SCons.Script import AlwaysBuild
  11. AlwaysBuild(env.Alias("build", "$BUILD_DIR/${PROGNAME}", "$BUILD_DIR/${PROGNAME}"))
  12. # Add custom target to explorer
  13. env.AddTarget(
  14. name = "execute",
  15. dependencies = "$BUILD_DIR\${PROGNAME}.exe",
  16. actions = "$BUILD_DIR\${PROGNAME}.exe",
  17. # actions = 'cmd.exe /C "start cmd.exe /C $BUILD_DIR\${PROGNAME}.exe"',
  18. title = "Execute",
  19. description = "Build and execute",
  20. group="General"
  21. )
  22. #print('=====================================')
  23. #print(env.Dump())