Skip to content

Commit

Permalink
version1 (#7)
Browse files Browse the repository at this point in the history
* a few changes (#3)

* Remove build script
* Remove debug script
* update readme
* Remove Import Res
* Qt Resource Generator
* Generated Resource
* Qrc file
* Rename QrcGenerator in readme
* Replace to Popen
* add requirements
* Add movement Qml window
* remove jumper
---------
Co-authored-by: manijamali2003 <[email protected]>

* Dev 0.1 (#4)

* Remove build script

* Remove debug script

* update readme

* Remove Import Res

* Qt Resource Generator

* Generated Resource

* Qrc file

* Rename QrcGenerator in readme

* Replace to Popen

* add requirements

* Add movement Qml window

* remove jumper

* Update pkgbuild

---------

Co-authored-by: Mani Jamali <[email protected]>
  • Loading branch information
mmdbalkhi and manijamali2003 authored Aug 19, 2023
1 parent 3ab228a commit 6031fa5
Show file tree
Hide file tree
Showing 16 changed files with 265 additions and 1,531 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
venv
.idea
__pycache__
*.tar.*
*.tar.*
parch-welcome-bin
.vscode
18 changes: 0 additions & 18 deletions Build.py

This file was deleted.

18 changes: 0 additions & 18 deletions Debug.py

This file was deleted.

20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
makepkg -f
```

### Install the package
- For installing this pacakge run:
```shell
python Build.py
cd build
sudo pacman -U ./parch-welcome*
```

## Debug & Run from Source
if you want to run project without installing, you should run:
## Generate Qt Resources (if edited)
if you made a changes in src you can update the `qrc` by running this command:
```shell
python Debug.py
cd src
python QrcGenerate.py
```
3 changes: 3 additions & 0 deletions build/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!.gitignore
!PKGBUILD
61 changes: 47 additions & 14 deletions build/PKGBUILD
Original file line number Diff line number Diff line change
@@ -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')
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() {
install -dm755 ${pkgdir}${destname}
cp -r ${srcdir}/${pkgname}${destname}/* ${pkgdir}${destname}

# 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"
}
Loading

0 comments on commit 6031fa5

Please sign in to comment.