init_env.ps1 664 B

1234567891011121314151617
  1. Write-Output "Setting up enviromental Variables"
  2. # setup relative paths
  3. $dist_path = "tauri\examples\communication\dist"
  4. $src_path = "tauri\examples\communication\src-tauri"
  5. # check to see if path variables are directories
  6. if ((Test-Path $dist_path -PathType Any) -Or (Test-Path $src_path -PathType Any)) {
  7. # convert relative paths to absolute paths.
  8. # put these absolute paths in enviromental variables
  9. $env:TAURI_DIST_DIR = Resolve-Path $dist_path
  10. $env:TAURI_DIR = Resolve-Path $src_path
  11. Write-Output "Variables set, ready to work!"
  12. }
  13. else {
  14. Write-Output "Variables are not setup properly. Please run from Tauri Root directory"
  15. }