SPF-OST / pytrnsys

Package that provides functionality to run and process, plot and report TRNSYS simulations
https://pytrnsys.readthedocs.io
GNU General Public License v3.0
11 stars 8 forks source link

Compare `pytrnsys` DLLs with TRNSYS DLLs before each run #99

Open zuckerruebe opened 2 years ago

zuckerruebe commented 2 years ago

As a user I want to be sure pytrnsys runs TRNSYS with the DLLs released with pytrnsys. Hence pytrnsys should at startup always check that

  1. If there is a DLL foo.dll in the TRNSYS DLL folder which exports a function (e.g. func7) of the same name as a function exported by a Dll x in the pytrnsys folder, then x = foo.dll and the hashes of both foo.dlls must be the same (i.e. they must [almost certainly ;)] be binary equal)
  2. All the DLLs in the pytrnsys DLL folder should also be in the TRNSYS DLL folder (looking at the names). If this is not the case tell the user to run the copy-dll script and re-run pytrnsys
  3. There should be no collisions of exported functions across all TRNSYS DLLs.

pytrnsys should refuse to run unless all of the above conditions are satisfied (possibly we can add a command line argument to override this behavior).

zuckerruebe commented 2 years ago

@martin-neugebauer: FYI