uv4cmd.py 705 B

1234567891011121314151617181920212223242526272829
  1. #! python
  2. from buildcmd import BuildCmd
  3. from string import maketrans
  4. from datetime import datetime
  5. import mmap
  6. class Uv4Cmd(BuildCmd):
  7. def __init__(self, project, config):
  8. BuildCmd.__init__(self)
  9. self._project = project
  10. self._config = config
  11. self._log = "UV4_{0}_{1}.log".format(self._config.translate(maketrans(" ", "_"), "()[],"), datetime.now().strftime("%Y%m%d%H%M%S"))
  12. def getCommand(self):
  13. return "UV4.exe"
  14. def getArguments(self):
  15. return [ "-t", self._config, "-cr", self._project, "-j0", "-o", self._log ]
  16. def isSuccess(self):
  17. return self._result <= 1
  18. def getLog(self):
  19. try:
  20. return open(self._log, "r")
  21. except:
  22. return None