Hi,
>Sam Stickland wrote:
>>
>> Hi,
>>
>> Some of the projects I hope to use PLIB in are unfortunately not open
>> source - so to maintain the LGPL license agreement PLIB needs to be
>> distributed as either shared libraries on *nix or DLL's on Win32 - which
>> requires some change to the automake system on *nix, and the changing of
>> some function prototypes on Win32.
>
>Well, you don't have to distribute PLIB unless you make changes to it.
>
>The contract implied between you and me by the LGPL is just that I'll give
>you the software for free so long as you promise to give me back any
>improvements you make to it...which you are just about to do. Woohoo! The
>system works!
>
>It also implies a requirement that your users be able to re-link your code
>against some hypothetical future PLIB without having to get you to do it.
>You can meet that requirement by shipping the '.o' files for your
application.
>I doubt that anyone ever made use of that feature in practice - but that's
>what LGPL requires.
>
>As an alternative, you *could* recompile PLIB as a DLL/.so - but that's not
>how I distribute it normally.
Yes, that's what I was hoping to do. It's just a pet-project of mine that I
would open source but as it's a multi-player network game I fear there could
be issues with security on the network. (Yes, I know all the arguments
about security through obsurity is no security is no security at all, et
all.. I'd be happy to discuss the situation with people but it's not really
on topic for this list).
>> Also, I needed PUI to resize it's interface when the window resizes, so I
>> made a couple of trivial changes to the source to allow this.
>
>Cool!
>
>> I'd like to submit these changes (to the current stable release). How do
I
>> go about this?
>
>If it's a simple patch, just email it to me - if you feel you need CVS
access
>to do major stuff, then I'll do it - but I'd like a better idea of what you
>plan to change.
It's not actually that much. Here's the changes for the interface scaling:
Make puGetWindowHeight(...) and puGetWindowWidth(...) return puWindowHeight
and puWindowWidth (rather than using glutGet(). This is like the
PU_NOT_USING_GLUT version.
Put a puSetWindowSize(...) in prototype in pu.h.
And that's it. Make sure you can puSetWindowSize before you do any
puDisplay calls and you're away. (I skip puDisplay completely and setup the
opengl state myself)
Minimal changes that should probably be wrapped up into #ifdef
PU_INTERFACE_RESIZING or something.
The DLL changes simply require a:
#ifdef WIN32
#define PU_EXPORT __dllspec(dllexport)
#else
#define PU_EXPORT
#endif
in a common header file, and then PU_EXPORT has to be added to every
function and variable prototype/declaration (after the return type, but
before the prototype). And, of course, some matches project files to
generate the DLLs (I can supply VC++ version 6) (although it's probably best
to supply all new project files VC++ being what it is).
I can supply a patch for the DLL and .so stuff - I'm not sure if it's worth
it for the interface resizing stuff.
I can't seem to get anonymous access (for read-only), on the plib cvs store
btw. Wincvs reports no recognised user "anonymous". Any ideas?
Sam
|