gvanem / wsock-trace

Tracing library for Winsock calls.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About geoip.exe

sgeto opened this issue · comments

So it seems that geoip.exe looks for the geoip files in %HOME%.
I think it should rather look in the parent folder (src..) because %HOME% is by default not set and because you can't expect people to have the files in their user folder. The geoip files that come with this repo are also expected to be more up-to-date.

Another thing is that the command geoip.exe -6g geoip-gen6.c outputs this when failing:
'geoip4' file '"C:\Users\Ali\geoip' not found. This is needed for these tests.

Shouldn't it be looking for geoip6? Or is it and this is just a mistake?

The output is wrong because it expects both geoip4 and geoip6 files to exist.
See function check_requirements(). I'll change that.

The rest of the issue I'll have to rethink.

I think it should rather look in the parent folder.

How can that be retrieved? Based on what?

How about the user must run an install-script before building. Like install.bat.txt.
Since there are several files copied, I prefer a %APPDATA%\ws_trace sub-dir.

I hate apps placing stuff in %APPDATA%, I prefer %HOME% (%USERDATA%) or the environment variable %WSOCK_TRACE%.

The best way to make sure the user has installs these files is to add them as part of the install target or make the nmake install call this batch file. Of course this will only happen after the build, when the build actually needs it during the build.

I think that if you use fopen() (or something similar) in geoip,c to look for geoip and geoip6 in the parent folder (..\geoip*) and/or in %HOME% this issue could be resolved too.

Also it should probably be %APPDATA%\Roaming\ws_trace

I think that if you use fopen() (or something similar)

Edit: GetFileAttributes() is actually a better choice.

Also it should probably be %APPDATA%\Roaming\ws_trace

Really? Here my %APPDATA% is c:\Users\Gisle\AppData\Roaming.
But I honestly don't know the difference between
C:\Users\Gisle\AppData\Local and
C:\Users\Gisle\AppData\Roaming.

I think that if you use fopen() (or something similar) in geoip,c

Maybe.

No progress in approx. 4 years. And the problem is perhaps resolved. Closing.