Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.1 KiB

  1. //====== Copyright � 1996-2004, Valve Corporation, All rights reserved. =====//
  2. //
  3. // Interface for makefiles to build differently depending on where they are run from
  4. //
  5. //===========================================================================//
  6. #ifndef IDMEMAKEFILEUTILS_H
  7. #define IDMEMAKEFILEUTILS_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "appframework/IAppSystem.h"
  12. #include "vstdlib/iprocessutils.h"
  13. //-----------------------------------------------------------------------------
  14. // Forward declarations
  15. //-----------------------------------------------------------------------------
  16. class CDmElement;
  17. //-----------------------------------------------------------------------------
  18. // Interface for makefiles to build differently depending on where they are run from
  19. //-----------------------------------------------------------------------------
  20. enum CompilationState_t
  21. {
  22. COMPILATION_SUCCESSFUL = 0,
  23. COMPILATION_NOT_COMPLETE,
  24. COMPILATION_FAILED,
  25. };
  26. abstract_class IDmeMakefileUtils : public IAppSystem
  27. {
  28. public:
  29. // Methods related to compilation
  30. virtual void PerformCompile( CDmElement *pElement, bool bBuildAllDependencies ) = 0;
  31. // Are we in the middle of compiling something?
  32. virtual bool IsCurrentlyCompiling( ) = 0;
  33. // Returns the size of the buffer to pass into UpdateCompilation()
  34. virtual int GetCompileOutputSize() = 0;
  35. // Updates the compilation
  36. virtual CompilationState_t UpdateCompilation( char *pOutputBuf, int nBufLen ) = 0;
  37. // Aborts the compilation
  38. virtual void AbortCurrentCompilation() = 0;
  39. // Opens an external editor for this element
  40. virtual void PerformOpenEditor( CDmElement *pElement ) = 0;
  41. // Returns the exit code of the failed compilation (if COMPILATION_FAILED occurred)
  42. virtual int GetExitCode() = 0;
  43. // Somewhere in here, we need a method of populating choice lists
  44. // for things like choosing vstInfoNodes to export for DCC makefiles
  45. };
  46. //-----------------------------------------------------------------------------
  47. // Default implementation
  48. //-----------------------------------------------------------------------------
  49. IDmeMakefileUtils* GetDefaultDmeMakefileUtils();
  50. #endif // IDMEMAKEFILEUTILS_H