Last active
December 7, 2022 09:44
-
-
Save BobSynfig/b861ead8ea57df22d601edb22324d6a6 to your computer and use it in GitHub Desktop.
Patch for enve in Manjaro and Fedora - Solves libgio-2.0.so.0 error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Patch for enve in Manjaro and Fedora | |
# | |
# Solves libgio-2.0.so.0 error by removing embedded libstdc++.so.6 and libgmodule-2.0.so.0 | |
# See https://github.com/MaurycyLiebner/enve/issues/289 | |
# https://github.com/MaurycyLiebner/enve/issues/301 | |
# | |
# Based on: | |
# https://github.com/AppImage/AppImageKit/issues/1162 | |
# https://github.com/project-slippi/Ishiiruka/issues/323 | |
# https://forum.manjaro.org/t/many-appimages-have-stopped-working-after-todays-update/69445/20 | |
# | |
# Usage: Make this script executable and run it. | |
# If the directory doesn't contain the .AppImage, it will be downloaded | |
# | |
# 2022-01-20 BobSynfig | |
# 2022-04-19 Update AppImage file names | |
# 2022-10-29 Update AppImage file names | |
# License: Do what you want with this script :) | |
#---------------------------------------------------------------- | |
# Basic configuration | |
#---------------------------------------------------------------- | |
# Provide the name of the original AppImage download page: | |
# https://github.com/MaurycyLiebner/enve/releases/tag/continuous-linux | |
# AI_SRC="enve-c0062e6-x86_64.AppImage" | |
AI_SRC="enve-d919d4d-9_25_22-x86_64.AppImage" | |
# Name the resulting appimage as you wish :) | |
AI_DST="enve-patched.AppImage" | |
#---------------------------------------------------------------- | |
# Do not modify below | |
#---------------------------------------------------------------- | |
AI_URL="https://github.com/MaurycyLiebner/enve/releases/download/continuous-linux/${AI_SRC}" | |
AITOOL="appimagetool-x86_64.AppImage" | |
AITOOL_URL="https://github.com/AppImage/AppImageKit/releases/download/13/${AITOOL}" | |
# Download Synfig if not in current directory | |
if [ ! -f "$AI_SRC" ]; then | |
echo ":: Downloading $AI_SRC..." | |
wget $AI_URL | |
chmod +x ./$AI_SRC | |
else | |
echo ":: $AI_SRC present - Skip download" | |
fi | |
if [ ! -f "$AITOOL" ]; then | |
echo ":: Downloading AppImageTool..." | |
wget $AITOOL_URL | |
chmod +x ./$AITOOL | |
else | |
echo ":: AppimageTool present - Skip download" | |
fi | |
echo ":: Extract the content of the AppImage..." | |
./$AI_SRC --appimage-extract >/dev/null 2>&1 | |
mv ./squashfs-root AppDir >/dev/null 2>&1 | |
echo ":: Patch" | |
TO_BE_REMOVED_1=./AppDir/usr/optional/libstdc++/libstdc++.so.6 | |
TO_BE_REMOVED_2=./AppDir/usr/lib/libgmodule-2.0.so.0 | |
rm $TO_BE_REMOVED_1 >/dev/null 2>&1 | |
rm $TO_BE_REMOVED_2 >/dev/null 2>&1 | |
echo ":: Repack/compress AppImage" | |
ARCH=x86_64 ./$AITOOL ./AppDir ./$AI_DST | |
echo ":: Cleanup" | |
rm -R ./AppDir | |
echo ":: Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment