Skip to content

TODO: add reshade-shaders as required dependency #7

@pchome

Description

@pchome

ReShade.fxh required by virtually everything ReShade-related, so:

  1. Make an ebuild for reshade-shaders and install into /usr/share/reshade-shaders when reshade USE flag is enabled.
    Provide a script for users to download shaders into ~/.local/share/reshade-shaders (or just document directory structure). Maybe makes little sense to create ebuilds for other shader repos, so ...
    (this is "packaging" task)
  2. Modify source code to use this path.
    Also code should look into ~/.local/share/reshade-shaders (XDG ...) and maybe ./reshade-shaders (in reverse order (?)).
  3. Simplify configuration by removing corresponding paths from the config file.
    There is maintained EffectPackages.ini which contain supported repositories list, installation paths, download urls, etc. User should be able to provide effect names only.
    Not sure yet about adding an INI parser.
  4. Maybe also check Compatibility.ini, some settings like DepthReversed=1, DepthUpsideDown=1, Banned=1 could be useful. Will definitely require INI parser.

Python script example (has built-in ini parser):

#!/usr/bin/env python3

import argparse
import configparser
import os
import urllib.request

LIST_NAME = "EffectPackages.ini"
LIST_SOURCE = "https://raw.githubusercontent.com/crosire/reshade-shaders/refs/heads/list/EffectPackages.ini"
LIST_PATH = "/usr/share/reshade-shaders"
# TODO: XDG
LIST_LOCAL_PATH = os.path.expanduser("~/.local/share/reshade-shaders")

parser = argparse.ArgumentParser(description='sum the integers at the command line')
parser.add_argument('action', type=str, choices=['install', 'list', 'details'], default='list', help='an action to be performed').required = False
args = parser.parse_args()

print('Using', args.action, 'mode')

conf = configparser.ConfigParser()

global_list = os.path.join(LIST_PATH, LIST_NAME)
local_list = os.path.join(LIST_LOCAL_PATH, LIST_NAME)

if os.access(global_list, os.F_OK):
    conf.read(global_list)
elif os.access(local_list, os.F_OK):
    conf.read(local_list)
else:
    print(LIST_NAME, 'not found')
    os.makedirs(LIST_LOCAL_PATH, exist_ok=True)
    urllib.request.urlretrieve(LIST_SOURCE, local_list)
    # TODO: re-read list on success
    exit

for section in conf.sections():
    if (
        not conf.has_option(section, 'PackageName')
        or not conf.has_option(section, 'PackageDescription')
    ):
        print('section', section, 'is invalid')
        exit

    print(section, ' - ', conf.get(section, 'PackageName'))
    print('\t', conf.get(section, 'PackageDescription'))

See:
https://github.com/crosire/reshade-shaders
https://github.com/crosire/reshade-shaders/tree/list

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions