diff --git a/.gitignore b/.gitignore
index 94242ab..b1b09fa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
venv
.idea
__pycache__
-*.tar.*
\ No newline at end of file
+*.tar.*
+parch-welcome-bin
+.vscode
diff --git a/Build.py b/Build.py
deleted file mode 100644
index c66b859..0000000
--- a/Build.py
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/python
-import os,subprocess
-
-# Jump to Src
-os.chdir("src/")
-
-# Create Qrc file
-listrc = os.listdir('UI')
-listrc.remove('res.qrc')
-f = open('UI/res.qrc', 'w')
-f.write("""""")
-for i in listrc:
- f.write(f"{i}")
-f.write("""""")
-f.close()
-
-# Compile Qrc & Create onefile script & Build Parch Package
-subprocess.run("""rcc -g python UI/res.qrc -o Res.py && sed -i 's/PySide2/PyQt6/g' Res.py && echo "#!/usr/bin/python" > Welcome && cat Res.py >> Welcome && cat Welcome.py >> Welcome && chmod +x Welcome && cp Welcome ../build/parch-welcome/usr/bin/ && cd ../build && chmod +x parch-welcome/usr/bin/* && tar -czvf parch-welcome.tar.gz parch-welcome/ && makepkg -f && cd .. && rm -rf build/pkg build/src build/*.tar.gz && rm -rf src/Welcome""",shell=True)
\ No newline at end of file
diff --git a/Debug.py b/Debug.py
deleted file mode 100644
index 598dcac..0000000
--- a/Debug.py
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/python
-import os,subprocess
-
-# Jump to Src
-os.chdir("src")
-
-# Create Qrc file
-listrc = os.listdir('UI')
-listrc.remove('res.qrc')
-f = open('UI/res.qrc', 'w')
-f.write("""""")
-for i in listrc:
- f.write(f"{i}")
-f.write("""""")
-f.close()
-
-# Compile Qrc & Create onefile script & run it
-subprocess.run("""rcc -g python UI/res.qrc -o Res.py && sed -i 's/PySide2/PyQt6/g' Res.py && echo "#!/usr/bin/python" > Welcome && cat Res.py >> Welcome && cat Welcome.py >> Welcome && chmod +x Welcome && ./Welcome && rm Welcome""",shell=True)
\ No newline at end of file
diff --git a/README.md b/README.md
index f31a3c9..e0aaadb 100644
--- a/README.md
+++ b/README.md
@@ -6,14 +6,22 @@ Parch dorood (/do-rood/, درود, pronunciation) which is Persian word for "Gre
- Updating Parch repositories
This program is still on alpha stages and it is not completely ready to use.
-## Build Parch Package
-for building **Parch Package** from **Welcome** project you should run:
+## Build the package on Arch machines
+
```shell
-python Build.py
+makepkg -f
```
-## Debug & Run from Source
-if you want to run project without installing, you should run:
+### Install the package
+- For installing this pacakge run:
```shell
-python Debug.py
+cd build
+sudo pacman -U ./parch-welcome*
+```
+
+## Generate Qt Resources (if edited)
+if you made a changes in src you can update the `qrc` by running this command:
+```shell
+cd src
+python QrcGenerate.py
```
\ No newline at end of file
diff --git a/build/.gitignore b/build/.gitignore
new file mode 100644
index 0000000..73e070b
--- /dev/null
+++ b/build/.gitignore
@@ -0,0 +1,3 @@
+*
+!.gitignore
+!PKGBUILD
\ No newline at end of file
diff --git a/build/PKGBUILD b/build/PKGBUILD
index 96d9fb8..a73284d 100644
--- a/build/PKGBUILD
+++ b/build/PKGBUILD
@@ -1,20 +1,53 @@
pkgname=parch-welcome
-destname="/"
-pkgver=1
-pkgrel=0
-pkgdesc='Parch dorood (/do-rood/, درود, pronunciation) which is Persian word for "Greetings", is a welcome app in the Parch distribution.'
arch=('x86_64')
-url="https://parchlinux.ir"
+pkgver=r44.91178ea
+pkgrel=1
+pkgdesc='Parch dorood (/do-rood/, درود, pronunciation) which is Persian word for "Greetings", is a welcome app in the Parch distribution.'
+url="https://github.com/parchlinux/${pkgname}"
license=('GPL')
-makedepends=()
-depends=("python-pyqt6")
-optdepends=()
-conflicts=()
+makedepends=("git")
+depends=("qt6-base" "python" "python-pyqt6")
+conflicts=("${pkgname}")
provides=("${pkgname}")
-options=(!strip !emptydirs)
-source=("${pkgname}.tar.gz")
-sha256sums=('SKIP')
-package() {
- install -dm755 ${pkgdir}${destname}
- cp -r ${srcdir}/${pkgname}${destname}/* ${pkgdir}${destname}
+source=("${pkgname}::git+${url}")
+#source=("${pkgname}.tar.gz")
+md5sums=('SKIP')
+build(){
+ _src="${srcdir}/${pkgname}/src"
+ _ui="${_src}/UI"
+
+ rcc -g python "${_ui}/res.qrc" -o "${_src}/Res.py"
+ sed -i 's/PySide2/PyQt6/g' "${_src}/Res.py"
+
+ _welcome="${_src}/../${pkgname}-bin"
+ echo "#!/usr/bin/python" > $_welcome && cat "${_src}/Res.py" >> $_welcome && cat "${_src}/Welcome.py" >> $_welcome
+ sed -i 's/import Res//g' $_welcome
+}
+
+pkgver() {
+ cd "${srcdir}/${pkgname}"
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+
+package() {
+
+ # copy license
+ install -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 "${srcdir}/${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ #copy logo
+ install -Dm644 "${srcdir}/${pkgname}/resources/logo.png" "${pkgdir}/usr/share/icons/${pkgname}.png"
+
+ # copy welcome binfile into /bin
+ install -Dm755 "${srcdir}/${pkgname}/${pkgname}-bin" "${pkgdir}/usr/bin/${pkgname}"
+
+ # copy autostart desktop file into autostart dir
+ install -Dm644 "${srcdir}/${pkgname}/resources/autostart.desktop" "${pkgdir}/etc/xdg/autostart/${pkgname}.desktop"
+
+ # copy appliction desktop file into autostart dir
+ install -Dm644 "${srcdir}/${pkgname}/resources/application.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
}
diff --git a/build/parch-welcome/usr/bin/Welcome b/build/parch-welcome/usr/bin/Welcome
deleted file mode 100755
index eee7240..0000000
--- a/build/parch-welcome/usr/bin/Welcome
+++ /dev/null
@@ -1,1329 +0,0 @@
-#!/usr/bin/python
-# Resource object code (Python 3)
-# Created by: object code
-# Created by: The Resource Compiler for Qt version 5.15.10
-# WARNING! All changes made in this file will be lost!
-
-from PyQt6 import QtCore
-
-qt_resource_data = b"\
-\x00\x00\x05\x0e\
-<\
-svg class=\x22w-6 h\
--6\x22 xmlns=\x22http:\
-//www.w3.org/200\
-0/svg\x22 fill=\x22cur\
-rentColor\x22 viewB\
-ox=\x220 0 16 16\x22>\x0a\
- \
- \x0a \
- \
-\x00\x00\x01@\
-<\
-svg xmlns=\x22http:\
-//www.w3.org/200\
-0/svg\x22 width=\x2216\
-\x22 height=\x2216\x22 fi\
-ll=\x22currentColor\
-\x22 class=\x22bi bi-x\
--lg\x22 viewBox=\x220 \
-0 16 16\x22>\x0a \x0a\
-\x00\x00\x02y\
-\x00\
-\x00\x09^x\x9c\xed\x96\xcfn\x1aA\x0c\xc6\xef}\x8a\
-\xd1\xde\xc7\x8c\xed\xf9[\x01\x12\xed\xa5\x97\xbc\x00\xb7\x15\
-\xa1!\xd2\x12\x22B \x8f_{vH\xdaFM\x0e\
-\x91\xa2D*0\xdf.\xd8\xeb\xb1\x7f\xfb!\x98\xde\x1d\
-\xaf\xcc\xc3v\xb8\xb9\x9bu\x9b\xc3\xe1\xf6\xebdr:\
-\x9d\xe0\xc4\xb0\xdb_M\xc897\x91\x8c\xce\xfc\xbc\x1e\
-\x86Y\xb7\xba\xdf\xef\xd77\x87\xef\xbba\xb7\xef\xccj\
-\xe8\xef\xe4\xb2\x93\x8dfccg\x8e\xd7\xeb\xd3\xb7\xdd\
-\xc3\xacs\xc6\x19\x8c\xf2\xea\xe6_\xcc?\x1e\xd3\xdb\xfe\
-\xb0\xa9e\xed\xfe~X\xcf\xba\xf5q}\xb3\xbb\xbc\xec\
-\xcc\xe5\xac\xbb\x80`b\x0fA\x0eZ\xcbY\xf09C\
-ty@\x88\x81L\x02\xcf~A\x12\xa6s\x8a\xf1\x80\
-\xce\xcb\x9e\x9b\x00\xa9P\xffg\x90\xc0{\x8bPB\x1e\
-\x00\x19-\x84\xd2\xb3\xe1\x16E`\x1b \x07?\x00\x91\
-\x04KY<\xedm\x90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xe5\xfd\x8c\x88\xae:\xf1\xe5\x1f\xf1\xa9\xfe\
-m\x9a\xff\x025\x8d\xde4\
-\x00\x00\x02\xd4\
-<\
-svg xmlns=\x22http:\
-//www.w3.org/200\
-0/svg\x22 width=\x2216\
-\x22 height=\x2216\x22 fi\
-ll=\x22currentColor\
-\x22 class=\x22bi bi-g\
-lobe-americas\x22 v\
-iewBox=\x220 0 16 1\
-6\x22>\x0a \x0a\
-\x00\x00\x017\
-<\
-svg xmlns=\x22http:\
-//www.w3.org/200\
-0/svg\x22 class=\x22h-\
-5 w-5 ml-2\x22 fill\
-=\x22none\x22 viewBox=\
-\x220 0 24 24\x22 stro\
-ke=\x22currentColor\
-\x22 stroke-width=\x22\
-2\x22>\x0a \
- \x0a \
- \
-\
-\x00\x00\x03\x0f\
-<\
-svg xmlns=\x22http:\
-//www.w3.org/200\
-0/svg\x22 width=\x2216\
-\x22 height=\x2216\x22 fi\
-ll=\x22currentColor\
-\x22 class=\x22bi bi-b\
-ook\x22 viewBox=\x220 \
-0 16 16\x22>\x0a \x0a\
-\x00\x00#f\
-<\
-?xml version=\x221.\
-0\x22 encoding=\x22UTF\
--8\x22 standalone=\x22\
-no\x22?>\x0a\x0a\
-\x0a\
-\x00\x00\x03n\
-\x00\
-\x00\x13\xe9x\x9c\xddX\xdfo\xda0\x10~\xcf_a\
-\xd1\x87n\x12\xcd\x02\xa5\xacE]\xa5\x8eiZ\xa5n\
-Z\xb7N{v\x12\x93x56\xb2\x9dB;\xf1\xbf\
-\xef\xf2\xc3)\x10'\xa4S\x11\xd3\xee\x01\xe1\xf3q\xfe\
-\xee\xbe\xb3\xcf\x86NgBjt\xa3o\x12\x1a\xdc9\
-tm\xe8\x8e\x05\xd7R0U\xa7w?cM$\xc5\
-\xccq.g3F\x03\xac\xa9\xe0?)\x0f\xc5\x1c\xfd\
-v\x10\xc8\x9c\x86:\x1e\xa13\xcf\xcb\x861\xa1Q\xac\
-G\xe8\xa4\x18O\x18\x8e\xd4\x08\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f5\x93\xf4H\xef>\x9b\xd8{\x225\xf4\x03v\
-\xc9h\xc4\xa7\x10\xe6(\x0b\xc6\xcd\xc6\x16\x06R\xb1\x15\
-\x03\x80\x81Tn/\x89\xde`\xa7%QC\xc4\x96$\
-\x14<\xe9\x18kh_\x14R\xab\x05\xf2\x09\x9aI\xa2\
-\xf5C\x17\x11\xac\x1eRU\xa2\x80\x00\x96\x06\xdaE\x13\
-\xac4@\x0f\x91\xd2\x18\xfa\x9e\xfb\xdf\xa7\xf6\x9f\xd9l\
-\xcd\xed\xfc\xefBMeG\xbd;\xa2:N\xfc\x86\xee\
-\xed\xff\x82\xcc~\x81[\x15\x18\xfb\xbd\xaaQ\xb5/\xef\
-\x08\xa9\x9e\xb7E\xd9\xdf'J\xb8}\xb6\xc5y\xbcG\
-\x9cp.\x07B\x86m\xa1\x0e\xf6\x08u\x0agY\xcd\
-\x85\xab\x0a\xf4d\x8f@\x03\x0a\
- \
- \x0a \
- \
- \
-\x00\x00\x02\xe0\
-<\
-svg class=\x22w-6 h\
--6\x22 xmlns=\x22http:\
-//www.w3.org/200\
-0/svg\x22 fill=\x22cur\
-rentColor\x22 viewB\
-ox=\x220 0 16 16\x22>\x0a\
- \
-
\x0a \
- \
-\x00\x00\x02\x93\
-<\
-svg class=\x22w-6 h\
--6\x22 xmlns=\x22http:\
-//www.w3.org/200\
-0/svg\x22 fill=\x22cur\
-rentColor\x22 viewB\
-ox=\x220 0 16 16\x22>\x0a\
- \
- \
-\x0a \
- \
-"
-
-qt_resource_name = b"\
-\x00\x0b\
-\x06QI\x87\
-\x00d\
-\x00i\x00s\x00c\x00o\x00r\x00d\x00.\x00s\x00v\x00g\
-\x00\x08\
-\x04*U\xa7\
-\x00x\
-\x00-\x00l\x00g\x00.\x00s\x00v\x00g\
-\x00\x08\
-\x07\xc8W\xe7\
-\x00c\
-\x00a\x00f\x00e\x00.\x00s\x00v\x00g\
-\x00\x0b\
-\x00_)\x87\
-\x00w\
-\x00e\x00b\x00s\x00i\x00t\x00e\x00.\x00s\x00v\x00g\
-\x00\x0b\
-\x08\xcf\xef\x87\
-\x00i\
-\x00n\x00s\x00t\x00a\x00l\x00l\x00.\x00s\x00v\x00g\
-\x00\x08\
-\x06^W\xe7\
-\x00b\
-\x00o\x00o\x00k\x00.\x00s\x00v\x00g\
-\x00\x0d\
-\x08\xf3a\xe7\
-\x00P\
-\x00a\x00r\x00c\x00h\x00L\x00o\x00g\x00o\x00.\x00s\x00v\x00g\
-\x00\x08\
-\x0c(U\x87\
-\x00t\
-\x00e\x00l\x00e\x00.\x00s\x00v\x00g\
-\x00\x0e\
-\x04\xd8\xe8\x9c\
-\x00P\
-\x00a\x00r\x00c\x00h\x00L\x00i\x00n\x00u\x00x\x00.\x00q\x00m\x00l\
-\x00\x09\
-\x0a\xb2\xbd\xc7\
-\x00m\
-\x00a\x00s\x00t\x00o\x00.\x00s\x00v\x00g\
-\x00\x0a\
-\x0f\xb8\x9b\x87\
-\x00g\
-\x00i\x00t\x00h\x00u\x00b\x00.\x00s\x00v\x00g\
-\x00\x06\
-\x07\xbaZ\xc7\
-\x00t\
-\x00w\x00.\x00s\x00v\x00g\
-"
-
-qt_resource_struct = b"\
-\x00\x00\x00\x00\x00\x02\x00\x00\x00\x0c\x00\x00\x00\x01\
-\x00\x00\x00\x00\x00\x00\x00\x00\
-\x00\x00\x00H\x00\x00\x00\x00\x00\x01\x00\x00\x08\xd3\
-\x00\x00\x01\x89\xf8\x14s,\
-\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x01\x00\x00\x05\x12\
-\x00\x00\x01\x89\xf8\x14s,\
-\x00\x00\x00\xcc\x00\x01\x00\x00\x00\x01\x00\x006\x80\
-\x00\x00\x01\x89\xf8\x14s,\
-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
-\x00\x00\x01\x89\xf8\x14s,\
-\x00\x00\x00\x80\x00\x00\x00\x00\x00\x01\x00\x00\x0c\xe6\
-\x00\x00\x01\x89\xf8\x14s,\
-\x00\x00\x01 \x00\x00\x00\x00\x00\x01\x00\x00@\xc2\
-\x00\x00\x01\x89\xf8\x14s,\
-\x00\x00\x002\x00\x01\x00\x00\x00\x01\x00\x00\x06V\
-\x00\x00\x01\x89\xf8\x14s,\
-\x00\x00\x00d\x00\x00\x00\x00\x00\x01\x00\x00\x0b\xab\
-\x00\x00\x01\x89\xf8\x14s,\
-\x00\x00\x00\x96\x00\x00\x00\x00\x00\x01\x00\x00\x0f\xf9\
-\x00\x00\x01\x89\xf8\x14s,\
-\x00\x00\x00\xee\x00\x00\x00\x00\x00\x01\x00\x009\xf2\
-\x00\x00\x01\x89\xf8\x14s,\
-\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x01\x00\x003c\
-\x00\x00\x01\x89\xf8\x14s,\
-\x00\x00\x01\x06\x00\x00\x00\x00\x00\x01\x00\x00=\xde\
-\x00\x00\x01\x89\xf8\x14s,\
-"
-
-def qInitResources():
- QtCore.qRegisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
-
-def qCleanupResources():
- QtCore.qUnregisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
-
-qInitResources()
-# Import I/O
-import subprocess
-import sys
-
-# Import PyQt6 Framework libraries
-from PyQt6.QtCore import *
-from PyQt6.QtGui import *
-from PyQt6.QtQml import *
-
-# Import Resources of Qt
-import Res
-
-# Simple Qt Quick class for loading QML files
-
-class Quick(QQmlApplicationEngine):
-
- # DO: Set property of object
- def setProperty(self, name, value):
- self.rootObjects()[0].setProperty(name, value)
-
- # DO: Get property of object
- def property(self, name):
- return self.rootObjects()[0].property(name)
-
- # DO: find a object
- def findChild(self, name, **kwargs):
- return self.rootObjects()[0].findChild(QObject, name)
-
- # DO: Close the loader
- def close(self):
- self.rootObjects()[0].close()
-
- def __init__(self):
- super(Quick, self).__init__()
-
-
-# Main Class of Parch Welcome Project
-class Main(Quick):
-
- # DO: Button 1 loading link: https://github.com/parchlinux
- def b1_(self):
- self.link("https://github.com/parchlinux")
-
- # DO: Button 2 loading link: https://twitter.com/bssfoss
- def b2_(self):
- self.link("https://twitter.com/bssfoss")
-
- # DO: Button 3 loading link: https://t.me/parchlinux
- def b3_(self):
- self.link("https://t.me/parchlinux")
-
- # DO: Button 4 loading link: https://discord.gg/9RW5cRByAM
- def b4_(self):
- self.link("https://discord.gg/9RW5cRByAM")
-
- # DO: Button 5 loading link: https://mas.to/@bssfoss
- def b5_(self):
- self.link("https://mas.to/@bssfoss")
-
- # DO: Button 6 loading link: https://coffeete.ir/parchlinux
- def b6_(self):
- self.link("https://coffeete.ir/parchlinux")
-
- # DO: Button 7 loading link: https://parchlinux.ir
- def b7_(self):
- self.link("https://parchlinux.ir")
-
- # DO: Button 8 loading link: https://parchlinux.ir/parchwiki/
- def b8_(self):
- self.link("https://parchlinux.ir/parchwiki/")
-
- # DO: Run Calamares Installer
- def install_(self):
- self.close()
- subprocess.run('sudo sh /etc/calamares/launch.sh',shell=True)
-
- # DO: Loading link in `xdg-open` function
- def link(self,url):
- self.close()
- subprocess.run(f'xdg-open {url}',shell=True)
-
- # DO: Init Function
- def __init__(self):
- super(Main, self).__init__()
-
- # Load Main QML file
- self.load(":/ParchLinux.qml")
-
-
- self.b1 = self.findChild("b1") # Find Button 1
- self.b1.clicked.connect(self.b1_) # Action: Connect Button 1 action to b1_
-
- self.b2 = self.findChild("b2") # Find Button 2
- self.b2.clicked.connect(self.b2_) # Action: Connect Button 2 action to b2_
-
- self.b3 = self.findChild("b3") # Find Button 3
- self.b3.clicked.connect(self.b3_) # Action: Connect Button 3 action to b3_
-
- self.b4 = self.findChild("b4") # Find Button 4
- self.b4.clicked.connect(self.b4_) # Action: Connect Button 4 action to b4_
-
- self.b5 = self.findChild("b5") # Find Button 5
- self.b5.clicked.connect(self.b5_) # Action: Connect Button 5 action to b5_
-
- self.b6 = self.findChild("b6") # Find Button 6
- self.b6.clicked.connect(self.b6_) # Action: Connect Button 6 action to b6_
-
- self.b7 = self.findChild("b7") # Find Button 7
- self.b7.clicked.connect(self.b7_) # Action: Connect Button 7 action to b7_
-
- self.b8 = self.findChild("b8") # Find Button 8
- self.b8.clicked.connect(self.b8_) # Action: Connect Button 8 action to b8_
-
- self.install = self.findChild('install') # Find Install Button
- self.install.clicked.connect(self.install_) # Action: Connect to install_ function
-
-
-# Start Qt Qui Application loop
-app = QGuiApplication([])
-
-# Set Qt Window Icon
-app.setWindowIcon(QIcon(":/ParchLogo.svg"))
-
-# Loading Main Class
-m = Main()
-
-# Set loop exec
-app.exec()
\ No newline at end of file
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..9f92236
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1 @@
+PyQt6
\ No newline at end of file
diff --git a/build/parch-welcome/usr/share/applications/welcome.desktop b/resources/application.desktop
similarity index 62%
rename from build/parch-welcome/usr/share/applications/welcome.desktop
rename to resources/application.desktop
index 0e50f13..a3eb4bf 100644
--- a/build/parch-welcome/usr/share/applications/welcome.desktop
+++ b/resources/application.desktop
@@ -2,7 +2,7 @@
[Desktop Entry]
Name=Welcome
Name[ir]=درود
-Exec=/usr/bin/Welcome
+Exec=/usr/bin/welcome
Terminal=false
Type=Application
-Icon=/usr/share/icons/ParchLogo.png
+Icon=/usr/share/icons/parch-welcome.png
diff --git a/build/parch-welcome/etc/xdg/autostart/welcome.desktop b/resources/autostart.desktop
similarity index 60%
rename from build/parch-welcome/etc/xdg/autostart/welcome.desktop
rename to resources/autostart.desktop
index 0e50f13..2e11b0d 100644
--- a/build/parch-welcome/etc/xdg/autostart/welcome.desktop
+++ b/resources/autostart.desktop
@@ -2,7 +2,7 @@
[Desktop Entry]
Name=Welcome
Name[ir]=درود
-Exec=/usr/bin/Welcome
+Exec=/usr/bin/parch-welcome
Terminal=false
Type=Application
-Icon=/usr/share/icons/ParchLogo.png
+Icon=/usr/share/icons/parch-welcome.png
diff --git a/build/parch-welcome/usr/share/icons/ParchLogo.png b/resources/logo.png
similarity index 100%
rename from build/parch-welcome/usr/share/icons/ParchLogo.png
rename to resources/logo.png
diff --git a/src/QrcGenerate.py b/src/QrcGenerate.py
new file mode 100644
index 0000000..2904f58
--- /dev/null
+++ b/src/QrcGenerate.py
@@ -0,0 +1,20 @@
+#!/usr/bin/python
+#!/usr/bin/python
+
+import os, subprocess
+
+# Create Qrc file
+listrc = os.listdir("UI")
+listrc.remove("res.qrc")
+f = open("UI/res.qrc", "w")
+f.write("""""")
+for i in listrc:
+ f.write(f"{i}")
+f.write("""""")
+f.close()
+
+# Compile Qrc & Create onefile script & run it
+subprocess.run(
+ """rcc -g python UI/res.qrc -o Res.py && sed -i 's/PySide2/PyQt6/g' Res.py && echo "#!/usr/bin/python" > Welcome && cat Res.py >> Welcome && cat Welcome.py >> Welcome && chmod +x Welcome && sed -i 's/import Res//g' Welcome && mv Welcome ../build/parch-welcome/usr/bin""",
+ shell=True,
+)
diff --git a/src/Res.py b/src/Res.py
index 1d35d30..c259409 100644
--- a/src/Res.py
+++ b/src/Res.py
@@ -153,6 +153,28 @@ q6\x92\x1c~\x87W\x1d\xb8\xdcr\x9d\xe6\xbf\x0d\xdf\
\x19\x91sh\xfahDz4by\xdd\x88\xe5#\x1a\
\xb1\xbc\xc5\x88\xe5\xfd\x8c\x88\xae:\xf1\xe5\x1f\xf1\xa9\xfe\
m\x9a\xff\x025\x8d\xde4\
+\x00\x00\x017\
+<\
+svg xmlns=\x22http:\
+//www.w3.org/200\
+0/svg\x22 class=\x22h-\
+5 w-5 ml-2\x22 fill\
+=\x22none\x22 viewBox=\
+\x220 0 24 24\x22 stro\
+ke=\x22currentColor\
+\x22 stroke-width=\x22\
+2\x22>\x0a \
+ \x0a \
+ \
+\
\x00\x00\x02\xd4\
<\
svg xmlns=\x22http:\
@@ -201,28 +223,6 @@ ZM2.04 4.326c.32\
.88A7 7 0 1 1 2.\
04 4.327Z\x22/>\x0a\
-\x00\x00\x017\
-<\
-svg xmlns=\x22http:\
-//www.w3.org/200\
-0/svg\x22 class=\x22h-\
-5 w-5 ml-2\x22 fill\
-=\x22none\x22 viewBox=\
-\x220 0 24 24\x22 stro\
-ke=\x22currentColor\
-\x22 stroke-width=\x22\
-2\x22>\x0a \
- \x0a \
- \
-\
\x00\x00\x03\x0f\
<\
svg xmlns=\x22http:\
@@ -895,63 +895,70 @@ c-.778.324-2.334\
.09z\x22>\x0a \
\
\
-\x00\x00\x03n\
+\x00\x00\x03\xdd\
\x00\
-\x00\x13\xe9x\x9c\xddX\xdfo\xda0\x10~\xcf_a\
-\xd1\x87n\x12\xcd\x02\xa5\xacE]\xa5\x8eiZ\xa5n\
-Z\xb7N{v\x12\x93x56\xb2\x9dB;\xf1\xbf\
-\xef\xf2\xc3)\x10'\xa4S\x11\xd3\xee\x01\xe1\xf3q\xfe\
-\xee\xbe\xb3\xcf\x86NgBjt\xa3o\x12\x1a\xdc9\
-tm\xe8\x8e\x05\xd7R0U\xa7w?cM$\xc5\
-\xccq.g3F\x03\xac\xa9\xe0?)\x0f\xc5\x1c\xfd\
-v\x10\xc8\x9c\x86:\x1e\xa13\xcf\xcb\x861\xa1Q\xac\
-G\xe8\xa4\x18O\x18\x8e\xd4\x08\x1c\xbb\x1f%\x9e\x12F\
-\x94\xca\x7f\xfe\x89r\x9dY\xdcSE}FFH\xcb\
-\x84d\x1a\x1a\x8e\xd0\x0c\xcb v\xb2a \x98\x90#\
-\xd4\xd1\x12s\x05z\xc2u'\x9f\xf9F\x02\x8dy\xc4\
-H\x81%\x15\xcc\x83XH\xe5N(c\x99\x1bR\xac\
-\x93\x8a\xc4!M\x00N\xdf+U\xc6\xfb\xc1\x87\x0f^\
-\xcf\x1bxg\x85\xef\xcc\x7f\x19\xe5\xaa\x98\x15d\x1ei\
-\xbeD>\xaa\xb5\xd5bVZ\xc2w\xa7bx+\x04\
-{\x9fh-\xb8e\xc5,)\x81\xe0\xae\x01;\x8f\xa9\
-&\x9dz;%\x12\x19@J;\x8b#\x16\xb9\xea>\
-\xb2\xdb\x0a>\x06N\xef\x08\xe4\xdb\xbeh*\x19\x13n\
-\xc0\x84\x22\xaf^[\xad\x96\x15\xed\xd2y\x8ap\xf9\xf4\
-u,X2\xdd\x0c\xd0\xa4(\x80\xdc\x10y\xc5K\xd2\
-\xd6\xac\xae\xa68\x22\x16\x94e\xa4_S\x98\xd7\x22\x12\
-\xf6p\x8b2\xed\xf5O+S\xa6dms\x06\x1c|\
-\xd0G\xd8\x14\x98\x8d3\x98%\x99\x9b\x13k\x1e\xd6\x13\
-c\xab\xd6\x0dx\x85\xd3l\xd4\x80\xb32e\xdd\x22\xf5\
-Hn\xc9B[@hP\x83\x93s\x05{\x9fG\x17\
-YF\xd15\xe5\xc9\xe2\xfcM\xa1\xab&vKIN\
- 7\xee\x04O){\x00\xa3\x1f~\xc2uRc5\
-\xa3\x0b\xc2\xbe\xd3G`\xf3\xd8\xdb)\x13/FE\xb5\
-`v\xc2\xc4y\x9a\x9f\xdc\xf5\xbb\xc3\x83c\xff\xb4?\
-\x19\x1e\xae\xf3\x93Z\x5c\x944!\xaa aH\xcc\x08\
-?\xcawH\x17]\x82\xf5\x91\x8f\x15\x09\xf3\xdf\xa0\x90\
-\x825\xf5\x93\xf4H\xef>\x9b\xd8{\x225\xf4\x03v\
-\xc9h\xc4\xa7\x10\xe6(\x0b\xc6\xcd\xc6\x16\x06R\xb1\x15\
-\x03\x80\x81Tn/\x89\xde`\xa7%QC\xc4\x96$\
-\x14<\xe9\x18kh_\x14R\xab\x05\xf2\x09\x9aI\xa2\
-\xf5C\x17\x11\xac\x1eRU\xa2\x80\x00\x96\x06\xdaE\x13\
-\xac4@\x0f\x91\xd2\x18\xfa\x9e\xfb\xdf\xa7\xf6\x9f\xd9l\
-\xcd\xed\xfc\xefBMeG\xbd;\xa2:N\xfc\x86\xee\
-\xed\xff\x82\xcc~\x81[\x15\x18\xfb\xbd\xaaQ\xb5/\xef\
-\x08\xa9\x9e\xb7E\xd9\xdf'J\xb8}\xb6\xc5y\xbcG\
-\x9cp.\x07B\x86m\xa1\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y\xba>\xa8\
+\xb8W\xf6\xcb\xd9\xbd\xf7?M\xbf3h\
\x00\x00\x03\xe8\
<\
svg class=\x22w-6 h\
@@ -1125,13 +1132,13 @@ qt_resource_name = b"\
\x00c\
\x00a\x00f\x00e\x00.\x00s\x00v\x00g\
\x00\x0b\
-\x00_)\x87\
-\x00w\
-\x00e\x00b\x00s\x00i\x00t\x00e\x00.\x00s\x00v\x00g\
-\x00\x0b\
\x08\xcf\xef\x87\
\x00i\
\x00n\x00s\x00t\x00a\x00l\x00l\x00.\x00s\x00v\x00g\
+\x00\x0b\
+\x00_)\x87\
+\x00w\
+\x00e\x00b\x00s\x00i\x00t\x00e\x00.\x00s\x00v\x00g\
\x00\x08\
\x06^W\xe7\
\x00b\
@@ -1164,37 +1171,44 @@ qt_resource_name = b"\
qt_resource_struct = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x0c\x00\x00\x00\x01\
-\x00\x00\x00\x00\x00\x00\x00\x00\
-\x00\x00\x00H\x00\x00\x00\x00\x00\x01\x00\x00\x08\xd3\
-\x00\x00\x01\x89\xf8\x14s,\
+\x00\x00\x01\x8a\x0c\xde\x84\x00\
+\x00\x00\x00d\x00\x00\x00\x00\x00\x01\x00\x00\x0a\x0e\
+\x00\x00\x01\x8a\x0c\xde\x84\x00\
\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x01\x00\x00\x05\x12\
-\x00\x00\x01\x89\xf8\x14s,\
+\x00\x00\x01\x8a\x0c\xde\x84\x00\
\x00\x00\x00\xcc\x00\x01\x00\x00\x00\x01\x00\x006\x80\
-\x00\x00\x01\x89\xf8\x14s,\
+\x00\x00\x01\x8a\x0c\xde\x84\x00\
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
-\x00\x00\x01\x89\xf8\x14s,\
+\x00\x00\x01\x8a\x0c\xde\x84\x00\
\x00\x00\x00\x80\x00\x00\x00\x00\x00\x01\x00\x00\x0c\xe6\
-\x00\x00\x01\x89\xf8\x14s,\
-\x00\x00\x01 \x00\x00\x00\x00\x00\x01\x00\x00@\xc2\
-\x00\x00\x01\x89\xf8\x14s,\
+\x00\x00\x01\x8a\x0c\xde\x84\x00\
+\x00\x00\x01 \x00\x00\x00\x00\x00\x01\x00\x00A1\
+\x00\x00\x01\x8a\x0c\xde\x84\x00\
\x00\x00\x002\x00\x01\x00\x00\x00\x01\x00\x00\x06V\
-\x00\x00\x01\x89\xf8\x14s,\
-\x00\x00\x00d\x00\x00\x00\x00\x00\x01\x00\x00\x0b\xab\
-\x00\x00\x01\x89\xf8\x14s,\
+\x00\x00\x01\x8a\x0c\xde\x84\x00\
+\x00\x00\x00H\x00\x00\x00\x00\x00\x01\x00\x00\x08\xd3\
+\x00\x00\x01\x8a\x0c\xde\x84\x00\
\x00\x00\x00\x96\x00\x00\x00\x00\x00\x01\x00\x00\x0f\xf9\
-\x00\x00\x01\x89\xf8\x14s,\
-\x00\x00\x00\xee\x00\x00\x00\x00\x00\x01\x00\x009\xf2\
-\x00\x00\x01\x89\xf8\x14s,\
+\x00\x00\x01\x8a\x0c\xde\x84\x00\
+\x00\x00\x00\xee\x00\x00\x00\x00\x00\x01\x00\x00:a\
+\x00\x00\x01\x8a\x0c\xde\x84\x00\
\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x01\x00\x003c\
-\x00\x00\x01\x89\xf8\x14s,\
-\x00\x00\x01\x06\x00\x00\x00\x00\x00\x01\x00\x00=\xde\
-\x00\x00\x01\x89\xf8\x14s,\
+\x00\x00\x01\x8a\x0c\xde\x84\x00\
+\x00\x00\x01\x06\x00\x00\x00\x00\x00\x01\x00\x00>M\
+\x00\x00\x01\x8a\x0c\xde\x84\x00\
"
+
def qInitResources():
- QtCore.qRegisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
+ QtCore.qRegisterResourceData(
+ 0x03, qt_resource_struct, qt_resource_name, qt_resource_data
+ )
+
def qCleanupResources():
- QtCore.qUnregisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
+ QtCore.qUnregisterResourceData(
+ 0x03, qt_resource_struct, qt_resource_name, qt_resource_data
+ )
+
qInitResources()
diff --git a/src/UI/ParchLinux.qml b/src/UI/ParchLinux.qml
index d570f91..e49ea28 100644
--- a/src/UI/ParchLinux.qml
+++ b/src/UI/ParchLinux.qml
@@ -3,16 +3,36 @@ import QtQuick.Controls
import QtQuick.Controls.Material
ApplicationWindow {
- width: 900
- height: 500
+ width: Screen.width
+ height: Screen.height
flags: Qt.FramelessWindowHint
visible: true
id: parch
color: "transparent"
- Rectangle {
+ MouseArea {
anchors.fill: parent
+ drag{ target: parent; axis: Drag.XandYAxis}
+
+ onMouseXChanged: {
+ if(drag.active){
+ print(parent.x)
+ }
+ }
+
+ onMouseYChanged: {
+ if(drag.active)
+ {
+ print(parent.y)
+ }
+ }
+ }
+
+ Rectangle {
+ anchors.centerIn: parent
+ width: 900
+ height: 500
radius: 20
color: "#DD010409"
diff --git a/src/UI/res.qrc b/src/UI/res.qrc
index be3b626..ce115c4 100644
--- a/src/UI/res.qrc
+++ b/src/UI/res.qrc
@@ -1 +1 @@
-website.svginstall.svgbook.svgmasto.svgx-lg.svgtele.svgParchLogo.svggithub.svgdiscord.svgParchLinux.qmlcafe.svgtw.svg
\ No newline at end of file
+install.svgmasto.svggithub.svgParchLinux.qmlbook.svgwebsite.svgdiscord.svgtw.svgx-lg.svgtele.svgcafe.svgParchLogo.svg
\ No newline at end of file
diff --git a/src/Welcome.py b/src/Welcome.py
index a32d685..e848074 100644
--- a/src/Welcome.py
+++ b/src/Welcome.py
@@ -12,8 +12,8 @@ import Res
# Simple Qt Quick class for loading QML files
-class Quick(QQmlApplicationEngine):
+class Quick(QQmlApplicationEngine):
# DO: Set property of object
def setProperty(self, name, value):
self.rootObjects()[0].setProperty(name, value)
@@ -36,7 +36,6 @@ class Quick(QQmlApplicationEngine):
# Main Class of Parch Welcome Project
class Main(Quick):
-
# DO: Button 1 loading link: https://github.com/parchlinux
def b1_(self):
self.link("https://github.com/parchlinux")
@@ -72,12 +71,12 @@ class Main(Quick):
# DO: Run Calamares Installer
def install_(self):
self.close()
- subprocess.run('sudo sh /etc/calamares/launch.sh',shell=True)
+ subprocess.Popen("sudo sh /etc/calamares/launch.sh", shell=True)
# DO: Loading link in `xdg-open` function
- def link(self,url):
+ async def link(self, url):
self.close()
- subprocess.run(f'xdg-open {url}',shell=True)
+ await subprocess.Popen(f"xdg-open {url}", shell=True)
# DO: Init Function
def __init__(self):
@@ -86,43 +85,42 @@ class Main(Quick):
# Load Main QML file
self.load(":/ParchLinux.qml")
+ self.b1 = self.findChild("b1") # Find Button 1
+ self.b1.clicked.connect(self.b1_) # Action: Connect Button 1 action to b1_
- self.b1 = self.findChild("b1") # Find Button 1
- self.b1.clicked.connect(self.b1_) # Action: Connect Button 1 action to b1_
+ self.b2 = self.findChild("b2") # Find Button 2
+ self.b2.clicked.connect(self.b2_) # Action: Connect Button 2 action to b2_
- self.b2 = self.findChild("b2") # Find Button 2
- self.b2.clicked.connect(self.b2_) # Action: Connect Button 2 action to b2_
+ self.b3 = self.findChild("b3") # Find Button 3
+ self.b3.clicked.connect(self.b3_) # Action: Connect Button 3 action to b3_
- self.b3 = self.findChild("b3") # Find Button 3
- self.b3.clicked.connect(self.b3_) # Action: Connect Button 3 action to b3_
+ self.b4 = self.findChild("b4") # Find Button 4
+ self.b4.clicked.connect(self.b4_) # Action: Connect Button 4 action to b4_
- self.b4 = self.findChild("b4") # Find Button 4
- self.b4.clicked.connect(self.b4_) # Action: Connect Button 4 action to b4_
+ self.b5 = self.findChild("b5") # Find Button 5
+ self.b5.clicked.connect(self.b5_) # Action: Connect Button 5 action to b5_
- self.b5 = self.findChild("b5") # Find Button 5
- self.b5.clicked.connect(self.b5_) # Action: Connect Button 5 action to b5_
+ self.b6 = self.findChild("b6") # Find Button 6
+ self.b6.clicked.connect(self.b6_) # Action: Connect Button 6 action to b6_
- self.b6 = self.findChild("b6") # Find Button 6
- self.b6.clicked.connect(self.b6_) # Action: Connect Button 6 action to b6_
+ self.b7 = self.findChild("b7") # Find Button 7
+ self.b7.clicked.connect(self.b7_) # Action: Connect Button 7 action to b7_
- self.b7 = self.findChild("b7") # Find Button 7
- self.b7.clicked.connect(self.b7_) # Action: Connect Button 7 action to b7_
+ self.b8 = self.findChild("b8") # Find Button 8
+ self.b8.clicked.connect(self.b8_) # Action: Connect Button 8 action to b8_
- self.b8 = self.findChild("b8") # Find Button 8
- self.b8.clicked.connect(self.b8_) # Action: Connect Button 8 action to b8_
-
- self.install = self.findChild('install') # Find Install Button
- self.install.clicked.connect(self.install_) # Action: Connect to install_ function
+ self.install = self.findChild("install") # Find Install Button
+ self.install.clicked.connect(
+ self.install_
+ ) # Action: Connect to install_ function
-# Start Qt Qui Application loop
-app = QGuiApplication([])
-
-# Set Qt Window Icon
-app.setWindowIcon(QIcon(":/ParchLogo.svg"))
-
-# Loading Main Class
-m = Main()
-
-# Set loop exec
-app.exec()
\ No newline at end of file
+if __name__ == "__main__":
+ # Start Qt Qui Application loop
+ app = QGuiApplication([])
+ # Set Qt Window Icon
+ app.setWindowIcon(QIcon(":/ParchLogo.svg"))
+ # Loading Main Class
+ m = Main()
+ # Set loop exec
+ app.exec()