Hi,
Well, tried today to compile and run flare on a Windows 10 machine (64 bits) and run into some problems:
- Aparrently mingw doesn't like 64 bits and you get a lot of trouble to actually make it link with the necessary and correct libs.
(What I've done was install the MSYS version from this website, recomended by SDL: http://mingw-w64.org)
- PlatformWin32.cpp is not really updated. It's missing some config inicialization and because of that, clicking in configuration and on new game (after character creation) leads to a Segmentation Fault cause it tries to access those vectors that have not being initialized. Fixing the constructor in PlatformWin32.cpp has fixed this problem.
- I wasn't able to use the --data-path to set a different location for the mod files. I had to copy that to the mod directory under the flare.exe directory. There's something wrong with paths on windows and I hadn't time to dig on this for now.
- BehaviorStandard.cpp, line 194 is also Segfaulting.
pursue_pos = target_stats->pos;
Aparrently target_stats might be NULL.
I think that I was being killed while I killed an Skeleton at almost the same time.
(not sure, but maybe a lock is needed on this case?)
Well,
So far is that. If I find any more problems and/or solutions, I'll post here.
Cheers and nice work!
Thanks for the report.
Question about the data-path issue:
Did you receive any error messages when changing the data path? I just did a clean "Release" build on Windows 7 and was able to use the flag successfully.
I believe SDL handles populating argc/argv on Windows since Windows treats console and gui applications differently. Maybe this is broken on versions of Windows > 7?
Hi,
There's something strange. Look:
D:\WORK\GAMES\flare-engine-master>flare.exe --data-path="..\flare-game-master\mods"
ERROR: Invalid custom data path: ""..\flare-game-master\mods"/"
INFO: Flare 1.09.05 (Windows)
Windows uses "\" for path. What's this "/" being there?
Well, I saw a couple of places that there's use of "/" on code and that would be used on windows, which appears to be wrong.
main.cpp does that, PlatformWin32.cpp and also ModManager.cpp
I've tried to change some stuff, but then I gave up since I don't want to waste much time now on this, but it will take some work to make it right and generic for every OS.
I don't know how you can do this correct on Windows 7.
Regards
npaulo
Okay, I was wrong about data-path working for me. I just happened to have mods in the fallback directory, so I didn't notice it was failing.
After some testing, it turns out that Windows preferring backslashes for paths isn't the problem. We don't convert the forward slashes in mod data files, and they work just fine. The problem actually ended up being the trailing slash. The stat() function errors when given a path that ends in either a slash or a backslash.
I've created a fix for this on a separate branch. I still need to test it more throughly before moving it upstream.
This data-path fix is now in the master branch. One thing to note: If you have a path with spaces, you need to put the double quotes around the flag as well, like so:
flare.exe "--data-path=..\path with spaces"