2021-02-10 08:24:38 +03:00
|
|
|
#!/usr/bin/env pwsh
|
|
|
|
echo "Building API definitions..."
|
|
|
|
cd api
|
|
|
|
yarn; yarn build
|
|
|
|
cd ..
|
|
|
|
|
2021-02-21 19:48:08 +03:00
|
|
|
echo "Installing the Tauri Rust CLI..."
|
2021-02-10 08:24:38 +03:00
|
|
|
cd cli\core
|
2021-02-21 19:48:08 +03:00
|
|
|
cargo install --path .
|
2021-02-10 08:24:38 +03:00
|
|
|
cd ..\..
|
2021-02-21 19:48:08 +03:00
|
|
|
echo "Tauri Rust CLI installed. Run it with '$ cargo tauri [COMMAND]'."
|
2021-02-10 08:24:38 +03:00
|
|
|
|
|
|
|
$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes"
|
|
|
|
$no = New-Object System.Management.Automation.Host.ChoiceDescription "&No"
|
|
|
|
$options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no)
|
|
|
|
|
2021-02-21 19:48:08 +03:00
|
|
|
$result = $host.ui.PromptForChoice("Node.js CLI", "Do you want to install the Node.js CLI?", $options, 1)
|
2021-02-10 08:24:38 +03:00
|
|
|
switch ($result) {
|
|
|
|
0{
|
|
|
|
cd cli\tauri.js
|
2021-02-21 19:48:08 +03:00
|
|
|
yarn; yarn build; yarn link
|
2021-02-10 08:24:38 +03:00
|
|
|
cd ..\..
|
2021-02-21 19:48:08 +03:00
|
|
|
echo "Tauri Node.js CLI installed. Run it with '$ tauri [COMMAND]'"
|
2021-02-10 08:24:38 +03:00
|
|
|
}
|
|
|
|
}
|