Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script API compatibility files are not found #8618

Closed
frosch123 opened this issue Jan 30, 2021 · 3 comments · Fixed by #8906
Closed

Script API compatibility files are not found #8618

frosch123 opened this issue Jan 30, 2021 · 3 comments · Fixed by #8906
Assignees

Comments

@frosch123
Copy link
Member

Version of OpenTTD

20210129-master-g48698403a8
linux, self-compiled from checkout

Expected result

Starting a game with SiliconValley game script should load the 1.3 API compatibility script, and print
"1.3 API compatibility in effect." in the GS log.

Actual result

The GS log shows "API compatibility script not found".
The script crashes later due to API incompatibility.

Steps to reproduce

  1. There is no system-wide installation of OpenTTD.
  2. Start OpenTTD directly from "build" folder.
  3. Add "SiliconValley" as GS, and start a game.
  4. Check the GS log for one of the two messages above.
@frosch123
Copy link
Member Author

I guess cmake needs to copy the scripts to the build folder?

@TrueBrain
Copy link
Member

Some background, for those who are interested: when I started the CMake branch, the idea was to have the current-working-directory in bin, so these files didn't have to be copied and constantly checked for: "are you modified?". lang is loaded from where-ever openttd is located (inside the build folder), which on the targets I was testing worked fine.

Sadly ... it turns out initially my set of targets I tested with was too limited :) On Windows it is pretty common that``openttd.exelives inbuild/Debug` and `build/Release`, meaning it cannot find `lang` (which is in `build/lang`). As such, the current-working-directory has to be your build-folder for it to work. So this whole idea had to be thrown out of the window, and the content of `bin` has to be copied inside the `build` folder.

I am guessing, but I have not checked the code, that this last part never happened yet. I think I never left that as comment in the PR how I left it, and in normal testing this won't show up ... but who is to blame for not implementing this is not important now, is it? :D

So yeah, sounds like the best solution is to copy the files from the bin folder inside the build folder via CMake :) Just be careful that changes to those file have to trigger a new copy .. but by now we have enough experience with that, not? (and with "we" I guess I mean @glx22 .. sorry :P)

@stormcone
Copy link
Contributor

FYI: There is a patch for that in JGRPP: JGRennison/OpenTTD-patches@e39a1d2. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants