Skip to content

Commit

Permalink
Fix missing .desktop file
Browse files Browse the repository at this point in the history
  • Loading branch information
konradmb committed Feb 9, 2024
1 parent f2b6e36 commit fcd297b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
11 changes: 7 additions & 4 deletions PacketTracer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ ingredients:
- [ -f ../etc/PacketTracerSettingsFix.py ] && cp ../etc/PacketTracerSettingsFix.py .
- [ -f ../etc/PacketTracerSettingsFix.py ] || wget -c https://raw.githubusercontent.com/konradmb/PacketTracer-AppImage/master/etc/PacketTracerSettingsFix.py
- chmod +x PacketTracerSettingsFix.py
- cp -r ../etc/ .

script:
# Fix overly restrictive permissions - we should be able do delete directory
- find opt/pt/saves opt/pt/templates -type d -exec chmod +w {} +
# Copy helper script to bin
- cp ../PacketTracerSettingsFix.py usr/bin/
# Copy .desktop file, icon and libs from extracted archive
- cp usr/share/applications/cisco-pt.desktop ./PacketTracer.desktop
# Copy icon and libs from extracted archive
- cp opt/pt/art/app.png ./PacketTracer.png
- mkdir -p usr/lib/x86_64-linux-gnu/
- mv opt/pt/bin/*.so.* usr/lib/x86_64-linux-gnu/
# # Remove unused binaries
# Remove unused binaries
- rm opt/pt/bin/linguist opt/pt/bin/meta
# Fix wrong permissions - images shouldn't be executable. Cisco still cannot into permissions, even with deb. ;)
- find opt/pt/help/default/images/ -type f -exec chmod -x {} +
Expand All @@ -55,7 +55,10 @@ script:
# Patch PT bin - change $HOME/.packettracer string to something else
# New file name must have the same length
- sed -i 's!/.packettracer!/.ptappimage00!g' opt/pt/bin/PacketTracer
# Change icon and executable path
# Create .desktop file
- cp ../etc/PacketTracer.desktop .
- cp ../etc/PacketTracer-url.desktop .
# - cp etc/Pac PacketTracer.desktop
- sed -i 's!Icon=/opt/pt/art/app.png!Icon=PacketTracer.png!' PacketTracer.desktop
- sed -i 's!Exec=/opt/pt/packettracer %f!Exec=PacketTracerWrapper %f!' PacketTracer.desktop
- echo 'Categories=Education;ComputerScience;' >> PacketTracer.desktop
9 changes: 9 additions & 0 deletions etc/PacketTracer-url.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Desktop Entry]
Type=Application
Exec=/opt/pt/packettracer -uri=%u
Name=Packet Tracer 8.2.1
Icon=/opt/pt/art/app.png
Terminal=false
StartupNotify=true
NoDisplay=true
MimeType=x-scheme-handler/pttp;
8 changes: 8 additions & 0 deletions etc/PacketTracer.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Exec=/opt/pt/packettracer %f
Name=Packet Tracer 8.2.1
Icon=/opt/pt/art/app.png
Terminal=false
StartupNotify=true
MimeType=application/x-pkt;application/x-pka;application/x-pkz;application/x-pks;application/x-pksz;

0 comments on commit fcd297b

Please sign in to comment.