2021-02-10 08:24:38 +03:00
|
|
|
#!/usr/bin/env pwsh
|
2023-06-07 16:32:36 +03:00
|
|
|
|
2024-03-01 14:29:01 +03:00
|
|
|
# Copyright 2019-2024 Tauri Programme within The Commons Conservancy
|
2021-04-11 01:09:09 +03:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2021-02-10 08:24:38 +03:00
|
|
|
echo "Building API definitions..."
|
2021-04-12 14:47:59 +03:00
|
|
|
cd tooling\api
|
2021-02-10 08:24:38 +03:00
|
|
|
yarn; yarn build
|
2021-04-12 14:47:59 +03:00
|
|
|
cd ..\..
|
2021-02-10 08:24:38 +03:00
|
|
|
|
2021-02-21 19:48:08 +03:00
|
|
|
echo "Installing the Tauri Rust CLI..."
|
2022-02-10 23:23:10 +03:00
|
|
|
cd tooling\cli
|
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{
|
2022-02-10 23:23:10 +03:00
|
|
|
cd tooling\cli\node
|
2021-02-21 19:48:08 +03:00
|
|
|
yarn; yarn build; yarn link
|
2021-02-10 08:24:38 +03:00
|
|
|
cd ..\..
|
2022-02-10 04:11:00 +03:00
|
|
|
echo "Tauri Node.js CLI installed. use `yarn link @tauri-apps/cli` and run it with '$ yarn tauri [COMMAND]'."
|
2021-02-10 08:24:38 +03:00
|
|
|
}
|
|
|
|
}
|