Skip to content

Commit

Permalink
Reimplement again the feature for a customizable .desktop file
Browse files Browse the repository at this point in the history
I needed to remove it to speed up the conversion of all existing Archimages in my repositories.
  • Loading branch information
ivan-hc authored Jan 29, 2024
1 parent 7c14a33 commit 57eed46
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions sample-next-junest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,33 @@ cp -r ./.junest/usr/share/icons/hicolor/512x512/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/scalable/apps/*$ICON* ./ 2>/dev/null
cp -r ./.junest/usr/share/pixmaps/*$ICON* ./ 2>/dev/null

# TEST IF THE DESKTOP FILE AND THE ICON ARE IN THE ROOT OF THE FUTURE APPIMAGE (./*AppDir/*)
if test -f ./*.desktop; then
echo "The .desktop file is available in $APP.AppDir/"
else
if test -f ./.junest/usr/bin/$BIN; then
echo "No .desktop file available for $APP, creating a new one..."
cat <<-HEREDOC >> "./$APP.desktop"
[Desktop Entry]
Version=1.0
Type=Application
Name=NAME
Comment=
Exec=BINARY
Icon=tux
Categories=Utility;
Terminal=true
StartupNotify=true
HEREDOC
sed -i "s#BINARY#$BIN#g" ./$APP.desktop
sed -i "s#Name=NAME#Name=$(echo $APP | tr a-z A-Z)#g" ./$APP.desktop
wget https://raw.githubusercontent.com/Portable-Linux-Apps/Portable-Linux-Apps.github.io/main/favicon.ico -O ./tux.png
else
echo "No binary in path... aborting all the processes."
exit
fi
fi

# ...AND FINALLY CREATE THE APPRUN, IE THE MAIN SCRIPT TO RUN THE APPIMAGE!
# EDIT THE FOLLOWING LINES IF YOU THINK SOME ENVIRONMENT VARIABLES ARE MISSING
rm -R -f ./AppRun
Expand Down

0 comments on commit 57eed46

Please sign in to comment.