forked from FudanCVL/SAM2Matting
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
38 lines (33 loc) · 1.05 KB
/
Copy pathbuild.bat
File metadata and controls
38 lines (33 loc) · 1.05 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
@echo off
echo Building SAM2Matting portable GUI executable...
REM Check if virtual environment exists
if not exist venv (
echo Virtual environment not found. Running the launcher once to build it...
pwsh -NoProfile -ExecutionPolicy Bypass -File "%~dp0launcher.ps1" --setup-only
if not exist venv (
echo Setup failed. Run launcher.ps1 manually to see the error.
pause
exit /b 1
)
)
echo Installing PyInstaller...
venv\Scripts\python.exe -m pip install pyinstaller -q
if %ERRORLEVEL% NEQ 0 (
echo Failed to install PyInstaller.
pause
exit /b 1
)
echo Building executable...
venv\Scripts\python.exe -m PyInstaller SAM2MattingPortableGUI.spec --noconfirm
if %ERRORLEVEL% NEQ 0 (
echo Build failed.
pause
exit /b 1
)
echo.
echo Build successful!
echo The executable can be found in the 'dist' folder: dist\SAM2MattingPortableGUI.exe
echo On first run it downloads Python plus ~3.5 GB of dependencies next to itself;
echo model checkpoints are downloaded automatically on the first matting run.
echo.
pause