📦 Crisp Windows Cursor package

This commit is contained in:
ful1e5 2020-08-10 11:26:24 +05:30
parent e7d509295b
commit 5f99e0565a

View file

@ -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: