Adds offically supported applications installed from the users folder

Adds Fusion360 to officially supported applications

Signed-off-by: sparky3387 <github@sparky.net.au>
This commit is contained in:
sparky3387
2025-08-31 22:27:32 +10:00
parent 94466f9a9b
commit dcb75c29f4
4 changed files with 176 additions and 31 deletions

View File

@@ -124,6 +124,16 @@ Contributing to the list of supported applications is encouraged through submiss
(CS6, CC, 2022)<br> (CS6, CC, 2022)<br>
<i><a href="https://commons.wikimedia.org/wiki/File:Adobe_Photoshop_CC_icon.svg">Icon</a> in the Public Domain.</i> <i><a href="https://commons.wikimedia.org/wiki/File:Adobe_Photoshop_CC_icon.svg">Icon</a> in the Public Domain.</i>
</td> </td>
<!-- Autodesk Fusion 360 -->
<td>
<img src="apps/fusion-360/icon.svg" width="100">
</td>
<td>
<b>Autodesk Fusion 360</b><br>
<i><a href="https://commons.wikimedia.org/wiki/File:Fusion360_Logo.svg">Icon</a> in the Public Domain.</i>
</td>
</tr>
<tr>
<!-- Command Prompt --> <!-- Command Prompt -->
<td> <td>
<img src="apps/cmd/icon.svg" width="100"> <img src="apps/cmd/icon.svg" width="100">
@@ -133,8 +143,6 @@ Contributing to the list of supported applications is encouraged through submiss
(cmd.exe)<br> (cmd.exe)<br>
<i><a href="https://github.com/microsoft/terminal/blob/main/res/terminal/Terminal.svg">Icon</a> under <a href="https://github.com/microsoft/terminal/blob/main/LICENSE">MIT license</a>.</i> <i><a href="https://github.com/microsoft/terminal/blob/main/res/terminal/Terminal.svg">Icon</a> under <a href="https://github.com/microsoft/terminal/blob/main/LICENSE">MIT license</a>.</i>
</td> </td>
</tr>
<tr>
<!-- File Explorer --> <!-- File Explorer -->
<td> <td>
<img src="apps/explorer/icon.svg" width="100"> <img src="apps/explorer/icon.svg" width="100">
@@ -144,6 +152,8 @@ Contributing to the list of supported applications is encouraged through submiss
(Windows Explorer)<br> (Windows Explorer)<br>
<i><a href="https://commons.wikimedia.org/wiki/File:Windows_Explorer.svg">Icon</a> in the Public Domain.</i> <i><a href="https://commons.wikimedia.org/wiki/File:Windows_Explorer.svg">Icon</a> in the Public Domain.</i>
</td> </td>
</tr>
<tr>
<!-- Internet Explorer --> <!-- Internet Explorer -->
<td> <td>
<img src="apps/iexplorer/icon.svg" width="100"> <img src="apps/iexplorer/icon.svg" width="100">
@@ -153,8 +163,6 @@ Contributing to the list of supported applications is encouraged through submiss
(11)<br> (11)<br>
<i><a href="https://commons.wikimedia.org/wiki/File:Internet_Explorer_10%2B11_logo.svg">Icon</a> in the Public Domain.</i> <i><a href="https://commons.wikimedia.org/wiki/File:Internet_Explorer_10%2B11_logo.svg">Icon</a> in the Public Domain.</i>
</td> </td>
</tr>
<tr>
<!-- Microsoft Access --> <!-- Microsoft Access -->
<td> <td>
<img src="apps/access/icon.svg" width="100"> <img src="apps/access/icon.svg" width="100">
@@ -164,6 +172,8 @@ Contributing to the list of supported applications is encouraged through submiss
(2016, 2019, o365)<br> (2016, 2019, o365)<br>
<i><a href="https://commons.wikimedia.org/wiki/File:Microsoft_Office_Access_(2019-present).svg">Icon</a> in the Public Domain.</i> <i><a href="https://commons.wikimedia.org/wiki/File:Microsoft_Office_Access_(2019-present).svg">Icon</a> in the Public Domain.</i>
</td> </td>
</tr>
<tr>
<!-- Microsoft Excel --> <!-- Microsoft Excel -->
<td> <td>
<img src="apps/excel/icon.svg" width="100"> <img src="apps/excel/icon.svg" width="100">
@@ -173,8 +183,6 @@ Contributing to the list of supported applications is encouraged through submiss
(2016, 2019, o365)<br> (2016, 2019, o365)<br>
<i><a href="https://en.m.wikipedia.org/wiki/File:Microsoft_Office_Excel_(2019%E2%80%93present).svg">Icon</a> in the Public Domain.</i> <i><a href="https://en.m.wikipedia.org/wiki/File:Microsoft_Office_Excel_(2019%E2%80%93present).svg">Icon</a> in the Public Domain.</i>
</td> </td>
</tr>
<tr>
<!-- Microsoft Word --> <!-- Microsoft Word -->
<td> <td>
<img src="apps/word/icon.svg" width="100"> <img src="apps/word/icon.svg" width="100">
@@ -184,6 +192,8 @@ Contributing to the list of supported applications is encouraged through submiss
(2016, 2019, o365)<br> (2016, 2019, o365)<br>
<i><a href="https://en.m.wikipedia.org/wiki/File:Microsoft_Office_Word_(2019%E2%80%93present).svg">Icon</a> in the Public Domain.</i> <i><a href="https://en.m.wikipedia.org/wiki/File:Microsoft_Office_Word_(2019%E2%80%93present).svg">Icon</a> in the Public Domain.</i>
</td> </td>
</tr>
<tr>
<!-- Microsoft OneNote --> <!-- Microsoft OneNote -->
<td> <td>
<img src="apps/onenote/icon.svg" width="100"> <img src="apps/onenote/icon.svg" width="100">
@@ -193,8 +203,6 @@ Contributing to the list of supported applications is encouraged through submiss
(2016, 2019, o365)<br> (2016, 2019, o365)<br>
<i><a href="https://en.m.wikipedia.org/wiki/File:Microsoft_Office_OneNote_(2019%E2%80%93present).svg">Icon</a> in the Public Domain.</i> <i><a href="https://en.m.wikipedia.org/wiki/File:Microsoft_Office_OneNote_(2019%E2%80%93present).svg">Icon</a> in the Public Domain.</i>
</td> </td>
</tr>
<tr>
<!-- Microsoft Outlook --> <!-- Microsoft Outlook -->
<td> <td>
<img src="apps/outlook/icon.svg" width="100"> <img src="apps/outlook/icon.svg" width="100">
@@ -204,6 +212,8 @@ Contributing to the list of supported applications is encouraged through submiss
(2016, 2019, o365)<br> (2016, 2019, o365)<br>
<i><a href="https://en.m.wikipedia.org/wiki/File:Microsoft_Office_Outlook_(2018%E2%80%93present).svg">Icon</a> in the Public Domain.</i> <i><a href="https://en.m.wikipedia.org/wiki/File:Microsoft_Office_Outlook_(2018%E2%80%93present).svg">Icon</a> in the Public Domain.</i>
</td> </td>
</tr>
<tr>
<!-- Microsoft PowerPoint --> <!-- Microsoft PowerPoint -->
<td> <td>
<img src="apps/powerpoint/icon.svg" width="100"> <img src="apps/powerpoint/icon.svg" width="100">
@@ -213,8 +223,6 @@ Contributing to the list of supported applications is encouraged through submiss
(2016, 2019, o365)<br> (2016, 2019, o365)<br>
<i><a href="https://en.m.wikipedia.org/wiki/File:Microsoft_Office_PowerPoint_(2019%E2%80%93present).svg">Icon</a> in the Public Domain.</i> <i><a href="https://en.m.wikipedia.org/wiki/File:Microsoft_Office_PowerPoint_(2019%E2%80%93present).svg">Icon</a> in the Public Domain.</i>
</td> </td>
</tr>
<tr>
<!-- Microsoft Publisher --> <!-- Microsoft Publisher -->
<td> <td>
<img src="apps/publisher/icon.svg" width="100"> <img src="apps/publisher/icon.svg" width="100">
@@ -224,6 +232,8 @@ Contributing to the list of supported applications is encouraged through submiss
(2016, 2019, o365)<br> (2016, 2019, o365)<br>
<i><a href="https://en.m.wikipedia.org/wiki/File:Microsoft_Office_Publisher_(2019-present).svg">Icon</a> in the Public Domain.</i> <i><a href="https://en.m.wikipedia.org/wiki/File:Microsoft_Office_Publisher_(2019-present).svg">Icon</a> in the Public Domain.</i>
</td> </td>
</tr>
<tr>
<!-- Microsoft Visio --> <!-- Microsoft Visio -->
<td> <td>
<img src="apps/visio/icon.svg" width="100"> <img src="apps/visio/icon.svg" width="100">
@@ -233,8 +243,6 @@ Contributing to the list of supported applications is encouraged through submiss
(Standard/Pro. 2021, Plan 2)<br> (Standard/Pro. 2021, Plan 2)<br>
<i><a href="https://en.m.wikipedia.org/wiki/File:Microsoft_Office_Visio_(2019).svg">Icon</a> in the Public Domain.</i> <i><a href="https://en.m.wikipedia.org/wiki/File:Microsoft_Office_Visio_(2019).svg">Icon</a> in the Public Domain.</i>
</td> </td>
</tr>
<tr>
<!-- Microsoft Project --> <!-- Microsoft Project -->
<td> <td>
<img src="apps/project/icon.svg" width="100"> <img src="apps/project/icon.svg" width="100">
@@ -244,6 +252,8 @@ Contributing to the list of supported applications is encouraged through submiss
(Standard/Pro. 2021, Plan 3/5)<br> (Standard/Pro. 2021, Plan 3/5)<br>
<i><a href="https://en.m.wikipedia.org/wiki/File:Microsoft_Project_(2019present).svg">Icon</a> in the Public Domain.</i> <i><a href="https://en.m.wikipedia.org/wiki/File:Microsoft_Project_(2019present).svg">Icon</a> in the Public Domain.</i>
</td> </td>
</tr>
<tr>
<!-- Microsoft Visual Studio --> <!-- Microsoft Visual Studio -->
<td> <td>
<img src="apps/visual-studio-pro/icon.svg" width="100"> <img src="apps/visual-studio-pro/icon.svg" width="100">
@@ -253,8 +263,6 @@ Contributing to the list of supported applications is encouraged through submiss
(Comm./Pro./Ent. 2022)<br> (Comm./Pro./Ent. 2022)<br>
<i><a href="https://en.m.wikipedia.org/wiki/File:Visual_Studio_Icon_2022.svg">Icon</a> in the Public Domain.</i> <i><a href="https://en.m.wikipedia.org/wiki/File:Visual_Studio_Icon_2022.svg">Icon</a> in the Public Domain.</i>
</td> </td>
</tr>
<tr>
<!-- mIRC --> <!-- mIRC -->
<td> <td>
<img src="apps/mirc/icon.svg" width="100"> <img src="apps/mirc/icon.svg" width="100">
@@ -263,6 +271,8 @@ Contributing to the list of supported applications is encouraged through submiss
<b>mIRC</b><br> <b>mIRC</b><br>
<i><a href="https://en.wikipedia.org/wiki/MIRC#/media/File:Mircnewlogo.png">Icon</a> in the Public Domain.</i> <i><a href="https://en.wikipedia.org/wiki/MIRC#/media/File:Mircnewlogo.png">Icon</a> in the Public Domain.</i>
</td> </td>
</tr>
<tr>
<!-- PowerShell --> <!-- PowerShell -->
<td> <td>
<img src="apps/powershell/icon.svg" width="100"> <img src="apps/powershell/icon.svg" width="100">
@@ -271,8 +281,6 @@ Contributing to the list of supported applications is encouraged through submiss
<b>PowerShell</b><br> <b>PowerShell</b><br>
<i><a href="https://iconduck.com/icons/102322/file-type-powershell">Icon</a> under <a href="https://iconduck.com/licenses/mit">MIT license</a>.</i> <i><a href="https://iconduck.com/icons/102322/file-type-powershell">Icon</a> under <a href="https://iconduck.com/licenses/mit">MIT license</a>.</i>
</td> </td>
</tr>
<tr>
<!-- Windows --> <!-- Windows -->
<td> <td>
<img src="icons/windows.svg" width="100"> <img src="icons/windows.svg" width="100">

90
apps/fusion-360/icon.svg Normal file
View File

@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="256pt"
height="256pt"
viewBox="0 0 256 256"
version="1.1"
id="svg7"
sodipodi:docname="Fusion360-82.svg"
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs7" />
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="pt"
showgrid="false"
inkscape:zoom="1.4142136"
inkscape:cx="228.74904"
inkscape:cy="139.30004"
inkscape:window-width="1418"
inkscape:window-height="892"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g8" />
<g
id="g8">
<path
style="fill:#ff9548;stroke-width:0.75;fill-opacity:1"
d="M 46.79097,-0.00247339 7.8151404,23.849982 8.0231482,23.990607 15.67377,23.310848 45.733663,5.9498164 Z"
id="path8"
sodipodi:nodetypes="cccccc" />
<path
fill="#ff9548"
opacity="1"
d="M 46.398594,0.36621094 46.78,0 C 46.69,59.94 46.65,119.88 46.8,179.82 40.173599,183.81384 12.241533,200.6415 7.83,203.25 7.82,143.45 7.84,83.65 7.82,23.85 16.708712,15.663236 38.795821,8.8363876 46.398594,0.36621094 Z"
id="path1"
sodipodi:nodetypes="cccccc" />
</g>
<g
id="#ff6b00ff"
style="display:inline">
<path
fill="#ff6b00"
opacity="1"
d="m 46.78,0 h 171.61 c 6.13,1.02 11.96,5.71 12.23,12.27 0.19,9.33 0.01,18.66 0.07,28 0.01,46.5 -0.01,93.01 0.01,139.51 -61.3,0.1 -122.6,0.02 -183.9,0.04 C 46.65,119.88 46.69,59.94 46.78,0 m 64.99,40.53 c 0.03,33.12 0,66.25 0.02,99.37 8.3,-0.02 16.6,0.05 24.9,-0.04 -0.06,-13.36 -0.02,-26.73 -0.03,-40.1 10.87,0.02 21.74,-0.07 32.62,0.04 0.1,-5.89 0.16,-11.8 -0.04,-17.69 -10.86,0.12 -21.71,0.03 -32.57,0.05 -0.06,-7.88 0.07,-15.76 -0.08,-23.65 12.91,-0.24 25.83,-0.03 38.74,-0.1 -0.01,-5.96 -0.01,-11.93 0,-17.89 -21.18,-0.01 -42.37,-0.02 -63.56,0.01 z"
id="path2" />
</g>
<g
id="#933c00ff">
<path
fill="#933c00"
opacity="1.00"
d=" M 230.69 40.27 C 236.63 40.33 242.56 40.12 248.50 40.40 C 248.26 112.26 248.46 184.13 248.40 256.00 L 40.90 256.00 C 35.09 254.75 29.45 250.32 29.18 243.98 C 29.00 226.15 29.15 208.31 29.11 190.47 C 35.01 186.93 40.91 183.37 46.80 179.82 C 108.10 179.80 169.40 179.88 230.70 179.78 C 230.68 133.28 230.70 86.77 230.69 40.27 M 163.04 199.06 C 157.06 202.24 156.37 212.16 162.15 215.83 C 166.41 218.38 171.48 218.99 175.96 221.04 C 178.76 222.05 179.00 226.25 176.91 228.06 C 172.76 230.53 165.86 228.94 165.73 223.33 C 162.83 223.33 159.94 223.34 157.04 223.33 C 157.25 226.60 158.35 229.96 160.90 232.17 C 164.97 235.91 170.93 236.24 176.16 235.69 C 181.07 235.18 186.33 232.16 187.38 226.99 C 187.94 223.28 187.75 218.80 184.56 216.28 C 180.18 212.67 174.15 212.48 169.26 209.85 C 167.07 208.83 166.95 205.27 168.99 204.06 C 172.69 201.92 178.42 203.55 178.83 208.32 C 181.69 208.34 184.56 208.34 187.42 208.32 C 187.18 204.06 184.77 199.89 180.69 198.28 C 175.11 196.05 168.36 196.14 163.04 199.06 M 92.12 197.62 C 92.29 210.14 92.16 222.67 92.19 235.19 C 95.27 235.19 98.35 235.19 101.43 235.28 C 101.77 230.14 101.46 225.00 101.60 219.86 C 105.70 219.87 109.80 219.87 113.90 219.86 C 113.90 217.65 113.90 215.45 113.89 213.25 C 109.78 213.26 105.68 213.26 101.57 213.26 C 101.60 210.33 101.59 207.39 101.49 204.47 C 106.40 204.20 111.32 204.41 116.24 204.34 C 116.24 202.07 116.24 199.80 116.25 197.54 C 108.20 197.58 100.16 197.42 92.12 197.62 M 121.04 197.58 C 121.38 207.36 120.57 217.21 121.49 226.96 C 123.25 236.40 136.36 238.70 142.71 232.48 C 142.97 233.38 143.24 234.28 143.53 235.18 C 146.16 235.19 148.79 235.19 151.42 235.30 C 151.84 222.72 151.56 210.10 151.55 197.51 C 148.42 197.54 145.29 197.53 142.16 197.62 C 142.32 206.42 142.16 215.22 142.25 224.03 C 143.08 230.29 130.91 231.38 130.55 224.88 C 130.27 215.78 130.50 206.66 130.44 197.56 C 127.31 197.53 124.18 197.53 121.04 197.58 Z"
id="path3" />
</g>
<g
id="#ffffffff">
<path
fill="#ffffff"
opacity="1.00"
d=" M 111.77 40.53 C 132.96 40.50 154.15 40.51 175.33 40.52 C 175.32 46.48 175.32 52.45 175.33 58.41 C 162.42 58.48 149.50 58.27 136.59 58.51 C 136.74 66.40 136.61 74.28 136.67 82.16 C 147.53 82.14 158.38 82.23 169.24 82.11 C 169.44 88.00 169.38 93.91 169.28 99.80 C 158.40 99.69 147.53 99.78 136.66 99.76 C 136.67 113.13 136.63 126.50 136.69 139.86 C 128.39 139.95 120.09 139.88 111.79 139.90 C 111.77 106.78 111.80 73.65 111.77 40.53 Z"
id="path4" />
<path
fill="#ffffff"
opacity="1.00"
d=" M 163.04 199.06 C 168.36 196.14 175.11 196.05 180.69 198.28 C 184.77 199.89 187.18 204.06 187.42 208.32 C 184.56 208.34 181.69 208.34 178.83 208.32 C 178.42 203.55 172.69 201.92 168.99 204.06 C 166.95 205.27 167.07 208.83 169.26 209.85 C 174.15 212.48 180.18 212.67 184.56 216.28 C 187.75 218.80 187.94 223.28 187.38 226.99 C 186.33 232.16 181.07 235.18 176.16 235.69 C 170.93 236.24 164.97 235.91 160.90 232.17 C 158.35 229.96 157.25 226.60 157.04 223.33 C 159.94 223.34 162.83 223.33 165.73 223.33 C 165.86 228.94 172.76 230.53 176.91 228.06 C 179.00 226.25 178.76 222.05 175.96 221.04 C 171.48 218.99 166.41 218.38 162.15 215.83 C 156.37 212.16 157.06 202.24 163.04 199.06 Z"
id="path5" />
<path
fill="#ffffff"
opacity="1.00"
d=" M 92.12 197.62 C 100.16 197.42 108.20 197.58 116.25 197.54 C 116.24 199.80 116.24 202.07 116.24 204.34 C 111.32 204.41 106.40 204.20 101.49 204.47 C 101.59 207.39 101.60 210.33 101.57 213.26 C 105.68 213.26 109.78 213.26 113.89 213.25 C 113.90 215.45 113.90 217.65 113.90 219.86 C 109.80 219.87 105.70 219.87 101.60 219.86 C 101.46 225.00 101.77 230.14 101.43 235.28 C 98.35 235.19 95.27 235.19 92.19 235.19 C 92.16 222.67 92.29 210.14 92.12 197.62 Z"
id="path6" />
<path
fill="#ffffff"
opacity="1.00"
d=" M 121.04 197.58 C 124.18 197.53 127.31 197.53 130.44 197.56 C 130.50 206.66 130.27 215.78 130.55 224.88 C 130.91 231.38 143.08 230.29 142.25 224.03 C 142.16 215.22 142.32 206.42 142.16 197.62 C 145.29 197.53 148.42 197.54 151.55 197.51 C 151.56 210.10 151.84 222.72 151.42 235.30 C 148.79 235.19 146.16 235.19 143.53 235.18 C 143.24 234.28 142.97 233.38 142.71 232.48 C 136.36 238.70 123.25 236.40 121.49 226.96 C 120.57 217.21 121.38 207.36 121.04 197.58 Z"
id="path7" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.7 KiB

