ko4life-net / ko

Open source development of the game Knight Online. This is a reversed engineered old version of the game aiming to replicate the nostalgic experience we all once had <3
MIT License
52 stars 21 forks source link

Use SrcDir and absolute paths for improved build reliability and portability. #250

Closed stevewgr closed 1 month ago

stevewgr commented 1 month ago

Description

This pull request includes two key changes aimed at improving project maintainability and robustness:

  1. Use SrcDir Instead of SolutionDir:

    • Replaces the usage of the SolutionDir variable with the SrcDir variable.
    • The SolutionDir variable can be problematic when building a specific project directly, especially when passing a .vcxproj file to msbuild instead of a .sln file. In such cases, SolutionDir is undefined and can break the build.
    • Using SrcDir makes the project more portable and resilient to directory relocations.
  2. Replace Relative Paths with Absolute Paths Using SrcDir:

    • Converts all relative paths to absolute paths by leveraging the SrcDir variable.
    • This change enhances project maintenance and ensures better handling of directory relocations.

Benefits

stevewgr commented 1 month ago

Build passing: https://github.com/ko4life-net/ko/actions/runs/10278200148/job/28441471408

Merging.