Skip to content

Commit

Permalink
Notepad ++: add 64bit support
Browse files Browse the repository at this point in the history
also move from the users $HOME folder to the ~/.local/share/applications folder
the user program directory is used so that plugins can be more easily installed
  • Loading branch information
theofficialgman committed Jun 23, 2023
1 parent f93d440 commit 3f46e52
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 30 deletions.
36 changes: 36 additions & 0 deletions apps/Notepad ++/install
Original file line number Diff line number Diff line change
@@ -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!'
28 changes: 0 additions & 28 deletions apps/Notepad ++/install-32

This file was deleted.

5 changes: 3 additions & 2 deletions apps/Notepad ++/uninstall
Original file line number Diff line number Diff line change
@@ -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++

0 comments on commit 3f46e52

Please sign in to comment.