23 lines
748 B
Bash
Executable File
23 lines
748 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "Building SMB Prowl PyInstaller executable..."
|
|
|
|
# Clean previous builds (preserve smb_prowl.spec if it exists)
|
|
rm -rf build dist
|
|
# Only remove auto-generated spec files, not the template
|
|
find . -maxdepth 1 -name "*.spec" ! -name "smb_prowl.spec" -delete 2>/dev/null || true
|
|
|
|
# Use the virtual environment's Python directly
|
|
if [ -d "venv" ]; then
|
|
echo "Using virtual environment Python: ./venv/bin/python3"
|
|
PYTHON_CMD="./venv/bin/python3"
|
|
else
|
|
echo "No virtual environment found, using system Python"
|
|
PYTHON_CMD="python3"
|
|
fi
|
|
|
|
# Build executable using the specified Python
|
|
$PYTHON_CMD -m PyInstaller --onefile --clean --additional-hooks-dir=hooks smb_prowl.py
|
|
|
|
echo "Build complete! Executable is in dist/smb_prowl"
|