Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use sdk-starter.bat instead of specific file #7

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions extension/BuildPhpExtension/private/Add-Extension.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Function Add-Extension {
$bat_content += "nmake /nologo 2>&1"
$bat_content += "exit %errorlevel%"
Set-Content -Encoding "ASCII" -Path $Extension-task.bat -Value $bat_content
$builder = "$currentDirectory\php-sdk\phpsdk-$($Config.vs_version)-$($Config.Arch).bat"
$builder = "$currentDirectory\php-sdk\phpsdk-starter.bat"
$task = (Get-Item -Path "." -Verbose).FullName + "\$Extension-task.bat"
$suffix = "php_" + (@(
$Config.name,
Expand All @@ -52,7 +52,7 @@ Function Add-Extension {
$Config.vs_version,
$Config.arch
) -join "-")
& $builder -t $task | Tee-Object -FilePath "build-$suffix.txt"
& $builder -c $Config.vs_version -a $Config.Arch -t $task | Tee-Object -FilePath "build-$suffix.txt"
$includePath = "$currentDirectory\php-dev\include"
New-Item -Path $includePath\ext -Name $Extension -ItemType "directory" | Out-Null
Get-ChildItem -Path (Get-Location).Path -Recurse -Include '*.h', '*.c' | Copy-Item -Destination "$includePath\ext\$Extension"
Expand Down
4 changes: 2 additions & 2 deletions extension/BuildPhpExtension/private/Invoke-Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Function Invoke-Build {
$bat_content += "exit %errorlevel%"
Set-Content -Encoding "ASCII" -Path task.bat -Value $bat_content

$builder = "php-sdk\phpsdk-$($Config.vs_version)-$($Config.Arch).bat"
$builder = "php-sdk\phpsdk-starter.bat"
$task = (Get-Item -Path "." -Verbose).FullName + '\task.bat'
$ref = $Config.ref
if($env:ARTIFACT_NAMING_SCHEME -eq 'pecl') {
Expand All @@ -38,7 +38,7 @@ Function Invoke-Build {
$Config.vs_version,
$Config.arch
) -join "-")
& $builder -s $Config.vs_toolset -t $task | Tee-Object -FilePath "build-$suffix.txt"
& $builder -c $Config.vs_version -a $Config.Arch -s $Config.vs_toolset -t $task | Tee-Object -FilePath "build-$suffix.txt"
Set-GAGroup end
Add-BuildLog tick $Config.name "Extension $($Config.name) built successfully"
} catch {
Expand Down
2 changes: 1 addition & 1 deletion php/BuildPhp/public/Invoke-PhpBuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function Invoke-PhpBuild {

$task = "$PSScriptRoot\..\runner\task-$Ts.bat"

& "$buildDirectory\php-sdk\phpsdk-$VsVersion-$Arch.bat" -t $task
& "$buildDirectory\php-sdk\phpsdk-starter.bat" -c $VsVersion -a $Arch -t $task
if (-not $?) {
throw "build failed with errorlevel $LastExitCode"
}
Expand Down