heal-research / HeuristicLab

HeuristicLab - An environment for heuristic and evolutionary optimization
https://dev.heuristiclab.com
GNU General Public License v3.0
38 stars 16 forks source link

Build improvements #3155

Open Vanmodeus opened 2 years ago

Vanmodeus commented 2 years ago

As described in #3152 the build process depends on a local git installation. Furthermore, the build process checks the current OS to execute specific Pre/PostBuildEvents and scripts (PreBuildEvent.cmd/.sh | MergeConfigs.cmd/.sh | ConfigMerger.exe) which leads to additional maintenance effort. To reduce these OS/machine specific dependencies, I've created a new .net standard 2.0 solution called HeuristicLab.Build, which includes the existing Pre/PostBuildEvents as MSBuild-Tasks and changed the existing .csproj files to utilize these new build tasks. The Version (revision to be more precise) uses minutes since midnight as a fallback if something goes wrong with git.

Please let me know what you think about this solution and if it also works on your machine.

gkronber commented 2 years ago

When a Plugin.cs.frame file contains an empty line the PreBuildEvent inserts the output "ECHO ON" into the generated Plugin.cs file. I suspect the problem is in PreBuildEvent.cmd line 26 when "!modified!" is empty. Proposed fix: if a line is empty then just output an empty line (without any replacements).