def compilePapyrus(args, window, optimize, release, final):
config = getPrefs(os.path.dirname(args["cmd"]))
if config:
scriptPath = args["cmd"][len(config["scripts"])+1:]
args["cmd"] = [config["compiler"], scriptPath]
args["cmd"].append("-f={0}".format(config["flags"]))
args["cmd"].append("-i={0}".format(config["import"]))
args["cmd"].append("-o={0}".format(config["output"]))
if optimize:
args["cmd"].append("-op")
if release:
args["cmd"].append("-r")
if final:
args["cmd"].append("-final")
args["working_dir"] = os.path.dirname(config["compiler"])
window.run_command("exec", args)
else:
sublime.status_message("No configuration for {0}".format(os.path.dirname(args["cmd"])))
评论列表
文章目录