mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-14 13:21:01 +03:00
feat(cli): enhance iOS build task arguments (#4987)
This commit is contained in:
parent
8aad710064
commit
e55d96acc1
@ -134,9 +134,6 @@ pub fn exec(
|
||||
map.insert("tauri-binary", tauri_binary.to_string_lossy());
|
||||
let mut build_args = Vec::new();
|
||||
for arg in args {
|
||||
if arg == "android" {
|
||||
break;
|
||||
}
|
||||
let path = PathBuf::from(&arg);
|
||||
if path.exists() {
|
||||
if let Ok(dir) = current_dir() {
|
||||
@ -146,10 +143,13 @@ pub fn exec(
|
||||
}
|
||||
}
|
||||
build_args.push(arg.to_string_lossy().into_owned());
|
||||
if arg == "android" || arg == "ios" {
|
||||
break;
|
||||
}
|
||||
}
|
||||
build_args.push("android".into());
|
||||
build_args.push("build".into());
|
||||
map.insert("tauri-binary-args", build_args);
|
||||
build_args.push(target.ide_build_script_name().into());
|
||||
map.insert("tauri-binary-args", &build_args);
|
||||
map.insert("tauri-binary-args-str", build_args.join(" "));
|
||||
|
||||
// Generate Android Studio project
|
||||
let android_env = if target == Target::Android {
|
||||
|
@ -78,6 +78,14 @@ impl Target {
|
||||
Self::Ios => "ios",
|
||||
}
|
||||
}
|
||||
|
||||
fn ide_build_script_name(&self) -> &'static str {
|
||||
match self {
|
||||
Self::Android => "build",
|
||||
#[cfg(target_os = "macos")]
|
||||
Self::Ios => "xcode-script",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Serialize, Deserialize)]
|
||||
|
@ -267,7 +267,7 @@ targets:
|
||||
VALID_ARCHS: {{~#each ios-valid-archs}} {{this}} {{/each}}
|
||||
legacy:
|
||||
toolPath: {{ tauri-binary }}
|
||||
arguments: ios xcode-script -v --platform ${PLATFORM_DISPLAY_NAME:?} --sdk-root ${SDKROOT:?} --configuration ${CONFIGURATION:?} ${FORCE_COLOR} ${ARCHS:?}
|
||||
arguments: {{ tauri-binary-args-str }} -v --platform ${PLATFORM_DISPLAY_NAME:?} --sdk-root ${SDKROOT:?} --configuration ${CONFIGURATION:?} ${FORCE_COLOR} ${ARCHS:?}
|
||||
passSettings: false # prevents evil linker errors
|
||||
workingDirectory: $(SRCROOT)/../..
|
||||
lib_{{app.name}}_macOS:
|
||||
@ -275,6 +275,6 @@ targets:
|
||||
platform: macOS
|
||||
legacy:
|
||||
toolPath: {{ tauri-binary }}
|
||||
arguments: ios xcode-script -v --platform ${PLATFORM_DISPLAY_NAME:?} --sdk-root ${SDKROOT:?} --configuration ${CONFIGURATION:?} ${FORCE_COLOR} ${ARCHS:?}
|
||||
arguments: {{ tauri-binary-args-str }} -v --platform ${PLATFORM_DISPLAY_NAME:?} --sdk-root ${SDKROOT:?} --configuration ${CONFIGURATION:?} ${FORCE_COLOR} ${ARCHS:?}
|
||||
passSettings: false
|
||||
workingDirectory: $(SRCROOT)/../..
|
||||
|
Loading…
Reference in New Issue
Block a user