[physfs] Packaging programs using PhysFS + ...

Edward Rudd eddie at omegaware.com
Mon May 12 22:44:23 EDT 2003


On Mon, 2003-05-12 at 18:06, Gaetan de Menten wrote:
> Hello there,
> 
> First, let me thank all the people (mainly Ryan C. Gordon, I guess) who
> contributed to this library... It's not that well-known but it's cool
> anyway :) 
> 
> Then I got a question:
> I'm using physfs in a game but since physfs is not that well-known, it
> seems like binary packages for it are not widespread. Even on the
> official page, the binaries are out of date. As I don't want my users to
> have to compile the library themselves, what should I do? "Copy" its
> source in my source tree (in a subdirectory) and statically link to it?
> or build those binary packages myself and distribute them "on the same
> page" as my game?
> 
I have the same situationa nd this is what I'm planning on doing
1) you could include a shared library with your program and either use
dlload/dlsyms and dynamically link to your copy runtime..
2) include the shared library but use the LD_LIBRARY_PATH environment
variable in a script that starts your program...

The second will work on linux, I"m not sure about windows or mac.. 
And I believe the first can be done on other OS's.. Not sure how to do
it with other compilers though.. (Visual C++ for example).. using mingw
on windows should be no problem though..

I haven't done any testing on this yet, as I'm still designing APIs. 
Right now I've integrated PHP as a scripting engine and have PHP using
PhysFS for all file access..

I can send you a dlsyms example program if you want.. but google should
get you there just the same..


> While I'm at it... I hope it'll be included in SDL2.0... Any hope for
> this?
> 
> One more thing:
> It would be nice (and easy to do) to have a function returning the
> number of files in a directory and another one to read a "text" line
> (read until a \n).
In the archives somewhere I posted my iostreams wrapper to physfs..
which plugs in a streambuf and iostream class to open a file via
physfs,so you use the << and >> and the getline etc.. functions of the
iostreams to access the file.. which in the class it uses the physfs
calls to fill the buffer space in the streambuf..

If you need me to repost it I can,..
> 
> 
> Thanks in advance,
> Gaetan.
-- 
Edward Rudd <eddie at omegaware.com>




More information about the physfs mailing list