Tuxemon / Tuxemon

Open source monster-fighting RPG.
GNU General Public License v3.0
941 stars 197 forks source link

Failed to start on windows: OSError: cannot load file I18n #1229

Open edave64 opened 2 years ago

edave64 commented 2 years ago

Describe the bug An error occurs when I try to run the "run_tuxemon.exe". Details in the screenshot.

To Reproduce I just used the tuxemon_windows_binary.zip for v0.4.34. The same issues happens when using the current tuxemon-installer.exe

Expected behavior I would expect the game to launch.

Screenshots The error

Note that neither the folders "C:\hostedtoolcache" nor "D:\a" actually exist.

Desktop (please complete the following information):

Additional context Building from source doesn't work for me either, but that's a different issue that I'll have to look into.

kerizane commented 2 years ago

@Murmele not sure if this is due to the GitHub actions, or if the script was already broken. Probably the latter.

Murmele commented 2 years ago

Sounds like the latter one, because I just copy pasted the build of the windows CI file. I will check out in the CI file if I forgott something. Are you able to reproduce the buildlocally to find out if it is a package issue or an application issue?

kerizane commented 2 years ago

I am removing the broken artifacts from the release, for investigating the bug you can get them from here:

https://github.com/Tuxemon/Tuxemon/actions/runs/2810055930

Murmele commented 2 years ago

ok thanks!

Murmele commented 2 years ago

When I am looking into the executable, l18n is here: mods/tuxemon/l18n/

Murmele commented 2 years ago

Tried with wine I get the same error message image

Murmele commented 2 years ago

the l18n is normaly located in .tuxemon/cache or?

Murmele commented 2 years ago

When executing the installer, l18n is in .wine/drive_c/Program Files (x86)/Tuxemon/mods/tuxemon/l18n/

kerizane commented 2 years ago

Yes, l18n is usually within .tuxemon/cache

There are two folders called l18n each containing en_US/LC_MESSAGES and then a single file:

base.po (pre-compiled translations) is within mods/tuxemon, base.mo (compiled translations) is within the cache.

kerizane commented 2 years ago

@Murmele could you comment out the automatic windows publishing (leave the build) until somebody fixes this?

Murmele commented 2 years ago

@kerizane yes I can do

Vuizur commented 3 months ago

I looked into it: The reason for the bug is that LIBDIR on Windows is exe.win-amd64-3.12\lib\tuxemon, the mods folder is calculated in the code with mods_folder = os.path.normpath(os.path.join(LIBDIR, "..", "mods")), so it searches in \exe.win-amd64-3.12\lib\mods, which doesn't exist. The only mods folder on disk that actually exists is exe.win-amd64-3.12\mods. So it should be really easy to fix. (Unfortunately I don't understand the code well enough to understand the desired behaviour and submit a PR.)