|
DelphiDabbler Wiki |
FAQs /
CodeSnipAppSourceCodeSnip Compiling & Source Code FAQThis FAQ is about compiling and using the source code of the DelphiDabbler CodeSnip Code Snippets Repository Application. If your question was about using CodeSnip itself please see the Using CodeSnip FAQ instead. If you can't find your answer below add your question to the Unanswered Questions page. Contents
1: Where can I get the CodeSnip source code? The best place is the CodeSnip Subversion repository on SourceForge.net. There are three main branches:
Please note that any code in the You can download a GNU Tarball of any of the branches. Alternatively you can check out code from the repository using a Subversion command like: svn co https://codesnip.svn.sourceforge.net/svnroot/codesnip codesnip
Please note that this will check out the whole repository. You are strongly advised to append a further directory to the URL. For example to checkout the trunk use: svn co https://codesnip.svn.sourceforge.net/svnroot/codesnip/trunk codesnip
Zip files containing the source of each release from v3.0 onwards are also available from SourceForge, in the CodeSnip project's Files section. Finally, the source code of the latest stable release only can be downloaded from DelphiDabler.com. 2: Which compiler is needed to compile CodeSnip? CodeSnip is written in Delphi Object Pascal. It must be compiled with Delphi 2010, although later Delphi compilers may be suitable. Some other utilities are also needed. See the "Build Tools" section of this file for details. CodeSnip's original code is open source and most of it is covered by the Mozilla Public License 1.1. Any third party libraries are also open source. The only exception is the code linked in from the Delphi RTL and VCL libraries. Given that you need Delphi to compile CodeSnip, that's not really an issue providing you don't distribute the Delphi library source code. 4: How do I build CodeSnip from source? This is all covered in detail in the file 1 the linked file is in the 5: Do you have a version of the source code that compiles with Delphi versions earlier than 2010? No, sorry. The code base makes use of Delphi 2010 features. With a few changes it may compile on Delphi 2009 (no promises). But, since the code now assumes that 6: Will you publish the PHP source code for the web services that CodeSnip accesses? Sorry but no. CodeSnip is open source but the scripts that drive my website are not. To publish all the relevant code would be a security risk. However, for each web service CodeSnip uses, there's a separate unit in the source code. In those unit's you'll find documentation about how to access the web services. 7: I want to use some of the CodeSnip source code in my project, what are the rules? The answer assumes that the code is covered by the Mozilla Public License 1.1 (MPL). This answer is not authoritative - please refer to the license itself for that. This is just a brief overview for which I make no warranty of accuracy. If this answer conflicts with the license then the license takes precedence.
If your project is for private use (i.e. you will not be distributing the project) then you can use the code as you wish. If you do intend to distribute your project, then the following rules apply to the CodeSnip code:
Using MPLd code from CodeSnip does not mean you have to make your other source files available. But there's no way out of complying with these requirements for MPLd code. If your project is licensed under the GPL or LGPL please read FAQ 10. Footnotes: 1 "Advertise" means you must mention that your product uses MPLd code in some suitable place in your documentation, help files, about box etc. The documentation must also tell users how to obtain the source code. You must also acknowledge the names of the original developers of the files you are using. 2 In the case of unchanged source files you may link to the CodeSnip Subversion repository on SourceForge, providing that you specify the names, paths and revision numbers of the files you are using. Alternatively provide your own means of obtaining the files3. 3 Make your own arrangements for making the MPLd available to users of your project. You could upload the files to some web space and provide a URL in your documentation or distribute the source files with your product. If you're in doubt about anything, or want help linking to CodeSnip's Subversion repo, ask me! 8: How do I contribute code / bug fixes to the project? You can contribute code in two ways:
Do not change the license on any code you modify. If you are submitting new source code units please license them using the Mozilla Public License v2.0 without an "Incompatible With Secondary Licenses" Notice. If you don't want to use the MPL v2.0 please discuss it with me first. 1 For info on checking out code from the Subversion repository, see FAQ 1. 2 To submit code use the issue tracker. Open the relevant bug report and / or feature request and attach the patch file, leaving a comment so that I get notified. If you don't make a comment I won't get a notification email. If there's no suitable bug report or feature request, create one first and attach the file to that. 9: How do I use TortoiseSVN to check out the CodeSnip source code?
The required source code should download into the folder. Note: You won't be able to commit changes unless you are a project member. However you can still submit changes to the author. See FAQ 8 for details. 10: Can I use CodeSnip source code in my GPL or LGPL licensed project? If the CodeSnip code is covered by the Mozilla Public License (MPL) v1.1 and does not have the MPL / GPL / LGPL tri-license you can't use it as is. This is because MPL v1.1 and the GPL / LGPL are not considered to be compatible. It is my intention to change the CodeSnip v4 code to the Mozilla Public License v2.0, which is GPL / LGPL compatible. If the files you want are not compatible I will try to accommodate you, providing:
For code in the trunk I will change to MPL v2.0 and for other code either MPL v2.0 or the tri-license as I see fit. If you want to do this, please get in touch, naming the files you are interested in. For other licenses, please read the license concerned and check out what the Free Software Foundation has to say about it. |