setup.ps1 946 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env pwsh
  2. # Copyright 2019-2021 Tauri Programme within The Commons Conservancy
  3. # SPDX-License-Identifier: Apache-2.0
  4. # SPDX-License-Identifier: MIT
  5. echo "Building API definitions..."
  6. cd tooling\api
  7. yarn; yarn build
  8. cd ..\..
  9. echo "Installing the Tauri Rust CLI..."
  10. cd tooling\cli
  11. cargo install --path .
  12. cd ..\..
  13. echo "Tauri Rust CLI installed. Run it with '$ cargo tauri [COMMAND]'."
  14. $yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes"
  15. $no = New-Object System.Management.Automation.Host.ChoiceDescription "&No"
  16. $options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no)
  17. $result = $host.ui.PromptForChoice("Node.js CLI", "Do you want to install the Node.js CLI?", $options, 1)
  18. switch ($result) {
  19. 0{
  20. cd tooling\cli\node
  21. yarn; yarn build; yarn link
  22. cd ..\..
  23. echo "Tauri Node.js CLI installed. use `yarn link @tauri-apps/cli` and run it with '$ yarn tauri [COMMAND]'."
  24. }
  25. }