Godot: A "-server" switch for Windows

Created on 7 Aug 2016  Â·  7Comments  Â·  Source: godotengine/godot

I was exploring the subject of "serverside godot", and since I work mainly on Windows there is no "platform=server_win32" build (just the linux target). I figured out "ok, so I can do OS.get_name() == "server" to check if this scene should run serverside scripts", but what if I'd like to run a server on Windows?

A possible way to do this would be to add a -server switch (executable arg) that would:

  • Enable -quiet and -nowindow options
  • Explicitly set OS name to Server
    This solution would work on every platform, unless submodules like the filesystem assume that "Server" OS means "use linux drivers".

An alternative would be to add a "server_win32" target, which would probably yield a smaller exe right? Any plans on that?

Or maybe there is a way to read execution arguments from script-level? Thoughts?

archived feature proposal windows buildsystem core

Most helpful comment

The server platform should actually be merged back into platform/x11 IMO, and there should be a server=yes compilation argument for Windows, OSX and Linux X11, to be able to build server binaries (headless, lightweight, etc.) for all desktop platforms.

All 7 comments

Duplicate of #2081?

Not at all. I'm looking for a way to tell my project to run serverside or clientside scripts directly from the console (an optional argument for godot.exe).

As far as I can tell there is also no "is_window_hidden" method in the OS class. That could be a good work-around.

The server platform should actually be merged back into platform/x11 IMO, and there should be a server=yes compilation argument for Windows, OSX and Linux X11, to be able to build server binaries (headless, lightweight, etc.) for all desktop platforms.

See also #2390.

The main issue with this is that the window manager layer is not really
abstracted, so the OS class also implements the window system. It can
probably be done, then X11 would become a driver (along with wayland,
windows, maybe osx), and the OS can use a dummy window for a headless
build. We already have the dummy visual server and audio server. The thing
is for most OSs there's only 1 window manager, so at the time it wasn't
worth thinking about it.

On 8 August 2016 at 06:57, Rémi Verschelde [email protected] wrote:

See also #2390 https://github.com/godotengine/godot/issues/2390.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/6059#issuecomment-238192274,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGVmPVhe0MpLs-4KRTxbZYpdaJRS-Bpnks5qdv1xgaJpZM4JeYTF
.

+1 for server=yes compilation argument instead of platform=server

I've opened #11389 as a clearer issue to discuss making the headless version multiplatform.

Was this page helpful?
0 / 5 - 0 ratings