New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Godot: Packaging a Godot binary and running it only displays a gray window. #21743
Comments
I encounter the exact same thing on my machine that is running NixOS unstable. However, If I install Godot 2.1.1 stable inside Steam and perform the same steps inside the Steam installed Godot, then the executable works: Looking at the output of Looking at steam, it seems like @abbradar has most commits in nixpkgs. Any hints on what could be different using a program inside steam? |
A program inside Steam is run in FHS user environments -- that is, something very resembling Ubuntu 12.04. You can try to run your stand-alone executable with |
Finally got some time to look deeper into this! Found a combination that works for the two demo games I tested { stdenv, steam-run, makeWrapper }:
stdenv.mkDerivation {
name = "minesweep-1.0";
src = ./src;
buildInputs = [ steam-run makeWrapper ];
phases = [ "installPhase" ];
installPhase = ''
mkdir -p "$out/bin"
cp $src/* "$out/bin/"
chmod 755 "$out/bin/minesweep"
chmod 755 "$out/bin/minesweep-godot-bin"
wrapProgram $out/bin/minesweep \
--set GODOT_BIN_PATH $out/bin/minesweep-godot-bin \
--suffix PATH : "${steam-run}/bin"
'';
} Where #!/usr/bin/env sh
steam-run "$GODOT_BIN_PATH" And I have tested this on NixOS (17.03 channel) and here's the result I get:
And here's the game window: @sunnystormy can you confirm that this works for you too, please? Edit: Forgot to mention that { system ? builtins.currentSystem }:
let
pkgs = import <nixpkgs> { inherit system; };
in
pkgs.callPackage ./default.nix {
inherit (pkgs);
} |
Still an issue? |
I ran into this issue when trying to play Hardcoded after following the usual patchelf process. @rzetterberg’s idea worked for me, though I didn’t bother writing a derivation, and I had no way to export the game because I’m not one of the authors.
|
Thank you for your contributions.
|
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/godot-export-will-not-run-ldd-x-not-found/13375/3 |
Issue description
When running a Godot-based binary that's been packaged, a window will display, but with no content.
Steps to reproduce
Export a Godot project into a fat binary using the X11 export template (non-fat binaries won't even run). Build a package using the below "default.nix" configuration file. Replace the folder and binary names with your own. (It's interesting, because the build process never complains about anything GL-related...)
`
{stdenv, libX11, libXinerama, libXcursor, libXrandr, freetype, alsaLib, libpulseaudio}:
`
Upon running from the command line, this error also gets displayed at the top:
ERROR: _load_settings_binary: Corrupted header in binary engine.cfb (not ECFG) At: core/globals.cpp:773.
Created a ticket in the Godot repo here: godotengine/godot#7472
Technical details
The text was updated successfully, but these errors were encountered: