Skip to content

Commit

Permalink
Merge pull request #756 from QuasarApp/task_755
Browse files Browse the repository at this point in the history
Fix a shortcuts array for debian pacakges
  • Loading branch information
EndrII authored Jun 13, 2023
2 parents 60d8148 + d35f0c3 commit de25aa3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/Deploy/src/Distributions/Templates/deb/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function createShortCut {
echo "Encoding=UTF-8" >> $DEST_FILE
echo "Name=$DEST_NAME" >> $DEST_FILE
echo "Type=Application" >> $DEST_FILE
echo "Icon=$CQT_INSTALL_DEB_DIR/icons/${SRC_FILE%%.*}.png" >> $DEST_FILE
echo "Icon=$TARGET_DIR/icons/${DEST_NAME}.png" >> $DEST_FILE
echo "Terminal=false" >> $DEST_FILE
echo "Exec=$SRC_FILE" >> $DEST_FILE

Expand All @@ -34,8 +34,6 @@ echo "Available commands:"
for app in "${APPS[@]}"
do

DEST_NAME=$app

if [ ! -e /usr/bin/"${app,,}" ]; then
ln -s "$TARGET_DIR/$app.sh" /usr/bin/"${app,,}"
echo "${app,,}"
Expand All @@ -45,10 +43,10 @@ done
for app in "${APPS_SHORTCUTS[@]}"
do

DEST_NAME=$app
DEST_NAME=${app%.*}

SRC_FILE="$TARGET_DIR/$app"
DEST_FILE="/usr/share/applications/${app%.*}.desktop"
DEST_FILE="/usr/share/applications/${DEST_NAME}.desktop"
createShortCut
done

Expand Down
2 changes: 1 addition & 1 deletion src/Deploy/src/Distributions/idistribution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ bool iDistribution::collectInfo(const DistroModule& pkg,
info.Custom["[\"array\", \"of\", \"shortcut\", \"cmds\"]"] = cmdShortCutsArray;

info.Custom["$BASH_ARRAY_APPLICATIONS"] = bashArray;
info.Custom["$BASH_ARRAY_APPLICATIONS"] = bashArray;
info.Custom["$BASH_ARRAY_SHORTCUTS_APPLICATIONS"] = bashShortCutsArray;

if (info.Name.isEmpty()) {
info.Name = "Application";
Expand Down

0 comments on commit de25aa3

Please sign in to comment.