Skip to content

Instantly share code, notes, and snippets.

@shmerl
shmerl / vkd3d_proton_build.sh
Last active Nov 15, 2020
For vkd3d-proton building on Debian
View vkd3d_proton_build.sh
#!/bin/bash
# Notes:
#
# For Debian build of vkd3-proton. Only builds dll.
#
# Example of building 64-bit and 32-bit variatns:
#
# for bitness in 64 32; do vkd3d_bitness=$bitness vkd3d_proton_build.sh; done
@shmerl
shmerl / gog_extract_konami_collectors_series.sh
Last active Dec 1, 2020
For extracting GOG Konami Collector's Series
View gog_extract_konami_collectors_series.sh
#!/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 / picture_of_the_day.sh
Last active Feb 21, 2020
Downloads astronomy picture of the day
View picture_of_the_day.sh
#!/bin/bash
# Requires: curl, pcregrep, xdg-user-dir
site="https://apod.nasa.gov"
# redirect all the output to the log file
exec > $HOME/pictures/picture_of_the_day.log
exec 2>&1
@shmerl
shmerl / wine_staging_build.sh
Last active Nov 22, 2020
For building Wine staging
View wine_staging_build.sh
#!/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 / dxvk_build.sh
Last active Oct 25, 2020
For dxvk building on Debian
View dxvk_build.sh
#!/bin/bash
# Notes:
#
# For Debian build of dxvk. Only builds dll.
#
# Example of building 64-bit and 32-bit variatns:
#
# for bitness in 64 32; do dxvk_bitness=$bitness dxvk_build.sh; done
@shmerl
shmerl / mesa_run.sh
Last active Nov 23, 2020
For launching programs with custom Mesa
View mesa_run.sh
#!/bin/bash
# Assumes Mesa libraries are installed in /opt/${mesa_dir}/<arch_dir>
# For explicit switching off of the override
mesa_run_off=${mesa_run_off:-false}
if $mesa_run_off; then
"$@" &
disown -h %+
sleep 1
View winetricks_run.sh
#!/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 / wine_run.sh
Last active Oct 26, 2020
Custom Wine running
View wine_run.sh
#!/bin/bash
# Configuration (set through environment variables):
#
# WINEPREFIX what prefix to use.
# WINEPATH to use custom location of Wine (e.g. /opt/wine-master).
# WINEARCH to set architecture (win64/win32).
#
# Notes:
@shmerl
shmerl / wine_env.sh
Last active Oct 26, 2020
Environment setting for custom Wine usage
View wine_env.sh
#!/bin/bash
# Helper script for wine_run.sh / winetricks_run.sh
# Sets environment and detects prefix arch. See wine_run.sh for details
# on configurable variables usage.
function get_wine_arch() {
local prefix="${WINEPREFIX:-"${HOME}/.wine"}"
local registry_winearch=$(perl -ne 'print $1 if /#arch=(win\d+)/' "${prefix}/system.reg" 2>/dev/null)
wine_arch=${WINEARCH:-"$registry_winearch"}
@shmerl
shmerl / mesa_debian_build.sh
Last active Oct 25, 2020
For building Mesa on Debian
View mesa_debian_build.sh
#!/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>
#
You can’t perform that action at this time.