From ba5306eea91f9f8be26f08d40cd8f2be21118edf Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Fri, 4 Oct 2019 13:30:16 +0530 Subject: [PATCH] Use pre-compiled PCOV binary for PHP7.4 on windows --- __tests__/utils.test.ts | 1 + lib/utils.js | 20 +++++++++++--------- package-lock.json | 2 +- package.json | 2 +- src/ext/php_pcov.dll | Bin 0 -> 27136 bytes src/scripts/win32.ps1 | 6 ++++-- src/utils.ts | 36 +++++++++++++++--------------------- 7 files changed, 33 insertions(+), 34 deletions(-) create mode 100644 src/ext/php_pcov.dll diff --git a/__tests__/utils.test.ts b/__tests__/utils.test.ts index 849e4a19..da5fdec5 100644 --- a/__tests__/utils.test.ts +++ b/__tests__/utils.test.ts @@ -56,6 +56,7 @@ describe('Utils tests', () => { expect(await utils.readScript('darwin.sh', '7.3', 'darwin')).toBe(darwin); expect(await utils.readScript('linux.sh', '7.4', 'linux')).toBe(linux); expect(await utils.readScript('linux.sh', '7.3', 'linux')).toBe(linux); + expect(await utils.readScript('win32.ps1', '7.4', 'win32')).toBe(win32); expect(await utils.readScript('win32.ps1', '7.3', 'win32')).toBe(win32); expect(await utils.readScript('fedora.sh', '7.3', 'fedora')).toContain( 'Platform fedora is not supported' diff --git a/lib/utils.js b/lib/utils.js index 28e7f65e..26155909 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -79,24 +79,26 @@ function readScript(filename, version, os_version) { 'scripts/pcov.sh' ]); return fs.readFileSync(path.join(__dirname, '../src/scripts/7.4.sh'), 'utf8'); - case '7.3': - default: - return fs.readFileSync(path.join(__dirname, '../src/scripts/' + filename), 'utf8'); } + break; case 'linux': switch (version) { case '7.4': yield readFiles74(['scripts/xdebug.sh', 'scripts/pcov.sh']); - return fs.readFileSync(path.join(__dirname, '../src/scripts/' + filename), 'utf8'); - case '7.3': - default: - return fs.readFileSync(path.join(__dirname, '../src/scripts/' + filename), 'utf8'); + break; } + break; case 'win32': - return fs.readFileSync(path.join(__dirname, '../src/scripts/' + filename), 'utf8'); + switch (version) { + case '7.4': + yield readFiles74(['ext/php_pcov.dll']); + break; + } + break; default: return yield log('Platform ' + os_version + ' is not supported', os_version, 'error'); } + return fs.readFileSync(path.join(__dirname, '../src/scripts/' + filename), 'utf8'); }); } exports.readScript = readScript; @@ -179,7 +181,7 @@ function log(message, os_version, log_type) { exports.log = log; function getExtensionPrefix(extension) { return __awaiter(this, void 0, void 0, function* () { - let zend = ['xdebug', 'opcache']; + let zend = ['xdebug', 'opcache', 'ioncube', 'eaccelerator']; switch (zend.indexOf(extension)) { case 0: case 1: diff --git a/package-lock.json b/package-lock.json index 912c5586..b3b3be0b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "setup-php", - "version": "1.3.7", + "version": "1.3.8", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a28afecd..6b8a1712 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "setup-php", - "version": "1.3.7", + "version": "1.3.8", "private": false, "description": "Setup php action", "main": "lib/setup-php.js", diff --git a/src/ext/php_pcov.dll b/src/ext/php_pcov.dll new file mode 100644 index 0000000000000000000000000000000000000000..a63db08da2df863695aef0bc9115ab773a2f969a GIT binary patch literal 27136 zcmeHw3w&F}mG{V&Z6zp?lG@;aOGHqLY3!hvZP}8I96#cKlPIxc8}d*bTaIk}5c0iw z&;T~qE>>vb5K?L!Zr22_FjWO(6cqr++}EK?(Xgp3|qX0fY@zl?>1Dft}}G?w0f7$ znKRoMB|WQb@%ojXn>DdidEH6P&B!k-x@p#G{#-Synm7s=lA~C##q@YmU7Ky zs=0br21u>~)mP%FM{@JLp1-FsmaY`XpKKoh5bAA@GM2(z<-8KrqYC_~JPhm6E})%w z?xEs7#-=Xf4)DE*+{n{C0s6|7w~rW0FnAmGT;JkO+dn{>mp8)%m0@9XbD8JY-^Za&U(_%^sVxo zJYdS&`-A-??x*cA9J$h{KFV0grIN-~;s+zglP~GCz9AwQbL4^{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qza981Ap36JNq~72kcMVe` z$rnlnOLmuhz2y5Pua~@8GFhT>XdH7LS2?VXn;nA=+3|?upB&FQUUB@|@$Zf)ht|2k zdA+mHS>bd$H#%=~e!=-A=l7k%&KI1&bxt_naZWl}X=dqlrTL}yQdenB>6+5U(oLl; zrJbch>CV!-O21h8aOrnS50xG({YB}i(s1cJrRPfjQaZaVvn;1>_MNgrWus-|Wp9_AEla;qd*cl^-cCWS0pGab@rdb{&{Ue)ZZ0=3H`kjx%tPk; z%@3I$Ge2W~)BJn$r1^q5%VM-tSlpJamhF~%Ee~4$-g3Y)W_i={KD75aYq7P~y3V@Z z+G!0~@3%f@{gaj1=Gm^a8Ek88UfaF4hiw03`@QW$TSmck1!V=d7xow4TX?eY9Y`~y z_>0BOj@upE9q%|)&MfD>&Ig?*oS!fCmu@fJSk_tgOxd$HQm{;G%%!FWOe*sh^V)*V z1rHTu6wNI%*`4-2`@Z7GiVqY&QT$}_Q^g01pDi9PK2khZe7yKX@z07+7Qb11s`#zq zaB*MBK*>7leutq1>3#H^kvgGP2V#eHdUKN^F8KA%?Hef z%ty_ynis%U-IiM|KFb}JFI#?#9)HI=VNJ7@*eYzRZ0l^I?F+Vk^f6@nitVem{k8+P z@7jJ~`;qMk?DuE3H*I0tJFwy@TY7=Mz))Z+a22d5@D*$?=qm^nJX-L}fih5cH))m~}8)!t(tu*E}xGN-eOnveHVD2?F5(dYJW=OiK=u`$#?oZj zU}?2QC*noJu^n@z1IA1vc<*MGMJ{x7@w0B8UJ literal 0 HcmV?d00001 diff --git a/src/scripts/win32.ps1 b/src/scripts/win32.ps1 index 82c60ca1..50658cf6 100644 --- a/src/scripts/win32.ps1 +++ b/src/scripts/win32.ps1 @@ -26,16 +26,18 @@ if($installed -ne $version) { } echo "Housekeeping in PHP.ini, enabling openssl" +$ext_dir = "C:\tools\php\ext" Add-Content C:\tools\php\php.ini "date.timezone = 'UTC'" -Set-PhpIniKey extension_dir C:\tools\php\ext +Set-PhpIniKey extension_dir $ext_dir + if($version -lt '7.4') { Enable-PhpExtension openssl } else { Add-Content C:\tools\php\php.ini "extension=php_openssl.dll" + Copy-Item "php_pcov.dll" -Destination $ext_dir"\php_pcov.dll" } echo "Installing Composer" Install-Composer -Scope System -Path C:\tools\php -$ext_dir = Get-PhpIniKey extension_dir php -v composer -V \ No newline at end of file diff --git a/src/utils.ts b/src/utils.ts index 89836723..b2bffb8f 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -70,33 +70,22 @@ export async function readScript( path.join(__dirname, '../src/scripts/7.4.sh'), 'utf8' ); - case '7.3': - default: - return fs.readFileSync( - path.join(__dirname, '../src/scripts/' + filename), - 'utf8' - ); } + break; case 'linux': switch (version) { case '7.4': await readFiles74(['scripts/xdebug.sh', 'scripts/pcov.sh']); - return fs.readFileSync( - path.join(__dirname, '../src/scripts/' + filename), - 'utf8' - ); - case '7.3': - default: - return fs.readFileSync( - path.join(__dirname, '../src/scripts/' + filename), - 'utf8' - ); + break; } + break; case 'win32': - return fs.readFileSync( - path.join(__dirname, '../src/scripts/' + filename), - 'utf8' - ); + switch (version) { + case '7.4': + await readFiles74(['ext/php_pcov.dll']); + break; + } + break; default: return await log( 'Platform ' + os_version + ' is not supported', @@ -104,6 +93,11 @@ export async function readScript( 'error' ); } + + return fs.readFileSync( + path.join(__dirname, '../src/scripts/' + filename), + 'utf8' + ); } /** @@ -189,7 +183,7 @@ export async function log( } export async function getExtensionPrefix(extension: string): Promise { - let zend: Array = ['xdebug', 'opcache']; + let zend: Array = ['xdebug', 'opcache', 'ioncube', 'eaccelerator']; switch (zend.indexOf(extension)) { case 0: case 1: