mirror of https://github.com/bmaltais/kohya_ss
Detect run by doucle-click
parent
3fdb33384e
commit
41fbcdcaaf
12
gui.bat
12
gui.bat
|
|
@ -1,4 +1,5 @@
|
|||
@echo off
|
||||
|
||||
:: Deactivate the virtual environment
|
||||
call .\venv\Scripts\deactivate.bat
|
||||
|
||||
|
|
@ -14,5 +15,12 @@ python.exe .\setup\validate_requirements.py
|
|||
|
||||
:: If the exit code is 0, run the kohya_gui.py script with the command-line arguments
|
||||
if %errorlevel% equ 0 (
|
||||
cmd /k python.exe kohya_gui.py %*
|
||||
)
|
||||
REM Check if the batch was started via double-click
|
||||
IF /i "%comspec% /c %~0 " equ "%cmdcmdline:"=%" (
|
||||
REM echo This script was started by double clicking.
|
||||
cmd /k python.exe kohya_gui.py %*
|
||||
) ELSE (
|
||||
REM echo This script was started from a command prompt.
|
||||
python.exe kohya_gui.py %*
|
||||
)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,14 @@ python .\setup\check_local_modules.py
|
|||
|
||||
call .\venv\Scripts\activate.bat
|
||||
|
||||
cmd /k python .\setup\setup_windows.py
|
||||
REM Check if the batch was started via double-click
|
||||
IF /i "%comspec% /c %~0 " equ "%cmdcmdline:"=%" (
|
||||
REM echo This script was started by double clicking.
|
||||
cmd /k python .\setup\setup_windows.py
|
||||
) ELSE (
|
||||
REM echo This script was started from a command prompt.
|
||||
python .\setup\setup_windows.py
|
||||
)
|
||||
|
||||
:: Deactivate the virtual environment
|
||||
call .\venv\Scripts\deactivate.bat
|
||||
Loading…
Reference in New Issue