14
apps/fusion-360/info Normal file
View File

@@ -0,0 +1,14 @@
# GNOME shortcut name
NAME="Fusion 360"
# Used for descriptions and window class
FULL_NAME="Autodesk Fusion 360"
# The executable inside windows
WIN_EXECUTABLE="C:\Users\%USERNAME%\AppData\Local\Autodesk\webdeploy\production\6a0c9611291d45bb9226980209917c3d\FusionLauncher.exe"
# GNOME categories
CATEGORIES="WinApps;Graphics;3DGraphics"
# GNOME mimetypes
MIME_TYPES="application/fusion"

View File

@@ -1153,7 +1153,7 @@ function waFindInstalled() {
source "./apps/${APPLICATION}/info" source "./apps/${APPLICATION}/info"
# Append commands to batch file. # Append commands to batch file.
echo "IF EXIST \"${WIN_EXECUTABLE}\" ECHO ${APPLICATION} >> ${TMP_INST_FILE_PATH_WIN}" >>"$BATCH_SCRIPT_PATH" echo "IF EXIST \"${WIN_EXECUTABLE}\" ECHO ${APPLICATION}^|^|^|${WIN_EXECUTABLE} >> ${TMP_INST_FILE_PATH_WIN}" >>"$BATCH_SCRIPT_PATH"
done done
# Append a command to the batch script to run the PowerShell script and store its output in the 'detected' file. # Append a command to the batch script to run the PowerShell script and store its output in the 'detected' file.
@@ -1330,17 +1330,35 @@ function waConfigureOfficiallySupported() {
# Create application entries for each officially supported application. # Create application entries for each officially supported application.
for OSA in "${OSA_LIST[@]}"; do for OSA in "${OSA_LIST[@]}"; do
# Print feedback. # Split the line by the '|||' delimiter
echo -n "Creating an application entry for ${OSA}... " local APP_NAME="${OSA%%|||*}"
local ACTUAL_WIN_EXECUTABLE="${OSA##*|||}"
# Copy application icon and information. # If splitting failed for some reason, skip this line to be safe.
$SUDO cp -r "./apps/${OSA}" "${APPDATA_PATH}/apps" if [[ -z "$APP_NAME" || -z "$ACTUAL_WIN_EXECUTABLE" ]]; then
continue
fi
# Configure the application. # Print feedback using the clean application name.
waConfigureApp "$OSA" svg echo -n "Creating an application entry for ${APP_NAME}... "
# Copy the original, unmodified application assets.
$SUDO cp -r "./apps/${APP_NAME}" "${APPDATA_PATH}/apps"
local DESTINATION_INFO_FILE="${APPDATA_PATH}/apps/${APP_NAME}/info"
# Sanitize the string using pure Bash. This is fast and safe.
local SED_SAFE_PATH="${ACTUAL_WIN_EXECUTABLE//&/\\&}"
SED_SAFE_PATH="${SED_SAFE_PATH//\\/\\\\}"
# Use the sanitized string to safely edit the file.
$SUDO sed -i "s|^WIN_EXECUTABLE=.*|WIN_EXECUTABLE=\"${SED_SAFE_PATH}\"|" "$DESTINATION_INFO_FILE"
# Configure the application using the clean name.
waConfigureApp "$APP_NAME" svg
# Check if the application is an Office app and copy the protocol handler. # Check if the application is an Office app and copy the protocol handler.
if [[ " ${OFFICE_APPS[*]} " == *" $OSA "* ]]; then if [[ " ${OFFICE_APPS[*]} " == *" $APP_NAME "* ]]; then
# Determine the target directory based on whether the installation is for the system or user. # Determine the target directory based on whether the installation is for the system or user.
if [[ "$OPT_SYSTEM" -eq 1 ]]; then if [[ "$OPT_SYSTEM" -eq 1 ]]; then
TARGET_DIR="$SYS_APP_PATH" TARGET_DIR="$SYS_APP_PATH"
@@ -1370,6 +1388,7 @@ function waConfigureApps() {
local APP_INSTALL="" # Stores the option selected by the user. local APP_INSTALL="" # Stores the option selected by the user.
local SELECTED_APPS=() # Stores the officially supported applications selected by the user. local SELECTED_APPS=() # Stores the officially supported applications selected by the user.
local TEMP_ARRAY=() # Temporary array used for sorting elements of an array. local TEMP_ARRAY=() # Temporary array used for sorting elements of an array.
declare -A APP_DATA_MAP # Associative array to map short names back to their full data line.
# Read the list of officially supported applications that are installed on Windows into an array, returning an empty array if no such files exist. # Read the list of officially supported applications that are installed on Windows into an array, returning an empty array if no such files exist.
# This will remove leading and trailing whitespace characters as well as ignore empty lines. # This will remove leading and trailing whitespace characters as well as ignore empty lines.
@@ -1384,14 +1403,28 @@ function waConfigureApps() {
# - Executable Path (WIN_EXECUTABLE) # - Executable Path (WIN_EXECUTABLE)
# - Supported MIME Types (MIME_TYPES) # - Supported MIME Types (MIME_TYPES)
# - Application Icon (ICON) # - Application Icon (ICON)
# Split the line to get the clean application name
local APP_NAME="${OSA%%|||*}"
local ACTUAL_WIN_EXECUTABLE="${OSA##*|||*}"
# If splitting failed, skip this entry.
if [[ -z "$APP_NAME" ]]; then
continue
fi
# Use the clean APP_NAME to source the info file
# shellcheck source=/dev/null # Exclude this file from being checked by ShellCheck. # shellcheck source=/dev/null # Exclude this file from being checked by ShellCheck.
source "./apps/${OSA}/info" source "./apps/${APP_NAME}/info"
# Add both the simplified and full name of the application to an array. # Add both the simplified and full name of the application to an array.
APPS+=("${FULL_NAME} (${OSA})") APPS+=("${FULL_NAME} (${APP_NAME})")
# Store the original data line in our map so we can retrieve it later.
APP_DATA_MAP["$APP_NAME"]="$OSA"
# Extract the executable file name (e.g. 'MyApp.exe') from the absolute path. # Extract the executable file name (e.g. 'MyApp.exe') from the absolute path.
WIN_EXECUTABLE="${WIN_EXECUTABLE##*\\}" WIN_EXECUTABLE="${ACTUAL_WIN_EXECUTABLE##*\\}"
# Trim any leading or trailing whitespace characters from the executable file name. # Trim any leading or trailing whitespace characters from the executable file name.
read -r WIN_EXECUTABLE <<<"$(echo "$WIN_EXECUTABLE" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" read -r WIN_EXECUTABLE <<<"$(echo "$WIN_EXECUTABLE" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
@@ -1426,11 +1459,11 @@ function waConfigureApps() {
for SELECTED_APP in "${SELECTED_APPS[@]}"; do for SELECTED_APP in "${SELECTED_APPS[@]}"; do
# Capture the substring within (but not including) the parentheses. # Capture the substring within (but not including) the parentheses.
# This substring represents the officially supported application name (see above loop). # This substring represents the officially supported application name (see above loop).
SELECTED_APP="${SELECTED_APP##*(}" local SHORT_NAME="${SELECTED_APP##*(}"
SELECTED_APP="${SELECTED_APP%%)}" SHORT_NAME="${SHORT_NAME%%)}"
# Add the substring back to the 'install' file. # Use the map to find the original data line (e.g., "word|||C:\...") and write it back.
echo "$SELECTED_APP" >>"$INST_FILE_PATH" echo "${APP_DATA_MAP[$SHORT_NAME]}" >>"$INST_FILE_PATH"
done done
fi fi