Looks like you are getting really close of having your application run properly on Linux.
I believe the right approach for this to work would be to leverage mkbundle. With this utility, you should be able to package your application as a standalone. This has the advantage of not having to install the whole Mono runtime with the install.sh and it’ll will allow you to run your application on GameLift without using a shell script.
Now, I don’t know a lot about your build environment and I am going to assume you are building with Mono on Linux. Here’s an example of a command that I would use to bundle up an application:
mkbundle -o MyGameServiceStandAlone GameServerExecutableApplication lib1.so lib2.so lib3.so --deps --static --config myconfigfile -L /usr/lib/mono/<Your version of mono>
This should give you a single executable file ‘MyGameServiceStandAlone’ that encompasses your application ‘GameServerExecutableApplication’ with all the libraries required for it to run. Keep in mind that you will have to give it all the libraries required by your application, including all the GameLift’s dependencies.
I invite you to play around with mkbundle and figure out the proper command for your application, but this should give you a good place to start.
Would you mind giving this a try and see if it works out for you?
Hope this helps!
P.S. Amazon Linux images sometime have older versions of libc and so if you run into failures to bootstrap your application you’ll want to use custom configuration files when bundling it up. For example:
<dllmap dll="libc" target="libc.so.6" os="!windows"/>