space-menace icon indicating copy to clipboard operation
space-menace copied to clipboard

project does not run on Windows

Open krehera opened this issue 5 years ago • 3 comments

When trying to run on Windows (using Vulkan) I got the following error:

Error: Error { inner: Inner { source: None, backtrace: None, error: ConfigError(File(Os { code: 123, kind: Other, message: "The filename, directory name, or volume label syntax is incorrect." })) } }

I posted in the Amethyst discord -- I wanted to reach you directly as mentioned in the Readme, but no Discord username/number is mentioned. If you need more info, you can reach out to me there. Chish#2578

krehera avatar Dec 29 '19 20:12 krehera

@krehera Thanks for logging the issue. Last I checked, the game was running fine on Windows. But that was a long time ago. Will look into this as soon as I get access to a Windows system.

krankur avatar Dec 30 '19 04:12 krankur

If I run cargo run from inside the space menace root directory on Windows 10, the game runs just fine. However, if I then try to run ./target/debug/space-menace.exe, it does produce the same error you are reporting.

The problem seems to be that some of the relative links to files in the /assets/ or /resources/ folders are run from a different directory and are therefore not resolving. A short-term fix is to only run the game using cargo run.

Jazarro avatar Dec 30 '19 17:12 Jazarro

The game uses the application_root_dir utility function provided by amethyst. From the docs on application_root_dir:

Returns the cargo manifest directory when running the executable with cargo or the directory in which the executable resides otherwise, traversing symlinks if necessary.

So you need to move both the executable as well as the configuration (assets/ and resources/) to the same directory for the executable to resolve the path correctly.

Or just use cargo run as @Jazarro mentions.

bacongobbler avatar Sep 30 '21 16:09 bacongobbler