- 最新
- 最多得票
- 最多評論
Hello @REDACTEDUSER
install.sh (or install.bat) needs to be at the root of the build you upload the GameLift. If that's the case, then GameLift will run the file at Fleet creation time.
If my local directory looks like this:
Game/ install.sh
GameDir/
game.exe
Then I would run this CLI command to upload a build:
aws gamelift upload-build --name MyGame --build-version 1 --build-root C:/path/to/Game --operating-system AMAZON_LINUX --region us-east-1
GameLift should be able to run the install.sh. Let me know if this is not the case.
That said, I notice that you have an *.exe file in your build and you're creating a Linux fleet. Is this the intention? There is a couple of options to do that, but I would like to know more about your use case here.
Regardless, let's assume this is what we want to do. Then, when creating the Fleet, I would make sure that the runtime configuration's launch path is:
/local/game/GameDir/game.exe
Which respects the folder structure of the build I uploaded before.
Does that make sense?
Cheers!
Alexis
Thanks @REDACTEDUSER
I tried it again and ran into the same error message. install.sh is in the root directory, my game is in a subdirectory, and I specify the build-root as the root directory C:/path/to/Game. I don't believe I can ssh in to review the logs or folder structure either after its failed or while its activating
With regards to the Linux/.exe file we intend to run our game servers through wine. Part of the install.sh script will be responsible for installing and setting up wine
If the fleet is in "Activating", "Active" or "Error" state you can connect to the instances. How to get the instance creds is pretty buried and you need to use the API to do so
Get your instances
aws gamelift describe-instances --fleet-******
Get the creds for an instance
aws gamelift get-instance-access --fleet-******
Make sure you also have the ssh port for linux and RDP port open in your port settings so you can connect.
I would love to see some better logging with the fleet installation / creation, or the ability to prevent an instance from being terminated when there's an error. Its beginning to look like the error message isn't exactly accurate, and that its actually running into problems executing the script instead. I got rid of the Windows CRLF newlines and the error message doesn't come up anymore. However, I'm now presented with a new error
FLEET_STATE_ERROR
Fleet fleet-******
More importantly, getting rid of the install.sh script altogether allows my game to actually run
I run into the same problem. install.sh is in the root, but
Cannot run program "/local/game/install.sh" (in directory "/local/game"): error=2, No such file or directory
If I do not add the install.sh there is an error that the file is missing.
Can someone post a working install.sh? Thanks.
However, above page contains no install.sh script with the content required when deploying a Linux Build. I am looking for the default install.sh file content, requested per the GameLift Fleet creation process.
I solved this problem. I'm leaving it because I think it'd help someone.
If you created <install.sh> on Window, this error is likely to occur.
Linux and Windows have different text formats.
Try open it via vi -b install.sh on Linux.
If you can see characters such as '^M', This error may occur when running it on a GameLift fleet.
相關內容
- 已提問 6 個月前
- 已提問 6 個月前