build.xml will currently allow .dlls that do now pass sigchec -q MYFILENAME.dll so we need to modify it to test it against sigchecks "description" and "MachineType" values to be sure they are not "n/a"
using this target as the basis of the test ( which currently doesn't function ) modify build.xml
.dll doesn't have necessary data fail with message and audio & sigcheck output
Currently output is:
BUILD FAILED
E:\Bearsampp-development\dev\build\build-bundle.xml:183: The following error occurred while executing this line:
E:\Bearsampp-development\dev\build\build-bundle.xml:154: The following error occurred while executing this line:
E:\Bearsampp-development\module-php\build.xml:149: The following error occurred while executing this line:
E:\Bearsampp-development\module-php\build.xml:180: Sigcheck failed for file E:\Bearsampp-development\bearsampp-build\tmp\dl/php_xdebug-3.3.2-8.2-vs16-x86_64.dll: Description='${description}', MachineType='${machine.type}'
youi can see that the variables are not being populated
<target name="sigcheck" if="${phpext.dest.endsWith('.dll')}">
<!-- Check sigcheck output -->
<exec executable="sigcheck" outputproperty="sigcheck.output" errorproperty="sigcheck.error">
<arg value="-q"/>
<arg value="${phpext.dest}"/>
</exec>
<!-- Extract description and machine type using Ant's built-in features -->
<loadfile property="description" srcFile="${phpext.dest}">
<filterchain>
<tokenfilter>
<replaceregex pattern=".*Description:\s*(.*)\s*MachineType:\s*(.*)\s*Verified.*" replace="\1" flags="gs"/>
</tokenfilter>
</filterchain>
</loadfile>
<echo message="Description: ${description}"/>
<loadfile property="machine.type" srcFile="${phpext.dest}">
<filterchain>
<tokenfilter>
<replaceregex pattern=".*MachineType:\s*(.*)\s*Verified.*" replace="\1" flags="gs"/>
</tokenfilter>
</filterchain>
</loadfile>
<echo message="MachineType: ${machine.type}"/>
<!-- Check if description is empty -->
<fail unless="description" message="Description is empty"/>
<!-- Execute PowerShell command if description is empty -->
<if>
<equals arg1="${description}" arg2="" trim="true"/>
<then>
<exec executable="C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" failonerror="true">
<arg value="-NoLogo"/>
<arg value="-NoProfile"/>
<arg value="-Command"/>
<arg value="(New-Object -ComObject SAPI.SpVoice).Speak('OH NO! the php_@{phpext} file is corrupted, the description is null')" />
</exec>
</then>
</if>
<!-- Execute PowerShell command if machine type is not 64-bit -->
<if>
<not>
<equals arg1="${machine.type}" arg2="64-bit" trim="true" casesensitive="false"/>
</not>
<then>
<exec executable="C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" failonerror="true">
<arg value="-NoLogo"/>
<arg value="-NoProfile"/>
<arg value="-Command"/>
<arg value="(New-Object -ComObject SAPI.SpVoice).Speak('OH NO! the php_@{phpext} file is not built for x64')" />
</exec>
</then>
</if>
</target>
build.xml will currently allow .dlls that do now pass
sigchec -q MYFILENAME.dll
so we need to modify it to test it against sigchecks "description" and "MachineType" values to be sure they are not "n/a"using this target as the basis of the test ( which currently doesn't function ) modify build.xml
Currently output is:
youi can see that the variables are not being populated
Here is the full build.xml