Skip to content

Instantly share code, notes, and snippets.

@shmerl
shmerl / wine_build.sh
Last active May 5, 2024 19:59
For building Wine
#!/bin/bash
# Builds Wine
# Notes:
# 1. Targeted for usage inside a VM (use shared directory $HOME/mnt/vmshare between host and guest).
#
# 2. You'd need to separately push the result on the host to whatever location you want (like to /opt).
#
# 3. Place any manual patches in ${HOME}/build/patches
@shmerl
shmerl / mesa_debian_build.sh
Last active March 10, 2024 19:35
For building Mesa on Debian
#!/bin/bash
# Notes:
#
# 1. Works for tags and specific hash commits too (override mesa_branch variable with needed value).
#
# 2. By default builds for /opt/mesa-<branch> and places the result in ${HOME}/mnt/vmshare/mesa-<branch>
# You can override the build deployment location by setting dest_dir. For example this should put it right away
# in /opt/mesa-<branch>
#
@shmerl
shmerl / wine_env.sh
Last active May 5, 2024 19:18
Environment setting for custom Wine usage
#!/bin/bash
# Helper script for wine_run.sh / winetricks_run.sh
# Sets environment. See wine_run.sh for details on
# configurable variables usage.
# $wine variable is a shortcut, setting /opt/$wine for $wine_path
# But explicitly set $wine_path takes priority.
if [[ "${wine+isset}" ]] && ! [[ "${wine_path+isset}" ]]; then
wine_path="/opt/${wine}"
@shmerl
shmerl / wine_run.sh
Last active November 3, 2023 05:16
Custom Wine running
#!/bin/bash
# Configuration (set through environment variables):
#
# WINEPREFIX - what prefix to use.
# wine_path - to use custom location of Wine (e.g. /opt/wine-main).
# wine - shortcut for the above, to assume /opt/$wine
#
# Notes:
#!/bin/bash
# Configuration:
#
# WINEPREFIX what prefix to use (or will use the default).
# WINEPATH custom location of Wine if needed (custom variable for the script).
#
# Uses wine_env.sh
# Note, winetricks requires using WoW64 build of Wine.
@shmerl
shmerl / mesa_run.sh
Last active April 20, 2023 04:00
For launching programs with custom Mesa
#!/bin/bash
# Assumes Mesa libraries are installed in:
# /opt/${mesa}/<arch_dir>
# or in
# ${mesa_path}/<arch_dir>
# For explicit control of the run
mesa_run=${mesa_run:-true}
if ! $mesa_run; then
@shmerl
shmerl / dxvk_build.sh
Last active October 22, 2023 21:53
For dxvk and vkd3d-proton building on Debian
#!/bin/bash
# Notes:
#
# For Debian build of dxvk and vkd3d-proton.
#
# 1. To build 64-bit and 32-bit dxvk:
#
# for bitness in 64 32; do project=dxvk bitness=$bitness dxvk_build.sh; done
#
@shmerl
shmerl / wine_staging_build.sh
Last active May 5, 2024 20:00
For building Wine staging
#!/bin/bash
# Builds Wine-staging
# Notes:
# 1. Targeted for usage inside a VM (use shared directory $HOME/mnt/vmshare between host and guest).
# 2. You'd need to separately push the result on the host to whatever location you want (like to /opt).
# 3. Place any manual patches in ${HOME}/build/patches
# 4. Override arch to something else if you aren't using Ryzen.
#
@shmerl
shmerl / gog_extract_konami_collectors_series.sh
Last active January 22, 2024 06:35
For extracting GOG Konami Collector's Series
#!/bin/bash
# Extractor for game ROMs from Konami Collector's Series.
#
# Usage: gog_extract_konami_collectors_series.sh <path_to>/cc.exe
#
# Make sure you have xxd hexdump tool and dd installed.
#
# Games locations:
@shmerl
shmerl / wordle.sh
Last active February 7, 2022 07:59
A simple version of Wordle game
#!/bin/bash
#
# Uses ripgrep (rg)
#
length=${length:-5}
tries=${tries:-6}
# All words of given length from a dictionary