summaryrefslogtreecommitdiffstats
path: root/lib/tqwtplot3d/scripts
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-07-11 14:15:27 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-07-11 14:15:27 -0500
commitb85a292ce06475d560bfa1195b63a8bfe211f22d (patch)
tree463d71be55ff807513139f1de106aef6bdd7b4db /lib/tqwtplot3d/scripts
parentce039289815e2802fdeca8d384126c807ca9cb58 (diff)
downloadulab-b85a292ce06475d560bfa1195b63a8bfe211f22d.tar.gz
ulab-b85a292ce06475d560bfa1195b63a8bfe211f22d.zip
Add 0.2.7 release of qwtplot3d for future TQt3 conversion and use
Diffstat (limited to 'lib/tqwtplot3d/scripts')
-rw-r--r--lib/tqwtplot3d/scripts/fixvc7.py16
-rw-r--r--lib/tqwtplot3d/scripts/makedistro.py67
-rw-r--r--lib/tqwtplot3d/scripts/makedocu.py36
-rw-r--r--lib/tqwtplot3d/scripts/qwtplot3d.supp17
-rw-r--r--lib/tqwtplot3d/scripts/valgr.sh1
5 files changed, 137 insertions, 0 deletions
diff --git a/lib/tqwtplot3d/scripts/fixvc7.py b/lib/tqwtplot3d/scripts/fixvc7.py
new file mode 100644
index 0000000..968337a
--- /dev/null
+++ b/lib/tqwtplot3d/scripts/fixvc7.py
@@ -0,0 +1,16 @@
+sourcedir = 'V:\\\\cvs\\qwtplot3d\\'
+stext="&quot;$(QTDIR)&quot;\\bin\\"
+rtext="$(QTDIR)\\bin\\"
+
+import os, string, sys
+from os.path import join, getsize
+for root, dirs, files in os.walk(sourcedir):
+ for name in files:
+ if '.vcproj' in name:
+ f = file(join(root,name),'r')
+ s = f.read()
+ f.close()
+ ss = string.replace(s,stext,rtext)
+ f = file(join(root,name),'w+')
+ f.write(ss);
+ f.close();
diff --git a/lib/tqwtplot3d/scripts/makedistro.py b/lib/tqwtplot3d/scripts/makedistro.py
new file mode 100644
index 0000000..4af5ce5
--- /dev/null
+++ b/lib/tqwtplot3d/scripts/makedistro.py
@@ -0,0 +1,67 @@
+import os.path
+import shutil
+import tarfile
+import zlib
+import zipfile
+from time import gmtime, strftime
+
+refuseddirs = ['CVS','Debug','Release','moc','obj','tmp','data','hannes','doc','lib','bin']
+refusedfiles = ['Makefile','.cvsignore','gl2psTest.c','gl2ps.bat','gl2ps.pro']
+requiredfiles = ['qwtplot3d.dsw','examples.dsw','qwtplot3d.sln','examples.sln','thesis.tex','valgr.sh','qwtplot3d.supp','install.nsi']
+requiredfiletypes = ['pro','bat','cpp','c','h','ui','ts','png','rc','ico','py','qrc']
+srcfiletypes = ['cpp','c','h']
+
+source = 'V:\\\\cvs\\porting24\\qwtplot3d\\'
+
+#tstr = strftime("%y%m%d", gmtime())
+#tarname = 'V:\\\\cvs\\uploads\\' + tstr + 'plot3d.tgz'
+#zipname = 'V:\\\\cvs\\uploads\\' + tstr + 'plot3d.zip'
+
+refuseddirs.append('scripts')
+tarname = 'V:\\\\cvs\\uploads\\qwtplot3d-0.2.6.tgz'
+zipname = 'V:\\\\cvs\\uploads\\qwtplot3d-0.2.6.zip'
+
+
+
+def dos2unix(filename):
+ if os.path.isdir(filename):
+ print filename, "Directory!"
+ return
+ data = open(filename, "rb").read()
+ if '\0' in data:
+ print filename, "Binary!"
+ return
+ newdata = data.replace("\r\n", "\n")
+ if newdata != data:
+ print filename
+ f = open(filename, "wb")
+ f.write(newdata)
+ f.close()
+
+
+def compresstree(src, tar, zip):
+ names = os.listdir(src)
+
+ for name in names:
+ srcname = os.path.join(src, name)
+ if os.path.isdir(srcname):
+ if name not in refuseddirs:
+ compresstree(srcname,tar, zip)
+ else:
+ (base,ext) = os.path.splitext(name)
+ ext2 = ext[1:]
+ if ((ext2 in requiredfiletypes) and (name not in refusedfiles)) or (name in requiredfiles):
+ zip.write(srcname, 'qwtplot3d/' + srcname[len(source):])
+ if (ext2 in srcfiletypes):
+ dos2unix(srcname)
+ tar.add(srcname, 'qwtplot3d/' + srcname[len(source):])
+
+
+if os.path.exists(tarname):
+ os.remove(tarname)
+
+tar = tarfile.open(tarname, "w:gz")
+zip = zipfile.ZipFile(zipname, 'w', zipfile.ZIP_DEFLATED)
+compresstree(source,tar, zip)
+tar.close()
+zip.close()
diff --git a/lib/tqwtplot3d/scripts/makedocu.py b/lib/tqwtplot3d/scripts/makedocu.py
new file mode 100644
index 0000000..b6a233d
--- /dev/null
+++ b/lib/tqwtplot3d/scripts/makedocu.py
@@ -0,0 +1,36 @@
+import os.path
+import shutil
+import tarfile
+import zlib
+import zipfile
+from time import gmtime, strftime
+
+refuseddirs = ['CVS','images']
+refuseddirsextra = ['CVS','small']
+
+source = 'V:\\\\cvs\\porting24\\qwtplot3d\\doc\\'
+sourceim = 'V:\\\\cvs\\porting24\\qwtplot3d\\doc\\images\\'
+zipname = 'V:\\\\cvs\\uploads\\qwtplot3d-doc.zip'
+zipextraname = 'V:\\\\cvs\\uploads\\qwtplot3d-doc-extra.zip'
+
+def compresstree(src, zip, refdir):
+ names = os.listdir(src)
+
+ for name in names:
+ srcname = os.path.join(src, name)
+ if os.path.isdir(srcname):
+ if name not in refdir:
+ compresstree(srcname, zip, refdir)
+ if name == 'images':
+ compresstree(srcname +'\\small', zip, refdir)
+ else:
+ zip.write(srcname,'qwtplot3d\\doc\\' + srcname[len(source):])
+
+
+
+zip = zipfile.ZipFile(zipname, 'w', zipfile.ZIP_DEFLATED)
+compresstree(source, zip, refuseddirs)
+zip.close()
+zip = zipfile.ZipFile(zipextraname, 'w', zipfile.ZIP_DEFLATED)
+compresstree(sourceim, zip, refuseddirsextra)
+zip.close()
diff --git a/lib/tqwtplot3d/scripts/qwtplot3d.supp b/lib/tqwtplot3d/scripts/qwtplot3d.supp
new file mode 100644
index 0000000..ebe0720
--- /dev/null
+++ b/lib/tqwtplot3d/scripts/qwtplot3d.supp
@@ -0,0 +1,17 @@
+{
+ nvidia_suppression
+ Addrcheck,Memcheck:Param
+ ioctl(generic)
+ obj:/lib/libc-2.3.2.so
+ fun:NvRm*
+}
+{
+ nvidia_suppression_2
+ Addrcheck,Memcheck:Cond
+ fun:__nvsym*
+}
+{
+ nvidia_suppression_3
+ Addrcheck,Memcheck:Cond
+ obj:/usr/lib/opengl/nvidia/lib/libGL*
+} \ No newline at end of file
diff --git a/lib/tqwtplot3d/scripts/valgr.sh b/lib/tqwtplot3d/scripts/valgr.sh
new file mode 100644
index 0000000..6c3090a
--- /dev/null
+++ b/lib/tqwtplot3d/scripts/valgr.sh
@@ -0,0 +1 @@
+valgrind --logfile=valog --suppressions=qwtplot3d.supp --error-limit=no $1 \ No newline at end of file