Where should I add license and copyrght information?
-
Hi
I have finished my
Exclusive File Lockplugin, everything is working and I will release it as a free plugin. It will be GNU GPLv3The last thing I have to sort out is were to put copyright and license information.
Do anyone have any examples of license and copyright formats and where to put them. Maybe a well formatted plugin I can look at.
I have used the
Notepad++ Plugin Templatewhich already has some copyright information in it so I assume I would need to add to these.Any help for this novice would be appreciated.
shoulders
-
If you put the GPLv3 license text in a file called
LICENSEorLICENSE.mdin your repo root, then GitHub will be able to make it clear to people who look at the repo what license you are under. (For best results, if you take the plain text or markdown files directly from the GNU website, GitHub can unambiguously recognize which license you are using.)Also, the official GPLv3 page has a section that explains how to put the copyright notice in your source code, so that it points to the license.
Some plugins will also include at least the copyright notice and sometimes the full LICENSE text in their ABOUT dialog or similar, but that’s not universal.
-
@PeterJones I will have the license in my repo, i have put it in an
aboutmenu item. I was particular interested in should i put it on individual files like the cpp and header files. -
I was particular interested in should i put it on individual files like the cpp and header files.
Which is what the section I linked you to describes how to do. As I said, “that explains how to put the copyright notice in your source code”. So follow that link, and it will show you the boilerplate to put in your source code files.
-
@PeterJones I have read that section but different languages have slightly different formats, also it does not address how I handle the already present copyright information and how to add my name etc to it.
If you knew of a well formed “real” plugin I can look at it and use that format. Practical examples are what I am after.
But either way I appreciate your help.
-
<one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.Seems pretty straightforward to me. You put the “block comment” syntax for your language around that block, fill in the
<one line..,>and<year> <name of author>Since the template you used probably already had the copyright, you most likely just need to change the intro line comment and the copyright line comment.
I’m not sure what more you want to see? Here’s how I did it in my CollectionInterface plugin: https://github.com/pryrt/NppPlugin-CollectionInterface/blob/main/src/PluginDefinition.cpp:
/* Copyright (C) 2025 Peter C. Jones <EMAIL@REDACTED FOR ANTISPAM> This file is part of the source code for the CollectionInterface plugin for Notepad++ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. */So when I did that, I didn’t bother with the
<one line>, and I just filled in the year and name as prompted.
One more thing:
how I handle the already present copyright information
For files from the template that I didn’t edit (other than maybe changing a string or two), I just left the copyright notice as originally given (which shows it was from the template). For files new to me, or that I changed significantly from the template version, I updated with my copyright block from above. You can navigate to other CPP files in that same repo I just linked you to in order to see more files, to see my mix of notices.
-
@PeterJones thanks for the link and information. This is exactly what I wanted.
These are some of my notes I put together a while back
How to implement Open Source licenses on your software | QuantumWarp
So this information will not go to waste, and again thanks for your time.
-
I randomly found this new meta
SPDX-License-Identifier:where you can add one line.// Copyright (c) 2026 Jane Smith // SPDX-License-Identifier: MIT- https://spdx.org/licenses/
- https://spdx.dev/learn/handling-license-info/
- https://github.com/david-a-wheeler/spdx-tutorial
Thought I might mention this as I have never heard of this standard.
I assume it is still legal but, IANAL.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login