55# destination directory. It is used by the Windows build script.
66#
77# Usage:
8- # prepare_bundled_resources.ps1 -DestinationDir <destination_directory> [-Channel <channel>] [-CargoProfile <profile>] [-CargoFeatures <features>] [-CargoTarget <target>]
8+ # prepare_bundled_resources.ps1 <destination_directory>
99#
1010# Arguments:
11- # DestinationDir: The directory where resources should be installed.
12- # Resources will be copied to subdirectories within this
13- # path (e.g., $DEST_DIR\skills).
14- # Channel: (Optional) Release channel. Used to include
15- # channel-gated skills.
16- # CargoProfile: (Optional) Cargo build profile to use when generating
17- # the settings schema.
18- # CargoFeatures: (Optional) Comma-separated cargo features to enable when
19- # generating the settings schema. Should match the
20- # features used to build the main binary so that cargo
21- # can reuse the existing compilation artifacts. Also
22- # ensures that feature-gated settings are included in the
23- # generated schema.
24- # CargoTarget: (Optional) Rust target triple to pass via --target.
25- # Should match the target used to build the main binary.
26- # NOTE: only set this when the target can be executed on
27- # the build host. `cargo run` will attempt to execute
28- # the resulting binary, so this must be omitted when
29- # cross-compiling to a target the host can't run
30- # (e.g. aarch64-pc-windows-msvc on an x64 runner).
11+ # destination_directory: The directory where resources should be installed.
12+ # Resources will be copied to subdirectories within
13+ # this path (e.g., $DEST_DIR\skills).
3114
3215Param (
3316 [Parameter (Mandatory = $true )]
@@ -37,13 +20,7 @@ Param(
3720 [String ]$Channel = ' ' ,
3821
3922 [Parameter (Mandatory = $false )]
40- [String ]$CargoProfile = ' ' ,
41-
42- [Parameter (Mandatory = $false )]
43- [String ]$CargoFeatures = ' ' ,
44-
45- [Parameter (Mandatory = $false )]
46- [String ]$CargoTarget = ' '
23+ [String ]$CargoProfile = ' '
4724)
4825
4926$ErrorActionPreference = ' Stop'
@@ -187,22 +164,11 @@ if ($env:SKIP_SETTINGS_SCHEMA -ne '1') {
187164 $SchemaOutput = Join-Path $DestinationDir ' settings_schema.json'
188165 Write-Output " Generating settings schema at $SchemaOutput "
189166
190- # Pass the same package, profile, features, and target as the main
191- # build so that cargo can reuse compilation artifacts (rather than
192- # recompiling any dependencies whose enabled features differ). Also
193- # ensures that feature-gated settings are included in the generated
194- # schema.
195- $SchemaCmd = @ (' run' , ' --manifest-path' , (Join-Path $RepoRoot ' Cargo.toml' ), ' -p' , ' warp' )
167+ $SchemaCmd = @ (' run' )
196168 if ($CargoProfile ) {
197169 $SchemaCmd += @ (' --profile' , $CargoProfile )
198170 }
199- if ($CargoFeatures ) {
200- $SchemaCmd += @ (' --features' , $CargoFeatures )
201- }
202- if ($CargoTarget ) {
203- $SchemaCmd += @ (' --target' , $CargoTarget )
204- }
205- $SchemaCmd += @ (' --bin' , ' generate_settings_schema' , ' --' )
171+ $SchemaCmd += @ (' --manifest-path' , (Join-Path $RepoRoot ' Cargo.toml' ), ' --bin' , ' generate_settings_schema' , ' --' )
206172 if ($Channel ) {
207173 $SchemaCmd += @ (' --channel' , $Channel )
208174 }
0 commit comments