Add Windows Chrome side panel and scoped IDE native bridge
This commit is contained in:
1 parent
75afd01b4b
commit
fb6f57cd36
14 files changed
+1018
-1
No files matched your search
@@ -0,0 +1,23 @@
|
||||
param([string]$OutputDirectory = (Join-Path $PSScriptRoot '../artifacts/chrome'))
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$taskRoot = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path
|
||||
$chromeSource = Join-Path $taskRoot 'apps/chrome'
|
||||
$compiler = Join-Path $env:WINDIR 'Microsoft.NET/Framework64/v4.0.30319/csc.exe'
|
||||
if (!(Test-Path -LiteralPath $compiler)) { throw '.NET Framework 4 C# compiler is required.' }
|
||||
$staging = Join-Path ([IO.Path]::GetTempPath()) ('aiturk-chrome-' + [guid]::NewGuid().ToString('N'))
|
||||
New-Item -ItemType Directory -Path $staging | Out-Null
|
||||
Copy-Item -LiteralPath (Join-Path $chromeSource 'extension') -Destination $staging -Recurse
|
||||
Copy-Item -LiteralPath (Join-Path $chromeSource 'KURULUM.txt') -Destination $staging
|
||||
$executable = Join-Path $staging 'AITURK Chrome Kur.exe'
|
||||
& $compiler /nologo /optimize+ /target:winexe /platform:anycpu /r:System.Web.Extensions.dll /r:System.Windows.Forms.dll "/out:$executable" (Join-Path $chromeSource 'native/Bridge.cs')
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Native bridge compilation failed.' }
|
||||
New-Item -ItemType Directory -Force -Path $OutputDirectory | Out-Null
|
||||
$version = (Get-Content -LiteralPath (Join-Path $chromeSource 'extension/manifest.json') -Raw | ConvertFrom-Json).version
|
||||
$archive = Join-Path $OutputDirectory "AITURK-Chrome-$version-windows.zip"
|
||||
if (Test-Path -LiteralPath $archive) { throw "Artifact already exists; use a new output directory: $archive" }
|
||||
Compress-Archive -Path (Join-Path $staging '*') -DestinationPath $archive -CompressionLevel Optimal
|
||||
$hash = (Get-FileHash -LiteralPath $archive -Algorithm SHA256).Hash.ToLowerInvariant()
|
||||
Write-Output "Archive: $archive"
|
||||
Write-Output "SHA256: $hash"
|
||||
Write-Output "Native host test path: $executable"
|
||||
Write-Output "Staging retained for verification: $staging"
|
||||
Reference in new issue
Block a user