Skip to content

Commit 598e6b5

Browse files
committed
actual 0.1.2 release
1 parent 1b221ff commit 598e6b5

File tree

9 files changed

+72
-45
lines changed

9 files changed

+72
-45
lines changed

.github/workflows/release.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
run: |
3131
cd ${{ github.workspace }}
3232
./release.sh ${{ env.tag }}
33+
tree
3334
3435
- name: Create Release
3536
id: create_release
@@ -50,6 +51,6 @@ jobs:
5051
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5152
with:
5253
upload_url: ${{ steps.create_release.outputs.upload_url }}
53-
asset_path: ./libaloo-v${{ env.tag }}.deb
54-
asset_name: libaloo-v${{ env.tag }}.deb
54+
asset_path: ./libaloo-v${{ env.tag }}-$(arch).deb
55+
asset_name: libaloo-v${{ env.tag }}-$(arch).deb
5556
asset_content_type: application/vnd.debian.binary-package

aloo-edit/app/main.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#include "aloo.h"
2-
#include "common/app.h"
1+
#include <aloo/aloo.h>
2+
#include <gtk/gtk.h>
3+
#include <string.h>
34

45
AlooWidget *labelGrid;
56
AlooWidget *navbar;

install.sh

+18-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
#!/bin/bash
2-
./build.sh
3-
if [ ! $(./build.sh test) ]; then
4-
echo -e "Tests failed"
5-
exit 1
2+
if [ -d build ]; then
3+
rm -rf build
4+
rm -rf bin
5+
rm -rf lib
66
fi
7+
./build.sh
78
if [ ! $1 ]; then
89
echo -e "Version not specified as argument"
910
exit 1
1011
fi
12+
if [ -d "output" ]; then
13+
rm -rf output
14+
fi
15+
1116
mkdir -p output/usr/{include,bin}
1217
cp -r lib output/usr/lib
13-
cp -r scripts/src output/etc
14-
mv output/etc/__init__.py output/usr/bin/aloo.py
18+
mkdir -p output/etc
19+
cp -r scripts/src output/etc/aloo
20+
mv output/etc/aloo/__init__.py output/usr/bin/aloo
21+
mv output/etc/aloo/aloocli.py output/usr/bin/aloocli
22+
chmod +x output/usr/bin/*
23+
1524
cp -r include output/usr/include/aloo
1625
echo "PKG_CONFIG_PATH=/usr/share/pkgconfig/aloo.pc" >output/etc/aloo.conf
1726
mkdir -p output/usr/share/pkgconfig
@@ -33,8 +42,8 @@ Architecture: all
3342
Maintainer: Jaipal <[email protected]>
3443
Description: This a library based on Gtk4 written in C to make things easier
3544
Depends: libgtk-4-dev, libsqlite3-dev, python3, python3-pip" >DEBIAN/control
36-
sudo dpkg-deb --root-owner-group --build . libaloo-v$1.deb
37-
mv libaloo-v$1.deb ..
45+
sudo dpkg-deb --root-owner-group --build . libaloo-v$1-$(arch).deb
46+
mv libaloo-v$1-$(arch).deb ..
3847
cd ..
3948

4049
elif [ $(which rpm) && $(which dnf) ]; then
@@ -62,7 +71,7 @@ else
6271
pkgver=$1
6372
pkgrel=1
6473
pkgdesc="This a Gtk4 based library written in C to make things easier"
65-
arch=("x86_64")
74+
arch=("$(arch)")
6675
url="https://github.com/BhJaipal/libaloo"
6776
license=('MIT')
6877
depends=(gtk4 sqlite python python-pip)

release.sh

+24-18
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
11
#!/bin/bash
2-
3-
if [ ! -d "build/" ]; then
4-
mkdir build
2+
if [ -d build ]; then
3+
rm -rf build
4+
rm -rf bin
5+
rm -rf lib
6+
fi
7+
./build.sh
8+
if [ ! $1 ]; then
9+
echo -e "Version not specified as argument"
10+
exit 1
511
fi
12+
if [ -d "output" ]; then
13+
rm -rf output
14+
fi
15+
616
cmake -B build -DCMAKE_BUILD_TYPE=Release
717
cd build
818
make
919
cd ..
10-
mv scripts/src/__init__.py bin/aloo.py
1120

12-
mkdir -p etc/aloo
13-
echo "PKG_CONFIG_PATH=/usr/share/pkgconfig/aloo.pc\n" >etc/aloo/aloo.conf
14-
mv scripts/src/main.c etc/aloo/main.c
15-
mv scripts/src/test.c etc/aloo/test.c
16-
mv scripts/src/main.server.c etc/aloo/main.server.c
17-
mv scripts/src/main.server.h etc/aloo/main.server.h
18-
mv scripts/src/CMakeLists.txt etc/aloo/CMakeLists.txt
21+
mkdir -p usr/{include,bin}
22+
mkdir -p etc
23+
echo "PKG_CONFIG_PATH=/usr/share/pkgconfig/aloo.pc\n" >etc/aloo.conf
1924

20-
mkdir -p usr/share/pkgconfig
21-
mkdir usr/include
22-
mv include usr/include/aloo
2325
mv lib usr/lib
24-
mv bin usr/bin
25-
rm -r bin/test-1.exe
26+
mv scripts/src etc/aloo
27+
mv include usr/include/aloo
28+
mv etc/aloo/__init__.py usr/bin/aloo
29+
mv etc/aloo/aloocli.py usr/bin/aloocli
30+
chmod +x usr/bin/*
2631

32+
mkdir -p usr/share/pkgconfig
2733
echo "Name: aloo
2834
Version: $1
2935
Description: This a Gtk4 based library written in C to make things easier
@@ -43,7 +49,7 @@ Architecture: all
4349
Maintainer: Jaipal <[email protected]>
4450
Description: This a library based on Gtk4 written in C to make things easier
4551
Depends: libgtk-4-dev, libsqlite3-dev, python3, python3-pip" >DEBIAN/control
46-
sudo dpkg-deb --root-owner-group --build . libaloo-v$1.deb
52+
sudo dpkg-deb --root-owner-group --build . libaloo-v$1-$(arch).deb
4753
elif [ $(which rpm) && $(which dnf) ]; then
4854
mkdir SPECS
4955
echo "Name: aloo
@@ -65,7 +71,7 @@ else
6571
pkgver=$1
6672
pkgrel=1
6773
pkgdesc="This a Gtk4 based library written in C to make things easier"
68-
arch=("x86_64")
74+
arch=("$(arch)")
6975
url="https://github.com/BhJaipal/libaloo"
7076
license=('MIT')
7177
depends=(gtk4 sqlite python python-pip)

scripts/src/__init__.py

+21-9
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ def createApp() -> None:
635635
currFilePath = "/".join(__file__.split("/")[:-1])
636636
if currFilePath.endswith("bin"):
637637
currFilePath = (
638-
"/".join(__file__.split("/")[:-2]) + "/etc/aloo/"
638+
"/".join(__file__.split("/")[:-3]) + "/etc/aloo/"
639639
)
640640
projectName = ""
641641
if appOptions.selectedAppOption != "Path":
@@ -709,15 +709,27 @@ def createApp() -> None:
709709
"r",
710710
).read()
711711

712-
while colorsCSS.index("\t") != -1:
713-
colorsCSS = colorsCSS.replace("\t", "")
714-
while colorsCSS.index("\n") != -1:
715-
colorsCSS = colorsCSS.replace("\n", "")
712+
try:
713+
while colorsCSS.index("\t") != -1:
714+
colorsCSS = colorsCSS.replace("\t", "")
715+
except:
716+
pass
717+
try:
718+
while colorsCSS.index("\n") != -1:
719+
colorsCSS = colorsCSS.replace("\n", "")
720+
except:
721+
pass
716722

717-
while materialCSS.index("\t") != -1:
718-
materialCSS = materialCSS.replace("\t", "")
719-
while materialCSS.index("\n") != -1:
720-
materialCSS = materialCSS.replace("\n", "")
723+
try:
724+
while materialCSS.index("\t") != -1:
725+
materialCSS = materialCSS.replace("\t", "")
726+
except:
727+
pass
728+
try:
729+
while materialCSS.index("\n") != -1:
730+
materialCSS = materialCSS.replace("\n", "")
731+
except:
732+
pass
721733
os.mkdir(appInfo["project-name"] + "styles")
722734
cssBundle = open(
723735
appInfo["project-name"] + "styles/material.bundle.min.css",

scripts/src/aloocli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def createApp(projectOption: str) -> None:
4040

4141
currFilePath = "/".join(__file__.split("/")[:-1])
4242
if currFilePath.endswith("bin"):
43-
currFilePath = "/".join(__file__.split("/")[:-2]) + "/etc/aloo/"
43+
currFilePath = "/".join(__file__.split("/")[:-3]) + "/etc/aloo/"
4444

4545
if "aloo.config.yaml" in os.listdir(os.getcwd()):
4646
os.system("clear")

scripts/src/main.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#include "aloo.h"
2-
#include "common/app.h"
1+
#include <aloo/aloo.h>
32
AlooApplication *app;
43

54
static void activate() {

scripts/src/test.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "aloo.h"
1+
#include <aloo/aloo.h>
22
#include <stdio.h>
33
AlooApplication *app;
44
Test *t;

uninstall.sh

-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
sudo rm -rf /etc/aloo
33
sudo apt remove aloo -y
44
sudo apt autoremove -y
5-
rm -f dist/deb.deb

0 commit comments

Comments
 (0)