summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefanBruens <stefan.bruens@rwth-aachen.de>2018-09-08 01:45:39 (GMT)
committerGitHub <noreply@github.com>2018-09-08 01:45:39 (GMT)
commitdc90259bb67126a6f3e016db2a67499945d6224f (patch)
tree7696542946eda1bc52e1854de84ed46efb32555e /src
parent3e1360976b6ab9621b85d93fdd4e9232d6a7a7fa (diff)
downloadDoxygen-dc90259bb67126a6f3e016db2a67499945d6224f.zip
Doxygen-dc90259bb67126a6f3e016db2a67499945d6224f.tar.gz
Doxygen-dc90259bb67126a6f3e016db2a67499945d6224f.tar.bz2
Order resources not only on filename but also dirname
Although the resource generation sorted files for each subdirectory, total order, i.e. including subdirectories, was not stable. As a result, the generated resources.cpp could be different on each build run. Fixes #6152
Diffstat (limited to 'src')
-rwxr-xr-xsrc/res2cc_cmd.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/res2cc_cmd.py b/src/res2cc_cmd.py
index 7e0322d..86d999d 100755
--- a/src/res2cc_cmd.py
+++ b/src/res2cc_cmd.py
@@ -98,10 +98,11 @@ def main():
directory = sys.argv[1]
files = []
for dirName, subdirList, fileList in walk(directory):
- for fname in sorted(fileList):
+ for fname in fileList:
subdir = dirName[len(directory)+1:] if dirName.startswith(directory) else dirName
if subdir:
files.append(File.factory(directory,subdir,fname))
+ files.sort(key=lambda f: f.subdir + "/" + f.fileName)
outputFile = open(sys.argv[2],"w")
print("#include \"resourcemgr.h\"\n",file=outputFile)
for f in files: