From 72c24d9ded547f13d39418392547051c1a5f73c9 Mon Sep 17 00:00:00 2001 From: Dengke Tang Date: Thu, 23 Feb 2023 16:24:35 -0800 Subject: [PATCH] generate php-win.ini --- .github/workflows/ci.yml | 2 +- Makefile.frag.w32 | 8 +++----- php-win.ini | 8 +++----- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0579c33..da0ae23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -120,7 +120,7 @@ jobs: phpize .\configure --with-prefix=${{steps.setup-php-sdk.outputs.prefix}} --enable-awscrt=shared nmake - nmake install + nmake generate-php-ini .\dev-scripts\run_tests # windows-vc14: diff --git a/Makefile.frag.w32 b/Makefile.frag.w32 index 9ba2450..14cd941 100644 --- a/Makefile.frag.w32 +++ b/Makefile.frag.w32 @@ -1,6 +1,5 @@ CMAKE=cmake.exe -COMPOSER_PHAR=C:\ProgramData\ComposerSetup\bin\composer.phar PHP_BINARY=$(PHP_PREFIX)\php.exe CMAKE_CONFIGURE = $(CMAKE) -DCMAKE_INSTALL_PREFIX=$(AWSCRT_DIR)\build\install -DCMAKE_PREFIX_PATH=$(AWSCRT_DIR)\build\install -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) @@ -25,7 +24,6 @@ $(AWSCRT_DIR)\ext\awscrt.c: $(AWSCRT_DIR)\build\libaws-crt-ffi.lib $(AWSCRT_DIR) $(AWSCRT_DIR)\ext\api.h: $(AWSCRT_DIR)\crt\aws-crt-ffi\src\api.h php $(AWSCRT_DIR)\gen_api.php $(AWSCRT_DIR)\crt\aws-crt-ffi\src\api.h > $(AWSCRT_DIR)\ext\api.h -# Use PHPUnit to run tests -test-awscrt: install $(AWSCRT_DIR)\src\api.h $(BUILD_DIR)\php_awscrt.dll - $(PHP_BINARY) -c $(AWSCRT_DIR)\php-win.ini $(COMPOSER_PHAR) --working-dir=$(AWSCRT_DIR) update - $(PHP_BINARY) -c $(AWSCRT_DIR)\php-win.ini $(COMPOSER_PHAR) --working-dir=$(AWSCRT_DIR) run test-win +# Get the dll directory to load +generate-php-ini: + @echo extension=$(BUILD_DIR)\php_awscrt.dll > php-win.ini diff --git a/php-win.ini b/php-win.ini index 82a2508..31d5621 100644 --- a/php-win.ini +++ b/php-win.ini @@ -1,5 +1,3 @@ -; only works on 64bit build -extension=.\x64\Release_TS\php_awscrt.dll - -; extension=php_openssl.dll -; extension=php_mbstring.dll +extension_dir="ext" +extension=php_openssl.dll +extension=php_mbstring.dll \ No newline at end of file