diff --git a/src/Gui/iisTaskPanel/tests/styles/main.cpp b/src/Gui/iisTaskPanel/tests/styles/main.cpp index 9d4d66547..290bd60e1 100644 --- a/src/Gui/iisTaskPanel/tests/styles/main.cpp +++ b/src/Gui/iisTaskPanel/tests/styles/main.cpp @@ -1,3 +1,10 @@ +/*************************************************************************** + * * + * Copyright: http://www.ii-system.com * + * License: LGPL * + * * + ***************************************************************************/ + #include #include "styles.h" diff --git a/src/Gui/iisTaskPanel/tests/styles/styles.cpp b/src/Gui/iisTaskPanel/tests/styles/styles.cpp index 20477515f..351e1775e 100644 --- a/src/Gui/iisTaskPanel/tests/styles/styles.cpp +++ b/src/Gui/iisTaskPanel/tests/styles/styles.cpp @@ -1,3 +1,10 @@ +/*************************************************************************** + * * + * Copyright: http://www.ii-system.com * + * License: LGPL * + * * + ***************************************************************************/ + #include "styles.h" #include diff --git a/src/Gui/iisTaskPanel/tests/styles/styles.h b/src/Gui/iisTaskPanel/tests/styles/styles.h index 5c9096990..714ad5638 100644 --- a/src/Gui/iisTaskPanel/tests/styles/styles.h +++ b/src/Gui/iisTaskPanel/tests/styles/styles.h @@ -1,3 +1,10 @@ +/*************************************************************************** + * * + * Copyright: http://www.ii-system.com * + * License: LGPL * + * * + ***************************************************************************/ + #ifndef TEST_H #define TEST_H diff --git a/src/Gui/iisTaskPanel/tests/test/main.cpp b/src/Gui/iisTaskPanel/tests/test/main.cpp index 32081f918..9a3c2f710 100644 --- a/src/Gui/iisTaskPanel/tests/test/main.cpp +++ b/src/Gui/iisTaskPanel/tests/test/main.cpp @@ -1,3 +1,10 @@ +/*************************************************************************** + * * + * Copyright: http://www.ii-system.com * + * License: LGPL * + * * + ***************************************************************************/ + #include #include "test.h" diff --git a/src/Gui/iisTaskPanel/tests/test/test.cpp b/src/Gui/iisTaskPanel/tests/test/test.cpp index e323985bb..814118310 100644 --- a/src/Gui/iisTaskPanel/tests/test/test.cpp +++ b/src/Gui/iisTaskPanel/tests/test/test.cpp @@ -1,3 +1,10 @@ +/*************************************************************************** + * * + * Copyright: http://www.ii-system.com * + * License: LGPL * + * * + ***************************************************************************/ + #include "test.h" #include diff --git a/src/Gui/iisTaskPanel/tests/test/test.h b/src/Gui/iisTaskPanel/tests/test/test.h index bb075bca3..f9ec5ec54 100644 --- a/src/Gui/iisTaskPanel/tests/test/test.h +++ b/src/Gui/iisTaskPanel/tests/test/test.h @@ -1,3 +1,10 @@ +/*************************************************************************** + * * + * Copyright: http://www.ii-system.com * + * License: LGPL * + * * + ***************************************************************************/ + #ifndef TEST_H #define TEST_H diff --git a/src/Mod/PartDesign/Scripts/Epitrochoid.py b/src/Mod/PartDesign/Scripts/Epitrochoid.py index 391666b9f..c6f633587 100644 --- a/src/Mod/PartDesign/Scripts/Epitrochoid.py +++ b/src/Mod/PartDesign/Scripts/Epitrochoid.py @@ -1,3 +1,7 @@ +#! python +# -*- coding: utf-8 -*- +# (c) 2011 Werner Mayer LGPL +# from __future__ import division # allows floating point division from integers import FreeCAD, Part, math diff --git a/src/Tools/LicenseChecker.py b/src/Tools/LicenseChecker.py new file mode 100644 index 000000000..f6e97c37d --- /dev/null +++ b/src/Tools/LicenseChecker.py @@ -0,0 +1,83 @@ +#! python +# -*- coding: utf-8 -*- +# (c) 2013 Werner Mayer LGPL +# +# Utility to search for source, header and Python files with a missing license text + +import codecs, os + +ext=[".cpp", ".cxx", ".cc", ".c", ".hpp", ".hxx", ".hh", ".h", ".inl", ".inc", ".py"] +flt=['__init__.py', '_rc.py', 'CxImage', + 'coin_header_includes.h', + 'CxxDebug.hxx', + 'IndirectPythonInterface.hxx', + ('src%sTools')%(os.path.sep), + ('App%skdl_cp')%(os.path.sep), + ('3rdParty%satlas')%(os.path.sep), + ('Mod%sGDML')%(os.path.sep), + ('boost%snumeric%sbindings')%(os.path.sep,os.path.sep), + ('salomesmesh%sinc')%(os.path.sep), + ('App%sCore%stritritest.h')%(os.path.sep,os.path.sep) + ] + # A note to tritritest.h + # tritritest.h has no licensing information, but Tomas Moller replied + # the following, when asked about it: + # + # The code is is free to use for anyone and any projects, but I give no + # warranties. + # + # See: http://anonscm.debian.org/gitweb/?p=debian-science/packages/freecad.git;a=blob;f=debian/copyright +lic=['LGPL', + 'GNU Library', + 'GNU Lesser', + 'Permission to copy, use, modify', + 'Permission to use, copy, modify', + 'Distributed under the Boost Software License', + 'Redistribution and use in source and binary forms', + 'This program is free software: you can redistribute it', + 'This module is free software, and you may redistribute it and/or modify', + 'This file was automatically generated by SWIG' + ] + +def startProcessing(): + fn = os.path.realpath(__file__) + # get path of parent directory + fn = os.path.dirname(fn) + fn = os.path.dirname(fn) + global ext + global flt + traverse(fn, ext, flt) + +def traverse(path, ext, flt): + for r,d,f in os.walk(path): + for i in f: + fn = os.path.join(r,i) + # filter out some file names + stop = False + for j in flt: + if fn.find(j) >= 0: + stop=True + break + if stop: + continue + bn = os.path.basename(fn).lower() + for j in ext: + if bn.endswith(j): + parsefile(fn) + break + +def parsefile(fn): + data = codecs.open(fn,'r','utf-8') + try: + lines = data.readlines() + data.close() + + global lic + for i in lines: + for j in lic: + if i.find(j) >= 0: + return + + print ("Missing license text in file %s") % (fn) + except: + pass