@mytec: iter2.1 ready for testing
This commit is contained in:
38
installer/build-linux.sh
Normal file
38
installer/build-linux.sh
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "========================================="
|
||||
echo " RFCP Desktop Build (Linux)"
|
||||
echo "========================================="
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# 1. Build frontend
|
||||
echo "[1/4] Building frontend..."
|
||||
cd frontend
|
||||
npm ci
|
||||
npm run build
|
||||
cd ..
|
||||
|
||||
# 2. Build backend with PyInstaller
|
||||
echo "[2/4] Building backend..."
|
||||
cd backend
|
||||
python3 -m pip install -r requirements.txt
|
||||
python3 -m pip install pyinstaller
|
||||
cd ../installer
|
||||
python3 -m PyInstaller rfcp-server.spec --clean --noconfirm
|
||||
mkdir -p ../desktop/backend-dist/linux
|
||||
cp dist/rfcp-server ../desktop/backend-dist/linux/
|
||||
cd ..
|
||||
|
||||
# 3. Build Electron app
|
||||
echo "[3/4] Building Electron app..."
|
||||
cd desktop
|
||||
npm ci
|
||||
npm run build:linux
|
||||
cd ..
|
||||
|
||||
# 4. Done
|
||||
echo "[4/4] Build complete!"
|
||||
ls -la desktop/dist/*.AppImage 2>/dev/null || echo "AppImage in desktop/dist/"
|
||||
ls -la desktop/dist/*.deb 2>/dev/null || echo "Deb in desktop/dist/"
|
||||
61
installer/build-mac.sh
Normal file
61
installer/build-mac.sh
Normal file
@@ -0,0 +1,61 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "========================================="
|
||||
echo " RFCP Desktop Build (macOS)"
|
||||
echo "========================================="
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Check if running on macOS
|
||||
if [[ "$(uname)" != "Darwin" ]]; then
|
||||
echo "Error: This script must run on macOS"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 1. Build frontend
|
||||
echo "[1/4] Building frontend..."
|
||||
cd frontend
|
||||
npm ci
|
||||
npm run build
|
||||
cd ..
|
||||
|
||||
# 2. Build backend with PyInstaller
|
||||
echo "[2/4] Building backend..."
|
||||
cd backend
|
||||
python3 -m pip install -r requirements.txt
|
||||
python3 -m pip install pyinstaller
|
||||
cd ../installer
|
||||
python3 -m PyInstaller rfcp-server.spec --clean --noconfirm
|
||||
mkdir -p ../desktop/backend-dist/darwin
|
||||
cp dist/rfcp-server ../desktop/backend-dist/darwin/
|
||||
cd ..
|
||||
|
||||
# 3. Create .icns icon if not exists
|
||||
if [ ! -f desktop/assets/icon.icns ]; then
|
||||
echo "Creating macOS icon..."
|
||||
mkdir -p icon.iconset
|
||||
sips -z 16 16 desktop/assets/icon.png --out icon.iconset/icon_16x16.png
|
||||
sips -z 32 32 desktop/assets/icon.png --out icon.iconset/icon_16x16@2x.png
|
||||
sips -z 32 32 desktop/assets/icon.png --out icon.iconset/icon_32x32.png
|
||||
sips -z 64 64 desktop/assets/icon.png --out icon.iconset/icon_32x32@2x.png
|
||||
sips -z 128 128 desktop/assets/icon.png --out icon.iconset/icon_128x128.png
|
||||
sips -z 256 256 desktop/assets/icon.png --out icon.iconset/icon_128x128@2x.png
|
||||
sips -z 256 256 desktop/assets/icon.png --out icon.iconset/icon_256x256.png
|
||||
sips -z 512 512 desktop/assets/icon.png --out icon.iconset/icon_256x256@2x.png
|
||||
sips -z 512 512 desktop/assets/icon.png --out icon.iconset/icon_512x512.png
|
||||
sips -z 1024 1024 desktop/assets/icon.png --out icon.iconset/icon_512x512@2x.png
|
||||
iconutil -c icns icon.iconset -o desktop/assets/icon.icns
|
||||
rm -rf icon.iconset
|
||||
fi
|
||||
|
||||
# 4. Build Electron app
|
||||
echo "[3/4] Building Electron app..."
|
||||
cd desktop
|
||||
npm ci
|
||||
npm run build:mac
|
||||
cd ..
|
||||
|
||||
# 5. Done
|
||||
echo "[4/4] Build complete!"
|
||||
ls -la desktop/dist/*.dmg 2>/dev/null || echo "DMG in desktop/dist/"
|
||||
39
installer/build-win.sh
Normal file
39
installer/build-win.sh
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "========================================="
|
||||
echo " RFCP Desktop Build (Windows)"
|
||||
echo "========================================="
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# 1. Build frontend
|
||||
echo "[1/4] Building frontend..."
|
||||
cd frontend
|
||||
npm ci
|
||||
npm run build
|
||||
cd ..
|
||||
|
||||
# 2. Build backend with PyInstaller
|
||||
echo "[2/4] Building backend..."
|
||||
cd backend
|
||||
python -m pip install -r requirements.txt
|
||||
python -m pip install pyinstaller
|
||||
cd ../installer
|
||||
python -m PyInstaller rfcp-server.spec --clean --noconfirm
|
||||
mkdir -p ../desktop/backend-dist/win32
|
||||
cp dist/rfcp-server.exe ../desktop/backend-dist/win32/
|
||||
cd ..
|
||||
|
||||
# 3. Build Electron app
|
||||
echo "[3/4] Building Electron app..."
|
||||
cd desktop
|
||||
npm ci
|
||||
npm run build:win
|
||||
cd ..
|
||||
|
||||
# 4. Done
|
||||
echo "[4/4] Build complete!"
|
||||
echo ""
|
||||
echo "Output: desktop/dist/"
|
||||
ls -la desktop/dist/*.exe 2>/dev/null || echo "Build artifacts in desktop/dist/"
|
||||
67
installer/rfcp-server.spec
Normal file
67
installer/rfcp-server.spec
Normal file
@@ -0,0 +1,67 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
block_cipher = None
|
||||
backend_path = Path('../backend')
|
||||
|
||||
a = Analysis(
|
||||
[str(backend_path / 'run_server.py')],
|
||||
pathex=[str(backend_path)],
|
||||
binaries=[],
|
||||
datas=[
|
||||
(str(backend_path / 'app'), 'app'),
|
||||
],
|
||||
hiddenimports=[
|
||||
'uvicorn.logging',
|
||||
'uvicorn.protocols.http',
|
||||
'uvicorn.protocols.http.auto',
|
||||
'uvicorn.protocols.http.h11_impl',
|
||||
'uvicorn.protocols.websockets',
|
||||
'uvicorn.protocols.websockets.auto',
|
||||
'uvicorn.lifespan',
|
||||
'uvicorn.lifespan.on',
|
||||
'uvicorn.lifespan.off',
|
||||
'httpx',
|
||||
'h11',
|
||||
'numpy',
|
||||
'scipy',
|
||||
'scipy.special',
|
||||
'scipy.interpolate',
|
||||
'aiosqlite',
|
||||
'sqlalchemy',
|
||||
'sqlalchemy.dialects.sqlite',
|
||||
],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=['tkinter', 'matplotlib', 'PIL', 'pandas', 'IPython'],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=block_cipher,
|
||||
noarchive=False,
|
||||
)
|
||||
|
||||
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
|
||||
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
[],
|
||||
name='rfcp-server',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=False, # No console window
|
||||
disable_windowed_traceback=False,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
icon='../desktop/assets/icon.ico' if sys.platform == 'win32' else None,
|
||||
)
|
||||
Reference in New Issue
Block a user