windows95.sh 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/bin/sh
  2. APP=windows95
  3. # DOWNLOADING THE DEPENDENCIES
  4. if test -f ./appimagetool; then
  5. echo " appimagetool already exists" 1> /dev/null
  6. else
  7. echo " Downloading appimagetool..."
  8. wget -q https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool
  9. fi
  10. if test -f ./pkg2appimage; then
  11. echo " pkg2appimage already exists" 1> /dev/null
  12. else
  13. echo " Downloading pkg2appimage..."
  14. wget -q https://github.com/ivan-hc/AM/raw/refs/heads/main/tools/pkg2appimage -O pkg2appimage
  15. fi
  16. chmod a+x ./appimagetool ./pkg2appimage
  17. # CREATING THE HEAD OF THE RECIPE
  18. DEB=$(curl -Ls https://api.github.com/repos/felixrieseberg/windows95/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | grep -i "amd64.deb" | head -1)
  19. echo "app: $APP
  20. binpatch: true
  21. ingredients:
  22. script:
  23. - if ! test -f ./*.deb; then wget -q -c \"$DEB\"; fi
  24. script:
  25. - rm -f windows95.png
  26. - wget -q https://raw.githubusercontent.com/Portable-Linux-Apps/Portable-Linux-Apps.github.io/refs/heads/main/icons/windows95.png" > recipe.yml
  27. # DOWNLOAD ALL THE NEEDED PACKAGES AND COMPILE THE APPDIR
  28. echo "Compilling $APP from recipe using pkg2appimage, please wait..."
  29. ./pkg2appimage ./recipe.yml >/dev/null 2>&1
  30. # EXPORT THE APP TO AN APPIMAGE
  31. printf '#!/bin/sh\nexit 0' > ./desktop-file-validate # hack due to https://github.com/AppImage/appimagetool/pull/47
  32. chmod a+x ./desktop-file-validate
  33. PATH="$PATH:$PWD" ARCH=x86_64 ./appimagetool -n ./"$APP"/"$APP".AppDir 2>&1 | grep "Architecture\|Creating\|====\|Exportable"
  34. if ! test -f ./*.AppImage; then
  35. echo "No AppImage available."; exit 1
  36. else
  37. rm -f ./appimagetool ./pkg2appimage
  38. fi