@echo off

path %OSGEO4W_ROOT%\apps\qt5\bin;%PATH%

findstr "Paths/5" "%OSGEO4W_ROOT%\bin\qt.conf" >nul
if errorlevel 1 (
	copy "%OSGEO4W_ROOT%\bin\qt.conf" "%TEMP%\qt-temp.conf"
	copy "%OSGEO4W_ROOT%\bin\qt5.conf"+"%TEMP%\qt-temp.conf" "%OSGEO4W_ROOT%\bin\qt.conf"
)

set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\Qt5\plugins
