-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.sh
More file actions
executable file
·53 lines (40 loc) · 1.04 KB
/
package.sh
File metadata and controls
executable file
·53 lines (40 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
set -e
ROOT_DIR=$(pwd)
echo "> Starting packaging process..."
############# Python Backend #############
echo ">> Building Python backend..."
cd "$ROOT_DIR/backend"
if [ ! -d "env" ]; then
python3 -m venv env
./env/bin/pip install -r requirements.txt
fi
./env/bin/pyinstaller --onefile --name main main.py --clean
echo ">> Python backend built in ./dist/main"
if [ ! -f "./dist/main" ]; then
echo ">> [Error]: Python backend not built"
exit 1
fi
cd "$ROOT_DIR"
############# GUI #############
echo ">> Building GUI..."
npm install
npm run build
if [ ! -d "dist" ]; then
echo ">> [Error]: GUI not built"
exit 1
fi
############# AppImage #############
echo ">> Creating AppImage..."
npm run dist
APPIMAGE_PATH=$(find release -name "*.AppImage" | head -n 1)
if [ -f "$APPIMAGE_PATH" ]; then
echo ">> AppImage created successfully: $APPIMAGE_PATH"
echo ">> Cleaning up temporary files..."
rm -rf dist
rm -rf build/main
rm -f main.spec
else
echo ">> [Error]: AppImage not built"
exit 1
fi