From 236b43453fde684706ed062cb8f9d2c975b5c4d2 Mon Sep 17 00:00:00 2001 From: cycool29 <88134003+cycool29@users.noreply.github.com> Date: Sun, 19 Sep 2021 13:34:47 +0800 Subject: [PATCH 01/13] Fix few problems Nativfied WhatApp Web with latest version of nativefier to solve "Old build detected" warning. Fix "whatsapp works with google chrome 60+" (NOTE: This will work in both normal version and multi-device beta but in Multi-device beta it will prompt it to update WhatsApp, still ooking for solution.) --- apps/Whatsapp/install-32 | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/apps/Whatsapp/install-32 b/apps/Whatsapp/install-32 index a7fba5f..4748862 100755 --- a/apps/Whatsapp/install-32 +++ b/apps/Whatsapp/install-32 @@ -9,19 +9,13 @@ function error { cd $HOME rm -f WhatsAppWeb-linux-armv7l.tar.xz -wget https://github.com/Itai-Nelken/Nativefier-WebApps/releases/download/v3.0/WhatsAppWeb-linux-armv7l.tar.xz || error 'Failed to download!' -tar -xf WhatsAppWeb-linux-armv7l.tar.xz || error "Failed to extract!" -rm WhatsAppWeb-linux-armv7l.tar.xz -mv "WhatsAppWeb-linux-armv7l" WhatsAppWeb +wget https://github.com/cycool29/whatsapp-for-linux/releases/download/rpi-v1.0/WhatsApp-linux-armv7l.tar.xz || error 'Failed to download!' +tar -xf WhatsApp-linux-armv7l.tar.xz || error "Failed to extract!" +rm WhatsApp-linux-armv7l.tar.xz +mv "WhatsAppWeb-linux-armv7l" WhatsApp #create menu shortcut -echo "[Desktop Entry] -Name=Whatsapp Web -Comment=Nativefier Whatsapp Web webapp. -Exec=$HOME/WhatsAppWeb/WhatsAppWeb -Path=$HOME/WhatsAppWeb -Icon=$(dirname "$0")/icon-64.png -Terminal=false -StartupNotify=true -Type=Application -Categories=Network;" > ~/.local/share/applications/whatsappweb.desktop || error "Failed to create menu button!" +wget https://github.com/cycool29/whatsapp-for-linux/releases/download/rpi-v1.0/whatsapp.desktop +sed -i "s@HOME@$HOME@g" whatsapp.desktop +sudo cp whatsapp.desktop .local/share/applications +sudo cp whatsapp.desktop $HOME/Desktop From 67b77967001d755e512cdc5451c3f7a141559c48 Mon Sep 17 00:00:00 2001 From: cycool29 <88134003+cycool29@users.noreply.github.com> Date: Sun, 19 Sep 2021 13:38:48 +0800 Subject: [PATCH 02/13] Fix typo --- apps/Whatsapp/install-32 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/Whatsapp/install-32 b/apps/Whatsapp/install-32 index 4748862..076fac4 100755 --- a/apps/Whatsapp/install-32 +++ b/apps/Whatsapp/install-32 @@ -8,7 +8,7 @@ function error { } cd $HOME -rm -f WhatsAppWeb-linux-armv7l.tar.xz +rm -f WhatsApp-linux-armv7l.tar.xz wget https://github.com/cycool29/whatsapp-for-linux/releases/download/rpi-v1.0/WhatsApp-linux-armv7l.tar.xz || error 'Failed to download!' tar -xf WhatsApp-linux-armv7l.tar.xz || error "Failed to extract!" rm WhatsApp-linux-armv7l.tar.xz From 61ef9f693cdfdae5a53e16da9eeeac7346c24f2b Mon Sep 17 00:00:00 2001 From: cycool29 <88134003+cycool29@users.noreply.github.com> Date: Sun, 19 Sep 2021 13:45:20 +0800 Subject: [PATCH 03/13] Fix typo --- apps/Whatsapp/install-32 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/Whatsapp/install-32 b/apps/Whatsapp/install-32 index 076fac4..96096a1 100755 --- a/apps/Whatsapp/install-32 +++ b/apps/Whatsapp/install-32 @@ -12,10 +12,12 @@ rm -f WhatsApp-linux-armv7l.tar.xz wget https://github.com/cycool29/whatsapp-for-linux/releases/download/rpi-v1.0/WhatsApp-linux-armv7l.tar.xz || error 'Failed to download!' tar -xf WhatsApp-linux-armv7l.tar.xz || error "Failed to extract!" rm WhatsApp-linux-armv7l.tar.xz -mv "WhatsAppWeb-linux-armv7l" WhatsApp +mv "WhatsApp-linux-armv7l" WhatsApp #create menu shortcut -wget https://github.com/cycool29/whatsapp-for-linux/releases/download/rpi-v1.0/whatsapp.desktop -sed -i "s@HOME@$HOME@g" whatsapp.desktop -sudo cp whatsapp.desktop .local/share/applications -sudo cp whatsapp.desktop $HOME/Desktop +echo "[Desktop Entry] +Name=WhatsApp +Type=Application +Exec=/home/pi/WhatsApp/run-whatsapp +Icon=/home/pi/WhatsApp/resources/app/icon.png +Categories=Network;Internet" > ~/.local/share/applications/whatsapp.desktop || error "Failed to create menu button!" From 2ed7dda50bd3266ae2cd4c9a28f4c4cb9359c5a8 Mon Sep 17 00:00:00 2001 From: cycool29 <88134003+cycool29@users.noreply.github.com> Date: Sun, 19 Sep 2021 14:13:03 +0800 Subject: [PATCH 04/13] Update install-32 --- apps/Whatsapp/install-32 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/Whatsapp/install-32 b/apps/Whatsapp/install-32 index 96096a1..b5e7b01 100755 --- a/apps/Whatsapp/install-32 +++ b/apps/Whatsapp/install-32 @@ -14,6 +14,9 @@ tar -xf WhatsApp-linux-armv7l.tar.xz || error "Failed to extract!" rm WhatsApp-linux-armv7l.tar.xz mv "WhatsApp-linux-armv7l" WhatsApp +#Modify run-whatsapp +echo "rm -rf $HOME/.config/whats*/Service* && $HOME/WhatsApp/WhatsApp" WhatsApp/run-whatsapp + #create menu shortcut echo "[Desktop Entry] Name=WhatsApp From 9b1d539b81d16af6d2dabcc4d66e0b29d1f8641e Mon Sep 17 00:00:00 2001 From: cycool29 <88134003+cycool29@users.noreply.github.com> Date: Sun, 19 Sep 2021 14:52:03 +0800 Subject: [PATCH 05/13] Update install-32 --- apps/Whatsapp/install-32 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/Whatsapp/install-32 b/apps/Whatsapp/install-32 index b5e7b01..6a594e5 100755 --- a/apps/Whatsapp/install-32 +++ b/apps/Whatsapp/install-32 @@ -21,6 +21,6 @@ echo "rm -rf $HOME/.config/whats*/Service* && $HOME/WhatsApp/WhatsApp" WhatsApp/ echo "[Desktop Entry] Name=WhatsApp Type=Application -Exec=/home/pi/WhatsApp/run-whatsapp +Exec=bash /home/pi/WhatsApp/run-whatsapp Icon=/home/pi/WhatsApp/resources/app/icon.png Categories=Network;Internet" > ~/.local/share/applications/whatsapp.desktop || error "Failed to create menu button!" From 26a4f6fc1b28e7f0d4c7d29f44a8a35c89aafdda Mon Sep 17 00:00:00 2001 From: cycool29 <88134003+cycool29@users.noreply.github.com> Date: Sun, 19 Sep 2021 14:57:53 +0800 Subject: [PATCH 06/13] Fix typo --- apps/Whatsapp/install-32 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/Whatsapp/install-32 b/apps/Whatsapp/install-32 index 6a594e5..b784da9 100755 --- a/apps/Whatsapp/install-32 +++ b/apps/Whatsapp/install-32 @@ -15,7 +15,7 @@ rm WhatsApp-linux-armv7l.tar.xz mv "WhatsApp-linux-armv7l" WhatsApp #Modify run-whatsapp -echo "rm -rf $HOME/.config/whats*/Service* && $HOME/WhatsApp/WhatsApp" WhatsApp/run-whatsapp +echo "rm -rf $HOME/.config/whats*/Service* && $HOME/WhatsApp/WhatsApp" > WhatsApp/run-whatsapp #create menu shortcut echo "[Desktop Entry] From 9836baf745444ac0e15dc767fbe0da9f6f00465c Mon Sep 17 00:00:00 2001 From: cycool29 <88134003+cycool29@users.noreply.github.com> Date: Tue, 21 Sep 2021 08:26:31 +0800 Subject: [PATCH 07/13] Update install-32 --- apps/Whatsapp/install-32 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/Whatsapp/install-32 b/apps/Whatsapp/install-32 index b784da9..b30a64a 100755 --- a/apps/Whatsapp/install-32 +++ b/apps/Whatsapp/install-32 @@ -14,7 +14,7 @@ tar -xf WhatsApp-linux-armv7l.tar.xz || error "Failed to extract!" rm WhatsApp-linux-armv7l.tar.xz mv "WhatsApp-linux-armv7l" WhatsApp -#Modify run-whatsapp +#Modify run-whatsapp to remove Service Worker before launching WhatsApp echo "rm -rf $HOME/.config/whats*/Service* && $HOME/WhatsApp/WhatsApp" > WhatsApp/run-whatsapp #create menu shortcut @@ -22,5 +22,5 @@ echo "[Desktop Entry] Name=WhatsApp Type=Application Exec=bash /home/pi/WhatsApp/run-whatsapp -Icon=/home/pi/WhatsApp/resources/app/icon.png +Icon=$(dirname "$0")/icon-64.png Categories=Network;Internet" > ~/.local/share/applications/whatsapp.desktop || error "Failed to create menu button!" From 24d6127361d13c40d669fb93aa80634af95e17e0 Mon Sep 17 00:00:00 2001 From: cycool29 <88134003+cycool29@users.noreply.github.com> Date: Tue, 21 Sep 2021 16:13:29 +0800 Subject: [PATCH 08/13] Create install-64 --- apps/Whatsapp/install-64 | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/apps/Whatsapp/install-64 b/apps/Whatsapp/install-64 index 30b390a..303efb1 100755 --- a/apps/Whatsapp/install-64 +++ b/apps/Whatsapp/install-64 @@ -8,20 +8,19 @@ function error { } cd $HOME -rm -f WhatsAppWeb-linux-arm64.tar.xz -wget https://github.com/Itai-Nelken/Nativefier-WebApps/releases/download/v3.0/WhatsAppWeb-linux-arm64.tar.xz || error 'Failed to download!' -tar -xf WhatsAppWeb-linux-arm64.tar.xz || error "Failed to extract!" -rm WhatsAppWeb-linux-arm64.tar.xz -mv "WhatsAppWeb-linux-arm64" WhatsAppWeb +rm -f WhatsApp-linux-arm64.tar.xz +wget https://github.com/cycool29/whatsapp-for-linux/releases/download/rpi-arm64-1.0/WhatsApp-linux-arm64.tar.xz || error 'Failed to download!' +tar -xf WhatsApp-linux-arm64.tar.xz || error "Failed to extract!" +rm WhatsApp-linux-arm64.tar.xz +mv "WhatsApp-linux-arm64" WhatsApp + +#Modify run-whatsapp to remove Service Worker before launching WhatsApp +echo "rm -rf $HOME/.config/whats*/Service* && $HOME/WhatsApp/WhatsApp" > WhatsApp/run-whatsapp #create menu shortcut echo "[Desktop Entry] -Name=Whatsapp Web -Comment=Nativefier Whatsapp Web webapp. -Exec=$HOME/WhatsAppWeb/WhatsAppWeb -Path=$HOME/WhatsAppWeb -Icon=$(dirname "$0")/icon-64.png -Terminal=false -StartupNotify=true +Name=WhatsApp Type=Application -Categories=Network;" > ~/.local/share/applications/whatsappweb.desktop || error "Failed to create menu button!" +Exec=bash /home/pi/WhatsApp/run-whatsapp +Icon=$(dirname "$0")/icon-64.png +Categories=Network;Internet" > ~/.local/share/applications/whatsapp.desktop || error "Failed to create menu button!" From b6398e25c94d815a9dbad5a16f367e1a44fcf642 Mon Sep 17 00:00:00 2001 From: cycool29 <88134003+cycool29@users.noreply.github.com> Date: Thu, 23 Sep 2021 07:23:13 +0800 Subject: [PATCH 09/13] Update uninstall --- apps/Whatsapp/uninstall | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/Whatsapp/uninstall b/apps/Whatsapp/uninstall index 7733883..b8295bd 100755 --- a/apps/Whatsapp/uninstall +++ b/apps/Whatsapp/uninstall @@ -7,9 +7,9 @@ function error { exit 1 } -#for backwards compatibility with the chromium version -rm -rf ~/WhatsappWeb &>/dev/null +# for backwards compatibility with the chromium version +# rm -rf ~/Whatsapp &>/dev/null -rm -rf ~/WhatsAppWeb -rm ~/.local/share/applications/whatsappweb.desktop +rm -rf ~/WhatsApp +rm ~/.local/share/applications/whatsapp.desktop exit 0 From 400cc4c5aae22367782f0074f39f9acf358af1ef Mon Sep 17 00:00:00 2001 From: cycool29 <88134003+cycool29@users.noreply.github.com> Date: Thu, 23 Sep 2021 07:26:10 +0800 Subject: [PATCH 10/13] Update install-32 --- apps/Whatsapp/install-32 | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/apps/Whatsapp/install-32 b/apps/Whatsapp/install-32 index b30a64a..a483dd9 100755 --- a/apps/Whatsapp/install-32 +++ b/apps/Whatsapp/install-32 @@ -7,20 +7,21 @@ function error { exit 1 } -cd $HOME -rm -f WhatsApp-linux-armv7l.tar.xz -wget https://github.com/cycool29/whatsapp-for-linux/releases/download/rpi-v1.0/WhatsApp-linux-armv7l.tar.xz || error 'Failed to download!' -tar -xf WhatsApp-linux-armv7l.tar.xz || error "Failed to extract!" -rm WhatsApp-linux-armv7l.tar.xz -mv "WhatsApp-linux-armv7l" WhatsApp +rm -rf ~/whatsapp.tar.xz ~/WhatsApp +mkdir ~/WhatsApp -#Modify run-whatsapp to remove Service Worker before launching WhatsApp -echo "rm -rf $HOME/.config/whats*/Service* && $HOME/WhatsApp/WhatsApp" > WhatsApp/run-whatsapp +wget -O ~/whatsapp.tar.xz https://github.com/cycool29/whatsapp-for-linux/releases/download/rpi-v1.0/WhatsApp-linux-armv7l.tar.xz || error 'Failed to download!' +tar -xf ~/whatsapp.tar.xz -C ~/WhatsApp || error "Failed to extract!" +rm ~/whatsapp.tar.xz +mv ~/WhatsApp/WhatsApp-linux-armv7l/* ~/WhatsApp && rm -rf ~/WhatsApp/WhatsApp-linux-armv7l #create menu shortcut echo "[Desktop Entry] Name=WhatsApp -Type=Application -Exec=bash /home/pi/WhatsApp/run-whatsapp +Exec=bash -c "\""rm -rf $HOME/.config/whats*/Service* ; $HOME/WhatsApp/WhatsApp"\"" +Path=$HOME/WhatsApp Icon=$(dirname "$0")/icon-64.png -Categories=Network;Internet" > ~/.local/share/applications/whatsapp.desktop || error "Failed to create menu button!" +Terminal=false +StartupNotify=true +Type=Application +Categories=Network;" > ~/.local/share/applications/whatsapp.desktop || error "Failed to create menu button!" From 971e962f1a7ee88925221148dc869102d2731f2f Mon Sep 17 00:00:00 2001 From: cycool29 <88134003+cycool29@users.noreply.github.com> Date: Thu, 23 Sep 2021 07:26:40 +0800 Subject: [PATCH 11/13] Update install-64 --- apps/Whatsapp/install-64 | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/apps/Whatsapp/install-64 b/apps/Whatsapp/install-64 index 303efb1..7b8f103 100755 --- a/apps/Whatsapp/install-64 +++ b/apps/Whatsapp/install-64 @@ -7,20 +7,21 @@ function error { exit 1 } -cd $HOME -rm -f WhatsApp-linux-arm64.tar.xz -wget https://github.com/cycool29/whatsapp-for-linux/releases/download/rpi-arm64-1.0/WhatsApp-linux-arm64.tar.xz || error 'Failed to download!' -tar -xf WhatsApp-linux-arm64.tar.xz || error "Failed to extract!" -rm WhatsApp-linux-arm64.tar.xz -mv "WhatsApp-linux-arm64" WhatsApp +rm -rf ~/whatsapp.tar.xz ~/WhatsApp +mkdir ~/WhatsApp -#Modify run-whatsapp to remove Service Worker before launching WhatsApp -echo "rm -rf $HOME/.config/whats*/Service* && $HOME/WhatsApp/WhatsApp" > WhatsApp/run-whatsapp +wget -O ~/whatsapp.tar.xz https://github.com/cycool29/whatsapp-for-linux/releases/download/rpi-arm64-1.0/WhatsApp-linux-arm64.tar.xz || error 'Failed to download!' +tar -xf ~/whatsapp.tar.xz -C ~/WhatsApp || error "Failed to extract!" +rm ~/whatsapp.tar.xz +mv ~/WhatsApp/WhatsApp-linux-armv7l/* ~/WhatsApp && rm -rf ~/WhatsApp/WhatsApp-linux-armv7l #create menu shortcut echo "[Desktop Entry] Name=WhatsApp -Type=Application -Exec=bash /home/pi/WhatsApp/run-whatsapp +Exec=bash -c "\""rm -rf $HOME/.config/whats*/Service* ; $HOME/WhatsApp/WhatsApp"\"" +Path=$HOME/WhatsApp Icon=$(dirname "$0")/icon-64.png -Categories=Network;Internet" > ~/.local/share/applications/whatsapp.desktop || error "Failed to create menu button!" +Terminal=false +StartupNotify=true +Type=Application +Categories=Network;" > ~/.local/share/applications/whatsapp.desktop || error "Failed to create menu button!" From ed291de1615244c30320f03d7d8145fd92f7a136 Mon Sep 17 00:00:00 2001 From: cycool29 <88134003+cycool29@users.noreply.github.com> Date: Thu, 23 Sep 2021 08:25:50 +0800 Subject: [PATCH 12/13] Update uninstall --- apps/Whatsapp/uninstall | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/Whatsapp/uninstall b/apps/Whatsapp/uninstall index b8295bd..9057415 100755 --- a/apps/Whatsapp/uninstall +++ b/apps/Whatsapp/uninstall @@ -7,8 +7,11 @@ function error { exit 1 } -# for backwards compatibility with the chromium version -# rm -rf ~/Whatsapp &>/dev/null +#for backwards compatibility with the chromium version +rm -rf ~/WhatsappWeb + +#for backwards compatibility with Itai's version +rm -rf ~/WhatsAppWeb rm -rf ~/WhatsApp rm ~/.local/share/applications/whatsapp.desktop From 4a6b75973503b527c97c6528ee9ffdea18aa8e1c Mon Sep 17 00:00:00 2001 From: Botspot <54716352+Botspot@users.noreply.github.com> Date: Wed, 22 Sep 2021 21:15:49 -0500 Subject: [PATCH 13/13] remove old-name desktop-file & use -f flag --- apps/Whatsapp/uninstall | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/Whatsapp/uninstall b/apps/Whatsapp/uninstall index 9057415..558cc1c 100755 --- a/apps/Whatsapp/uninstall +++ b/apps/Whatsapp/uninstall @@ -12,7 +12,8 @@ rm -rf ~/WhatsappWeb #for backwards compatibility with Itai's version rm -rf ~/WhatsAppWeb +rm -f ~/.local/share/applications/whatsappweb.desktop rm -rf ~/WhatsApp -rm ~/.local/share/applications/whatsapp.desktop +rm -f ~/.local/share/applications/whatsapp.desktop exit 0