mirror of
https://github.com/hanzoai/minutes.git
synced 2026-10-30 18:27:58 +00:00
A fork of meetily (MIT, Zackriya Solutions) rebranded to Hanzo. The Python/FastAPI tier, its Docker files, its whisper-server scripts and the whisper.cpp submodule are deleted rather than rebranded. Upstream's own CLAUDE.md says that tier is archived and unsupported and tells you not to add endpoints to it; the shipping product is one Tauri binary that transcribes in-process with whisper-rs and Parakeet. Rebranding a corpse would have doubled the surface and taught the next reader that a dead service is a live one. Going with it: the vestigial localhost:5167 gate the sidebar checked before reading its own database. .github/workflows goes too. This repo lives on git.hanzo.ai, which reads .hanzo/workflows, and we do not use GitHub-hosted runners โ six workflow files that cannot run read like CI that passes. Nothing replaces them yet, because a pipeline that has never run is worse than an honest absence. Summaries are written by api.hanzo.ai, our own stack, and it is the default. The other providers still compile and should go in a follow-up. The upstream MIT notice stays and the Hanzo copyright joins it. About and the README say plainly what this is a fork of. Left alone deliberately, and each is a decision someone must still make: the minisign updater key is upstream's and we cannot re-sign, so the updater points at a release path that does not exist yet; the ffmpeg binaries still come from upstream's GitHub; the Parakeet models still come from upstream's host. Co-authored-by: Hanzo Dev <[email protected]>
242 lines
8.2 KiB
Batchfile
242 lines
8.2 KiB
Batchfile
@echo off
|
|
REM Minutes GPU-Accelerated Development Script for Windows
|
|
REM Automatically detects and runs in development mode with optimal GPU features
|
|
REM Based on build-gpu.bat but for development (debug build, tauri dev)
|
|
|
|
REM Exit on error
|
|
setlocal enabledelayedexpansion
|
|
|
|
REM Check if help is requested
|
|
if "%~1" == "help" (
|
|
call :_print_help
|
|
exit /b 0
|
|
) else if "%~1" == "--help" (
|
|
call :_print_help
|
|
exit /b 0
|
|
) else if "%~1" == "-h" (
|
|
call :_print_help
|
|
exit /b 0
|
|
) else if "%~1" == "/?" (
|
|
call :_print_help
|
|
exit /b 0
|
|
)
|
|
|
|
echo.
|
|
echo ========================================
|
|
echo Minutes GPU-Accelerated Development
|
|
echo ========================================
|
|
echo.
|
|
|
|
echo.
|
|
|
|
REM Kill any existing processes on port 3118
|
|
echo ๐งน Checking for existing processes on port 3118...
|
|
for /f "tokens=5" %%a in ('netstat -aon ^| findstr :3118 2^>nul') do (
|
|
echo Killing process %%a on port 3118
|
|
taskkill /PID %%a /F >nul 2>&1
|
|
)
|
|
|
|
REM Set libclang path for whisper-rs-sys
|
|
set "LIBCLANG_PATH=C:\Program Files\LLVM\bin"
|
|
|
|
REM Try to find and setup Visual Studio environment
|
|
echo ๐ง Setting up Visual Studio environment...
|
|
if exist "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" (
|
|
echo Using Visual Studio 2022 Build Tools
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" >nul 2>&1
|
|
|
|
REM Manually set up the environment
|
|
set "LIB=C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\lib\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\ucrt\x64"
|
|
set "INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt"
|
|
set "PATH=C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\bin\HostX64\x64;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64;%PATH%"
|
|
) else if exist "C:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" (
|
|
echo Using Visual Studio 2022 Build Tools
|
|
call "C:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" >nul 2>&1
|
|
) else if exist "C:\Program Files (x86)\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" (
|
|
echo Using Visual Studio 2022 Community
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" >nul 2>&1
|
|
) else if exist "C:\Program Files (x86)\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat" (
|
|
echo Using Visual Studio 2022 Professional
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat" >nul 2>&1
|
|
) else if exist "C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" (
|
|
echo Using Visual Studio 2022 Enterprise
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" >nul 2>&1
|
|
) else if exist "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" (
|
|
echo Using Visual Studio 2019 Build Tools
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" >nul 2>&1
|
|
) else (
|
|
echo โ ๏ธ Visual Studio not found, using manual SDK setup
|
|
set "WindowsSDKVersion=10.0.22621.0"
|
|
set "WindowsSDKLibVersion=10.0.22621.0"
|
|
set "WindowsSDKIncludeVersion=10.0.22621.0"
|
|
set "LIB=C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\ucrt\x64;%LIB%"
|
|
set "INCLUDE=C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt;%INCLUDE%"
|
|
set "PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64;%PATH%"
|
|
)
|
|
|
|
REM Export environment variables for the child process
|
|
set "RUST_ENV_LIB=%LIB%"
|
|
set "RUST_ENV_INCLUDE=%INCLUDE%"
|
|
|
|
echo.
|
|
echo ๐ฆ Starting Minutes in development mode...
|
|
echo.
|
|
|
|
REM Find package.json location
|
|
if exist "package.json" (
|
|
echo Found package.json in current directory
|
|
) else if exist "frontend\package.json" (
|
|
echo Found package.json in frontend directory
|
|
cd frontend
|
|
) else (
|
|
echo โ Error: Could not find package.json
|
|
echo Make sure you're in the project root or frontend directory
|
|
exit /b 1
|
|
)
|
|
|
|
REM Check if pnpm or npm is available
|
|
where pnpm >nul 2>&1
|
|
if %errorlevel% equ 0 (
|
|
set "USE_PNPM=1"
|
|
) else (
|
|
set "USE_PNPM=0"
|
|
)
|
|
|
|
where npm >nul 2>&1
|
|
if %errorlevel% equ 0 (
|
|
set "USE_NPM=1"
|
|
) else (
|
|
set "USE_NPM=0"
|
|
)
|
|
|
|
if %USE_PNPM% equ 0 (
|
|
if %USE_NPM% equ 0 (
|
|
echo โ Error: Neither npm nor pnpm found
|
|
exit /b 1
|
|
)
|
|
)
|
|
|
|
REM Detect GPU feature
|
|
echo ๐ Detecting GPU features...
|
|
for /f "delims=" %%i in ('node scripts/auto-detect-gpu.js') do set TAURI_GPU_FEATURE=%%i
|
|
|
|
if defined TAURI_GPU_FEATURE (
|
|
echo โ
Detected GPU feature: !TAURI_GPU_FEATURE!
|
|
) else (
|
|
echo โ ๏ธ No specific GPU feature detected or forced
|
|
)
|
|
|
|
REM Build llama-helper
|
|
echo.
|
|
echo ๐ฆ Building llama-helper sidecar (debug)...
|
|
|
|
set "HELPER_DIR=..\llama-helper"
|
|
if not exist "%HELPER_DIR%" (
|
|
echo โ Could not find llama-helper directory at %HELPER_DIR%
|
|
exit /b 1
|
|
)
|
|
|
|
set "HELPER_FEATURES="
|
|
if defined TAURI_GPU_FEATURE (
|
|
set "HELPER_FEATURES=--features !TAURI_GPU_FEATURE!"
|
|
)
|
|
|
|
echo Building in %HELPER_DIR% with features: %HELPER_FEATURES%
|
|
pushd "%HELPER_DIR%"
|
|
call cargo build %HELPER_FEATURES%
|
|
if errorlevel 1 (
|
|
echo โ Failed to build llama-helper
|
|
popd
|
|
exit /b 1
|
|
)
|
|
popd
|
|
echo โ
llama-helper built successfully
|
|
|
|
REM Detect target triple
|
|
echo.
|
|
echo ๐ฏ Detecting target triple...
|
|
for /f "tokens=2" %%i in ('rustc -vV ^| findstr "host:"') do set TARGET_TRIPLE=%%i
|
|
echo Target: !TARGET_TRIPLE!
|
|
|
|
REM Copy binary
|
|
set "BINARIES_DIR=src-tauri\binaries"
|
|
if not exist "%BINARIES_DIR%" mkdir "%BINARIES_DIR%"
|
|
|
|
REM Clean old binaries
|
|
del /q "%BINARIES_DIR%\llama-helper*" 2>nul
|
|
|
|
set "BASE_BINARY=llama-helper.exe"
|
|
set "SIDECAR_BINARY=llama-helper-!TARGET_TRIPLE!.exe"
|
|
set "SRC_PATH=..\target\debug\%BASE_BINARY%"
|
|
set "DEST_PATH=%BINARIES_DIR%\%SIDECAR_BINARY%"
|
|
|
|
if not exist "%SRC_PATH%" (
|
|
REM Fallback check
|
|
set "SRC_PATH=target\debug\%BASE_BINARY%"
|
|
)
|
|
|
|
if exist "%SRC_PATH%" (
|
|
copy /Y "%SRC_PATH%" "%DEST_PATH%" >nul
|
|
echo โ
Copied binary to %DEST_PATH%
|
|
) else (
|
|
echo โ Binary not found at %SRC_PATH%
|
|
echo โ ๏ธ Contents of ..\target\debug:
|
|
dir "..\target\debug"
|
|
exit /b 1
|
|
)
|
|
|
|
REM Run tauri dev
|
|
echo.
|
|
echo ๐ฆ Starting complete Tauri application...
|
|
echo.
|
|
|
|
if %USE_PNPM% equ 1 (
|
|
call pnpm run tauri:dev
|
|
) else (
|
|
call npm run tauri:dev
|
|
)
|
|
|
|
if errorlevel 1 (
|
|
echo.
|
|
echo โ Development server encountered an error
|
|
exit /b 1
|
|
)
|
|
|
|
echo.
|
|
echo ========================================
|
|
echo โ
Development server stopped cleanly
|
|
echo ========================================
|
|
echo.
|
|
exit /b 0
|
|
|
|
:_print_help
|
|
echo.
|
|
echo ========================================
|
|
echo Minutes GPU Development Script - Help
|
|
echo ========================================
|
|
echo.
|
|
echo USAGE:
|
|
echo dev-gpu.bat [OPTION]
|
|
echo.
|
|
echo OPTIONS:
|
|
echo help Show this help message
|
|
echo --help Show this help message
|
|
echo -h Show this help message
|
|
echo /? Show this help message
|
|
echo.
|
|
echo DESCRIPTION:
|
|
echo This script automatically detects your GPU and runs
|
|
echo Minutes in development mode with optimal hardware acceleration:
|
|
echo.
|
|
echo - NVIDIA GPU : Builds with CUDA acceleration
|
|
echo - AMD/Intel GPU : Builds with Vulkan acceleration
|
|
echo - No GPU : Builds with OpenBLAS CPU optimization
|
|
echo.
|
|
echo REQUIREMENTS:
|
|
echo - Visual Studio 2022 Build Tools
|
|
echo - Windows SDK 10.0.22621.0 or compatible
|
|
echo - Rust toolchain installed
|
|
echo - LLVM installed at C:\Program Files\LLVM\bin
|
|
echo.
|
|
echo ========================================
|
|
exit /b 0 |