Remove old mod archive before packing.

This commit is contained in:
lzwdgc 2024-02-13 22:48:48 +03:00
parent 23ddad574e
commit abce8c17e1
2 changed files with 7 additions and 0 deletions

View file

@ -27,6 +27,10 @@ deps: pub.lzwdgc.Polygon4.Tools.aim1_mod_maker-master
// patch note:
// patch note: Installation
// patch note: Unpack and drop all files near original aim.exe. Replace files if necessary.
// patch note: Or you can use mod_activator.exe, put it near aim.exe and drop mod archive
// patch note: onto mod_activator.exe in explorer.
// patch note: Game loads .pak files from the latest to oldest, so active mod .pak file must have
// patch note: the latest timestamp on it.
// patch note:
int main(int argc, char *argv[]) {

View file

@ -199,6 +199,9 @@ struct mod_maker {
// we do not check for presence of 7z command here
if (has_in_path("7z")) {
auto ar = get_full_mod_name() + ".zip";
if (fs::exists(ar)) {
fs::remove(ar);
}
primitives::Command c;
c.working_directory = game_dir;