dr-server: wrap wine64 in xvfb-run for headless Unity
Unity's Win64 build still creates a 1x1 hidden window via Win32 even under -batchmode -nographics. Wine needs an X display to honor that; without one, startup fails with "Failed to create batch mode window: Success." after Mono initializes and PhysX comes up. xvfb-run -a gives it a virtual display with no real X server cost. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
8b83cf9bfb
commit
91670f0d28
1 changed files with 5 additions and 2 deletions
|
|
@ -40,7 +40,6 @@ in
|
||||||
WINEARCH = "win64";
|
WINEARCH = "win64";
|
||||||
WINEDEBUG = "-all";
|
WINEDEBUG = "-all";
|
||||||
HOME = dataDir;
|
HOME = dataDir;
|
||||||
DISPLAY = "";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
preStart = ''
|
preStart = ''
|
||||||
|
|
@ -57,7 +56,11 @@ in
|
||||||
User = "dr-server";
|
User = "dr-server";
|
||||||
Group = "dr-server";
|
Group = "dr-server";
|
||||||
WorkingDirectory = buildDir;
|
WorkingDirectory = buildDir;
|
||||||
ExecStart = "${wine}/bin/wine64 DR_Server.exe -batchmode -nographics -logFile ${logDir}/server.log";
|
# Unity's Win64 build still tries to create a 1x1 hidden window
|
||||||
|
# via Win32 even with -batchmode -nographics, and Wine needs a
|
||||||
|
# real X display for that — fails with "Failed to create batch
|
||||||
|
# mode window: Success." otherwise. xvfb-run gives it one.
|
||||||
|
ExecStart = "${pkgs.xvfb-run}/bin/xvfb-run -a ${wine}/bin/wine64 DR_Server.exe -batchmode -nographics -logFile ${logDir}/server.log";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = "10s";
|
RestartSec = "10s";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue