|
@echo off |
|
echo Updater by Derur |
|
set pypath=home = %~dp0python |
|
set venvpath=_ENV=%~dp0venv |
|
if exist venv ( |
|
powershell -command "$text = (gc venv\pyvenv.cfg) -replace 'home = .*', $env:pypath; $Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding($False);[System.IO.File]::WriteAllLines('venv\pyvenv.cfg', $text, $Utf8NoBomEncoding);$text = (gc venv\scripts\activate.bat) -replace '_ENV=.*', $env:venvpath; $Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding($False);[System.IO.File]::WriteAllLines('venv\scripts\activate.bat', $text, $Utf8NoBomEncoding);" |
|
) |
|
|
|
for /d %%i in (tmp\tmp*,tmp\pip*) do rd /s /q "%%i" 2>nul || ("%%i" && exit /b 1) & del /q tmp\tmp* > nul 2>&1 & rd /s /q pip\cache 2>nul |
|
|
|
set appdata=%~dp0tmp |
|
set userprofile=%~dp0tmp |
|
set temp=%~dp0tmp |
|
set PATH=%~dp0python;%~dp0venv\scripts; |
|
|
|
set HF_DATASETS_OFFLINE=0 |
|
set HF_HUB_OFFLINE=0 |
|
|
|
call venv\Scripts\activate.bat |
|
|
|
python -m pip install -U pip g4f g4f[all] g4f[gui] g4f[image] g4f[webdriver] aiohttp_socks browser_cookie3 undetected-chromedriver |
|
|
|
pause |
|
|