Updated h2inc_gtk.py
This commit is contained in:
@@ -77,6 +77,7 @@ incinc = ''
|
|||||||
defdir = False
|
defdir = False
|
||||||
defsrc = 'usr/include'
|
defsrc = 'usr/include'
|
||||||
defdest = '~'
|
defdest = '~'
|
||||||
|
count = 0
|
||||||
|
|
||||||
def sourcedir_filecnt(sourcedir):
|
def sourcedir_filecnt(sourcedir):
|
||||||
### Return the number of files, ending with '.h', in sourcedir - including subdirectories ###
|
### Return the number of files, ending with '.h', in sourcedir - including subdirectories ###
|
||||||
@@ -112,6 +113,7 @@ def sourcedir_foldercnt(sourcedir):
|
|||||||
return cnt
|
return cnt
|
||||||
|
|
||||||
def process_file(data):
|
def process_file(data):
|
||||||
|
global count
|
||||||
outfile = ''
|
outfile = ''
|
||||||
inputfile = data
|
inputfile = data
|
||||||
encodings = ['utf-8', 'latin-1', 'windows-1250', 'windows-1252', 'ascii',
|
encodings = ['utf-8', 'latin-1', 'windows-1250', 'windows-1252', 'ascii',
|
||||||
@@ -146,7 +148,8 @@ def process_file(data):
|
|||||||
fh.close()
|
fh.close()
|
||||||
outputfile = os.path.splitext(inputfile)[0] + '.inc'
|
outputfile = os.path.splitext(inputfile)[0] + '.inc'
|
||||||
outputfile = str(outputfile).replace(srcdir, destdir)
|
outputfile = str(outputfile).replace(srcdir, destdir)
|
||||||
print(outputfile)
|
count += 1
|
||||||
|
print(str(count)+'->'+outputfile)
|
||||||
if not os.path.exists(os.path.dirname(outputfile)):
|
if not os.path.exists(os.path.dirname(outputfile)):
|
||||||
try:
|
try:
|
||||||
os.makedirs(os.path.dirname(outputfile))
|
os.makedirs(os.path.dirname(outputfile))
|
||||||
|
|||||||
Reference in New Issue
Block a user