AEExternalTool.cpp 794 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
  2. // Please see LICENSE.md in repository root for license information
  3. // https://github.com/AtomicGameEngine/AtomicGameEngine
  4. #include "AtomicEditor.h"
  5. #include <Atomic/IO/Log.h>
  6. #include "Subprocess/AESubprocessSystem.h"
  7. #include "AEExternalTool.h"
  8. namespace AtomicEditor
  9. {
  10. ExternalTool::ExternalTool(Context* context) :
  11. Object(context)
  12. {
  13. }
  14. ExternalTool::~ExternalTool()
  15. {
  16. }
  17. bool ExternalTool::LaunchInternal(const String& applicationPath, const String& args)
  18. {
  19. SubprocessSystem* system = GetSubsystem<SubprocessSystem>();
  20. Vector<String> vargs;
  21. if (args.Length())
  22. vargs = args.Split(' ');
  23. subprocess_ = system->Launch(applicationPath, vargs);
  24. return subprocess_.NotNull();
  25. }
  26. }