diff --git a/Makefile b/Makefile index 18cabd9..165b670 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ CC ?= clang CXX ?= clang++ CFLAGS ?= -O2 -Wall -Wextra -std=c++11 PREFIX ?= /usr/local/bin +APPFOLDER ?= /usr/share/applications .PHONY: default default: tv_rename @@ -19,6 +20,10 @@ install: tv_rename install_gui: gui install -d $(PREFIX)/ install -m 755 tv_rename_gui $(PREFIX)/ + cat tv_rename.desktop | sed "s/\$$PWD/$$(pwd | sed 's/\//\\\//g')/" > temp.desktop + chmod +x temp.desktop + install -d $(APPFOLDER) + mv temp.desktop $(APPFOLDER)/tv_rename.desktop tv_rename: functions.o filesystem_u.o network.o tv_rename.o main.cpp $(CXX) $(CFLAGS) -o tv_rename main.cpp tv_rename.o functions.o filesystem_u.o network.o -lcurl diff --git a/tv_rename.desktop b/tv_rename.desktop new file mode 100755 index 0000000..6b28f51 --- /dev/null +++ b/tv_rename.desktop @@ -0,0 +1,10 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Encoding=UTF-8 +Value=1.0 +Type=Application +Name=TV Rename +GenericName=TV Rename +Comment=TV Rename +Icon=$PWD/tv_rename.svg +Exec=tv_rename_gui diff --git a/tv_rename.svg b/tv_rename.svg new file mode 100644 index 0000000..3cf84d4 --- /dev/null +++ b/tv_rename.svg @@ -0,0 +1,120 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + +