aboutsummaryrefslogtreecommitdiff
path: root/src/zencompute/runners/winerunner.h
blob: 7df62e7c0da239df3ae21844b91cb04b2b75bb4d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright Epic Games, Inc. All Rights Reserved.

#pragma once

#include "localrunner.h"

#if ZEN_WITH_COMPUTE_SERVICES && ZEN_PLATFORM_LINUX

#	include <string>

namespace zen::compute {

/** Wine-based process runner for executing Windows worker executables on Linux.

	Subclasses LocalProcessRunner, reusing sandbox management, worker manifesting,
	input/output handling, and monitor thread infrastructure. Overrides only the
	platform-specific methods: process spawning, sweep, and cancellation.
 */
class WineProcessRunner : public LocalProcessRunner
{
public:
	WineProcessRunner(ChunkResolver&			   Resolver,
					  const std::filesystem::path& BaseDir,
					  DeferredDirectoryDeleter&	   Deleter,
					  WorkerThreadPool&			   WorkerPool);

	[[nodiscard]] SubmitResult SubmitAction(Ref<RunnerAction> Action) override;
	void					   SweepRunningActions() override;
	void					   CancelRunningActions() override;

private:
	std::string m_WinePath = "wine";
};

}  // namespace zen::compute

#endif