File size: 1,737 Bytes
05fcd0f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@echo off
echo FramePack-Studio Update Script



REM Check if Git is installed (basic check)
where git >nul 2>&1
if %errorlevel% neq 0 (
    echo Error: Git is not installed or not in your PATH. Unable to update.
    goto end
)



REM Check if Python is installed (basic check)
where python >nul 2>&1
if %errorlevel% neq 0 (
    echo Error: Python is not installed or not in your PATH. Unable to update dependencies.

    REM Continue with Git pull, but warn about dependencies
    echo Warning: Python is not available, skipping dependency update.
    goto git_pull
)


:git_pull
echo Pulling latest changes from Git...
git pull



REM Check if git pull was successful
if %errorlevel% neq 0 (
    echo Error: Failed to pull latest changes from Git. Please resolve any conflicts manually.
    goto end
)

echo Git pull successful.



REM Attempt to update dependencies if Virtual Environment is available
if exist "%cd%/venv/Scripts/python.exe" (

if %errorlevel% equ 0 (
    echo Updating dependencies using pip...

    REM This assumes there's a requirements.txt file in the root

    REM Using --upgrade to update existing packages
    "%cd%/venv/Scripts/python.exe" -m pip install --upgrade -r requirements.txt



    REM Check if pip update was successful
    if %errorlevel% neq 0 (
        echo Warning: Failed to update dependencies. You may need to update them manually.
    ) else (
        echo Dependency update successful.
    )
) else (
    echo Skipping dependency update as Python is not available.
)

) else (

echo Error: Virtual Environment for Python not found. Did you install correctly?
goto end 

)



echo Update complete.

:end
echo Exiting update script.
pause