Skip to content

Commit c4384eb

Browse files
authored
Merge pull request #26 from sourcehold/python-add-setup-scripts-and-structures
[PYTHON/RECCMP] Create setup script and re-structure reccmp setup
2 parents 01f9035 + 68d3e8c commit c4384eb

16 files changed

Lines changed: 202 additions & 33 deletions

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ message("CMAKE_CXX_FLAGS_RELWITHDEBINFO is ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
5858
# Handled by path, but explicitly included to support IntelliSense
5959
include_directories(${CMAKE_SOURCE_DIR}/MSVC1400/VC/include ${CMAKE_SOURCE_DIR}/MSVC1400/VC/PlatformSDK/Include)
6060

61+
# Handle Windows dependencies that need explicit linking
62+
link_libraries(winmm)
63+
6164
# Handle dependencies without source files
6265
include_directories(${CMAKE_SOURCE_DIR}/dependencies/recreated/include)
6366
link_directories(${CMAKE_SOURCE_DIR}/dependencies/recreated/lib)

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,8 @@ Because the original game was compiled using an old compiler, you have to compil
4747
git clone --recursive https://github.com/sourcehold/OpenSHC.git
4848
```
4949
- Should NET Framework 3.5 be required, it can be easily installed on Windows 11 by running `mt.exe` (from the MSVC1400 repo), Windows 11 will ask to install the right version.
50-
2. Install the needed Python dependencies, mainly `reccmp` for binary comparison
51-
```sh
52-
python -m pip install -r requirements.txt
53-
```
54-
3. Create a softlink to the original game executable with the name `_original` by running [softlink.bat](softlink.bat). It will request the full path to the game folder.
50+
2. Create a softlink to the original game executable with the name `_original` by running [softlink.bat](softlink.bat). It will request the full path to the game folder.
51+
3. Setup the needed Python environment to run `reccmp` for binary comparison by running [setup.bat](reccmp/setup.bat) in the reccmp folder.
5552

5653
### Development
5754
The build can be run using the dev tools of the preferred IDE or via the build scripts. Regardless, a CMake installation is required.
@@ -69,7 +66,7 @@ If the scripts are preferred, the following triggers a build using the scripts:
6966
```
7067
5. Compare a function byte by byte to check compilation:
7168
```sh
72-
reccmp-reccmp --target STRONGHOLDCRUSADER --verbose 0x401000
69+
reccmp/run reccmp-reccmp --target STRONGHOLDCRUSADER --verbose 0x401000
7370
```
7471

7572
Note that any code needs to be formatted properly using the provided `clang-format`. The way to do so it up to the developer. Many IDEs support it out of the box.

cmake/core-sources.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ src/core/MainImplementation.cpp
22
src/core/Resolver.cpp
33
src/core/ViewportRenderState.cpp
44
src/core/entry.cpp
5-
src/core/windowslib.cpp

compare.bat

Lines changed: 0 additions & 1 deletion
This file was deleted.

reccmp-build.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

reccmp-user.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

reccmp/reccmp-build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
project: .
2+
targets:
3+
STRONGHOLDCRUSADER:
4+
path: ../build-RelWithDebInfo/OpenSHC.exe
5+
pdb: ../build-RelWithDebInfo/OpenSHC.pdb
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
targets:
22
STRONGHOLDCRUSADER:
3-
filename: StrongholdCrusader.exe
4-
source_root: .
3+
filename: Stronghold Crusader.exe
4+
source_root: ../src
55
hash:
66
sha256: 3bb0a8c1e72331b3a30a5aa93ed94beca0081b476b04c1960e26d5b45387ac5a
7+
data_sources: []
78
ghidra:
89
ignore_types: []
910
ignore_functions: []
1011
name_substitutions: []
12+
allow_hash_mismatch: false
1113
report:
1214
ignore_functions: []

reccmp/reccmp-user.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
targets:
2+
STRONGHOLDCRUSADER:
3+
path: ../_original/Stronghold Crusader.exe

0 commit comments

Comments
 (0)