elishacloud / dxwrapper

Fixes compatibility issues with older games running on Windows 10/11 by wrapping DirectX dlls. Also allows loading custom libraries with the file extension .asi into game processes.
zlib License
1.16k stars 83 forks source link

License Issues #146

Closed DarkShadow44 closed 10 months ago

DarkShadow44 commented 2 years ago

I saw you give credit to quite a few projects, but your license is not compatible with them. Now, I'm not a lawyer, but I'm pretty sure you have quite a few license violations here. E.g., you use OllyDbg's disasm.c, which is GPL. This would require your project to also be GPL, which it is not.

To avoid getting this project and/or yourself in trouble, I'd recommend fixing those license issues.

mirh commented 2 years ago

I don't think so (even though perhaps it may be better underlined that there's a mix of licenses in the project, and not just one). Dxwrapper uses the zlib license AFAICT, which is GPL compatible.

Binaries are going to be GPL eventually, but the source code can still keep that otherwise.

DarkShadow44 commented 2 years ago

The zlib license is only in so far GPL compatible, in that GPL code can use zlib code - not the other way around. The GPL is pretty strict on that. And the license should apply to the code, not only the binaries.

mirh commented 2 years ago

A GPL binary is GPL code that uses zlib code. And I see nothing wrong with different part of the code using different licenses (as long as they are compatible with each other). I agree some extra clarification of what "legally" happens behind the scenes given the premises is needed though.

elishacloud commented 2 years ago

I'm pretty sure you have quite a few license violations here.

You mentioned that I have "quite a few" violations, but only mentioned one. I will address the one you mentioned. GPL licenses allow for "fair use" rights when using the source code inside another program. See here.

DarkShadow44 commented 2 years ago

I'm based in Germany, which (AFAIK) doesn't have fair use, so I don't know much about that. But I don't think using the code in another project is covered...

