MCMrARM / mcpelauncher-linux

Please note this is a legacy repository, please go to: https://github.com/minecraft-linux/mcpelauncher-manifest/wiki
GNU General Public License v3.0
312 stars 46 forks source link

[server]separate the server / client build script(or just add a option) #288

Closed codehz closed 6 years ago

codehz commented 6 years ago

Some dependencies are useless for server(headless) builds. e.g X11 glfw cef and extract.cpp(with zip, I mean the extract.cpp file can be moved to client folder)

If done, the server-side build can also be statically linked and portable. (the only thing that cannot be statically linked is libm, but it is easy to adapt).

in fact, I've write a CMakeLists.txt to produce a statically linked server binary(https://github.com/codehz/mcpe-server), and it have a automated build(https://hub.docker.com/r/codehz/mcpe-server)

MCMrARM commented 6 years ago

Yes, I definitely want to do this asap.

MCMrARM commented 6 years ago

Please try https://github.com/MCMrARM/mcpelauncher-linux/commit/5d55bc8577464dc5c83c968ac9ff806f88d1bcdc

codehz commented 6 years ago

@MCMrARM I don't think libzip is necessary for building the server binary...extract.cpp is unused...

wiktorek140 commented 6 years ago

@codehz i suppose u need resources from apk so that why libzip stay in building server :)

codehz commented 6 years ago

@wiktorek140 but it can be done manually or just use client binary to do that.. The server does not use any function inside extract.cpp actually..

guppy42 commented 6 years ago

@codehz it server should be able to do the extract it self - otherwise running a headless server would be impossible.

codehz commented 6 years ago

@guppy42 I mean, add this feature, or remove this feature and then remove the extra dependencies..

See https://github.com/codehz/mcpe-demo

And I think people who have a headless server should have some ability to use script. This built-in extracting function for such people is not necessary.

MCMrARM commented 6 years ago

This feature is planned.

MCMrARM commented 6 years ago

Does this work just fine otherwise?

codehz commented 6 years ago

@MCMrARM yes, it worked for me!