diff options
author | bilabila | 2022-01-07 01:23:07 +0800 |
---|---|---|
committer | bilabila | 2022-01-07 01:23:07 +0800 |
commit | 379c9643de2c2af4541c74aceeabaa53374520d6 (patch) | |
tree | 773c123112169d876db17d0aacac0bb419e7e80a | |
parent | c8111f6ea62a6528c235e7e2c73b9ca4ad74096c (diff) | |
download | aur-akhelper-git.tar.gz |
fix patch
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | use_state_separation.patch | 49 |
3 files changed, 4 insertions, 53 deletions
@@ -1,7 +1,7 @@ pkgbase = akhelper-git pkgdesc = Arknights Auto Helper based on ADB and Python | 基于python的明日方舟护肝助手 pkgver = r911.fcf089e - pkgrel = 4 + pkgrel = 5 url = https://github.com/ninthDevilHAUNSTER/ArknightsAutoHelper arch = x86_64 license = MIT @@ -28,6 +28,6 @@ pkgbase = akhelper-git sha512sums = SKIP sha512sums = 6712dd3bf83ff90f521effc671fb607f035cebf1b9dc7b31f3edaa013459a51e23c5aee869313b5352fcf14e72ce20b55c025c3338aa4a7937d6125aff72f1d0 sha512sums = 2afe415a28cf8bc795bd395b45878eeab7341e64347b915850d155fdf68e09066fe443fe15a8c840649d15f6c2d491a96813508ea366f023292af555c4345f26 - sha512sums = 74ce993b144dd81e2b47275104565f2b0af5b3cc8478b3f29367ddf6a34303a4ae38971a5bc983ff6ddc78d172083e3fe105e65d5c23450054288aa77aa3d3ec + sha512sums = f13d60c6e05785e5f18f6b3e37843ed457e8da628ad294bec9e34e83856a6b1fc2b5d69632be4e55b4ef988cbfe43c08cabc13213cb8ecb035fb8bdcc86ed29a pkgname = akhelper-git @@ -3,7 +3,7 @@ _srcname=ArknightsAutoHelper _pkgname=akhelper pkgname=$_pkgname-git pkgver=r911.fcf089e -pkgrel=4 +pkgrel=5 pkgdesc='Arknights Auto Helper based on ADB and Python | 基于python的明日方舟护肝助手' arch=(x86_64) url=https://github.com/ninthDevilHAUNSTER/ArknightsAutoHelper @@ -24,7 +24,7 @@ source=(git+https://github.com/ninthDevilHAUNSTER/ArknightsAutoHelper sha512sums=(SKIP 6712dd3bf83ff90f521effc671fb607f035cebf1b9dc7b31f3edaa013459a51e23c5aee869313b5352fcf14e72ce20b55c025c3338aa4a7937d6125aff72f1d0 2afe415a28cf8bc795bd395b45878eeab7341e64347b915850d155fdf68e09066fe443fe15a8c840649d15f6c2d491a96813508ea366f023292af555c4345f26 - 74ce993b144dd81e2b47275104565f2b0af5b3cc8478b3f29367ddf6a34303a4ae38971a5bc983ff6ddc78d172083e3fe105e65d5c23450054288aa77aa3d3ec + f13d60c6e05785e5f18f6b3e37843ed457e8da628ad294bec9e34e83856a6b1fc2b5d69632be4e55b4ef988cbfe43c08cabc13213cb8ecb035fb8bdcc86ed29a ) pkgver() { cd $_srcname diff --git a/use_state_separation.patch b/use_state_separation.patch index 2299304536b9..e1bcc0b2ced7 100644 --- a/use_state_separation.patch +++ b/use_state_separation.patch @@ -11,52 +11,3 @@ index 3f2d1b2..4446f71 100644 if bundled: root = sys._MEIPASS # FIXME: macOS app bundle outside /Applications -@@ -38,8 +38,15 @@ if use_state_separation is None: - use_state_separation = False - - if use_state_separation: -- # TODO: use platform application state directory, copy skeleton -- writable_root = '\0placeholder' -+ system = sys.platform -+ if system == "win32": -+ # TODO: windows user data dir -+ path = '' -+ elif system == 'darwin': -+ path = os.path.expanduser('~/Library/Preferences') -+ else: -+ path = os.getenv('XDG_CONFIG_HOME', os.path.expanduser("~/.config")) -+ writable_root = os.path.join(path, 'ArknightsAutoHelper') - else: - writable_root = root - -@@ -52,6 +59,7 @@ extra_items_path = os.path.join(writable_root, 'extra_items') - config_file = os.path.join(CONFIG_PATH, 'config.yaml') - config_template = os.path.join(config_template_path, 'config-template.yaml') - logging_config_file = os.path.join(CONFIG_PATH, 'logging.yaml') -+logging_config_template = os.path.join(config_template_path, 'logging.yaml') - logs = os.path.join(writable_root, 'log') - use_archived_resources = not os.path.isdir(os.path.join(root, 'resources')) - if use_archived_resources: -@@ -62,8 +70,11 @@ else: - resource_archive = None - resource_root = os.path.join(root, 'resources') - --if not os.path.exists(logs): -- os.mkdir(logs) -+os.makedirs(SCREEN_SHOOT_SAVE_PATH, exist_ok=True) -+os.makedirs(CONFIG_PATH, exist_ok=True) -+os.makedirs(cache_path, exist_ok=True) -+os.makedirs(extra_items_path, exist_ok=True) -+os.makedirs(logs, exist_ok=True) - - dirty = False - -@@ -242,6 +253,8 @@ def enable_logging(): - return - get_instance_id() - old_handlers = logging.root.handlers[:] -+ if not os.path.exists(logging_config_file): -+ shutil.copy2(logging_config_template, logging_config_file) - with open(logging_config_file, 'r', encoding='utf-8') as f: - logging.config.dictConfig(yaml.load(f)) - for h in old_handlers: |