diff --git a/apps/Notepad ++/install b/apps/Notepad ++/install new file mode 100755 index 00000000000..f6d96e13702 --- /dev/null +++ b/apps/Notepad ++/install @@ -0,0 +1,36 @@ +#!/bin/bash + +version=8.5.3 + +#determine filename of download +if [ $arch == 32 ];then + filename="https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v${version}/npp.${version}.portable.zip" +elif [ $arch == 64 ];then + filename="https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v${version}/npp.${version}.portable.x64.zip" +fi + +#Installing wine +if [ $arch == 32 ];then + "$DIRECTORY/manage" install-if-not-installed 'Wine (x86)' || error 'Failed to install wine' +elif [ $arch == 64 ];then + "$DIRECTORY/manage" install-if-not-installed 'Wine (x64)' || error 'Failed to install wine' +fi +#Removing deprecated filepaths +rm -rf ~/npp.zip ~/Notepad++ +#Downloading npp files +wget "$filename" -O /tmp/npp.zip || error 'Failed to download npp files' +#Extracting npp files +mkdir -p ~/.local/share/applications +unzip /tmp/npp.zip -d ~/.local/share/applications/Notepad++ || error 'Failed to extract npp archive' +#Removing npp archive +rm /tmp/npp.zip +#Creating Desktop Entry +echo "[Desktop Entry] +Name=Notepad++ +Comment=Notepad++ is a free source code editor and Notepad replacement that supports several languages. +Exec=wine $HOME/.local/share/applications/Notepad++/notepad++.exe +Icon=$(dirname "$0")/icon-64.png +Terminal=false +StartupNotify=true +Type=Application +Categories=Utility;" > ~/.local/share/applications/notepad++.desktop || error 'Failed to create menu button!' diff --git a/apps/Notepad ++/install-32 b/apps/Notepad ++/install-32 deleted file mode 100755 index 2edf36b9a83..00000000000 --- a/apps/Notepad ++/install-32 +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -version=8.4.8 - -#Checking if wine is installed -if ! command -v wine &>/dev/null ; then - echo 'Wine Is Not Installed' - #Installing wine - $DIRECTORY/manage install 'Wine (x86)' || error 'Failed to install wine' -fi -#Removing any files which were created by corrupted installation -rm -rf npp.zip ~/Notepad++ -#Downloading npp files -wget https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v${version}/npp.${version}.portable.zip -O npp.zip || error 'Failed to download npp files' -#Extracting npp files -unzip npp.zip -d ~/Notepad++ || error 'Failed to extract npp archive' -#Removing npp archive -rm npp.zip -#Creating Desktop Entry -echo "[Desktop Entry] -Name=Notepad++ -Comment=Notepad++ is a free source code editor and Notepad replacement that supports several languages. -Exec=wine '$HOME/Notepad++/notepad++.exe' -Icon=$(dirname "$0")/icon-64.png -Terminal=false -StartupNotify=true -Type=Application -Categories=Utility;" > ~/.local/share/applications/notepad++.desktop || error "Failed to create menu button!" diff --git a/apps/Notepad ++/uninstall b/apps/Notepad ++/uninstall index 1bc17413d33..e55bd8f36a5 100755 --- a/apps/Notepad ++/uninstall +++ b/apps/Notepad ++/uninstall @@ -1,6 +1,7 @@ #!/bin/bash purge_packages || exit 1 -#Removing Downlaoded Files +#removing deprecated files rm -rf ~/Notepad++ -rm -f ~/.local/share/applications/notepad++.desktop +#removing program files +rm -rf ~/.local/share/applications/notepad++.desktop ~/.local/share/applications/Notepad++