diff --git a/.gitignore b/.gitignore index eae3e6872..109e4b4e3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,9 @@ -########## Custom -# Out Dir +# --------------------------------------------- Custom bitmaps themes -test.py +bin -# Logs Files -builder/files.txt - -# Extra -.vscode - -########## Python +# --------------------------------------------- Python # Byte-compiled / optimized / DLL files __pycache__/ @@ -143,7 +136,7 @@ dmypy.json .pyre/ -######### Node +# --------------------------------------------- Nodejs # Logs logs diff --git a/CHANGELOG.md b/CHANGELOG.md index ad4986b4f..8a1f83dbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +## [Bibata v1.1.2] - 12 Jul 2021 + ### Added +- Support button inside `PLING.bbcode` product page +- `make prepare` command for preparing bibata binaries +- `pyrightconfig.json` init + ### Changed +- Removed **clean** target from `builder/Makefile` +- Compact code inside `builder/*` +- Remove `setup.py` +- Builder code moved to `src` +- Import `src` module directly inside `build.py` - `Makefile` build commands re-arrange with groups - Dynamic determine **Windows canvas size** on **Windows cursor size** inside build.py` diff --git a/Makefile b/Makefile index 1e53e53f2..30d3afbf6 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ render: bitmapper svg @cd bitmapper && make install render_modern render_original build: bitmaps - @cd builder && make setup build clean + @cd builder && make setup build # Specific platform build @@ -27,7 +27,7 @@ render_modern: bitmapper svg @cd bitmapper && make install render_modern build_modern: bitmaps - @cd builder && make setup build_modern clean + @cd builder && make setup build_modern # Bibata Original @@ -37,7 +37,7 @@ render_original: bitmapper svg @cd bitmapper && make install render_original build_original: bitmaps - @cd builder && make setup build_original clean + @cd builder && make setup build_original # Installation @@ -72,3 +72,31 @@ uninstall: @fi reinstall: uninstall install + +# generates binaries +THEMES = Amber Classic Ice +BIN_DIR = ../bin +prepare: bitmaps themes + # Bitmaps + @rm -rf bin && mkdir bin + @cd bitmaps && zip -r $(BIN_DIR)/bitmaps.zip * && cd .. + @cd themes + # + # Bibata-Modern + # + @$(foreach theme,$(THEMES), tar -czvf $(BIN_DIR)/Bibata-Modern-$(theme).tar.gz Bibata-Modern-$(theme);) + @$(foreach theme,$(THEMES), zip -r $(BIN_DIR)/Bibata-Modern-$(theme)-Windows.zip Bibata-Modern-$(theme)-Windows;) + @tar -czvf $(BIN_DIR)/Bibata-Modern.tar.gz Bibata-Modern-Amber Bibata-Modern-Classic Bibata-Modern-Ice + @zip -r $(BIN_DIR)/Bibata-Modern-Windows.zip Bibata-Modern-Amber-Windows Bibata-Modern-Classic-Windows Bibata-Modern-Ice-Windows + # + # Bibata-Original + # + @$(foreach theme,$(THEMES), tar -czvf $(BIN_DIR)/Bibata-Original-$(theme).tar.gz Bibata-Original-$(theme);) + @$(foreach theme,$(THEMES), zip -r $(BIN_DIR)/Bibata-Original-$(theme)-Windows.zip Bibata-Original-$(theme)-Windows;) + @tar -czvf $(BIN_DIR)/Bibata-Original.tar.gz Bibata-Original-Amber Bibata-Original-Classic Bibata-Original-Ice + @zip -r $(BIN_DIR)/Bibata-Original-Windows.zip Bibata-Original-Amber-Windows Bibata-Original-Classic-Windows Bibata-Original-Ice-Windows + # + # Bibata.tar.gz + # + @tar -czvf $(BIN_DIR)/Bibata.tar.gz --exclude='*-Windows' * + @cd .. diff --git a/PLING.bbcode b/PLING.bbcode index 607e9b2fd..5eefdccc8 100644 --- a/PLING.bbcode +++ b/PLING.bbcode @@ -9,6 +9,10 @@ [i]Release Notification[/i] at [b][url=https://twitter.com/ful1e5]Twitter[/url][/b](@ful1e5) For [i]Customizing Size[/i] check [b][url=https://github.com/ful1e5/Bibata_Cursor#manual-build]README.md[/url][/b] +[b] Support Creator[/b] + +[url=https://www.buymeacoffee.com/Nt7Wg4V][img]https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png[/img][/url] + [b]Linux/X11 installation[/b] Get the latest stable Linux release from the [b][url=https://www.pling.com/p/1197198/#files-panel]Pling[/url][/b]. Unpack [b].tar.gz[/b] file and follow these [b]commands[/b]. diff --git a/bitmapper/package.json b/bitmapper/package.json index 6efe26984..81950c9d6 100644 --- a/bitmapper/package.json +++ b/bitmapper/package.json @@ -1,6 +1,6 @@ { "name": "bibata-cursor", - "version": "1.1.1", + "version": "1.1.2", "description": "Material Based Cursors", "main": "index.js", "author": "Kaiz Khatri", @@ -11,5 +11,7 @@ "render:bibata-original": "yarn workspace bibata-original render", "render:bibata-rainbow": "yarn workspace bibata-rainbow render" }, - "workspaces": ["packages/*"] + "workspaces": [ + "packages/*" + ] } diff --git a/bitmapper/packages/modern/package.json b/bitmapper/packages/modern/package.json index 84b4df3e3..d59e866ad 100644 --- a/bitmapper/packages/modern/package.json +++ b/bitmapper/packages/modern/package.json @@ -1,6 +1,6 @@ { "name": "bibata-modern", - "version": "1.1.1", + "version": "1.1.2", "description": "Rounded edges bibata cursors", "main": "dist/index.js", "scripts": { diff --git a/bitmapper/packages/original/package.json b/bitmapper/packages/original/package.json index 637fdb3d4..38fb72145 100644 --- a/bitmapper/packages/original/package.json +++ b/bitmapper/packages/original/package.json @@ -1,6 +1,6 @@ { "name": "bibata-original", - "version": "1.1.1", + "version": "1.1.2", "description": "Sharp edges bibata cursors", "main": "dist/index.js", "scripts": { diff --git a/bitmapper/yarn.lock b/bitmapper/yarn.lock index 3dcdf7bb2..fcfc2dbfa 100644 --- a/bitmapper/yarn.lock +++ b/bitmapper/yarn.lock @@ -3,35 +3,35 @@ "@types/node@*": - version "14.14.31" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.31.tgz#72286bd33d137aa0d152d47ec7c1762563d34055" - integrity sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g== + version "16.3.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.3.1.tgz#24691fa2b0c3ec8c0d34bfcfd495edac5593ebb4" + integrity sha512-N87VuQi7HEeRJkhzovao/JviiqKjDKMVKxKMfUvSKw+MbkbW8R0nA3fi/MQhhlxV2fQ+2ReM+/Nt4efdrJx3zA== "@types/pixelmatch@^5.2.2": - version "5.2.2" - resolved "https://registry.yarnpkg.com/@types/pixelmatch/-/pixelmatch-5.2.2.tgz#3403238d4b920bf2255fb6cbf9a098bef796ce62" - integrity sha512-ndpfW/H8+SAiI3wt+f8DlHGgB7OeBdgFgBJ6v/1l3SpJ0MCn9wtXFb4mUccMujN5S4DMmAh7MVy1O3WcXrHUKw== + version "5.2.4" + resolved "https://registry.yarnpkg.com/@types/pixelmatch/-/pixelmatch-5.2.4.tgz#ca145cc5ede1388c71c68edf2d1f5190e5ddd0f6" + integrity sha512-HDaSHIAv9kwpMN7zlmwfTv6gax0PiporJOipcrGsVNF3Ba+kryOZc0Pio5pn6NhisgWr7TaajlPEKTbTAypIBQ== dependencies: "@types/node" "*" "@types/pngjs@^6.0.0": - version "6.0.0" - resolved "https://registry.yarnpkg.com/@types/pngjs/-/pngjs-6.0.0.tgz#d5372348793a383eb2220e43b661af61daf364b8" - integrity sha512-PyZJHtd/mGA9a+cb3RQvd2pj56OIoo522sEhGZvq9THfBv5skyPRo50o3Hvy+n6U0u8RWteMHhlvLfN4FOZTaA== + version "6.0.1" + resolved "https://registry.yarnpkg.com/@types/pngjs/-/pngjs-6.0.1.tgz#c711ec3fbbf077fed274ecccaf85dd4673130072" + integrity sha512-J39njbdW1U/6YyVXvC9+1iflZghP8jgRf2ndYghdJb5xL49LYDB+1EuAxfbuJ2IBbWIL3AjHPQhgaTxT3YaYeg== dependencies: "@types/node" "*" "@types/puppeteer@^5.4.3": - version "5.4.3" - resolved "https://registry.yarnpkg.com/@types/puppeteer/-/puppeteer-5.4.3.tgz#cdca84aa7751d77448d8a477dbfa0af1f11485f2" - integrity sha512-3nE8YgR9DIsgttLW+eJf6mnXxq8Ge+27m5SU3knWmrlfl6+KOG0Bf9f7Ua7K+C4BnaTMAh3/UpySqdAYvrsvjg== + version "5.4.4" + resolved "https://registry.yarnpkg.com/@types/puppeteer/-/puppeteer-5.4.4.tgz#e92abeccc4f46207c3e1b38934a1246be080ccd0" + integrity sha512-3Nau+qi69CN55VwZb0ATtdUAlYlqOOQ3OfQfq0Hqgc4JMFXiQT/XInlwQ9g6LbicDslE6loIFsXFklGh5XmI6Q== dependencies: "@types/node" "*" "@types/yauzl@^2.9.1": - version "2.9.1" - resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.9.1.tgz#d10f69f9f522eef3cf98e30afb684a1e1ec923af" - integrity sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA== + version "2.9.2" + resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.9.2.tgz#c48e5d56aff1444409e39fa164b0b4d4552a7b7a" + integrity sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA== dependencies: "@types/node" "*" @@ -48,9 +48,9 @@ arg@^4.1.0: integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== base64-js@^1.3.1: version "1.5.1" @@ -108,9 +108,9 @@ create-require@^1.1.0: integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== debug@4, debug@^4.1.0, debug@^4.1.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + version "4.3.2" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" + integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== dependencies: ms "2.1.2" @@ -175,9 +175,9 @@ get-stream@^5.1.0: pump "^3.0.0" glob@^7.1.3: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -427,9 +427,9 @@ ts-node@^9.1.1: yn "3.1.1" typescript@^4.1.5: - version "4.1.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.5.tgz#123a3b214aaff3be32926f0d8f1f6e704eb89a72" - integrity sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA== + version "4.3.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" + integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== unbzip2-stream@^1.3.3: version "1.4.3" @@ -450,9 +450,9 @@ wrappy@1: integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= ws@^7.2.3: - version "7.4.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.3.tgz#1f9643de34a543b8edb124bdcbc457ae55a6e5cd" - integrity sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA== + version "7.5.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.3.tgz#160835b63c7d97bfab418fc1b8a9fced2ac01a74" + integrity sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg== yauzl@^2.10.0: version "2.10.0" diff --git a/builder/Makefile b/builder/Makefile index f42106752..330d5c4c5 100644 --- a/builder/Makefile +++ b/builder/Makefile @@ -1,4 +1,4 @@ -all: clean setup build +all: setup build bitmaps_dir = "../bitmaps" @@ -12,18 +12,8 @@ X_SIZES ?= 22 24 28 32 40 48 56 64 72 80 88 96 WIN_CANVAS_SIZE ?= 32 WIN_SIZE ?= 24 -clean: - @rm -rf bbpkg.egg-info build dist - @find -iname "*.pyc" -delete - # Removing setup.py package files if installed - @if [ -f "files.txt" ]; then - @xargs rm -rf < files.txt - @rm -rf files.txt - @fi - -setup: setup.py - @python3 setup.py install --user --record files.txt - +setup: + @python3 -m pip install clickgen --user build: build_modern build_original diff --git a/builder/build.py b/builder/build.py index d7fe7c9ab..d99fb8bc4 100644 --- a/builder/build.py +++ b/builder/build.py @@ -4,8 +4,8 @@ import argparse from pathlib import Path -from bbpkg.configure import get_config -from bbpkg.generator import Info, xbuild, wbuild, build +from src.configure import get_config +from src.generator import Info, xbuild, wbuild, build parser = argparse.ArgumentParser( diff --git a/builder/setup.py b/builder/setup.py deleted file mode 100644 index 119a7e7c3..000000000 --- a/builder/setup.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -from setuptools import setup - -setup( - name="bbpkg", - version="1.1.1", - description="Generate 'Bibata' cursor theme from PNGs file", - url="https://github.com/ful1e5/Bibata_Cursor", - packages=["bbpkg"], - package_dir={"bbpkg": "bbpkg"}, - author="Kaiz Khatri", - author_email="kaizmandhu@gamil.com", - install_requires=["clickgen==1.1.9"], - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", - ], - python_requires=">=3.8", - zip_safe=True, -) diff --git a/builder/bbpkg/__init__.py b/builder/src/__init__.py similarity index 100% rename from builder/bbpkg/__init__.py rename to builder/src/__init__.py diff --git a/builder/bbpkg/configure.py b/builder/src/configure.py similarity index 96% rename from builder/bbpkg/configure.py rename to builder/src/configure.py index 44461f1c1..f46d0fd1e 100644 --- a/builder/bbpkg/configure.py +++ b/builder/src/configure.py @@ -6,7 +6,7 @@ from clickgen.util import PNGProvider -from bbpkg.constants import WIN_CURSORS_CFG, WIN_DELAY, X_CURSORS_CFG, X_DELAY +from .constants import WIN_CURSORS_CFG, WIN_DELAY, X_CURSORS_CFG, X_DELAY X = TypeVar("X") diff --git a/builder/bbpkg/constants.py b/builder/src/constants.py similarity index 100% rename from builder/bbpkg/constants.py rename to builder/src/constants.py diff --git a/builder/bbpkg/generator.py b/builder/src/generator.py similarity index 98% rename from builder/bbpkg/generator.py rename to builder/src/generator.py index e2d4ed91a..f4dfcd048 100644 --- a/builder/bbpkg/generator.py +++ b/builder/src/generator.py @@ -4,12 +4,13 @@ from pathlib import Path from typing import Any, Dict, NamedTuple -from bbpkg.constants import AUTHOR, URL -from bbpkg.symlinks import add_missing_xcursor from clickgen.builders import WindowsCursor, XCursor from clickgen.core import CursorAlias from clickgen.packagers import WindowsPackager, XPackager +from .constants import AUTHOR, URL +from .symlinks import add_missing_xcursor + class Info(NamedTuple): """Important cursor package's information field""" diff --git a/builder/bbpkg/symlinks.py b/builder/src/symlinks.py similarity index 100% rename from builder/bbpkg/symlinks.py rename to builder/src/symlinks.py diff --git a/pyrightconfig.json b/pyrightconfig.json new file mode 100644 index 000000000..5e0a2a736 --- /dev/null +++ b/pyrightconfig.json @@ -0,0 +1,12 @@ +{ + "include": ["builder"], + "exclude": ["**/node_modules", "**/__pycache__"], + + "reportMissingImports": true, + "reportMissingTypeStubs": false, + + "pythonVersion": "3.9", + "pythonPlatform": "Linux", + + "executionEnvironments": [{ "root": "builder" }] +}