Questions in Respect to Code Release
Posted: Thu Mar 05, 2015 8:57 pm
I am going to release my engine sometime this month. Unfortunately I have never released code and also didn't originally write my code with the intention of releasing it or having it run on any machine aside from my own. This leads me to a few questions. I also suspect I might have more questions before I release and in order not to clutter up the forum I will just reply to my own post here if I do end up with more questions.
So my first question is in respect to licensing. I want to release my code under GPL however I found out there are 3 versions of GPL, is there a reason not to use the newest version? On this same note as far I can remember there shouldn't be any code snippets I didn't write myself that is longer then just a few lines of code, however I use kogge stone fill algorithms which I at some point, back when my engine was still in Java took from the CPW page I just linked. Is it even possible for me to release my engine with this part of the code? Do I need to add people to the list of authors if I don't remove this part of the code?
Assuming I can release my code under some license, should I write the license information at the top of every single file or does it suffice to simply add it in the project directory together with a read me file?
Furthermore I wrote my code under Linux and I currently have the following 3 functions which I don't know if they are platform specific?
Aside from again having the question if it is possible to release my code with these functions in them I also wanted to know if I would have to change something so the code will compile on Windows/OSX? My understanding is that functions that start with "__" are system specific...
The last question that comes to mind is in respect to makefiles. This is my first and so far only larger scale (more then a single file) project written in c++ and was in large part done in order to learn how to code c++ (for better or worse the majority of c++ code I have now seen outside of my own, is that of Stockfish). And while it was a great learning experience it was a serious uphill battle for me and as such I tried to avoid some things, specifically I haven't used pointers in my code yet and have absolutely no clue how to write my own makefile yet. Instead I opted for making a Managed Make C++ project using the Eclipse CDT. In essence what I am trying to say is my makefile is automatically generated and any other automatically or manually generated makefile should be as good or better then mine and I don't know how it actually works. My question is when I release the code should I release the makefile with it? Should I take the time to learn to write and proceed to write my own makefile before releasing the project? Will the makefile work on systems that are not Linux without changing it at all?
So my first question is in respect to licensing. I want to release my code under GPL however I found out there are 3 versions of GPL, is there a reason not to use the newest version? On this same note as far I can remember there shouldn't be any code snippets I didn't write myself that is longer then just a few lines of code, however I use kogge stone fill algorithms which I at some point, back when my engine was still in Java took from the CPW page I just linked. Is it even possible for me to release my engine with this part of the code? Do I need to add people to the list of authors if I don't remove this part of the code?
Assuming I can release my code under some license, should I write the license information at the top of every single file or does it suffice to simply add it in the project directory together with a read me file?
Furthermore I wrote my code under Linux and I currently have the following 3 functions which I don't know if they are platform specific?
Code: Select all
/** return the number of trailing zeros */
inline int numberOfTrailingZeros(BitBoard x) {
return __builtin_ctzll(x);
}
/** return the leading number of zeros */
inline int numberOfLeadingZeros(BitBoard x) {
return __builtin_clzll(x);
}
/** return number of set 1 bits */
inline int popCount(BitBoard x) {
return __builtin_popcountll(x);
}
The last question that comes to mind is in respect to makefiles. This is my first and so far only larger scale (more then a single file) project written in c++ and was in large part done in order to learn how to code c++ (for better or worse the majority of c++ code I have now seen outside of my own, is that of Stockfish). And while it was a great learning experience it was a serious uphill battle for me and as such I tried to avoid some things, specifically I haven't used pointers in my code yet and have absolutely no clue how to write my own makefile yet. Instead I opted for making a Managed Make C++ project using the Eclipse CDT. In essence what I am trying to say is my makefile is automatically generated and any other automatically or manually generated makefile should be as good or better then mine and I don't know how it actually works. My question is when I release the code should I release the makefile with it? Should I take the time to learn to write and proceed to write my own makefile before releasing the project? Will the makefile work on systems that are not Linux without changing it at all?