mirror of
https://github.com/diasurgical/riivaaja.git
synced 2026-05-21 05:40:34 +00:00
Tracking of the "similarity" to the original binary.
This commit is contained in:
committed by
Dennis Duda
parent
1fe38c84f6
commit
c63a2d2100
@@ -1,4 +1,6 @@
|
||||
*
|
||||
!orig_full.asm
|
||||
!status.sh
|
||||
!VS6/COMMON/MSDEV98/BIN/MSPDB60.DLL
|
||||
!VS6/COMMON/MSDEV98/BIN/RCDLL.DLL
|
||||
!VS6/COMMON/MSDEV98/BIN/RC.EXE
|
||||
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
/orig_full.asm
|
||||
/VS6
|
||||
/DevStudio_5.10
|
||||
@@ -4,7 +4,7 @@ Docker build system for devilution using the original tools.
|
||||
|
||||
In order to verify the accuracy of the source code and to generate a binary that is as close as possible to the original one, it is necessary to compile it using the original toolchain. This tool generates a docker image that can be used to compile devilution on any platform with that toolchain.
|
||||
|
||||
This build system is used in the devilution CI system as well in order to make sure that all changes can be compiled with the original toolchain.
|
||||
This build system is used in the devilution CI system as well in order to make sure that all changes can be compiled with the original toolchain and also calculate the accuracy of the binary.
|
||||
|
||||
## Running
|
||||
|
||||
@@ -22,7 +22,7 @@ docker run -v $(pwd):/root/devilution -e MAKE_BUILD=pdb diasurgical/riivaaja
|
||||
|
||||
## Building a new image
|
||||
|
||||
Place the files for Visual C++ 5 SP3 (DevStudio_5.10) and Visual C++ SP5 PP5 (VS6) in the Riivaaja root folder. Make sure the versions of VC actually support optimizations (Professional and higher).
|
||||
Place the files for Visual C++ 5 SP3 (DevStudio_5.10) and Visual C++ SP5 PP5 (VS6) in the Riivaaja root folder. Make sure the versions of VC actually support optimizations (Professional and higher). Optionally use Devilution-comparer to generate a orig_full.asm and put it in the root to allow Riivaaja to generate a project status.
|
||||
|
||||
Then run the following command:
|
||||
|
||||
@@ -38,4 +38,3 @@ Make sure that all the files needed have the right casing (see the `.dockerignor
|
||||
We aim to expand this to support the following:
|
||||
|
||||
- Artifact generation
|
||||
- Tracking of the "similarity" to the original binary.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
diff /root/orig_full.asm compare_full.asm > /tmp/asm.diff || true
|
||||
insertions=$(cat /tmp/asm.diff | grep "^+" | wc -l)
|
||||
deletions=$(cat /tmp/asm.diff | grep "^-" | wc -l)
|
||||
total=$(cat /root/orig_full.asm | wc -l)
|
||||
echo "$(((insertions + deletions) / (total * 2 / 100)))% change, $((insertions)) insertions(+), $((deletions)) deletions(-)"
|
||||
|
||||
Reference in New Issue
Block a user