AntSimulator icon indicating copy to clipboard operation
AntSimulator copied to clipboard

copy config file over

Open whyvn opened this issue 3 years ago • 1 comments

I know its stupid for a few lines to be a pr but its kindof important since config is loaded relative to the current directory which causes inconsistencies when loading config file depending on your current directory. e.g. if your in . and you run ./build/AntSimulator it will try to load the config file in . instead of ./build. i was initially going to change the loadUserConf() function but i noticed that ./res/ already uses cmake to copy its contents so i thought it should stay with the style but the obvious downside with this implementation is that only the config in . will be synced between builds, this means changes made in ./build will be overwritten although this happens with res too and an easy fix would be to write in ./conf.txt and re-sync the temporary changes before building (maybe a message saying something like "your config files are different which one do you want to keep"or something like that).

whyvn avatar Jan 18 '23 12:01 whyvn

unfortunately the COMPARE and DIFFERENCES arent standard cmake from what i know so i had to use diff with the downside of output.

whyvn avatar Jan 19 '23 00:01 whyvn