From 8d5856c4760fe851e0ac03c7b683fa839dcd7e72 Mon Sep 17 00:00:00 2001 From: mobilegmYT <44128563+mobilegmYT@users.noreply.github.com> Date: Wed, 16 Dec 2020 10:37:03 -0700 Subject: [PATCH] retro2png --- apps/Retro2png/description | 9 +++++++++ apps/Retro2png/icon-24.png | Bin 0 -> 102 bytes apps/Retro2png/icon-64.png | Bin 0 -> 117 bytes apps/Retro2png/install | 32 ++++++++++++++++++++++++++++++++ apps/Retro2png/uninstall | 13 +++++++++++++ apps/Retro2png/website | 1 + 6 files changed, 55 insertions(+) create mode 100644 apps/Retro2png/description create mode 100644 apps/Retro2png/icon-24.png create mode 100644 apps/Retro2png/icon-64.png create mode 100644 apps/Retro2png/install create mode 100644 apps/Retro2png/uninstall create mode 100644 apps/Retro2png/website diff --git a/apps/Retro2png/description b/apps/Retro2png/description new file mode 100644 index 0000000..3cab8ee --- /dev/null +++ b/apps/Retro2png/description @@ -0,0 +1,9 @@ +Fork of Raspi2png with support for retropie and controller buttons. + +Run in a terminal: retro2png / Press the keys "r+2+p" in order +The resulting image will be saved to ~/Pictures/ + +or, + +Do the controller shortcut "Mode/PS+DPAD_UP" +Go to the Github to find out how to configure custom shortcuts for your controller at https://github.com/Vegz78/retro2png#configuring-the-gamepad-and-keyboard-hotkeys. \ No newline at end of file diff --git a/apps/Retro2png/icon-24.png b/apps/Retro2png/icon-24.png new file mode 100644 index 0000000000000000000000000000000000000000..3832d6f28bf4e531896beb2ad61f7f3846b5766b GIT binary patch literal 102 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjoCO|{#S9F5M?jcysy3fANQI}1 tV~9uR+k=dZKwiUyf9v0Ia4|HjV&s%yU_AFu)eb1i;OXk;vd$@?2>=i?7nuM6 literal 0 HcmV?d00001 diff --git a/apps/Retro2png/icon-64.png b/apps/Retro2png/icon-64.png new file mode 100644 index 0000000000000000000000000000000000000000..4012944b58252423bd3c84fbf6f5e698b1a39bf0 GIT binary patch literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fAP*B~| w#WAE}&f9~Gyg=Te1>gO1`OFspnaH4_oY}#FfwBM7$v}{>r>mdKI;Vst07yI;1ONa4 literal 0 HcmV?d00001 diff --git a/apps/Retro2png/install b/apps/Retro2png/install new file mode 100644 index 0000000..c0ad4bf --- /dev/null +++ b/apps/Retro2png/install @@ -0,0 +1,32 @@ +#!/bin/bash + +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + +function error { + echo -e "\\e[91m$1\\e[39m" + exit 1 +} +"${DIRECTORY}/pkg-install" "libpng-dev libpng12-dev git-core triggerhappy" "$(dirname "$0")" || exit 1 + +# 2. Clone git to home folder +cd ~ +git clone https://github.com/Vegz78/retro2png.git +cd retro2png + +# 3. Compile and install retro2png +make +sudo make install + +# 4. Setup Triggerhappy +sed -i "s/pi/$USER/g" ./triggerhappy.service +sudo cp -f ./triggerhappy.service /lib/systemd/system/triggerhappy.service +sudo cp -f ./retro2png.conf /etc/triggerhappy/triggers.d/retro2png.conf #Raspbian installs triggerhappy as default, but optional, so when changing user here, the Shift key on boot to disable the on-demand scaling governor might not work after this +sudo systemctl disable triggerhappy.socket #This socket prevents triggerhappy from starting correctly, ref: https://github.com/wertarbyte/triggerhappy/issues/22 +sudo systemctl daemon-reload +sudo systemctl enable triggerhappy.service +sudo systemctl restart triggerhappy.service +sudo systemctl status triggerhappy.service #From this you can check if the triggerhappy service now is running as your user + +# 5. Clean up +cd .. +rm -fr retro2png diff --git a/apps/Retro2png/uninstall b/apps/Retro2png/uninstall new file mode 100644 index 0000000..14c3924 --- /dev/null +++ b/apps/Retro2png/uninstall @@ -0,0 +1,13 @@ +#!/bin/bash + +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + +function error { + echo -e "\\e[91m$1\\e[39m" + exit 1 +} + +#if your app installs any packages, keep this command here so those packages will be removed. +"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 + +sudo rm /usr/bin/retro2png diff --git a/apps/Retro2png/website b/apps/Retro2png/website new file mode 100644 index 0000000..6bd9797 --- /dev/null +++ b/apps/Retro2png/website @@ -0,0 +1 @@ +https://github.com/Vegz78/retro2png \ No newline at end of file