Auto-apply *.w files on RDB output in DRC

This commit is contained in:
Matthias Koefferlein 2024-04-28 17:53:10 +02:00
parent 4f96914b3c
commit daa406d518
1 changed files with 18 additions and 0 deletions

View File

@ -115,11 +115,29 @@ module DRC
end
def write
if @file_name
rdb_file = @engine._make_path(@file_name)
# Apply waive DB if possible
wdb_file = rdb_file + ".w"
if File.exists?(wdb_file)
begin
wdb = RBA::ReportDatabase::new
wdb.load(wdb_file)
@engine.info("Applying waive database: #{wdb_file} ..")
@rdb.apply(wdb)
wdb._destroy
rescue
end
end
@engine.info("Writing report database: #{rdb_file} ..")
@rdb.save(rdb_file)
end
end
def rdb