-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_linux.sh
More file actions
52 lines (46 loc) · 1.3 KB
/
Copy pathbuild_linux.sh
File metadata and controls
52 lines (46 loc) · 1.3 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
#!/usr/bin/env bash
set -euo pipefail
echo "============================================"
echo " MetaLens — Linux Build Script"
echo "============================================"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
# 1. Python sidecar
echo ""
echo "[1/3] Building Python sidecar..."
cd python
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt -q
pyinstaller main.py --onefile --name metalens-sidecar --distpath dist --clean --noconfirm \
--hidden-import piexif \
--hidden-import mutagen \
--hidden-import hachoir \
--hidden-import olefile \
--hidden-import openpyxl \
--hidden-import docx \
--hidden-import pptx \
--hidden-import pypdf
deactivate
echo " Sidecar: python/dist/metalens-sidecar"
cd "$SCRIPT_DIR"
# 2. React frontend
echo ""
echo "[2/3] Building React frontend..."
cd frontend
npm install --silent
npm run build
echo " Frontend: frontend/dist/"
cd "$SCRIPT_DIR"
# 3. Electron Forge
echo ""
echo "[3/3] Packaging with Electron Forge..."
cd electron
npm install --silent
npx electron-forge make --platform=linux
echo " Output: electron/out/"
cd "$SCRIPT_DIR"
echo ""
echo "============================================"
echo " Build complete! Output in electron/out/"
echo "============================================"