mirror of
https://github.com/openai/codex.git
synced 2026-05-27 06:25:48 +00:00
## Summary `codex app` should be a platform-aware entry point for opening Codex Desktop or helping users install it. Before this change, the command only existed on macOS and its default installer URL always pointed at the Apple Silicon DMG, which sent Intel Mac users to the wrong build. This updates the macOS path to choose the Apple Silicon or Intel DMG based on the detected processor, while keeping `--download-url` as an advanced override. It also enables `codex app` on Windows, where the CLI opens an installed Codex Desktop app when available and otherwise opens the Windows installer URL. --------- Co-authored-by: Felipe Coury <felipe.coury@openai.com>
23 lines
700 B
Rust
23 lines
700 B
Rust
#[cfg(target_os = "macos")]
|
|
mod mac;
|
|
#[cfg(target_os = "windows")]
|
|
mod windows;
|
|
|
|
/// Run the app install/open logic for the current OS.
|
|
#[cfg(target_os = "macos")]
|
|
pub async fn run_app_open_or_install(
|
|
workspace: std::path::PathBuf,
|
|
download_url_override: Option<String>,
|
|
) -> anyhow::Result<()> {
|
|
mac::run_mac_app_open_or_install(workspace, download_url_override).await
|
|
}
|
|
|
|
/// Run the app install/open logic for the current OS.
|
|
#[cfg(target_os = "windows")]
|
|
pub async fn run_app_open_or_install(
|
|
workspace: std::path::PathBuf,
|
|
download_url_override: Option<String>,
|
|
) -> anyhow::Result<()> {
|
|
windows::run_windows_app_open_or_install(workspace, download_url_override).await
|
|
}
|