diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e69de29 diff --git a/build.py b/build.py deleted file mode 100644 index 7679079..0000000 --- a/build.py +++ /dev/null @@ -1,19 +0,0 @@ -import json -import log -from clickgen import build_cursor_theme - -from config import name, sizes, delay, bitmaps_dir, temp_folder -from helper import init_build, pack_it - - -def build() -> None: - init_build() - with open('./hotspots.json', 'r') as hotspot_file: - hotspots = json.loads(hotspot_file.read()) - build_cursor_theme(name, image_dir=bitmaps_dir, - cursor_sizes=sizes, out_path=temp_folder, hotspots=hotspots, archive=False, delay=delay) - pack_it() - - -if __name__ == "__main__": - build() diff --git a/builder/setup.py b/builder/setup.py new file mode 100644 index 0000000..e69de29 diff --git a/builder/src/__init__.py b/builder/src/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/builder/src/configure.py b/builder/src/configure.py new file mode 100644 index 0000000..e69de29 diff --git a/builder/src/generator.py b/builder/src/generator.py new file mode 100644 index 0000000..e69de29 diff --git a/config.py b/config.py deleted file mode 100644 index 86ab951..0000000 --- a/config.py +++ /dev/null @@ -1,46 +0,0 @@ -import tempfile -import json - -# Build Config -delay = 50 -name = "macOSBigSur" -sizes = [22, 24, 28, 32, 40, 48, 56, 64, 72, 80, 88, 96] - -bitmaps_dir = "./bitmaps" -package_dir = "./themes" -temp_folder = tempfile.mkdtemp() - -# Cleanup Configs -x11_out = name -win_out = name + "_Windows" - -# getting author name -with open("./package.json") as f: - data = json.loads(f.read()) - author = data["author"] - -# Windows Cursors Config -windows_cursors = { - "right_ptr.cur": "Alternate.cur", - "wait.ani": "Busy.ani", - "crosshair.cur": "Cross.cur", - "left_ptr.cur": "Default.cur", - "bd_double_arrow.cur": "Diagonal_1.cur", - "fd_double_arrow.cur": "Diagonal_2.cur", - "pencil.cur": "Handwriting.cur", - "dnd-ask.cur": "Help.cur", - "sb_h_double_arrow.cur": "Horizontal.cur", - "hand2.cur": "Link.cur", - "hand1.cur": "Move.cur", - "xterm.cur": "Text.cur", - "circle.cur": "Unavailiable.cur", - "sb_v_double_arrow.cur": "Vertical.cur", - "left_ptr_watch.ani": "Work.ani", -} - -# Windows install.inf file content -with open("./scripts/windows.inf") as f: - data = f.read() - window_install_inf_content = data.replace( - "", name + " Cursors" - ).replace("", author) diff --git a/helper.py b/helper.py deleted file mode 100644 index cdf4c20..0000000 --- a/helper.py +++ /dev/null @@ -1,61 +0,0 @@ -import shutil -import json -import sys - -from config import name, temp_folder, bitmaps_dir, win_out, x11_out, window_install_inf_content, windows_cursors, package_dir -from os import path, listdir, rename, remove - - -x11_out_dir = path.join(package_dir, x11_out) -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) - - 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(window_install_inf_content) - - -def init_build() -> None: - """ - Print build version. - Remove previously built packages && Check Bitmaps. - """ - with open("./package.json", "r") as package_file: - data = json.loads(package_file.read()) - version = data['version'] - print("⚡ Apple Cursor Version %s" % version) - - # cleanup old packages - if path.exists(package_dir): - shutil.rmtree(package_dir) - - # Checking Bitmaps directory - if not path.exists(bitmaps_dir): - print( - "⚠ BITMAPS NOT FOUND.\n\n`yarn install && yarn render` to Generates Bitmaps") - sys.exit(1) - - -def pack_it() -> None: - """ - Create Crisp 📦 Packages for Windows & X11 Cursor Theme. - """ - # Rename directory - shutil.move(path.join(temp_folder, name, "x11"), x11_out_dir) - shutil.move(path.join(temp_folder, name, "win"), win_out_dir) - - # create install.inf file in Windows Theme - window_bundle() diff --git a/hotspots.json b/hotspots.json deleted file mode 100644 index adbba3b..0000000 --- a/hotspots.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "all_scroll": { "xhot": 100, "yhot": 100 }, - - "bottom_left_corner": { "xhot": 100, "yhot": 100 }, - "fd_double_arrow": { "xhot": 100, "yhot": 100 }, - "top_right_corner": { "xhot": 100, "yhot": 100 }, - - "bottom_right_corner": { "xhot": 100, "yhot": 100 }, - "bd_double_arrow": { "xhot": 100, "yhot": 100 }, - "top_left_corner": { "xhot": 100, "yhot": 100 }, - - "bottom_tee": { "xhot": 141, "yhot": 99 }, - - "center_ptr": { "xhot": 61, "yhot": 100 }, - - "circle": { "xhot": 47, "yhot": 39 }, - "crossed_circle": { "xhot": 47, "yhot": 39 }, - "dnd_no_drop": { "xhot": 47, "yhot": 39 }, - - "context_menu": { "xhot": 61, "yhot": 58 }, - - "copy": { "xhot": 47, "yhot": 39 }, - "dnd_copy": { "xhot": 47, "yhot": 39 }, - - "cross": { "xhot": 100, "yhot": 100 }, - "tcross": { "xhot": 100, "yhot": 100 }, - - "crosshair": { "xhot": 100, "yhot": 100 }, - - "dotbox": { "xhot": 100, "yhot": 100 }, - - "hand1": { "xhot": 94, "yhot": 105 }, - - "hand2": { "xhot": 66, "yhot": 34 }, - - "left_ptr": { "xhot": 68, "yhot": 41 }, - - "left_side": { "xhot": 100, "yhot": 100 }, - "right_side": { "xhot": 100, "yhot": 100 }, - - "left_tee": { "xhot": 100, "yhot": 58 }, - - "link": { "xhot": 61, "yhot": 105 }, - "dnd_link": { "xhot": 61, "yhot": 105 }, - - "ll_angle": { "xhot": 141, "yhot": 58 }, - - "lr_angle": { "xhot": 141, "yhot": 138 }, - - "move": { "xhot": 80, "yhot": 106 }, - "dnd_move": { "xhot": 80, "yhot": 106 }, - "dnd_none": { "xhot": 80, "yhot": 106 }, - "grabbing": { "xhot": 80, "yhot": 106 }, - "pointer_move": { "xhot": 80, "yhot": 106 }, - - "pencil": { "xhot": 141, "yhot": 58 }, - - "plus": { "xhot": 100, "yhot": 100 }, - - "question_arrow": { "xhot": 105, "yhot": 105 }, - "dnd_ask": { "xhot": 105, "yhot": 105 }, - - "right_ptr": { "xhot": 61, "yhot": 138 }, - - "right_tee": { "xhot": 100, "yhot": 138 }, - - "sb_down_arrow": { "xhot": 133, "yhot": 99 }, - - "sb_h_double_arrow": { "xhot": 100, "yhot": 100 }, - - "sb_left_arrow": { "xhot": 100, "yhot": 68 }, - - "sb_right_arrow": { "xhot": 100, "yhot": 138 }, - - "sb_up_arrow": { "xhot": 68, "yhot": 99 }, - - "sb_v_double_arrow": { "xhot": 100, "yhot": 100 }, - - "top_side": { "xhot": 100, "yhot": 100 }, - "bottom_side": { "xhot": 100, "yhot": 100 }, - - "top_tee": { "xhot": 61, "yhot": 99 }, - - "ul_angle": { "xhot": 61, "yhot": 65 }, - - "ur_angle": { "xhot": 61, "yhot": 138 }, - - "vertical_text": { "xhot": 100, "yhot": 102 }, - - "wait": { "xhot": 104, "yhot": 105 }, - "left_ptr_watch": { "xhot": 104, "yhot": 105 }, - - "wayland_cursor": { "xhot": 100, "yhot": 100 }, - - "x_cursor": { "xhot": 100, "yhot": 100 }, - - "xterm": { "xhot": 97, "yhot": 97 }, - - "zoom_in": { "xhot": 76, "yhot": 78 }, - - "zoom_out": { "xhot": 76, "yhot": 78 } -} diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 4c7f1ea..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -clickgen==1.1.7 -Pillow==8.0.1 diff --git a/scripts/windows.inf b/scripts/windows.inf deleted file mode 100644 index eed64a2..0000000 --- a/scripts/windows.inf +++ /dev/null @@ -1,52 +0,0 @@ -[Version] -signature="$CHICAGO$" - By Kaiz Khatri -https://github.com/ful1e5/apple_cursor - -[DefaultInstall] -CopyFiles = Scheme.Cur -AddReg = Scheme.Reg - -[DestinationDirs] -Scheme.Cur = 10,"%CUR_DIR%" - -[Scheme.Reg] -HKCU,"Control Panel\Cursors\Schemes","%SCHEME_NAME%",,"%10%\%CUR_DIR%\%pointer%,%10%\%CUR_DIR%\%help%,%10%\%CUR_DIR%\%work%,%10%\%CUR_DIR%\%busy%,%10%\%CUR_DIR%\%Cross%,%10%\%CUR_DIR%\%Text%,%10%\%CUR_DIR%\%Hand%,%10%\%CUR_DIR%\%Unavailiable%,%10%\%CUR_DIR%\%Vert%,%10%\%CUR_DIR%\%Horz%,%10%\%CUR_DIR%\%Dgn1%,%10%\%CUR_DIR%\%Dgn2%,%10%\%CUR_DIR%\%move%,%10%\%CUR_DIR%\%alternate%,%10%\%CUR_DIR%\%link%" - -; -- Installed files - -[Scheme.Cur] -"Default.cur" -"Help.cur" -"Work.ani" -"Busy.ani" -"Cross.cur" -"Text.cur" -"Handwriting.cur" -"Unavailiable.cur" -"Vertical.cur" -"Horizontal.cur" -"Diagonal_1.cur" -"Diagonal_2.cur" -"Move.cur" -"Alternate.cur" -"Link.cur" - -[Strings] -CUR_DIR = "Cursors\" -SCHEME_NAME = "" -pointer = "Default.cur" -help = "Help.cur" -work = "Work.ani" -busy = "Busy.ani" -cross = "Cross.cur" -text = "Text.cur" -hand = "Handwriting.cur" -unavailiable = "Unavailiable.cur" -vert = "Vertical.cur" -horz = "Horizontal.cur" -dgn1 = "Diagonal_1.cur" -dgn2 = "Diagonal_2.cur" -move = "Move.cur" -alternate = "Alternate.cur" -link = "Link.cur" \ No newline at end of file