License issues

This commit is contained in:
wmayer 2013-01-09 14:09:22 +01:00
parent 5dd72b9501
commit 5af75be21b
8 changed files with 129 additions and 0 deletions

View File

@ -1,3 +1,10 @@
/***************************************************************************
* *
* Copyright: http://www.ii-system.com *
* License: LGPL *
* *
***************************************************************************/
#include <QtGui/QApplication>
#include "styles.h"

View File

@ -1,3 +1,10 @@
/***************************************************************************
* *
* Copyright: http://www.ii-system.com *
* License: LGPL *
* *
***************************************************************************/
#include "styles.h"
#include <iisTaskPanel>

View File

@ -1,3 +1,10 @@
/***************************************************************************
* *
* Copyright: http://www.ii-system.com *
* License: LGPL *
* *
***************************************************************************/
#ifndef TEST_H
#define TEST_H

View File

@ -1,3 +1,10 @@
/***************************************************************************
* *
* Copyright: http://www.ii-system.com *
* License: LGPL *
* *
***************************************************************************/
#include <QtGui/QApplication>
#include "test.h"

View File

@ -1,3 +1,10 @@
/***************************************************************************
* *
* Copyright: http://www.ii-system.com *
* License: LGPL *
* *
***************************************************************************/
#include "test.h"
#include <iisTaskPanel>

View File

@ -1,3 +1,10 @@
/***************************************************************************
* *
* Copyright: http://www.ii-system.com *
* License: LGPL *
* *
***************************************************************************/
#ifndef TEST_H
#define TEST_H

View File

@ -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

View File

@ -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