@@ -417,7 +417,10 @@ const WINDOWS_DESKTOP_BUILD_PREREQUISITES = [
417417 id : "msvc" ,
418418 description : "Visual Studio Build Tools with C++, Windows SDK, and Spectre libraries" ,
419419 } ,
420- { id : "tar" , description : "tar to inspect the bundled WSL runtime archive" } ,
420+ {
421+ id : "tar" ,
422+ description : "tar.exe to extract Cua Driver and inspect the bundled WSL runtime archive" ,
423+ } ,
421424] as const ;
422425
423426export class WindowsDesktopBuildPrerequisitesMissingError extends Schema . TaggedError < WindowsDesktopBuildPrerequisitesMissingError > ( ) (
@@ -1926,7 +1929,7 @@ function windowsVswherePrerequisiteScript(arch: typeof BuildArch.Type): string {
19261929}
19271930
19281931export const preflightWindowsDesktopBuild = Effect . fn ( "preflightWindowsDesktopBuild" ) (
1929- function * ( input : { readonly arch : typeof BuildArch . Type ; readonly bundlesWslRuntime : boolean } ) {
1932+ function * ( input : { readonly arch : typeof BuildArch . Type } ) {
19301933 const rustTarget = resolveResourceMonitorRustTargets ( "win" , input . arch ) [ 0 ] ! ;
19311934 const reuseResourceMonitor = yield * Config . Boolean (
19321935 "T3CODE_DESKTOP_REUSE_RESOURCE_MONITOR" ,
@@ -1953,9 +1956,7 @@ export const preflightWindowsDesktopBuild = Effect.fn("preflightWindowsDesktopBu
19531956 ] ) ,
19541957 "Visual Studio Build Tools" ,
19551958 ) ,
1956- tar : input . bundlesWslRuntime
1957- ? desktopBuildProbeSucceeds ( ChildProcess . make ( "tar.exe" , [ "--version" ] ) , "tar" )
1958- : Effect . succeed ( true ) ,
1959+ tar : desktopBuildProbeSucceeds ( ChildProcess . make ( "tar.exe" , [ "--version" ] ) , "tar" ) ,
19591960 } ,
19601961 { concurrency : "unbounded" } ,
19611962 ) ;
@@ -2453,7 +2454,12 @@ export const stageCuaDriverExecutable = Effect.fn("stageCuaDriverExecutable")(fu
24532454 const command =
24542455 release . format === "zip" && hostPlatform !== "win32"
24552456 ? ChildProcess . make ( "unzip" , [ "-q" , archivePath , "-d" , extracted ] )
2456- : ChildProcess . make ( "tar" , [ "-xf" , archivePath , "-C" , extracted ] ) ;
2457+ : ChildProcess . make ( hostPlatform === "win32" ? "tar.exe" : "tar" , [
2458+ "-xf" ,
2459+ archivePath ,
2460+ "-C" ,
2461+ extracted ,
2462+ ] ) ;
24572463 yield * runCommand ( command , { label : "extract Cua Driver" , verbose : input . verbose } ) ;
24582464 const requiredFiles = [
24592465 release . executable ,
@@ -3492,13 +3498,18 @@ export const validateWindowsPackagedPayload = Effect.fn(
34923498 ) ;
34933499 }
34943500
3501+ const hostPlatform = yield * HostProcess . Platform ;
34953502 const listing = yield * spawnAndCollectOutput (
3496- ChildProcess . make ( "tar" , [ "-tzf" , WSL_RUNTIME_ARCHIVE_NAME ] , {
3497- cwd : resourcesDir ,
3498- stdin : "ignore" ,
3499- stdout : "pipe" ,
3500- stderr : "pipe" ,
3501- } ) ,
3503+ ChildProcess . make (
3504+ hostPlatform === "win32" ? "tar.exe" : "tar" ,
3505+ [ "-tzf" , WSL_RUNTIME_ARCHIVE_NAME ] ,
3506+ {
3507+ cwd : resourcesDir ,
3508+ stdin : "ignore" ,
3509+ stdout : "pipe" ,
3510+ stderr : "pipe" ,
3511+ } ,
3512+ ) ,
35023513 ) . pipe ( Effect . mapError ( invalidWslRuntime ) ) ;
35033514 if ( listing . exitCode !== 0 ) {
35043515 return yield * invalidWslRuntime (
@@ -3587,10 +3598,6 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* (
35873598 if ( hostPlatform === "win32" && options . platform === "win" ) {
35883599 yield * preflightWindowsDesktopBuild ( {
35893600 arch : options . arch ,
3590- bundlesWslRuntime : bundlesWslRuntime ( {
3591- platform : options . platform ,
3592- runtimeArchivePath : options . wslRuntime ,
3593- } ) ,
35943601 } ) ;
35953602 }
35963603 const workspaceConfig = yield * readWorkspaceConfig ( ) ;
0 commit comments