Skip to content

Commit b3064c7

Browse files
committed
fix enchant lib/dicts discovery
1 parent 25983fb commit b3064c7

File tree

1 file changed

+12
-22
lines changed

1 file changed

+12
-22
lines changed

.github/scripts/windows/test_task.bat

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -82,33 +82,23 @@ mkdir %OPENSSLDIR%
8282
if %errorlevel% neq 0 exit /b 3
8383
copy %DEPS_DIR%\template\ssl\openssl.cnf %OPENSSLDIR%
8484
if %errorlevel% neq 0 exit /b 3
85-
rem set OPENSSL_CONF=%OPENSSLDIR%\openssl.cnf
86-
set OPENSSL_CONF=
87-
rem set SSLEAY_CONF=
85+
if /i "%APPVEYOR%" equ "True" (
86+
set OPENSSL_CONF=
87+
)
8888

8989
rem prepare for enchant
90-
mkdir C:\usr\local\lib\enchant-2
90+
mkdir %~d0\usr\local\lib\enchant-2
9191
if %errorlevel% neq 0 exit /b 3
92-
copy %DEPS_DIR%\bin\libenchant2_hunspell.dll C:\usr\local\lib\enchant-2
92+
copy %DEPS_DIR%\bin\libenchant2_hunspell.dll %~d0\usr\local\lib\enchant-2
9393
if %errorlevel% neq 0 exit /b 3
94-
reg add HKEY_CURRENT_USER\SOFTWARE\Enchant\Config /v Module_Dir /t REG_SZ /d c:\enchant_plugins
94+
mkdir %~d0\usr\local\share\enchant\hunspell
9595
if %errorlevel% neq 0 exit /b 3
96-
set PHP_BUILD_CACHE_ENCHANT_DICT_DIR=%PHP_BUILD_CACHE_BASE_DIR%\enchant_dict
97-
if not exist "%PHP_BUILD_CACHE_ENCHANT_DICT_DIR%" (
98-
echo Creating %PHP_BUILD_CACHE_ENCHANT_DICT_DIR%
99-
mkdir "%PHP_BUILD_CACHE_ENCHANT_DICT_DIR%"
100-
)
101-
if not exist "%PHP_BUILD_CACHE_ENCHANT_DICT_DIR%\en_US.aff" (
102-
echo Fetching enchant dicts
103-
pushd %PHP_BUILD_CACHE_ENCHANT_DICT_DIR%
104-
del /q *
105-
powershell -Command wget http://windows.php.net/downloads/qa/appveyor/ext/enchant/dict.zip -OutFile dict.zip
106-
unzip dict.zip
107-
del /q dict.zip
108-
popd
109-
)
110-
mkdir %LOCALAPPDATA%\enchant\hunspell
111-
copy %PHP_BUILD_CACHE_ENCHANT_DICT_DIR%\* %LOCALAPPDATA%\enchant\hunspell
96+
echo Fetching enchant dicts
97+
pushd %~d0\usr\local\share\enchant\hunspell
98+
powershell -Command wget http://windows.php.net/downloads/qa/appveyor/ext/enchant/dict.zip -OutFile dict.zip
99+
unzip dict.zip
100+
del /q dict.zip
101+
popd
112102

113103
set PHP_BUILD_DIR=%PHP_BUILD_OBJ_DIR%\Release
114104
if "%THREAD_SAFE%" neq "" set PHP_BUILD_DIR=%PHP_BUILD_DIR%_TS

0 commit comments

Comments
 (0)