Closed a1exsh closed 3 years ago
Hi @a1exsh
If I didn't install fheroes2, what's its "installation directory" anyway?
"Installation directory" is the directory where fheroes2
binary resides. Please build your setup with proper CONFIGURE_FHEROES2_DATA
.
Hi @a1exsh as mentioned by @oleg-derevenetz , such trick logically should be used with configuration setup. I don't thing that here's a bug.
@ihhub @a1exsh The rationale here is as follows: here is a list of common (and recommended) use cases:
fheroes2
to the directory with the original game and runs fheroes2
from this directory;fheroes2
to the separate user-writable directory, then copies assets from original game to this directory and runs fheroes2
from this directory;fheroes2
to the system-wide directory (like Program Files
or /opt/local
) and then copies assets from original game to the user's data directory (e.g. ~/.fheroes2
, %APPDATA\fheroes2
and so on).In all these use cases attempt to read data files from the current directory is either useless or harmful (because the same files will be scanned twice, which is pointless waste of resources), and more often harmful than useless. For non-standard use cases there is CONFIGURE_FHEROES2_DATA
define.
Ah, I see. That works, thank you!
One can also run it with FHEROES2_DATA=. ~/src/fheroes2/fheroes2
, no need to recompile.
Preliminary checks
Platform
Linux
Describe the bug
@oleg-derevenetz the change #4125 broke my setup :(
I have the original game installed at
~/.wine/drive_c/GOG_Games/HoMM_2_Gold
. The source code is checked out at~/src/fheroes2
and I frequently build the binary to test my local changes.Now when I run the program like I used to, I'm getting the error and it refuses to run:
This worked perfectly fine before the change and I didn't have to copy MAPS/DATA/etc. anywhere.
I also frequently use the original game maps editor to create a test map so that I can compare original game behavior to fheroes2. This worked really well as I didn't have to copy the saved map around: it could be opened in both versions from the same place on disk.
If I didn't install fheroes2, what's its "installation directory" anyway?
Save file
No save file needed.
Additional info
No response