From 97237611c1abbe8613982f519763e1761f47e335 Mon Sep 17 00:00:00 2001 From: Scan Date: Sun, 8 Sep 2024 15:05:54 -0400 Subject: [PATCH] Cleanup/rename unused files from original project --- bytepatch_intern_to_mon.py | 21 --------- helper_steamct | 47 ------------------- monitor_by_id.c | 33 ------------- patch_pages | 10 ---- s3p_to_2dx.sh => s3p_to_2dx | 0 0005731108.py => win8prefix_protonfix.py | 0 stacktrace.py => wine_stacktrace_to_static.py | 0 7 files changed, 111 deletions(-) delete mode 100755 bytepatch_intern_to_mon.py delete mode 100755 helper_steamct delete mode 100644 monitor_by_id.c delete mode 100755 patch_pages rename s3p_to_2dx.sh => s3p_to_2dx (100%) rename 0005731108.py => win8prefix_protonfix.py (100%) rename stacktrace.py => wine_stacktrace_to_static.py (100%) diff --git a/bytepatch_intern_to_mon.py b/bytepatch_intern_to_mon.py deleted file mode 100755 index b2429e7..0000000 --- a/bytepatch_intern_to_mon.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python3 -# Translates internal documentation patch notations into js format expected by BemaniPatcher -import sys -import pyperclip - -if len(sys.argv) < 2: - exit(1) -stin = pyperclip.paste() if sys.argv[1] == "clip" else sys.argv[1] - - -[*rest, addr, on] = stin.split(":") -[off, on, *rest] = on.split("->") -off = ", ".join([f"0x{x}" for x in off.strip().split(" ")]) -on = ", ".join([f"0x{x}" for x in on.strip().split(" ")]) -addr = addr.strip() - -output = f"{{ offset: {addr}, off: [{off}], on: [{on}] }}," -if sys.argv[1] == "clip": - stin = pyperclip.copy(output) -else: - print(output) diff --git a/helper_steamct b/helper_steamct deleted file mode 100755 index e629cc1..0000000 --- a/helper_steamct +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# Helper::Steam Compatibility Tools -# Expects below formats (called directly from steam client, supports any ambiguous application through chainloading) -# Launch current game while forcing native support (games steam doesn't list such feature for) -# $this waitforexitandrun /full/path/to/steam/game/binary -# Launch arbitrary EP process while emulating being a steam game in question (chainloading, may enable Remote Play Together etc.) -# $this waitforexitandrun /full/path/to/steam/game/binary "ENTRYPOINTNAME" --cd "ACTUALWORKINGDIR" ..ALLENTRYPOINTARGUMENTS.. -_C_scriptName="$(basename -- "$(realpath -- "$0")")" -_C_scriptDir="$(dirname -- "$(realpath -- "$0")")" - - -# Support for generic native execution (no steam helpers support) -[ "$1" = "waitforexitandrun" ] || exit 0 -args=("${@:2}") - -# Support for routing arbitrary EP through current steam app (expects ep_* next to itself) -argIndex=0 -for arg in "${args[@]}"; do - [[ "$arg" == "ep_"* ]] && break - ((argIndex++)) -done -if [ "${#args[@]}" -ne "$argIndex" ]; then - # Set correct Entry Point - argSwap=("${args[@]}") - args=("$_C_scriptDir/${argSwap[$argIndex]}") - ((argIndex++)) - - # Restore expected working directory (if any) - if [[ "${argSwap[$argIndex]}" == "--cd" ]]; then - ((argIndex++)) - cd "${argSwap[$argIndex]}" - ((argIndex++)) - fi - - # Set corrent args for Entry Point - args+=("${argSwap[@]:$argIndex}") -fi - -# for arg in "${args[@]}"; do -# echo "ARG: $arg" -# done - -# Execute requested command -echo "Command routed as [steam://run/$STEAM_COMPAT_APP_ID]:" -echo "cd $(pwd)" -echo "exec ${args[@]}" -exec "${args[@]}" diff --git a/monitor_by_id.c b/monitor_by_id.c deleted file mode 100644 index 8c6261c..0000000 --- a/monitor_by_id.c +++ /dev/null @@ -1,33 +0,0 @@ -// gcc monitor_by_id.c -o monitor_by_id -lX11 -lXrandr -#include -#include -#include -#include - - -int main(int argc, char *argv[]) -{ - int vmajor = 0; - int vminor = 0; - int moni = -1; - int monc = 0; - if (argc == 2) moni = atoi(argv[1]); - - Display *dpy = XOpenDisplay(NULL); - if (!dpy || moni < 0) return 1; - Window wnd = XDefaultRootWindow(dpy); - - if (XRRQueryExtension(dpy, &vmajor, &vminor)) - { - XRRQueryVersion(dpy, &vmajor, &vminor); - XRRMonitorInfo *info = XRRGetMonitors(dpy, wnd, 0, &monc); - if (moni >= monc) return 1; - - printf("%s\n", XGetAtomName(dpy, info[moni].name)); - - XFree(info); - } - - XCloseDisplay(dpy); - return 0; -} \ No newline at end of file diff --git a/patch_pages b/patch_pages deleted file mode 100755 index a279054..0000000 --- a/patch_pages +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -shopt -s globstar - - -# Patch html -read -p "This action may modify all .html files at '$PWD'" -for html in **/*.html ; do - # Override relative links to open in current tab instead - sed -i 's~href="patcher/" target="_blank"~href="patcher/"~g' "$html" -done diff --git a/s3p_to_2dx.sh b/s3p_to_2dx similarity index 100% rename from s3p_to_2dx.sh rename to s3p_to_2dx diff --git a/0005731108.py b/win8prefix_protonfix.py similarity index 100% rename from 0005731108.py rename to win8prefix_protonfix.py diff --git a/stacktrace.py b/wine_stacktrace_to_static.py similarity index 100% rename from stacktrace.py rename to wine_stacktrace_to_static.py