#8634 closed patch
Small patches for AdvancedDetector
Reported by: | jvprat | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | --Other-- |
Version: | Keywords: | ||
Cc: | Game: |
Description
I've written a small patch to clean the MD5 output when no match is found to make it easier to copy-paste. This removes duplicates (the same file ending with a dot) and sorts the list by file name.
Old output: "resource.000.", "eb1cc4c1e44b33c0a622f6a16e1f66ad", 737253 "resource.002.", "79f4efe77f4a502465b61904998aa563", 1153561 "resource.004.", "e19ffa75e8b31238b5a497df00911284", 1143606 "resource.001.", "f37ab6914348f47a933537048fe0fb1a", 1196787 "resource.map", "baac9cc6903a7bd6acb4d4d9f9ed6931", 5559 "resource.map.", "baac9cc6903a7bd6acb4d4d9f9ed6931", 5559 "resource.000", "eb1cc4c1e44b33c0a622f6a16e1f66ad", 737253 "resource.001", "f37ab6914348f47a933537048fe0fb1a", 1196787 "resource.002", "79f4efe77f4a502465b61904998aa563", 1153561 "resource.003.", "ca6fc95d9417237689feaf3d68bebfa0", 1159791 "resource.003", "ca6fc95d9417237689feaf3d68bebfa0", 1159791 "resource.004", "e19ffa75e8b31238b5a497df00911284", 1143606
New output: "resource.000", "eb1cc4c1e44b33c0a622f6a16e1f66ad", 737253 "resource.001", "f37ab6914348f47a933537048fe0fb1a", 1196787 "resource.002", "79f4efe77f4a502465b61904998aa563", 1153561 "resource.003", "ca6fc95d9417237689feaf3d68bebfa0", 1159791 "resource.004", "e19ffa75e8b31238b5a497df00911284", 1143606 "resource.map", "baac9cc6903a7bd6acb4d4d9f9ed6931", 5559
Ticket imported from: #1697907. Ticket imported from: patches/739.
Attachments (3)
Change History (11)
by , 18 years ago
Attachment: | clean_md5_output.patch added |
---|
comment:1 by , 18 years ago
While writing the previous patch, I've found a case where an uninitialized variable is used. The attached patch should solve it.
This made me wonder if the filename duplication (adding a final dot) is really needed. It seems it's added everywhere (both in the needed files and in the found ones), and in the end it's like a brute force search. Maybe we could reduce the addition just in one direction. For example, if we know the engines always search files without an ending dot, we don't need to add dots to the found files. This would enable a cleaner approach for my previous patch.
File Added: uninitialized-var.patch
comment:2 by , 18 years ago
Basically trailing dot is needed only for file names without extension. I.e. 'gamepc' in AGOS engine. It was problematic due to CDs written in that weird way, i.e. they have 'gamepc.' instead of plain 'gamepc'. Under Miscrosoft OS it makes no problem, but is problematic under proper POSIX systems.
comment:3 by , 18 years ago
Owner: | set to |
---|
comment:4 by , 18 years ago
So, we should only be trying a second time with a dot added if the original name doesn't contain one.
comment:5 by , 18 years ago
I'm attaching a cleaning patch for the detector that always works without the trailing dot. I've tested it with simon and found that it's still detected when renaming gamepc as sev said.
I haven't tested the filename based fallback, as I don't know of any game that works with this. File Added: cleandetector.patch
comment:6 by , 18 years ago
Haven't heard from Eugene yet, but I think this latest patch (cleandetector.patch) looks good. Commited to SVN, thanks!
comment:7 by , 18 years ago
Owner: | changed from | to
---|---|
Status: | new → closed |
comment:8 by , 6 years ago
Component: | → --Other-- |
---|
Clean the MD5 output