IOPaint/scripts/pack.bat

31 lines
664 B
Batchfile
Raw Normal View History

2022-10-24 12:32:35 +02:00
@echo off
2022-10-25 08:41:01 +02:00
set "PYTHONNOUSERSITE=1"
2022-10-24 12:32:35 +02:00
SET BUILD_DIST=lama-cleaner
SET BUILD_ENV=installer
SET USER_SCRIPTS=user_scripts
2022-10-25 08:41:01 +02:00
echo Creating a distributable package..
@call conda env create --prefix %BUILD_ENV% -f environment.yaml
echo Finish creating environment
@call conda activate .\%BUILD_ENV%
@call conda install -c conda-forge -y conda-pack
@call conda pack --n-threads -1 --prefix %BUILD_ENV% --format tar
mkdir %BUILD_DIST%\%BUILD_ENV%
2022-10-24 12:32:35 +02:00
echo "Copy user scripts file %USER_SCRIPTS%"
2022-10-25 08:41:01 +02:00
copy %USER_SCRIPTS%\* %BUILD_DIST%
cd %BUILD_DIST%
@call tar -xf ..\%BUILD_ENV%.tar -C %BUILD_ENV%
cd ..
@call conda deactivate
rmdir /s /q %BUILD_ENV%
del %BUILD_ENV%.tar