Closed
Description
$vipshome = getenv("VIPSHOME");
if ($vipshome) {
// lib<qual>/ predicates lib/
$libraryPaths[] = $vipshome . ($is_64bits ? "/lib64/" : "/lib32/");
// lib/ is always searched
$libraryPaths[] = $vipshome . "/lib/";
}
How should VIPSHOME
be configured on Windows?
The Windows download contains a bin
and a lib
subdirectory, however the library itself (libvips-42.dll
) is in the bin
.
Assuming I downloaded the package to C:\vips
,
- when
VIPSHOME=C:\vips
, the library will be searched inC:\vips\lib
- the path exists, but the library doesn't - when
VIPSHOME=C:\vips\bin
, the library will be searched inC:\vips\bin\lib
, which doesn't exist
I see the following options:
- simply add
VIPSHOME
as a potential library location (without a platform check; might be useful to other platforms, not just Window):if ($vipshome) { $libraryPaths[] = $vipshome . '/'; …
- make it support the Windows structure differently:
if ($vipshome) { if (PHP_OS_FAMILY === "Windows") { $libraryPaths[] = $vipshome . '/'; } else { // lib<qual>/ predicates lib/ $libraryPaths[] = $vipshome . ($is_64bits ? "/lib64/" : "/lib32/"); // lib/ is always searched $libraryPaths[] = $vipshome . "/lib/"; } }
- show an error on Windows:
if ($vipshome) { if (PHP_OS_FAMILY === "Windows") { throw new RuntimeException('VIPSHOME is not supported on Windows'); } …
Metadata
Metadata
Assignees
Labels
No labels