├── .gitignore ├── etc ├── PacketTracer-url.desktop ├── PacketTracer.desktop └── PacketTracerSettingsFix.py ├── .github └── workflows │ └── main.yml ├── PacketTracer-7.3.0.yml ├── PacketTracer-8.1.yml ├── PacketTracer.yml ├── PacketTracer-7.1.yml ├── README.md └── PacketTracer-7.2.1.yml /.gitignore: -------------------------------------------------------------------------------- 1 | *.tar.gz 2 | *.deb 3 | /PacketTracer*/ 4 | /pkg2appimage 5 | /out 6 | .vscode -------------------------------------------------------------------------------- /etc/PacketTracer-url.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Exec=/opt/pt/packettracer -uri=%u 4 | Name=Packet Tracer 8.2.2 5 | Icon=/opt/pt/art/app.png 6 | Terminal=false 7 | StartupNotify=true 8 | NoDisplay=true 9 | MimeType=x-scheme-handler/pttp; 10 | -------------------------------------------------------------------------------- /etc/PacketTracer.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Exec=/opt/pt/packettracer %f 4 | Name=Packet Tracer 8.2.2 5 | Icon=/opt/pt/art/app.png 6 | Terminal=false 7 | StartupNotify=true 8 | MimeType=application/x-pkt;application/x-pka;application/x-pkz;application/x-pks;application/x-pksz; 9 | -------------------------------------------------------------------------------- /etc/PacketTracerSettingsFix.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | 4 | 5 | def write_pt_file(pathStartChar, pathSeparatorChar, packetTracerRoot, settingsFileName, homeFolder): 6 | homePath = os.getenv("HOME") 7 | packetTracerHomePath = homePath + homeFolder 8 | 9 | settingsFilePath = homePath + settingsFileName 10 | settingsFile = open(settingsFilePath, "wb") 11 | 12 | fileHeader = bytearray([0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00]) 13 | if type(pathStartChar) == str: 14 | pathStart = bytearray(pathStartChar, "utf16")[2:] 15 | else: 16 | pathStart = bytearray(pathStartChar) 17 | pathSeparator = bytearray([0x00, 0x00, 0x00, pathSeparatorChar, 0x00]) 18 | packetTracerPath = os.getcwd() + packetTracerRoot 19 | 20 | packetTracerPathEncoded = bytearray(packetTracerPath, "utf16")[2:-1] 21 | packetTracerHomePathEncoded = bytearray( 22 | packetTracerHomePath, "utf16")[2:-1] 23 | encodedPaths = pathStart + packetTracerPathEncoded \ 24 | + pathSeparator + packetTracerHomePathEncoded 25 | encodedPaths = encodedPaths 26 | 27 | bytesToWrite = fileHeader + encodedPaths 28 | settingsFile.write(bytesToWrite) 29 | settingsFile.close() 30 | 31 | 32 | if sys.argv[1] == "8.1": 33 | write_pt_file([0x82, 0x00], 0x1E, "/opt/pt", "/.ptappimage00", "/pt") 34 | elif sys.argv[1] == "7.3": 35 | write_pt_file(">", 0x32, "/opt/pt", "/.ptappimage00", "/PacketTracer") 36 | elif sys.argv[1] == "7.2": 37 | write_pt_file("^", 0x32, "/share/PacketTracer", 38 | "/.ptappimage00", "/PacketTracer") 39 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: Run pkg2appimage 4 | 5 | # Controls when the workflow will run 6 | on: 7 | # Triggers the workflow on push or pull request events but only for the master branch 8 | # push: 9 | # branches: [ master ] 10 | pull_request: 11 | branches: [ master ] 12 | 13 | # Allows you to run this workflow manually from the Actions tab 14 | workflow_dispatch: 15 | 16 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 17 | jobs: 18 | # This workflow contains a single job called "build" 19 | build: 20 | # The type of runner that the job will run on 21 | runs-on: ubuntu-latest 22 | 23 | # Steps represent a sequence of tasks that will be executed as part of the job 24 | steps: 25 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 26 | - uses: actions/checkout@v2 27 | 28 | - name: Install dependencies 29 | run: | 30 | sudo add-apt-repository universe 31 | sudo apt-get install desktop-file-utils libfuse2 32 | wget https://github.com/AppImage/pkg2appimage/raw/master/pkg2appimage 33 | chmod +x pkg2appimage 34 | 35 | 36 | # Runs a set of commands using the runners shell 37 | - name: Run pkg2appimage 38 | run: | 39 | for yaml in *.yml 40 | do 41 | if [ "$yaml" == "PacketTracer-7.1.yml" ] ; then 42 | continue; 43 | fi 44 | 45 | echo "Running $yaml" 46 | ./pkg2appimage $yaml 47 | echo "Removing PacketTracer directory" 48 | rm -rf PacketTracer 49 | done 50 | -------------------------------------------------------------------------------- /PacketTracer-7.3.0.yml: -------------------------------------------------------------------------------- 1 | app: PacketTracer 2 | 3 | ingredients: 4 | dist: jessie 5 | sources: 6 | - deb http://deb.debian.org/debian jessie main 7 | packages: 8 | - libpng12-0 9 | - libssl1.0.0 10 | - python3 11 | - libdouble-conversion1 12 | - qt-at-spi 13 | script: 14 | - FILENAME=PacketTracer_730_amd64.deb 15 | - [ -f ../"$FILENAME" ] && ln -sf ../"$FILENAME" . 16 | - [ -f ../"$FILENAME" ] || wget -c https://archive.org/download/packettracer730mac_202002/PacketTracer_730_amd64.deb 17 | - echo "c96ed6356cabeca198f8fbe237197dc7c234cd37 $FILENAME" > checksum 18 | - sha1sum -c checksum 19 | - wget -c https://raw.githubusercontent.com/konradmb/PacketTracer-AppImage/master/etc/PacketTracerSettingsFix.py 20 | - chmod +x PacketTracerSettingsFix.py 21 | 22 | script: 23 | # Fix overly restrictive permissions - we should be able do delete directory 24 | - find opt/pt/saves -type d -exec chmod +w {} + 25 | # Copy helper script to bin 26 | - cp ../PacketTracerSettingsFix.py usr/bin/ 27 | # Copy .desktop file, icon and libs from extracted archive 28 | - cp usr/share/applications/cisco-pt7.desktop ./PacketTracer.desktop 29 | - cp opt/pt/art/app.png ./PacketTracer.png 30 | - mkdir -p usr/lib/x86_64-linux-gnu/ 31 | - mv opt/pt/bin/*.so.* usr/lib/x86_64-linux-gnu/ 32 | # # Remove unused binaries 33 | - rm opt/pt/bin/linguist opt/pt/bin/meta 34 | # Fix wrong permissions - images shouldn't be executable. Cisco still cannot into permissions, even with deb. ;) 35 | - find opt/pt/help/default/images/ -type f -exec chmod -x {} + 36 | - chmod -x opt/pt/art/ComponentBox/*.png 37 | - chmod -x opt/pt/art/Toolbar/*.png 38 | # Add wrapper 39 | - cat > usr/bin/PacketTracerWrapper << EOF 40 | - #!/bin/sh 41 | # Fool PacketTracer into thinking that it's been already running from this directory 42 | - cd .. 43 | - usr/bin/python3 usr/bin/PacketTracerSettingsFix.py 7.3 44 | - cd opt/pt/bin 45 | - QT_AUTO_SCREEN_SCALE_FACTOR=1 ./PacketTracer7 "$@" 46 | - EOF 47 | # Make it executable 48 | - chmod +x usr/bin/PacketTracerWrapper 49 | # Patch PT bin - change $HOME/.packettracer string to something else 50 | # New file name must have the same length 51 | - sed -i 's!/.packettracer!/.ptappimage00!g' opt/pt/bin/PacketTracer7 52 | # Change icon and executable path 53 | - sed -i 's!Icon=/opt/pt/art/app.png!Icon=PacketTracer.png!' PacketTracer.desktop 54 | - sed -i 's!Exec=/opt/pt/packettracer %f!Exec=PacketTracerWrapper %f!' PacketTracer.desktop 55 | - echo 'Categories=Education;ComputerScience;' >> PacketTracer.desktop 56 | -------------------------------------------------------------------------------- /PacketTracer-8.1.yml: -------------------------------------------------------------------------------- 1 | # Version: 8.1.0 2 | app: PacketTracer 3 | 4 | ingredients: 5 | dist: jessie 6 | sources: 7 | - deb http://deb.debian.org/debian jessie main 8 | packages: 9 | - libpng12-0 10 | - libssl1.0.0 11 | - python3 12 | - libdouble-conversion1 13 | - qt-at-spi 14 | script: 15 | - FILENAME='CiscoPacketTracer_810_Ubuntu_64bit.deb' 16 | - URL='https://archive.org/download/cisco-packet-tracer-810-ubuntu-64bit/CiscoPacketTracer_810_Ubuntu_64bit.deb' 17 | - CHECKSUM='09359b9597e420b2537a77f503d2d409e66b9669' 18 | - [ -f ../"$FILENAME" ] && ln -sf ../"$FILENAME" . 19 | - [ -f ../"$FILENAME" ] || wget -c "$URL" 20 | - echo "$CHECKSUM $FILENAME" > checksum 21 | - sha1sum -c checksum 22 | - [ -f ../etc/PacketTracerSettingsFix.py ] && cp ../etc/PacketTracerSettingsFix.py . 23 | - [ -f ../etc/PacketTracerSettingsFix.py ] || wget -c https://raw.githubusercontent.com/konradmb/PacketTracer-AppImage/master/etc/PacketTracerSettingsFix.py 24 | - chmod +x PacketTracerSettingsFix.py 25 | 26 | script: 27 | # Fix overly restrictive permissions - we should be able do delete directory 28 | - find opt/pt/saves opt/pt/templates -type d -exec chmod +w {} + 29 | # Copy helper script to bin 30 | - cp ../PacketTracerSettingsFix.py usr/bin/ 31 | # Copy .desktop file, icon and libs from extracted archive 32 | - cp usr/share/applications/cisco-pt.desktop ./PacketTracer.desktop 33 | - cp opt/pt/art/app.png ./PacketTracer.png 34 | - mkdir -p usr/lib/x86_64-linux-gnu/ 35 | - mv opt/pt/bin/*.so.* usr/lib/x86_64-linux-gnu/ 36 | # # Remove unused binaries 37 | - rm opt/pt/bin/linguist opt/pt/bin/meta 38 | # Fix wrong permissions - images shouldn't be executable. Cisco still cannot into permissions, even with deb. ;) 39 | - find opt/pt/help/default/images/ -type f -exec chmod -x {} + 40 | - chmod -x opt/pt/art/ComponentBox/*.png 41 | - chmod -x opt/pt/art/Toolbar/*.png 42 | # Add wrapper 43 | - cat > usr/bin/PacketTracerWrapper << EOF 44 | - #!/bin/sh 45 | # Fool PacketTracer into thinking that it's been already running from this directory 46 | - cd .. 47 | - usr/bin/python3 usr/bin/PacketTracerSettingsFix.py 8.1 48 | - cd opt/pt/bin 49 | - export PT8HOME="$(readlink -f ..)" 50 | - QT_AUTO_SCREEN_SCALE_FACTOR=1 ./PacketTracer "$@" 51 | - EOF 52 | # Make it executable 53 | - chmod +x usr/bin/PacketTracerWrapper 54 | # Patch PT bin - change $HOME/.packettracer string to something else 55 | # New file name must have the same length 56 | - sed -i 's!/.packettracer!/.ptappimage00!g' opt/pt/bin/PacketTracer 57 | # Change icon and executable path 58 | - sed -i 's!Icon=/opt/pt/art/app.png!Icon=PacketTracer.png!' PacketTracer.desktop 59 | - sed -i 's!Exec=/opt/pt/packettracer %f!Exec=PacketTracerWrapper %f!' PacketTracer.desktop 60 | - echo 'Categories=Education;ComputerScience;' >> PacketTracer.desktop 61 | -------------------------------------------------------------------------------- /PacketTracer.yml: -------------------------------------------------------------------------------- 1 | # Version: 8.2.2 2 | app: PacketTracer 3 | 4 | ingredients: 5 | dist: jessie 6 | sources: 7 | - deb http://archive.debian.org/debian jessie main 8 | packages: 9 | - libpng12-0 10 | - libssl1.0.0 11 | - python3 12 | - libdouble-conversion1 13 | - qt-at-spi 14 | - libxcb-xinerama0 15 | script: 16 | - FILENAME='CiscoPacketTracer822_amd64_signed.deb' 17 | - URL='https://archive.org/download/cisco-packet-tracer-822-amd-64-signed_202405/CiscoPacketTracer822_amd64_signed.deb' 18 | - CHECKSUM='35bd819fcb0e2ed1df3582387d599e4a9c6bf2c9' 19 | - [ -f ../"$FILENAME" ] && ln -sf ../"$FILENAME" . 20 | - [ -f ../"$FILENAME" ] || wget -c "$URL" 21 | - echo "$CHECKSUM $FILENAME" > checksum 22 | - sha1sum -c checksum 23 | - [ -f ../etc/PacketTracerSettingsFix.py ] && cp ../etc/PacketTracerSettingsFix.py . 24 | - [ -f ../etc/PacketTracerSettingsFix.py ] || wget -c https://raw.githubusercontent.com/konradmb/PacketTracer-AppImage/master/etc/PacketTracerSettingsFix.py 25 | - chmod +x PacketTracerSettingsFix.py 26 | - cp -r ../etc/ . 27 | 28 | script: 29 | # Fix overly restrictive permissions - we should be able do delete directory 30 | - find opt/pt/saves opt/pt/templates -type d -exec chmod +w {} + 31 | # Copy helper script to bin 32 | - cp ../PacketTracerSettingsFix.py usr/bin/ 33 | # Copy icon and libs from extracted archive 34 | - cp opt/pt/art/app.png ./PacketTracer.png 35 | - mkdir -p usr/lib/x86_64-linux-gnu/ 36 | - mv opt/pt/bin/*.so.* usr/lib/x86_64-linux-gnu/ 37 | # Remove unused binaries 38 | - rm opt/pt/bin/linguist opt/pt/bin/meta 39 | # Fix wrong permissions - images shouldn't be executable. Cisco still cannot into permissions, even with deb. ;) 40 | - find opt/pt/help/default/images/ -type f -exec chmod -x {} + 41 | - chmod -x opt/pt/art/ComponentBox/*.png 42 | - chmod -x opt/pt/art/Toolbar/*.png 43 | # Add wrapper 44 | - cat > usr/bin/PacketTracerWrapper << EOF 45 | - #!/bin/sh 46 | # Fool PacketTracer into thinking that it's been already running from this directory 47 | - cd .. 48 | - usr/bin/python3 usr/bin/PacketTracerSettingsFix.py 8.1 49 | - cd opt/pt/bin 50 | - export PT8HOME="$(readlink -f ..)" 51 | - QT_AUTO_SCREEN_SCALE_FACTOR=1 ./PacketTracer "$@" 52 | - EOF 53 | # Make it executable 54 | - chmod +x usr/bin/PacketTracerWrapper 55 | # Patch PT bin - change $HOME/.packettracer string to something else 56 | # New file name must have the same length 57 | - sed -i 's!/.packettracer!/.ptappimage00!g' opt/pt/bin/PacketTracer 58 | # Create .desktop file 59 | - cp ../etc/PacketTracer.desktop . 60 | # - cp ../etc/PacketTracer-url.desktop . 61 | - sed -i 's!Icon=/opt/pt/art/app.png!Icon=PacketTracer.png!' PacketTracer.desktop 62 | - sed -i 's!Exec=/opt/pt/packettracer %f!Exec=PacketTracerWrapper %f!' PacketTracer.desktop 63 | - echo 'Categories=Education;ComputerScience;' >> PacketTracer.desktop 64 | -------------------------------------------------------------------------------- /PacketTracer-7.1.yml: -------------------------------------------------------------------------------- 1 | app: PacketTracer-7.1 2 | 3 | ingredients: 4 | dist: jessie 5 | sources: 6 | - deb http://deb.debian.org/debian jessie main 7 | packages: 8 | - libpng12-0 9 | - libssl1.0.0 10 | - python3 11 | - libicu52 12 | exclude: 13 | - PacketTracer 14 | script: 15 | # Remove directory if already extracted 16 | - rm -rf extracted 17 | - mkdir -p extracted 18 | - wget -c https://www.netacad.com/portal/sites/default/files/resources/PacketTracer/packet_tracer_7.1.1_for_linux_64_bit.tar.gz 19 | - tar --delay-directory-restore -zxvf packet_tracer_7.1.1_for_linux_64_bit.tar.gz --directory extracted/ 20 | # Fix overly restrictive permissions - we should be able do delete directory 21 | - find extracted/saves -type d -exec chmod +w {} + 22 | # Copy helper script 23 | - wget -c https://raw.githubusercontent.com/konradmb/PacketTracer-AppImage/master/etc/PacketTracerSettingsFix.py 24 | - chmod +x PacketTracerSettingsFix.py 25 | 26 | script: 27 | # Copy helper script to bin 28 | - cp ../PacketTracerSettingsFix.py usr/bin/ 29 | # Copy .desktop file, icon and libs from extracted archive 30 | - cp ../extracted/bin/Cisco-PacketTracer.desktop ./PacketTracer.desktop 31 | - cp ../extracted/art/app.png ./PacketTracer.png 32 | - mkdir -p usr/lib/x86_64-linux-gnu/ 33 | - cp -P ../extracted/lib/*.so.* usr/lib/x86_64-linux-gnu/ 34 | # Copy all of the archive contents to its own directory 35 | - mkdir -p usr/share/PacketTracer 36 | - cp -r ../extracted/* usr/share/PacketTracer 37 | # Remove libraries already copied to usr/lib/x86_64-linux-gnu 38 | - rm usr/share/PacketTracer/lib/*.so.* 39 | # Remove files needed for installation 40 | - rm usr/share/PacketTracer/tpl.* usr/share/PacketTracer/set_* usr/share/PacketTracer/install 41 | # Remove unused binaries 42 | - rm usr/share/PacketTracer/bin/linguist usr/share/PacketTracer/bin/meta 43 | # Fix wrong permissions - images shouldn't be executable. Cisco cannot into permissions. ;) 44 | - chmod -x usr/share/PacketTracer/art/ComponentBox/*.png 45 | - chmod -x usr/share/PacketTracer/art/Toolbar/*.png 46 | # Add wrapper 47 | - cat > usr/bin/PacketTracerWrapper << EOF 48 | - #!/bin/sh 49 | # Fool PacketTracer into thinking that it's been already running from this directory 50 | # Should think of a nicer solution 51 | - bin/python3 bin/PacketTracerSettingsFix.py 52 | - cd share/PacketTracer/bin 53 | - ./PacketTracer7 54 | - EOF 55 | # Make it executable 56 | - chmod +x usr/bin/PacketTracerWrapper 57 | # Patch PT bin - change $HOME/.packettracer string to something else 58 | # New file name must have the same length 59 | - sed -i 's!/.packettracer!/.ptappimage00!g' usr/share/PacketTracer/bin/PacketTracer7 60 | # Change icon and executable path 61 | - sed -i 's!Icon=/opt/pt/art/app.png!Icon=PacketTracer.png!' PacketTracer.desktop 62 | - sed -i 's!Exec=packettracer %F!Exec=PacketTracerWrapper!' PacketTracer.desktop 63 | # Change name to prevent confilcts with newer versions 64 | - sed -i 's!Name=Cisco Packet Tracer!Name=Cisco Packet Tracer 7.1!' PacketTracer.desktop 65 | 66 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AppImage for Cisco Packet Tracer 2 | 3 | *🎶I'm already Tracer🎶* 4 | 5 | ### A configuration for [pkg2appimage](https://github.com/AppImage/pkg2appimage) to build Packet Tracer in AppImage form. 6 | 7 | ## Version: 8.2.2 8 | 9 | If you find out that there's a new version available, please let me know by [opening an issue](https://github.com/konradmb/PacketTracer-AppImage/issues/new/?title=Update%20PacketTracer%20to%20x.x&body=Dear%20konradmb,%0APlease%20update%20this%20AppImage%20to%20a%20new%20version%20x.x!%20I%20hate%20you%20because%20I%20have%20a%20**very**%20important%20assignment%20to%20do%20and%20I%20will%20fail%20it%20because%20you%27re%20so%20lazy!%20%F0%9F%98%A1%F0%9F%98%A1%F0%9F%98%A1%0ASincerely,%20xoxo)! 10 | 11 | ## How to use it? 12 | 13 | 1. Clone this repository and `cd` into it. 14 | ```shell 15 | git clone https://github.com/konradmb/PacketTracer-AppImage.git 16 | cd PacketTracer-AppImage/ 17 | ``` 18 | 2. Download pkg2appimage tool and make it executable. 19 | ```shell 20 | wget https://github.com/AppImage/pkg2appimage/raw/master/pkg2appimage 21 | chmod +x pkg2appimage 22 | ``` 23 | 3. Build it: 24 | 25 | ```shell 26 | ./pkg2appimage PacketTracer.yml 27 | ``` 28 | 29 | 4. After a short break you should get an executable inside `out/` directory. 30 | 31 | ### Can't you just put AppImage in releases, so I can simply download one file? 32 | 33 | I can't put the resulting AppImage here, because the Packet Tracer license forbids redistribution (at least it said so when I checked the old license, I can't find it in new EULAs, but there is a reason that NetAcad account is required to download PT). 34 | 35 | I don't know if Cisco enforces it, but they could send a DMCA takedown request (and GitHub would have to delete whole repo). 36 | 37 | ## It doesn't work! 38 | 39 | If you encounter an error, download Packet Tracer archive from official site: [Cisco_Packet_Tracer_820_Ubuntu_64bit_696ae64b25.deb](https://skillsforall.com/resources/lab-downloads) (requires login). 40 | Put it into the directory with .yml file, it will be detected automatically. 41 | 42 | ## Older versions 43 | 44 | #### Packet Tracer 7.3.0 45 | 46 | Follow the guide, but use `PacketTracer-7.3.0.yml`. 47 | 48 | ```shell 49 | ./pkg2appimage PacketTracer-7.2.1.yml 50 | ``` 51 | 52 | In case of error, download [PacketTracer_730_amd64.deb](https://www.netacad.com/portal/resources/file/aa38a51f-45bb-4eb1-89a0-01d961ae1432) and put it into the directory with .yml file. 53 | 54 | #### Packet Tracer 7.2.1 55 | 56 | Follow the guide, but use `PacketTracer-7.2.1.yml`. 57 | 58 | ```shell 59 | ./pkg2appimage PacketTracer-7.2.1.yml 60 | ``` 61 | 62 | In case of error, download [Packet Tracer 7.2.1 for Linux 64 bit.tar.gz](https://www.netacad.com/portal/resources/file/88097a5b-6dbd-43b5-9589-72797dca143c) and put it into the directory with .yml file. 63 | 64 | ### Packet Tracer 7.1 65 | 66 | Cisco deleted previous download link. If you find one, please open an issue. 67 | 68 | ## Differences from official version 69 | 70 | * PacketTracer binary is patched to change `~/.packettracer` file name to `~/.ptappimage00` as to prevent conflicts with Packet Tracer executed from normal folder. 71 | -------------------------------------------------------------------------------- /PacketTracer-7.2.1.yml: -------------------------------------------------------------------------------- 1 | app: PacketTracer-7.2.1 2 | 3 | ingredients: 4 | dist: jessie 5 | sources: 6 | - deb http://deb.debian.org/debian jessie main 7 | packages: 8 | - libpng12-0 9 | - libssl1.0.0 10 | - python3 11 | exclude: 12 | - PacketTracer 13 | script: 14 | - FILENAME="Packet Tracer 7.2.1 for Linux 64 bit.tar.gz" 15 | - [ -f ../"$FILENAME" ] && ln -sf ../"$FILENAME" . 16 | - [ -f ../"$FILENAME" ] || wget -c https://archive.org/download/pt722/Packet%20Tracer%207.2.1%20for%20Linux%2064%20bit.tar.gz 17 | - echo "b95e0a58e9a65c623b6534bd42855117e25c50d3 $FILENAME" > checksum 18 | - sha1sum -c checksum 19 | # Remove directory if already extracted 20 | - rm -rf extracted 21 | - mkdir -p extracted 22 | - tar zxvf "$FILENAME" --directory extracted/ 23 | # Fix overly restrictive permissions - we should be able do delete directory 24 | - find extracted/saves -type d -exec chmod +w {} + 25 | # Copy helper script 26 | - wget -c https://raw.githubusercontent.com/konradmb/PacketTracer-AppImage/master/etc/PacketTracerSettingsFix.py 27 | - chmod +x PacketTracerSettingsFix.py 28 | - echo "7.2.1" > VERSION 29 | 30 | script: 31 | # Copy helper script to bin 32 | - cp ../PacketTracerSettingsFix.py usr/bin/ 33 | # Copy .desktop file, icon and libs from extracted archive 34 | - cp ../extracted/bin/Cisco-PacketTracer.desktop ./PacketTracer.desktop 35 | - cp ../extracted/art/app.png ./PacketTracer.png 36 | - mkdir -p usr/lib/x86_64-linux-gnu/ 37 | - cp ../extracted/bin/*.so.* usr/lib/x86_64-linux-gnu/ 38 | # Copy all of the archive contents to its own directory 39 | - mkdir -p usr/share/PacketTracer 40 | - cp -r ../extracted/* usr/share/PacketTracer 41 | # Remove libraries already copied to usr/lib/x86_64-linux-gnu 42 | - rm usr/share/PacketTracer/bin/*.so.* 43 | # Remove files needed for installation 44 | - rm usr/share/PacketTracer/tpl.* usr/share/PacketTracer/set_* usr/share/PacketTracer/install 45 | # Remove unused binaries 46 | - rm usr/share/PacketTracer/bin/linguist usr/share/PacketTracer/bin/meta 47 | # Fix wrong permissions - images shouldn't be executable. Cisco cannot into permissions. ;) 48 | - chmod -x usr/share/PacketTracer/help/default/images/font*.png 49 | - chmod -x usr/share/PacketTracer/art/ComponentBox/*.png 50 | - chmod -x usr/share/PacketTracer/art/Toolbar/*.png 51 | # Add wrapper 52 | - cat > usr/bin/PacketTracerWrapper << EOF 53 | - #!/bin/sh 54 | # Fool PacketTracer into thinking that it's been already running from this directory 55 | # Should think of a nicer solution 56 | - bin/python3 bin/PacketTracerSettingsFix.py 7.2 57 | - cd share/PacketTracer/bin 58 | - ./PacketTracer7 59 | - EOF 60 | # Make it executable 61 | - chmod +x usr/bin/PacketTracerWrapper 62 | # Patch PT bin - change $HOME/.packettracer string to something else 63 | # New file name must have the same length 64 | - sed -i 's!/.packettracer!/.ptappimage00!g' usr/share/PacketTracer/bin/PacketTracer7 65 | # Change icon and executable path 66 | - sed -i 's!Icon=/opt/pt/art/app.png!Icon=PacketTracer.png!' PacketTracer.desktop 67 | - sed -i 's!Exec=packettracer %F!Exec=PacketTracerWrapper!' PacketTracer.desktop 68 | 69 | --------------------------------------------------------------------------------