kthakore / frozen-bubble

Making frozen bubble cross platform
http://frozen-bubble.org
GNU General Public License v2.0
149 stars 33 forks source link

User home directory is not detected on Windows #72

Open the-Arioch opened 5 years ago

the-Arioch commented 5 years ago

2.2.1beta1 when run on Windows 10 opens menu, but fails to enter the game mode itself.

Console log:

[SDL Init] [Graphics....libpng warning: Interlace handling should be turned on when using png_read_image libpng warning: Interlace handling should be turned on when using png_read_image libpng warning: Interlace handling should be turned on when using png_read_image ......] [Sound Init] Ready. output in file /.frozen-bubble/rc failed: No such file or directory

Bug reason:

d:\Strawberry\perl\site\lib\Games\FrozenBubble\Stuff.pm

$FBHOME = "$ENV{HOME}/.frozen-bubble";

There is no HOME variable in Windows NT, there are

HOMEDRIVE=C: HOMEPATH=\Users\abcdefgh

However yet better, for the Windows filesystem standard, would be using yet another variable - the roaming (network-shared in the domain) application data - APPDATA environment var - and then there is no need to hide the FB folder (not that dot-files were hidden on Windows anyway)

So, the correct line, for windows would be

$FBHOME = "$ENV{APPDATA }/frozen-bubble";

the-Arioch commented 5 years ago

Also, could you please update ALien:SDL1 on CPAN and relax GCC version RegExp ? See https://stackoverflow.com/questions/50562148/