remove old build script

This commit is contained in:
manijamali2003 2023-08-12 21:22:00 +03:30
parent 1abd87096a
commit b9f2503b61
8 changed files with 43 additions and 41 deletions

3
.gitignore vendored
View file

@ -1,3 +1,4 @@
venv
.idea
__pycache__
__pycache__
*.tar.*

18
Build.py Normal file
View file

@ -0,0 +1,18 @@
#!/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("""<RCC><qresource prefix="/">""")
for i in listrc:
f.write(f"<file>{i}</file>")
f.write("""</qresource></RCC>""")
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)

18
Debug.py Normal file
View file

@ -0,0 +1,18 @@
#!/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("""<RCC><qresource prefix="/">""")
for i in listrc:
f.write(f"<file>{i}</file>")
f.write("""</qresource></RCC>""")
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)

View file

@ -5,25 +5,15 @@ Parch dorood (/do-rood/, درود, pronunciation) which is Persian word for "Gre
- Running the installer program
- 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:
```shell
sh build.sh
python Build.py
```
## Build Source
- **Step 1**: Generate **Qt Resource** from `src/UI` directory
## Debug & Run from Source
if you want to run project without installing, you should run:
```shell
python 01-Generate.py
```
- **Step 2**: Compile Generated **Qt Resource** `src/UI/res.qrc` file
```shell
sh 02-Compile.sh
```
- **Step 3**: Build one-file python
```shell
sh 03-Build.sh
python Debug.py
```

View file

@ -1,4 +0,0 @@
#!/usr/bin/bash
chmod +x parch-welcome/usr/bin/*
tar -czvf parch-welcome.tar.gz parch-welcome/
makepkg -f

View file

@ -1,12 +0,0 @@
#!/usr/bin/env python
import os
listrc = os.listdir('UI')
listrc.remove('res.qrc')
f = open('UI/res.qrc', 'w')
f.write("""<RCC><qresource prefix="/">""")
for i in listrc:
f.write(f"<file>{i}</file>")
f.write("""</qresource></RCC>""")
f.close()

View file

@ -1,2 +0,0 @@
#!/usr/bin/env bash
rcc -g python -o Res.py UI/res.qrc

View file

@ -1,7 +0,0 @@
#!/usr/bin/env bash
echo "#!/usr/bin/python" > Welcome
cat Res.py >> Welcome
cat Welcome.py >> Welcome
chmod +x Welcome
cp Welcome ../rootcopy/usr/bin/