[SOLVED] Unity Game - "execv error: no such file or directory"

Hi! :smile:

My name is Raphael and I’m a game developer, very focused on mobile and desktop games. Now, I’m testing building games for Linux (I use Unity 3D to make my games, and building them for Linux works great). All build process are ok. So now, I want to test building an .appimage to distribute my game more easily.

To do this, I’m trying to manually build the appimage, using the appimagetool-x86_64.AppImage to build the appimage package.

I’ve created this exactly file structure:

~/Games/AppImage/GameX/AppDir/
~/Games/AppImage/GameX/AppDir/GameX_Data/
~/Games/AppImage/GameX/AppDir/GameX.x86_64
~/Games/AppImage/GameX/AppDir/GameX.desktop
~/Games/AppImage/GameX/AppDir/GameX.png

Finally, I’m tried to compile an appimage doing appimagetool-x86_64.AppImage ./AppDir inside ~/Games/AppImage/GameX/ folder. The final appimage file has generated successfully, but it’s not working. When I try to launch it, I get an error execv error: no such file or directory :frowning_face:

Note 1: The GameX_Data/ folder and GameX.x86_64 file are generated automatically by the game engine, so they need to stay at the same location, together

Note 2: I also tried to create a usr/bin folder inside AppDir/ and move GameX_Data/ and GameX.x86_64 into that, but not works (the same error)

Note 3: In combination to the try described above (“Note 2”), I also tried to create a GameX.sh file inside AppDir/, only containing this one line: GameX.x86_64, and tried GameX.x86_64 and GameX.sh on Exec parameter of my .desktop file, but also not works (I got the same error in all tries)

Note 4: There is my current .desktop file:

[Desktop Entry]
Name=Game X
Exec=GameX.x86_64
#Exec=GameX.sh
Icon=GameX
Type=Application
Categories=Game;

Can someone help me solving this problem?

UPDATE

After a few hours googleing, I finally got my appimage working correctly.

What I done:
1 - Created an AppRun file, with this content:

#!/bin/sh
cd "$(dirname "$0")"
exec ./GameX.x86_64

2 - Make this new file executable with chmod +x AppRun

3 - Removed the Exec entry from my GameX.desktop file

After that, my final appimage is working like a charm, as expected :smile:

Note 1: This is my current file structure

~/Games/AppImages/GameX/AppDir/
~/Games/AppImages/GameX/AppDir/GameX_Data/
~/Games/AppImages/GameX/AppDir/GameX.x86_64
~/Games/AppImages/GameX/AppDir/GameX.png
~/Games/AppImages/GameX/AppDir/GameX.desktop
~/Games/AppImages/GameX/AppDir/AppRun

Note 2: And this is my current GameX.desktop file:

[Desktop Entry]
Name=Game X
Icon=GameX
Type=Application
Categories=Game;

Alright, I’ve leaving this comment here for any another Unity game developer who wants to distribute games on Linux with this format and don’t have a large knowledge of that :slight_smile:

Thank you!

2 Likes