fix(imagemagick): build the VisualMagick tree under source/ on windows

- C:\im was outside the project so bin/spc reset could not clean it
- with the command line limit fixed a short base path is no longer
  needed; keep SPC_IMAGEMAGICK_BUILD_DIR as an override
This commit is contained in:
m-this
2026-07-10 10:52:14 +02:00
parent c54fa78ad1
commit 6d58d53f7d

View File

@@ -25,13 +25,13 @@ class imagemagick
* msbuild. The resulting CORE_RL_*.lib static libraries + MagickWand/MagickCore headers are
* installed into the build root for ext-imagick to link.
*
* A short working directory is used (VisualMagick's tree is deeply nested and otherwise exceeds
* MAX_PATH); override with SPC_IMAGEMAGICK_BUILD_DIR.
* The VisualMagick tree lives under source/ so bin/spc reset cleans it up like everything
* else; override the location with SPC_IMAGEMAGICK_BUILD_DIR.
*/
#[BuildFor('Windows')]
public function buildWin(LibraryPackage $lib): void
{
$work = getenv('SPC_IMAGEMAGICK_BUILD_DIR') ?: 'C:\im';
$work = getenv('SPC_IMAGEMAGICK_BUILD_DIR') ?: SOURCE_PATH . '\imagemagick-win';
$configure_release = '2026.05.30.2033';
$configure_url = "https://github.com/ImageMagick/Configure/releases/download/{$configure_release}/Configure.Release.x64.exe";