changeset 13:73fd89b46da4

bing4desktop-0.240206-3
author prymula <prymula76@outlook.com>
date Tue, 06 Feb 2024 17:47:04 +0100
parents 74d743cf58cb
children 4770f6dca839
files bing4desktop/Changelog.txt bing4desktop/DEBIAN/debian.rules bing4desktop/Makefile bing4desktop/Makefile.aur bing4desktop/PKG/PKGBUILD bing4desktop/RPM/bing4desktop.spec bing4desktop/bing4desktop.py bing4desktop/copy_desktop.sh bing4desktop/remove_desktop.sh
diffstat 9 files changed, 67 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/bing4desktop/Changelog.txt	Tue Feb 06 12:01:38 2024 +0100
+++ b/bing4desktop/Changelog.txt	Tue Feb 06 17:47:04 2024 +0100
@@ -1,3 +1,4 @@
+0.240206-3 - Skrypty instalacyjne
 0.240206-0 - Miał być przełom a skończyło się na kosmetyce
 0.240205-4 - Przetwarzanie zdjęć w katalogu tymczasowym, buildy dla Arch, Fedory i Thumbleweed
 0.240205-3 - Wyświetla zdjęcia (jednak w osobnych oknach), oraz ustawia je jako tapetę, pisze informacje o zdjęciu
--- a/bing4desktop/DEBIAN/debian.rules	Tue Feb 06 12:01:38 2024 +0100
+++ b/bing4desktop/DEBIAN/debian.rules	Tue Feb 06 17:47:04 2024 +0100
@@ -15,9 +15,12 @@
 	mkdir -pm 0755 debian/bing4desktop
 	mkdir -pm 0755 debian/bing4desktop/usr/bin
 	mkdir -pm 0755 debian/bing4desktop/usr/share/bing4desktop
+	mkdir -pm 0755 debian/bing4desktop/usr/share/applications
 	mkdir -pm 0755 debian/bing4desktop/etc/xdg/autostart
 	cp bing4desktop.py debian/bing4desktop/usr/bin/
 	cp bing.ico debian/bing4desktop/usr/share/bing4desktop/
+	cp bing.png debian/bing4desktop/usr/share/bing4desktop/
 	cp bing4desktop.desktop debian/bing4desktop/etc/xdg/autostart
+	cp bing4desktop.desktop debian/bing4desktop/usr/share/applications
 	dh_gencontrol
 	dh_builddeb
--- a/bing4desktop/Makefile	Tue Feb 06 12:01:38 2024 +0100
+++ b/bing4desktop/Makefile	Tue Feb 06 17:47:04 2024 +0100
@@ -1,17 +1,23 @@
 prefix=/usr
+MYDIR=/home
 
 install: bing4desktop.py
-	mkdir -pm 0755 $(DESTDIR)$(prefix)/bin
-	mkdir -pm 0755 $(DESTDIR)$(prefix)/share/bing4desktop
-	mkdir -pm 0755 $(DESTDIR)/etc/xdg/autostart
-	install -m 0755 bing4desktop.py $(DESTDIR)$(prefix)/bin
-	install -m 0644 bing.ico $(DESTDIR)$(prefix)/share/bing4desktop
-	install -m 0644 bing4desktop.desktop $(DESTDIR)/etc/xdg/autostart
+	mkdir -pm 0755 $(prefix)/bin
+	mkdir -pm 0755 $(prefix)/share/bing4desktop
+	#mkdir -pm 0755 /etc/xdg/autostart
+	install -m 0755 bing4desktop.py $(prefix)/bin
+	install -m 0644 bing.ico $(prefix)/share/bing4desktop
+	install -m 0644 bing.png $(prefix)/share/bing4desktop
+	install -m 0644 bing4desktop.desktop $(prefix)/share/applications
+	$(shell ./copy_desktop.sh)
 .PHONY: install
 
 uninstall:
 	rm $(prefix)/bin/bing4desktop.py
 	rm $(prefix)/share/bing4desktop/bing.ico
-	rm /etc/xdg/autostart/bing4desktop.desktop
+	rm $(prefix)/share/bing4desktop/bing.png
+	rm $(prefix)/share/applications/bing4desktop.desktop
+	#rm /etc/xdg/autostart/bing4desktop.desktop
 	rmdir $(prefix)/share/bing4desktop/
