add PKGBUILD
This commit is contained in:
parent
b6b07dcf4a
commit
ee86e24768
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
pkg/*
|
||||||
|
src/*
|
||||||
|
*.zst
|
30
PKGBUILD
Normal file
30
PKGBUILD
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
# Maintainer: TROM <contact@tromsite.com>
|
||||||
|
pkgname=tromjaro-welcome-app
|
||||||
|
pkgver=1.0
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Welcome app for TROMjaro OS"
|
||||||
|
arch=(any)
|
||||||
|
url=""
|
||||||
|
license=(unknown)
|
||||||
|
depends=()
|
||||||
|
provides=('tromjaro-welcome-app')
|
||||||
|
backup=()
|
||||||
|
options=(!strip)
|
||||||
|
source=()
|
||||||
|
sha256sums=()
|
||||||
|
prepare() {
|
||||||
|
cp -R ../*.png ../*.svg ../welcome.py ../tromjaro-welcome-app.desktop .
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -d ${pkgdir}/usr/share/tromjaro-welcome-app
|
||||||
|
install -Dm644 ${srcdir}/*.png ${pkgdir}/usr/share/tromjaro-welcome-app
|
||||||
|
install -Dm644 ${srcdir}/*.svg ${pkgdir}/usr/share/tromjaro-welcome-app
|
||||||
|
install -Dm755 ${srcdir}/welcome.py ${pkgdir}/usr/share/tromjaro-welcome-app
|
||||||
|
|
||||||
|
install -d ${pkgdir}/usr/bin
|
||||||
|
ln -s ${pkgdir}/usr/share/tromjaro-welcome-app/welcome.py ${pkgdir}/usr/bin/tromjaro-welcome-app
|
||||||
|
|
||||||
|
install -d ${pkgdir}/usr/share/applications
|
||||||
|
install -Dm644 ${srcdir}/tromjaro-welcome-app.desktop ${pkgdir}/usr/share/applications
|
||||||
|
}
|
32
welcome.py
32
welcome.py
|
@ -8,6 +8,11 @@ import os
|
||||||
gi.require_version("Gtk", "3.0")
|
gi.require_version("Gtk", "3.0")
|
||||||
from gi.repository import Gtk, Gdk, Gio
|
from gi.repository import Gtk, Gdk, Gio
|
||||||
|
|
||||||
|
workdir_path = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
|
def resolve_workdir_path(filename):
|
||||||
|
return os.path.join(dir_path, filename)
|
||||||
|
|
||||||
DESKTOP_FILE = "tromjaro-welcome-app.desktop"
|
DESKTOP_FILE = "tromjaro-welcome-app.desktop"
|
||||||
DESKTOP_FILE_PATH = os.path.join("/usr/share/applications", DESKTOP_FILE)
|
DESKTOP_FILE_PATH = os.path.join("/usr/share/applications", DESKTOP_FILE)
|
||||||
AUTOSTART_SYMLINK_PATH = os.path.join(os.path.expanduser("~/.config/autostart"), DESKTOP_FILE)
|
AUTOSTART_SYMLINK_PATH = os.path.join(os.path.expanduser("~/.config/autostart"), DESKTOP_FILE)
|
||||||
|
@ -16,7 +21,7 @@ class WelcomeScreen(Gtk.Window):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
Gtk.Window.__init__(self, title="TROMjaro Welcome")
|
Gtk.Window.__init__(self, title="TROMjaro Welcome")
|
||||||
|
|
||||||
icon_path = "tromjaro-welcome.svg"
|
icon_path = resolve_workdir_path("tromjaro-welcome.svg")
|
||||||
if os.path.exists(icon_path):
|
if os.path.exists(icon_path):
|
||||||
self.set_icon_from_file(icon_path)
|
self.set_icon_from_file(icon_path)
|
||||||
else:
|
else:
|
||||||
|
@ -30,43 +35,43 @@ class WelcomeScreen(Gtk.Window):
|
||||||
self.pages = [
|
self.pages = [
|
||||||
{"title": "Welcome to TROMjaro",
|
{"title": "Welcome to TROMjaro",
|
||||||
"description": "This operating system is trade-free.\nThis means that you do not have to trade anything to us in order to use it.\nNot your data, not your attention, currency or anything else.\nThere are no free trials here, no ads, and no trackers.",
|
"description": "This operating system is trade-free.\nThis means that you do not have to trade anything to us in order to use it.\nNot your data, not your attention, currency or anything else.\nThere are no free trials here, no ads, and no trackers.",
|
||||||
"image_path": "",
|
"image_filename": "",
|
||||||
"with_button": True,
|
"with_button": True,
|
||||||
"button_text": "Take a minute to customize your desktop experience",
|
"button_text": "Take a minute to customize your desktop experience",
|
||||||
"button_handler": self.on_next_button_clicked},
|
"button_handler": self.on_next_button_clicked},
|
||||||
{"title": "Choose a Layout",
|
{"title": "Choose a Layout",
|
||||||
"description": "Make it morph into any configuration you like!",
|
"description": "Make it morph into any configuration you like!",
|
||||||
"image_path": "tromjaro-layout-switcher-thumb.png",
|
"image_filename": "tromjaro-layout-switcher-thumb.png",
|
||||||
"with_button": True,
|
"with_button": True,
|
||||||
"button_text": "Open the Layout Switcher",
|
"button_text": "Open the Layout Switcher",
|
||||||
"button_handler": self.on_layout_switcher_button_clicked},
|
"button_handler": self.on_layout_switcher_button_clicked},
|
||||||
{"title": "Choose a Theme",
|
{"title": "Choose a Theme",
|
||||||
"description": "Choose between the many variations of themes that sync across different types of applications.",
|
"description": "Choose between the many variations of themes that sync across different types of applications.",
|
||||||
"image_path": "tromjaro-theme-switcher-thumb.png",
|
"image_filename": "tromjaro-theme-switcher-thumb.png",
|
||||||
"with_button": True,
|
"with_button": True,
|
||||||
"button_text": "Open the Theme Switcher",
|
"button_text": "Open the Theme Switcher",
|
||||||
"button_handler": self.on_theme_switcher_button_clicked},
|
"button_handler": self.on_theme_switcher_button_clicked},
|
||||||
{"title": "Choose a Background",
|
{"title": "Choose a Background",
|
||||||
"description": "Pick a cool background to go along with your theme!",
|
"description": "Pick a cool background to go along with your theme!",
|
||||||
"image_path": "wallpapers-thumbnail.png",
|
"image_filename": "wallpapers-thumbnail.png",
|
||||||
"with_button": True,
|
"with_button": True,
|
||||||
"button_text": "Change the Wallpaper",
|
"button_text": "Change the Wallpaper",
|
||||||
"button_handler": self.on_background_button_clicked},
|
"button_handler": self.on_background_button_clicked},
|
||||||
{"title": "Setup the Internet Content Blocker",
|
{"title": "Setup the Internet Content Blocker",
|
||||||
"description": "Setup your Operating System to block the pesky ads and trackers, system-wide.",
|
"description": "Setup your Operating System to block the pesky ads and trackers, system-wide.",
|
||||||
"image_path": "content-blocker-thumbnail.png",
|
"image_filename": "content-blocker-thumbnail.png",
|
||||||
"with_button": True,
|
"with_button": True,
|
||||||
"button_text": "Setup Internet Content Blocker",
|
"button_text": "Setup Internet Content Blocker",
|
||||||
"button_handler": self.on_content_blocker_button_clicked},
|
"button_handler": self.on_content_blocker_button_clicked},
|
||||||
{"title": "Settings Manager",
|
{"title": "Settings Manager",
|
||||||
"description": "If you want to do more tweaks, you will find all of the settings into one single place.",
|
"description": "If you want to do more tweaks, you will find all of the settings into one single place.",
|
||||||
"image_path": "settings-thumbnail.png",
|
"image_filename": "settings-thumbnail.png",
|
||||||
"with_button": True,
|
"with_button": True,
|
||||||
"button_text": "Open Settings Manager",
|
"button_text": "Open Settings Manager",
|
||||||
"button_handler": self.on_settings_button_clicked},
|
"button_handler": self.on_settings_button_clicked},
|
||||||
{"title": "Support Us",
|
{"title": "Support Us",
|
||||||
"description": "TROMjaro is one of the many trade-free projects that we are doing. Please support us if you can. Thank you!",
|
"description": "TROMjaro is one of the many trade-free projects that we are doing. Please support us if you can. Thank you!",
|
||||||
"image_path": "donation-thumb.png",
|
"image_filename": "donation-thumb.png",
|
||||||
"with_button": True,
|
"with_button": True,
|
||||||
"button_text": "Donate",
|
"button_text": "Donate",
|
||||||
"button_handler": self.on_donate_button_clicked},
|
"button_handler": self.on_donate_button_clicked},
|
||||||
|
@ -112,15 +117,16 @@ class WelcomeScreen(Gtk.Window):
|
||||||
grid.attach(description_label, 0, grid_row, 2, 1)
|
grid.attach(description_label, 0, grid_row, 2, 1)
|
||||||
grid_row += 1
|
grid_row += 1
|
||||||
|
|
||||||
image_path = self.pages[self.current_page]["image_path"]
|
image_filename = self.pages[self.current_page]["image_filename"]
|
||||||
if image_path:
|
if image_filename:
|
||||||
if os.path.exists(image_path):
|
full_path = resolve_workdir_path(image_filename)
|
||||||
image = Gtk.Image.new_from_file(image_path)
|
if os.path.exists(full_path):
|
||||||
|
image = Gtk.Image.new_from_file(full_path)
|
||||||
image.set_size_request(600, 400)
|
image.set_size_request(600, 400)
|
||||||
grid.attach(image, 0, grid_row, 2, 1)
|
grid.attach(image, 0, grid_row, 2, 1)
|
||||||
grid_row += 1
|
grid_row += 1
|
||||||
else:
|
else:
|
||||||
print("Error: Image not found:", image_path)
|
print("Error: Image not found:", full_path)
|
||||||
|
|
||||||
if self.pages[self.current_page]["with_button"]:
|
if self.pages[self.current_page]["with_button"]:
|
||||||
button_text = self.pages[self.current_page]["button_text"]
|
button_text = self.pages[self.current_page]["button_text"]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user