Following other issues I see (taken from the credits you've given):

You probably should also include the MIT and BSD license somewhere, AFAIK it's needed for both source and release. The real problem here is GPL. You can't use that unless your project is GPL as well, this is kinda the whole reason GPL exists in the first place.

P.S.: Please excuse if I might sound a bit petty in my comments, I'm just very careful about legal/license matters, and this is my 2 cents. Though I'm pretty sure people appreciate that you gave detailed and visible credits in the first place! I appreciate your transparency on this matter.

elishacloud commented 2 years ago

@DarkShadow44, thanks for your comments here. Let me address some of these:

The code from ReactOS, doom3, diablo-ddrawwrapper, DSoundCtrl and Wine have been completely re-written by me. I used their code as an initial foundation and then completely rewrote it. I kept the mention of them in here because I see the credits as a bibliography, giving credit to the locations where I got the ideas from. BTW: I also got permission from the creator of DSoundCtrl to use his code.

So I think the only "issue" is DxWnd and OllyDbg's disasm.c, which both use GPL licenses. I don't know much about GPL licenses. It seems WAY too complicated for open source code. What's the point in having open source software if the license is too complicated for normal people to understand it or use it? It is no longer "open" at that point but becomes closed to only people who can understand it. As you stated above, we need a lawyer to understand these things. I can't afford a lawyer. This is supposed to be an open source (i.e. FREE) project! Therefore, I opted to use a simple license that is much easier to understand.

Anyways, I am in the USA and we have fair use rights here. It seems I am able to use the GPL code under fair use, which I am doing. Thanks!

mirh commented 2 years ago

The real problem here is GPL. You can't use that unless your project is GPL as well

Again, not true, regardless of fair use. https://www.gnu.org/licenses/gpl-faq.en.html#WhatDoesCompatMean You probably can't just loosely sweep under the rug that the entire project would have just a single license, but just a little note would be already enough to perfectly solve the situation.

..if that was the only problem, but I'm afraid this might be more difficult https://github.com/aqrit/ddwrapper/blob/master/license.txt

elishacloud commented 2 years ago

..if that was the only problem, but I'm afraid this might be more difficult

I am not using any code from that GitHub repository. The code I am using does not exist there. Maybe he deleted that part of the code before uploading it there? Anyways, I am using the code from here, which does not have any such license file. Furthermore, the license explicitly says: "For non-commerical use: do anything you want." I am using this for non-commercial, so I can do anything I want, including use the code without acknowledgments. But, I am doing better than that. I am actually acknowledging him.

BTW: Commercial use is a legal term that defines the use of certain merchandise, tools or intellectual property for financial gain. See here.

just a little note would be already enough to perfectly solve the situation.

I am fine to add a note to the top of the source code. But I don't have privileges to add a note to all of the source code. For example, I link in d3d8to9 as a sub-module. Since it is a sub-module I have no way of adding a note to that part of the code. It would also be nice to know exactly what needs to be said in that note. I have already added a note to each source file that uses any code from another source. See here for an example.

DarkShadow44 commented 2 years ago

The code from ReactOS, doom3, diablo-ddrawwrapper, DSoundCtrl and Wine have been completely re-written by me. I used their code as an initial foundation and then completely rewrote it. I kept the mention of them in here because I see the credits as a bibliography, giving credit to the locations where I got the ideas from.

Fair enough, I didn't actually check how much code of each project you use.

What's the point in having open source software if the license is too complicated for normal people to understand it or use it? It is no longer "open" at that point but becomes closed to only people who can understand it.

Not really, the point of the GPL is to force people to keep the code open. That's why, once it's GPL, it has to remain GPL. It's a lot of legalspeak though, and noone really understands it fully. Whether you agree with that philosophy or keep things simple is a different question. :)

Again, not true, regardless of fair use. https://www.gnu.org/licenses/gpl-faq.en.html#WhatDoesCompatMean

Not sure how this is relevant. Sure, you can merge code when your own project is GPL. Because not all licenses allow this merge, you need a compatible license for that. But this project is not GPL to begin with.

mirh commented 2 years ago

I am not using any code from that GitHub repository.

Putting aside that "no license" would technically be even less flexible, see https://github.com/aqrit/ddwrapper/issues/1.

Furthermore, the license explicitly says: "For non-commerical use: do anything you want."

Yes, but that's incompatible with the GPL (and even zlib maybe?).

I am fine to add a note to the top of the source code.

You don't even need that actually. Just mentioning in the license file that "everything in this project is released under X, except those file in Y folders or with Z preambles" would be enough.

Sure, you can merge code when your own project is GPL.

"Project" doesn't really mean much legally. Only individual source files, and their (redistributed) combination/compilation/linking to form machine code is what matters. If you are compatible, it means that as long as you abide to the conditions of the most restrictive license (for the binaries), you are good.

DarkShadow44 commented 2 years ago

Only individual source files, and their (redistributed) combination/compilation/linking to form machine code is what matters. If you are compatible, it means that as long as you abide to the conditions of the most restrictive license (for the binaries), you are good.

So you're saying the whole project has to be GPL.

mirh commented 2 years ago

No, I'm saying that you are focusing on a non-issue. AFAIK there's no "legal relationship" between individual pieces of source code (even if they specifically make references to other parts of the codebase). "Text" is kinda just text. It's only after the act of compilation that they are functionally and "physically" a whole, where their terms of use intermingle.

So whether you argue "this is GPL at 10% and the remainder is zlib" or "this is zlib at 90% and the remainder is GPL" it doesn't really matter, as long as you aren't misrepresenting the conditions of some library.

DarkShadow44 commented 2 years ago

That's not how that works, IMHO the GPL is pretty clear: You're only allowed to use GPL'd code in your code if your code is GPL as well. Even when it's just code, you can't avoid the GPL, it's a viral license. Everything it touches has to be GPL.

mirh commented 2 years ago

Yes, but this is the deal. "Use" happens, duh, at use time. When you run the thing (or to be even more specific, when you distribute the work). Even if we use the very conservative bar of "having compiled it", that's still way above just the source code at rest existing. https://opensource.stackexchange.com/a/4557/24576

Two cpps sitting one in front of the other is just words, not touching.

DarkShadow44 commented 2 years ago

As soon as you push the code to github, you make it public, distributing it.

https://opensource.stackexchange.com/a/4557/24576

Read the other comments, that specific comment is simply wrong.

mirh commented 2 years ago

It's wrong.. because what? The specific commenter has read them too, you know. Putting even aside credentialism, they also make a pretty compelling example with ffmpeg.

If your extensive interpretation that source couldn't be stated to have a more permissive license than the object code (because "this is zlib except 5% of it" wouldn't be equal to "this is GPL except 95% of it"), then you couldn't even claim a project is LGPL if it just so happened to optionally include GPL code. Its source code would already be infected.

DarkShadow44 commented 2 years ago

Sigh We just don't agree, do we? ffmpeg allows you to link against GPL code, as optional dependency. If you don't link against said GPL code, then your project doesn't need to be GPL. They don't just copy GPL code into their code, they have a clear boundary and configuration. It's murkier waters, but I doubt the author wants to do this here. As it currently is, that's a different usecase.

mirh commented 2 years ago

ffmpeg allows you to link against GPL code, as optional dependency.

Yes. But the optionality of the dependency doesn't remove from the fact that the feature/code/whatever that exploits the GPL stuff is still there in the overall "project".

You can't choose not to compile the GPL part here, but insofar as we convene the "interaction" doesn't automatically and immediately happen in the sources that's it.

If you don't link against said GPL code, then your project doesn't need to be GPL.

And, dead source code is not linking or linked to anything either. Of course binaries are going to be GPL licensed here, but that wasn't being put into question.

They don't just copy GPL code into their code, they have a clear boundary and configuration.

Having a submodule or a subtree seems legally intangible tbh.

elishacloud commented 10 months ago

Closing issue. 1. dxwrapper does not make the use of the GPL parts conditional on accepting an EULA. 2. dxwrapper does not prevent modifications to the GPL-covered components. 3. The dxwrapper source code is provided for all to see and modify.