+	$(shell ./copy_desktop.sh)
 .PHONY: uninstall
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bing4desktop/Makefile.aur	Tue Feb 06 17:47:04 2024 +0100
@@ -0,0 +1,24 @@
+prefix=/usr
+#MYDIR=/home
+
+install: bing4desktop.py
+	mkdir -pm 0755 $(DESTDIR)$(prefix)/bin
+	mkdir -pm 0755 $(DESTDIR)$(prefix)/share/bing4desktop
+	mkdir -pm 0755 $(DESTDIR)/etc/xdg/autostart
+	install -m 0755 bing4desktop.py $(DESTDIR)$(prefix)/bin
+	install -m 0644 bing.ico $(DESTDIR)$(prefix)/share/bing4desktop
+	install -m 0644 bing.png $(prefix)/share/bing4desktop
+	install -m 0644 bing4desktops.desktop $(DESTDIR)$(prefix)/share/applications
+	install -m 0644 bing4desktops.desktop $(DESTDIR)/etc/xdg/autostart
+	#$(shell ./copy_desktop.sh)
+.PHONY: install
+
+uninstall:
+	rm $(prefix)/bin/bing4desktop.py
+	rm $(prefix)/share/bing4desktop/bing.ico
+	rm $(prefix)/share/bing4desktop/bing.png
+	rm $(prefix)/share/applications/bing4desktops.desktop
+	rm /etc/xdg/autostart/bing4desktop.desktop
+	rmdir $(prefix)/share/bing4desktop/
+	#$(shell ./copy_desktop.sh)
+.PHONY: uninstall
--- a/bing4desktop/PKG/PKGBUILD	Tue Feb 06 12:01:38 2024 +0100
+++ b/bing4desktop/PKG/PKGBUILD	Tue Feb 06 17:47:04 2024 +0100
@@ -22,5 +22,5 @@
 
 package() {
 	cd "$srcdir/${pkgname}-${pkgver}-${pkgrel}"
-	make DESTDIR="${pkgdir}" prefix=/usr install
+	make -f Makefile.aur DESTDIR="${pkgdir}" install
 }
--- a/bing4desktop/RPM/bing4desktop.spec	Tue Feb 06 12:01:38 2024 +0100
+++ b/bing4desktop/RPM/bing4desktop.spec	Tue Feb 06 17:47:04 2024 +0100
@@ -46,6 +46,7 @@
 mkdir -p %{buildroot}/usr/bin
 mkdir -p %{buildroot}/usr/share
 mkdir -p %{buildroot}/usr/share/bing4desktop
+mkdir -p %{buildroot}/usr/share/applications
 mkdir -p %{buildroot}/etc
 mkdir -p %{buildroot}/etc/xdg
 mkdir -p %{buildroot}/etc/xdg/autostart
@@ -53,8 +54,9 @@
 
 install -m 0755 bing4desktop.py %{buildroot}/usr/bin
 install -m 0644 bing.ico %{buildroot}/usr/share/bing4desktop
+install -m 0644 bing.png %{buildroot}/usr/share/bing4desktop
 install -m 0644 bing4desktop.desktop %{buildroot}/etc/xdg/autostart
-
+install -m 0644 bing4desktop.desktop %{buildroot}/usr/share/applications
 
 %files
 %defattr(0755,root,root)
@@ -62,7 +64,9 @@
 /usr/share/bing4desktop/
 %defattr(0644,root,root)
 /usr/share/bing4desktop/bing.ico
+/usr/share/bing4desktop/bing.png
 /etc/xdg/autostart/bing4desktop.desktop
+/usr/share/applications/bing4desktop.desktop
 
 %changelog
 
--- a/bing4desktop/bing4desktop.py	Tue Feb 06 12:01:38 2024 +0100
+++ b/bing4desktop/bing4desktop.py	Tue Feb 06 17:47:04 2024 +0100
@@ -22,7 +22,7 @@
 import shutil
 import glob
 
-ver = "0.240206-0"
+ver = "0.240206-3"
 
 BING_URI_BASE = "http://www.bing.com"
 BING_WALLPAPER_PATH = "/HPImageArchive.aspx?format=js&idx=1&n=1&mkt=en-US"
@@ -183,13 +183,11 @@
         for ico in ['./bing.ico', '/usr/share/bing4desktop/bing.ico']:
             try:
                 self.image =  Image.open(ico)
-            except FileNotFoundError as fs:
-                print ('W bieżącym katalogu, brak ikony, ', fs)
+            except:
+                print ('W bieżącym katalogu, brak ikony ' + ico)
             finally:
-                break
-                
-            #if self.image != None:
-            #   break
+                if self.image != None:
+                    break
             
         self.tmp = None
         self.menu = (
@@ -214,7 +212,7 @@
     def about(self):
         global ver
         messagebox.showinfo("Bing4Desktop","Inspracja:\npystray.readthedocs.io/en/latest/usage.html\n\nNapisał: Prymula\n\nLuty 2024\n\nLicencja:\nPublic Domain\n\nWersja: "+ver)
-        # możliwe że nieprawidlowe
+        # możliwe że nieprawidlowe po wyjściu z aplikacji zwróci bląd :(
         self.window.destroy()
         self.window.update()
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bing4desktop/copy_desktop.sh	Tue Feb 06 17:47:04 2024 +0100
@@ -0,0 +1,7 @@
+#?/bin/sh
+
+MYDIR=/home
+
+for file in $(ls ${MYDIR}) ; do\
+	cp bing4desktop.desktop /home/${file}/.local/share/applications
+done
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bing4desktop/remove_desktop.sh	Tue Feb 06 17:47:04 2024 +0100
@@ -0,0 +1,7 @@
+#?/bin/sh
+
+MYDIR=/home
+
+for file in $(ls ${MYDIR}) ; do\
+	rm /home/${file}/.local/share/applications/bing4desktop.desktop
+done