Files
Jonathan Kelley 4d3d55a7a3 CLI self-updater, warn on version mismatch, direct install.sh option, androidmanifest and info.plist customization, bump to 0.7-alpha.0 (#4095)
* wip.... bun installer

* - warn on incompatible versions
- clean up some logs
- add coloring to log levels

* add toasts to desktop/mobile

* Auto open simulators

* auto boot android

* preserve url

* pull out some of the warnings

* add self-updater

* wip: mcp

* add install.sh and adjust binstall path

* add some cuter styling to logs!

* update "input.css"

* update other input.css

* style a bit more

* change getting started

* add windows installer

* move dioxus-mobile into dioxus-desktop
add sentry wip to cli

* shorten timeout of toast

* fix cli display

* wire up customization of android manifest

* udid is a real word

* add 429 to lychee cache

* accept all 200-204 and 429
2025-05-14 08:43:11 +02:00

57 lines
1.3 KiB
PowerShell

#!/usr/bin/env pwsh
$ErrorActionPreference = 'Stop'
if ($v) {
$Version = "v${v}"
}
if ($Args.Length -eq 1) {
$Version = $Args.Get(0)
}
$DxInstall = $env:DX_INSTALL
$BinDir = if ($DxInstall) {
"${DxInstall}\bin"
} else {
"${Home}\.dx\bin"
}
$DxZip = "$BinDir\dx.zip"
$DxExe = "$BinDir\dx.exe"
$Target = 'x86_64-pc-windows-msvc'
$DownloadUrl = if (!$Version) {
"https://github.com/dioxuslabs/dioxus/releases/latest/download/dx-${target}.zip"
} else {
"https://github.com/dioxuslabs/dioxus/releases/download/${Version}/dx-${target}.zip"
}
if (!(Test-Path $BinDir)) {
New-Item $BinDir -ItemType Directory | Out-Null
}
curl.exe --ssl-revoke-best-effort -Lo $DxZip $DownloadUrl
tar.exe xf $DxZip -C $BinDir
Remove-Item $DxZip
$CargoBin = "${Home}\.cargo\bin"
if (!(Test-Path $CargoBin)) {
New-Item $CargoBin -ItemType Directory | Out-Null
}
Copy-Item $DxExe "$CargoBin\dx.exe" -Force
# $User = [System.EnvironmentVariableTarget]::User
# $Path = [System.Environment]::GetEnvironmentVariable('Path', $User)
# if (!(";${Path};".ToLower() -like "*;${BinDir};*".ToLower())) {
# [System.Environment]::SetEnvironmentVariable('Path', "${Path};${BinDir}", $User)
# $Env:Path += ";${BinDir}"
# }
Write-Output "dx was installed successfully! 💫"
Write-Output "Run 'dx --help' to get started"