-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·37 lines (31 loc) · 930 Bytes
/
build.sh
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
#!/bin/bash
# Build script for Linux Whisper Notepad application
# Check if virtual environment exists and activate it
if [ -d ".venv" ]; then
echo "Activating virtual environment..."
source .venv/bin/activate
fi
# Ensure PyInstaller is installed
if ! pip show pyinstaller > /dev/null; then
echo "Installing PyInstaller..."
pip install pyinstaller
fi
# Clean previous build if it exists
if [ -d "dist" ] || [ -d "build" ]; then
echo "Cleaning previous build..."
rm -rf dist build
fi
# Create the executable using the spec file
echo "Building executable..."
pyinstaller Linux-Whisper-Notepad.spec
# Check if build was successful
if [ -f "dist/Linux-Whisper-Notepad" ]; then
echo "Build successful! Executable is located at: dist/Linux-Whisper-Notepad"
else
echo "Build failed."
exit 1
fi
# Deactivate virtual environment if it was activated
if [ -n "$VIRTUAL_ENV" ]; then
deactivate
fi