mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-21 18:55:12 -04:00
📦 build only x11 option added
This commit is contained in:
parent
8dea8c690f
commit
530670d3ed
2 changed files with 49 additions and 19 deletions
47
build.py
47
build.py
|
@ -1,23 +1,50 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import log
|
||||
from clickgen import build_cursor_theme
|
||||
from clickgen import build_cursor_theme, build_x11_cursor_theme
|
||||
|
||||
from config import configs, sizes, delay, temp_folder
|
||||
from config import version, configs, sizes, delay, temp_folder
|
||||
from helper import init_build, pack_it
|
||||
|
||||
|
||||
def cmd_parse():
|
||||
"""Parse command line arguments"""
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Bibata cursors builder %s" % version)
|
||||
|
||||
parser.add_argument("-x", "--x11", action="store_true", default=False,
|
||||
help=("Create X11 cursors using bitmaps"
|
||||
" (default: %(default)s)"))
|
||||
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def build(config) -> None:
|
||||
|
||||
build_cursor_theme(
|
||||
config['name'],
|
||||
image_dir=config['bitmaps_dir'],
|
||||
cursor_sizes=sizes,
|
||||
out_path=config['temp_folder'],
|
||||
hotspots=hotspots,
|
||||
archive=False,
|
||||
delay=delay)
|
||||
args = cmd_parse()
|
||||
|
||||
if (args.x11):
|
||||
# build x11 cursors packages only
|
||||
build_x11_cursor_theme(
|
||||
config['name'],
|
||||
image_dir=config['bitmaps_dir'],
|
||||
cursor_sizes=sizes,
|
||||
out_path=config['temp_folder'],
|
||||
hotspots=hotspots,
|
||||
archive=False,
|
||||
delay=delay)
|
||||
else:
|
||||
# build windows & x11 cursors packages
|
||||
build_cursor_theme(
|
||||
config['name'],
|
||||
image_dir=config['bitmaps_dir'],
|
||||
cursor_sizes=sizes,
|
||||
out_path=config['temp_folder'],
|
||||
hotspots=hotspots,
|
||||
archive=False,
|
||||
delay=delay)
|
||||
|
||||
pack_it(config)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue