diff --git a/helper.py b/helper.py index 96bb8ca..2b3b642 100644 --- a/helper.py +++ b/helper.py @@ -2,8 +2,8 @@ import shutil import json import sys -from config import name, temp_folder, bitmaps_dir, win_out, x11_out -from os import path, listdir +from config import name, temp_folder, bitmaps_dir, win_out, x11_out, window_install_inf, windows_cursors +from os import path, listdir, rename, remove package_dir = "./packages" @@ -12,9 +12,21 @@ win_out_dir = path.join(package_dir, win_out) def window_bundle() -> None: + # Remove & Rename cursors + # If Key found => Rename else Remove + for cursor in listdir(win_out_dir): + old_path = path.join(win_out_dir, cursor) - # TODO: Where is Body !!!!! - pass + try: + new_path = path.join(win_out_dir, windows_cursors[cursor]) + rename(old_path, new_path) + except KeyError: + remove(old_path) + + # creating install.inf file + install_inf_path = path.join(win_out_dir, "install.inf") + with open(install_inf_path, "w") as file: + file.write(install_inf_path) def init_build() -> None: