All of a sudden, these errors are being thrown by the VSCode extension, I even tried to do a fresh install of the engine and extension but it still keeps popping up.
If it is at all useful I’m using Fedora 41 currently, along with FPC 3.2.2-15.
It means that CodeTools (part of our pasls
tool, used by our VS Code extension) cannot find standard FPC units sources. These messages imply that code completion in VS Code cannot find FPC units, which means it cannot complete code in most programs.
You mention you use FPC 3.2.2-15 – do you mean FPC installed from the Fedora standard packages?
- If yes, then make sure you have installed also FPC sources, and point
FPCDIR
setting in VS Code (see Castle Game Engine - Visual Studio Marketplace ) to their location. - Alternatively, note that you can also just rely in FPC “bundled” with the engine. Standard engine downloads on Download | Castle Game Engine come packaged with this FPC, and you don’t need to install any FPC system-wide to use it.
If this doesn’t help, please let me know We will need then more information about your system:
- Show us your VS Code settings, all settings for Castle Game Engine extension.
- Tell us where and how exactly did you install FPC and FPC sources.
- Tell us how exactly do you install the engine – e.g. using zip from Download | Castle Game Engine ? With bundled or not FPC version?
Thanks!
Here is the VSCode extension settings I currently have (bundled with fpc version installed:
I have fpc and fpc-src installed via the fedora repository, but i have tried many things. Different downloads (bundled and not-bundled), removing and reinstalling fpc and fpc-src, etc. The only change I made to my machine between the time it worked and now is installing Qemu to test a build on windows, but even uninstalling anything related to Qemu did not seem to help. I also tried pointing the FPCDIR setting to the location of the source files but it seemed to not help anything.
I may see if it’s something I’ve done and forgotten about in the OS when I can. May simply be a system issue rather than an engine one. I wonder how Castle would work on Gentoo
Just did a quick test, after sending all the game files to a Linux Mint PC, it seems to work fine. I must have done something to some file somewhere…
OK, so this comes down to at least 2 problems, if you cannot setup “FPC bundled with CGE” and you cannot setup “FPC installed from Fedora”. Let’s try one thing at a time:
-
Let’s try to make “FPC bundled with CGE work”.
- To be sure, please remove Fedora’s fpc, fpc-src and related packages.
- Running
fpc
on the command-line should answer that FPC cannot be found. - Make sure you have CGE download from Download | Castle Game Engine , and it has FPC bundled inside – check that it has
..../castle_game_engine/tools/contrib/fpc/src
subdirectory. - Make sure you don’t have anything non-standard in the environment. If you have defined
CASTLE_ENGINE_PATH
environment, remove it. If you have added toPATH
something to CGE or FPC, remove it. - Now, in VS Code settings, you should only need to provide the “Engine Path”. So the configuration you should on the screenshot above should work.
- If it doesn’t, please check that above is good, and that your user can access everything, and finally in VS Code open “Help → Toggle Developer Tools”. Please make a screenshot of it’s contents, we are in particular interested in all the lines that look like this:
[Extension Host] Castle Engine Extension - Activate - START
[Extension Host] Engine path from configuration: ...
[Extension Host] Found FPC sources (FPC looks like provided by fpcupdeluxe): ...
[Extension Host] Found Lazarus sources: ...
[Extension Host] Paths found:
Castle Game Engine path: ...
Castle Game Engine build tool path: ....
Pascal server path: ...
FPC executable path: ...
FPC sources path: ...
Lazarus sources path: ...
[Extension Host] bestWorkspaceFolder:...
[Extension Host] FPC standard units paths: ...
[Extension Host] Extended execution environment PATH (to add FPC, Lazarus paths): ...
[Extension Host] Castle Engine Extension - Activate - DONE
[Extension Host] Extended execution environment PATH (to add FPC, Lazarus paths): ...
-
In an independent test, let’s try to make FPC from Fedora work.
- Install Fedora’s packages for fpc, fpc-src
- Show where is FPC. Does
fpc
from command-line works? What doeswhich fpc
tell? - Where are FPC sources. What do you have in
/usr/share/fpcsrc/
?/usr/local/share/fpcsrc/
? If the fpc-src from Fedora is in a different place, then you need to setFPCDIR
to that location, as mentioned in the last post.
Please provide as much information about the above steps as you can, so I will be able to help Screenshots of everything will be helpful.
I had enough problems on Fedora (as much as I like it, I’ve always felt it has a mind of it’s own) so I switched over to Debian on my main system. I do switch Linux Distros like I change socks though so I may be able to give some more information about it.
Everything just works on Debian though, so I feel like this is just up to user error
I used Fedora and it was quite hard to tune. Specially on multimedia (graphics and sound). I moved to Debian too and now I have much less problems with that.
I still use yum over dnf if that says anything I like fedora a lot but it can be a nightmare. As much as I dislike Debian, it just works without as much hassle.