Skip to content

Commit b8a0eb4

Browse files
author
marci
committed
feat: Building startmenu
1 parent ce9aab0 commit b8a0eb4

File tree

10 files changed

+290
-9
lines changed

10 files changed

+290
-9
lines changed

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ include packages.txt
66
include *.py
77
include *.sh
88
include *.desktop
9+
recursive-include assets *.svg *.png *.ico
910
recursive-include docs *.md
1011
global-exclude *.pyc
1112
global-exclude __pycache__

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Ein benutzerfreundliches GUI-Programm zur Erstellung von Bash-Scripts mit visuel
6464
- Zenity (für Dialog-Funktionen)
6565
- Linux-Distribution mit apt, dnf, pacman oder ähnlichem Paketmanager
6666

67-
### Automatische Installation
67+
### Automatische Installation mit Desktop-Integration
6868

6969
**Empfohlene Methode (automatische Erkennung):**
7070
```bash
@@ -73,6 +73,8 @@ cd bash-script-maker
7373
./install.sh
7474
```
7575

76+
Das Script erkennt automatisch Ihren Paketmanager, installiert alle notwendigen Abhängigkeiten und richtet die Desktop-Integration ein.
77+
7678
**Spezifisch für Distributionen:**
7779

7880
Für Ubuntu/Debian-basierte Systeme:
@@ -85,6 +87,14 @@ Für Fedora/RHEL/CentOS-basierte Systeme:
8587
./install_dnf.sh
8688
```
8789

90+
### Nur Desktop-Integration installieren
91+
92+
Falls Sie die App bereits installiert haben und nur die Desktop-Integration hinzufügen möchten:
93+
94+
```bash
95+
./install_desktop_integration.sh
96+
```
97+
8898
### Manuelle Installation
8999

90100
Wenn die automatischen Scripts nicht funktionieren, installieren Sie die Pakete manuell:
@@ -140,10 +150,28 @@ Alle Scripts sind ausführbar und können direkt aufgerufen werden.
140150
## Verwendung
141151

142152
### Programm starten
153+
154+
**Über das Anwendungsmenü:**
155+
Nach der Installation finden Sie "Bash-Script-Maker" im Anwendungsmenü Ihrer Desktop-Umgebung.
156+
157+
**Über das Terminal:**
158+
```bash
159+
bash-script-maker
160+
```
161+
162+
**Direkt aus dem Quellcode:**
143163
```bash
144-
python bash_script_maker.py
164+
python3 bash_script_maker.py
145165
```
146166

167+
### Desktop-Integration
168+
169+
Die App wird automatisch mit einem benutzerdefinierten Icon und Desktop-Integration installiert:
170+
- **Icon**: Ein modernes SVG-Icon mit Terminal-Design
171+
- **Desktop-Datei**: Vollständige Integration in das Anwendungsmenü
172+
- **Kategorien**: Development und Utility
173+
- **Unterstützte Distributionen**: Alle Linux-Distributionen mit Desktop-Umgebung
174+
147175
### Script erstellen
148176
1. Wählen Sie die gewünschten Befehlsbausteine aus der linken Palette
149177
2. Klicken Sie auf einen Baustein, um ihn in den Editor einzufügen

assets/bash-script-maker.svg

Lines changed: 27 additions & 0 deletions
Loading

bash-script-maker.desktop

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
Name=Bash-Script-Maker
33
Comment=Ein GUI-Programm zur Erstellung von Bash-Scripts
44
Exec=bash-script-maker
5-
Icon=terminal
5+
Icon=bash-script-maker
66
Terminal=false
77
Type=Application
88
Categories=Development;Utility;
99
Keywords=bash;script;editor;generator;
10+
StartupWMClass=bash-script-maker

install.sh

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,37 @@ if main_installation; then
288288
fi
289289

290290
if verify_installation; then
291+
# Desktop-Integration installieren
292+
print_status "Installiere Desktop-Integration..."
293+
if [ -f "bash-script-maker.desktop" ] && [ -f "assets/bash-script-maker.svg" ]; then
294+
# Erstelle Verzeichnisse
295+
mkdir -p ~/.local/share/applications
296+
mkdir -p ~/.local/share/icons/hicolor/scalable/apps
297+
298+
# Kopiere Desktop-Datei und Icon
299+
cp bash-script-maker.desktop ~/.local/share/applications/
300+
cp assets/bash-script-maker.svg ~/.local/share/icons/hicolor/scalable/apps/
301+
302+
# Desktop-Datenbank aktualisieren
303+
if command -v update-desktop-database &> /dev/null; then
304+
update-desktop-database ~/.local/share/applications
305+
fi
306+
307+
if command -v gtk-update-icon-cache &> /dev/null; then
308+
gtk-update-icon-cache -f -t ~/.local/share/icons/hicolor
309+
fi
310+
311+
print_success "Desktop-Integration installiert!"
312+
print_status "Die App ist jetzt im Anwendungsmenü verfügbar."
313+
else
314+
print_warning "Desktop-Datei oder Icon nicht gefunden. Desktop-Integration übersprungen."
315+
fi
316+
291317
echo ""
292318
print_success "=== INSTALLATION ERFOLGREICH ABGESCHLOSSEN ==="
293319
print_status "Sie können Bash-Script-Maker jetzt starten mit:"
294-
echo " cd $(pwd)"
295-
echo " ./start.sh"
320+
echo " bash-script-maker"
321+
echo " (über das Anwendungsmenü oder Terminal)"
296322
echo ""
297323
print_status "Oder direkt mit:"
298324
echo " python3 bash_script_maker.py"

install_apt.sh

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,37 @@ else
154154
print_error "Zenity ist nicht verfügbar."
155155
fi
156156

157+
# Desktop-Integration installieren
158+
print_status "Installiere Desktop-Integration..."
159+
if [ -f "bash-script-maker.desktop" ] && [ -f "assets/bash-script-maker.svg" ]; then
160+
# Erstelle Verzeichnisse
161+
mkdir -p ~/.local/share/applications
162+
mkdir -p ~/.local/share/icons/hicolor/scalable/apps
163+
164+
# Kopiere Desktop-Datei und Icon
165+
cp bash-script-maker.desktop ~/.local/share/applications/
166+
cp assets/bash-script-maker.svg ~/.local/share/icons/hicolor/scalable/apps/
167+
168+
# Desktop-Datenbank aktualisieren
169+
if command -v update-desktop-database &> /dev/null; then
170+
update-desktop-database ~/.local/share/applications
171+
fi
172+
173+
if command -v gtk-update-icon-cache &> /dev/null; then
174+
gtk-update-icon-cache -f -t ~/.local/share/icons/hicolor
175+
fi
176+
177+
print_success "Desktop-Integration installiert!"
178+
print_status "Die App ist jetzt im Anwendungsmenü verfügbar."
179+
else
180+
print_warning "Desktop-Datei oder Icon nicht gefunden. Desktop-Integration übersprungen."
181+
fi
182+
157183
echo ""
158184
print_success "=== INSTALLATION ABGESCHLOSSEN ==="
159185
print_status "Sie können Bash-Script-Maker jetzt starten mit:"
160-
print_status " cd /pfad/zu/bash-script-maker"
161-
print_status " ./start.sh"
186+
print_status " bash-script-maker"
187+
print_status " (über das Anwendungsmenü oder Terminal)"
162188
echo ""
163189
print_status "Oder direkt mit:"
164190
print_status " python3 bash_script_maker.py"

install_desktop_integration.sh

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
#!/bin/bash
2+
# Desktop-Integration für Bash-Script-Maker
3+
# Installiert Desktop-Datei und Icon für alle Linux-Distributionen
4+
5+
echo "=== Bash-Script-Maker - Desktop-Integration ==="
6+
echo "Dieses Script installiert die Desktop-Integration für alle Linux-Distributionen."
7+
echo ""
8+
9+
# Farbcodes für bessere Lesbarkeit
10+
RED='\033[0;31m'
11+
GREEN='\033[0;32m'
12+
YELLOW='\033[1;33m'
13+
BLUE='\033[0;34m'
14+
NC='\033[0m' # No Color
15+
16+
# Funktion für farbige Ausgabe
17+
print_status() {
18+
echo -e "${BLUE}[INFO]${NC} $1"
19+
}
20+
21+
print_success() {
22+
echo -e "${GREEN}[SUCCESS]${NC} $1"
23+
}
24+
25+
print_warning() {
26+
echo -e "${YELLOW}[WARNING]${NC} $1"
27+
}
28+
29+
print_error() {
30+
echo -e "${RED}[ERROR]${NC} $1"
31+
}
32+
33+
# Überprüfe, ob wir im richtigen Verzeichnis sind
34+
if [ ! -f "bash-script-maker.desktop" ] || [ ! -f "assets/bash-script-maker.svg" ]; then
35+
print_error "Desktop-Datei oder Icon nicht gefunden!"
36+
print_status "Stellen Sie sicher, dass Sie im Projektverzeichnis sind."
37+
exit 1
38+
fi
39+
40+
# Erstelle Verzeichnisse
41+
print_status "Erstelle Verzeichnisse..."
42+
mkdir -p ~/.local/share/applications
43+
mkdir -p ~/.local/share/icons/hicolor/scalable/apps
44+
45+
# Kopiere Desktop-Datei
46+
print_status "Installiere Desktop-Datei..."
47+
if cp bash-script-maker.desktop ~/.local/share/applications/; then
48+
print_success "Desktop-Datei installiert: ~/.local/share/applications/bash-script-maker.desktop"
49+
else
50+
print_error "Fehler beim Kopieren der Desktop-Datei!"
51+
exit 1
52+
fi
53+
54+
# Kopiere Icon
55+
print_status "Installiere Icon..."
56+
if cp assets/bash-script-maker.svg ~/.local/share/icons/hicolor/scalable/apps/; then
57+
print_success "Icon installiert: ~/.local/share/icons/hicolor/scalable/apps/bash-script-maker.svg"
58+
else
59+
print_error "Fehler beim Kopieren des Icons!"
60+
exit 1
61+
fi
62+
63+
# Desktop-Datenbank aktualisieren
64+
print_status "Aktualisiere Desktop-Datenbank..."
65+
if command -v update-desktop-database &> /dev/null; then
66+
if update-desktop-database ~/.local/share/applications; then
67+
print_success "Desktop-Datenbank aktualisiert"
68+
else
69+
print_warning "Fehler beim Aktualisieren der Desktop-Datenbank"
70+
fi
71+
else
72+
print_warning "update-desktop-database nicht gefunden"
73+
fi
74+
75+
# Icon-Cache aktualisieren
76+
print_status "Aktualisiere Icon-Cache..."
77+
if command -v gtk-update-icon-cache &> /dev/null; then
78+
if gtk-update-icon-cache -f -t ~/.local/share/icons/hicolor; then
79+
print_success "Icon-Cache aktualisiert"
80+
else
81+
print_warning "Fehler beim Aktualisieren des Icon-Caches"
82+
fi
83+
else
84+
print_warning "gtk-update-icon-cache nicht gefunden"
85+
fi
86+
87+
# Berechtigungen setzen
88+
print_status "Setze Berechtigungen..."
89+
chmod +x ~/.local/share/applications/bash-script-maker.desktop
90+
91+
echo ""
92+
print_success "=== DESKTOP-INTEGRATION ERFOLGREICH INSTALLIERT ==="
93+
print_status "Die App ist jetzt verfügbar:"
94+
print_status " - Im Anwendungsmenü Ihrer Desktop-Umgebung"
95+
print_status " - Über den Befehl: bash-script-maker"
96+
print_status " - Mit dem Icon: bash-script-maker"
97+
echo ""
98+
print_status "Falls die App nicht im Menü erscheint, starten Sie Ihren Desktop neu."

install_dnf.sh

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,37 @@ else
147147
print_error "Zenity ist nicht verfügbar."
148148
fi
149149

150+
# Desktop-Integration installieren
151+
print_status "Installiere Desktop-Integration..."
152+
if [ -f "bash-script-maker.desktop" ] && [ -f "assets/bash-script-maker.svg" ]; then
153+
# Erstelle Verzeichnisse
154+
mkdir -p ~/.local/share/applications
155+
mkdir -p ~/.local/share/icons/hicolor/scalable/apps
156+
157+
# Kopiere Desktop-Datei und Icon
158+
cp bash-script-maker.desktop ~/.local/share/applications/
159+
cp assets/bash-script-maker.svg ~/.local/share/icons/hicolor/scalable/apps/
160+
161+
# Desktop-Datenbank aktualisieren
162+
if command -v update-desktop-database &> /dev/null; then
163+
update-desktop-database ~/.local/share/applications
164+
fi
165+
166+
if command -v gtk-update-icon-cache &> /dev/null; then
167+
gtk-update-icon-cache -f -t ~/.local/share/icons/hicolor
168+
fi
169+
170+
print_success "Desktop-Integration installiert!"
171+
print_status "Die App ist jetzt im Anwendungsmenü verfügbar."
172+
else
173+
print_warning "Desktop-Datei oder Icon nicht gefunden. Desktop-Integration übersprungen."
174+
fi
175+
150176
echo ""
151177
print_success "=== INSTALLATION ABGESCHLOSSEN ==="
152178
print_status "Sie können Bash-Script-Maker jetzt starten mit:"
153-
print_status " cd /pfad/zu/bash-script-maker"
154-
print_status " ./start.sh"
179+
print_status " bash-script-maker"
180+
print_status " (über das Anwendungsmenü oder Terminal)"
155181
echo ""
156182
print_status "Oder direkt mit:"
157183
print_status " python3 bash_script_maker.py"

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ Repository = "https://github.com/securebitsorg/bash-script-maker"
5252
"Bug Reports" = "https://github.com/securebitsorg/bash-script-maker/issues"
5353
Changelog = "https://github.com/securebitsorg/bash-script-maker/blob/main/CHANGELOG.md"
5454

55+
[project.gui-scripts]
56+
bash-script-maker = "bash_script_maker:main"
57+
5558
[project.scripts]
5659
bash-script-maker = "bash_script_maker:main"
5760

0 commit comments

Comments
 (0)