mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-22 03:05:13 -04:00
📚 Bibata builder docs added
This commit is contained in:
parent
7e452a4512
commit
31469678e8
6 changed files with 12 additions and 39 deletions
|
@ -32,9 +32,6 @@ class Bundler():
|
|||
"""
|
||||
|
||||
def __init__(self, config: ConfigProvider) -> None:
|
||||
"""
|
||||
docsstring
|
||||
"""
|
||||
self.__name = config.name
|
||||
self.__tmpdir = config.tmpdir
|
||||
self.__x11_dest = path.join(config.out_dir, self.__name)
|
||||
|
@ -42,17 +39,13 @@ class Bundler():
|
|||
self.__content = config.get_windows_script()
|
||||
|
||||
def __save_win_install_script(self) -> None:
|
||||
"""
|
||||
docstring
|
||||
"""
|
||||
""" Save `install.inf` file in windows cursor theme. """
|
||||
file_path = path.join(self.__win_dest, "install.inf")
|
||||
with open(file_path, "w") as file:
|
||||
file.write(self.__content)
|
||||
|
||||
def __clean_win_bundle(self) -> None:
|
||||
"""
|
||||
docstring
|
||||
"""
|
||||
""" Remvoe unnecessary cursor from directory generated by `clickgen` """
|
||||
# Remove & Rename cursors
|
||||
# If Key found => Rename else Remove
|
||||
for cursor in listdir(self.__win_dest):
|
||||
|
@ -67,24 +60,18 @@ class Bundler():
|
|||
self.__save_win_install_script()
|
||||
|
||||
def win_bundle(self) -> None:
|
||||
"""
|
||||
docstring
|
||||
"""
|
||||
""" Make cursor theme installable on `Windows OS`. """
|
||||
src = path.join(self.__tmpdir, self.__name, "win")
|
||||
shutil.copytree(src, self.__win_dest)
|
||||
self.__clean_win_bundle()
|
||||
|
||||
def x11_bundle(self) -> None:
|
||||
"""
|
||||
docstring
|
||||
"""
|
||||
""" Make cursor theme installable on `x11`. """
|
||||
src = path.join(self.__tmpdir, self.__name, "x11")
|
||||
shutil.copytree(src, self.__x11_dest, symlinks=True)
|
||||
|
||||
def bundle(self) -> None:
|
||||
"""
|
||||
docstring
|
||||
"""
|
||||
""" Make cursor theme installable on `x11` & `Windows OS`. """
|
||||
x11_src = path.join(self.__tmpdir, self.__name, "x11")
|
||||
shutil.copytree(x11_src, self.__x11_dest, symlinks=True)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue