Open mjordan opened 8 years ago
Duh. Just noticed that the two functional post-write hook scripts already parse the .ini file:
$config = parse_ini_file($config_path, true);
but they do so to get the ['WRITER']['output_directory']
, not their own settings.
Currently, config variables for post-write hook scripts are hard-coded in the scripts themselves. Since these scripts have access to the MIK config file, we should allow adding variables used by these scripts in the .ini file. Each script could get its own section in the .ini file. For example, the validate_mods.php script defines these variables internally:
We should allow these variables to be defined in the .ini file, like:
The validate_mods.php script could then parse the ini file to get its settings:
The benefit of this is that variables like paths to executables, which are OS-specific, don't need to be hard-coded in the script.