Skip to content

Commit

Permalink
WPS Office: switch to pi-apps-coders archived deb
Browse files Browse the repository at this point in the history
  • Loading branch information
theofficialgman committed Aug 19, 2024
1 parent 73d0a84 commit ec4f3b8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 28 deletions.
File renamed without changes.
13 changes: 3 additions & 10 deletions apps/WPS Office/install-32
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,10 @@ personality=linux
preserve-environment=true" | sudo tee /etc/schroot/chroot.d/wps-office-chroot >/dev/null

echo
#package found in: https://linux.wps.cn/
version=11.1.0.11720
# download wps office with custom command
time="$(date +%s)"
secrityKey="$(wget -qO- https://linux.wps.cn | grep 'secrityKey =' | sed 's/.* "//g ; s/";$//g')" #lol typo
url="/wps/download/ep/Linux2019/$(echo $version | sed 's/.*\.//g')/wps-office_${version}_arm64.deb"
url="https://wps-linux-personal.wpscdn.cn$url?t=${time}&k=$(echo -n "$secrityKey$url$time" | md5sum | awk '{print $1}')"

# download wps office with custom command

# install wps office into chroot
rm -f /tmp/wps-office.deb
wget --header="User-Agent: This download is a result of the Pi-Apps store. Please stop blocking us. Please contact us if you have any questions. https://github.com/Botspot/pi-apps/issues/new/choose" "$url" -O /tmp/wps-office.deb || exit 1
wget "https://github.com/Pi-Apps-Coders/files/releases/download/large-files/wps-office_11.1.0.11720_arm64.deb" -O /tmp/wps-office.deb || exit 1
sudo mv /tmp/wps-office.deb /opt/wps-office-chroot/wps-office.deb

status "Installing wps package in the chroot..."
Expand Down
19 changes: 2 additions & 17 deletions apps/WPS Office/install-64
Original file line number Diff line number Diff line change
@@ -1,32 +1,17 @@
#!/bin/bash

#package found in: https://linux.wps.cn/

version=11.1.0.11720

if package_is_new_enough firejail 0.9.58 ;then
firejail_package="firejail"
else
firejail_package="http://ports.ubuntu.com/pool/universe/f/firejail/firejail_0.9.62-3ubuntu0.1_arm64.deb"
fi

#custom url 'encryption' function added by wps to prevent abuse
time="$(date +%s)"
secrityKey="$(wget -qO- https://linux.wps.cn | grep 'secrityKey =' | sed 's/.* "//g ; s/";$//g')" #lol typo
url="/wps/download/ep/Linux2019/$(echo $version | sed 's/.*\.//g')/wps-office_${version}_arm64.deb"
url="https://wps-linux-personal.wpscdn.cn$url?t=${time}&k=$(echo -n "$secrityKey$url$time" | md5sum | awk '{print $1}')"

# download wps office with custom command
rm -f /tmp/wps-office.deb
wget --header="User-Agent: This download is a result of the Pi-Apps store. Please stop blocking us. Please contact us if you have any questions. https://github.com/Botspot/pi-apps/issues/new/choose" "$url" -O /tmp/wps-office.deb || exit 1

#install libwebp6 and libtiff5 to get PDF export working
if package_available libwebp6 && package_available libtiff5 ;then
install_packages "$firejail_package" /tmp/wps-office.deb libwebp6 libtiff5 ttf-mscorefonts-installer x11-utils wmctrl || exit 1
install_packages "$firejail_package" "https://github.com/Pi-Apps-Coders/files/releases/download/large-files/wps-office_11.1.0.11720_arm64.deb" libwebp6 libtiff5 ttf-mscorefonts-installer x11-utils wmctrl || exit 1
else
install_packages "$firejail_package" /tmp/wps-office.deb ttf-mscorefonts-installer x11-utils wmctrl "http://ftp.us.debian.org/debian/pool/main/libj/libjpeg-turbo/libjpeg62-turbo_2.1.5-2_arm64.deb" "http://ftp.debian.org/debian/pool/main/libw/libwebp/libwebp6_0.6.1-2.1+deb11u2_arm64.deb" "http://ftp.debian.org/debian/pool/main/t/tiff/libtiff5_4.2.0-1+deb11u5_arm64.deb" || exit 1
install_packages "$firejail_package" "https://github.com/Pi-Apps-Coders/files/releases/download/large-files/wps-office_11.1.0.11720_arm64.deb" ttf-mscorefonts-installer x11-utils wmctrl "http://ftp.us.debian.org/debian/pool/main/libj/libjpeg-turbo/libjpeg62-turbo_2.1.5-2_arm64.deb" "http://ftp.debian.org/debian/pool/main/libw/libwebp/libwebp6_0.6.1-2.1+deb11u2_arm64.deb" "http://ftp.debian.org/debian/pool/main/t/tiff/libtiff5_4.2.0-1+deb11u5_arm64.deb" || exit 1
fi
rm -f /tmp/wps-office.deb

#make icon symlinks that correspond to WM_CLASS so correct icon is set on Wayland (for main wps window only)
while read file ;do
Expand Down
2 changes: 1 addition & 1 deletion etc/categories
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ Windows Screensavers|Appearance
Wine (x64)|Tools/Emulation
Wine (x86)|Tools/Emulation
WorldPainter|Games
WPS Office|hidden
WPS Office|Office
Xfburn|Tools
XMRig|Tools
XSnow|Appearance
Expand Down

0 comments on commit ec4f3b8

Please sign in to comment.