protobuf.toml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. [tasks.install_tauri_protobuf.windows]
  2. script = """
  3. npm install -g protoc-gen-ts [email protected]
  4. """
  5. script_runner = "@shell"
  6. [tasks.install_tauri_protobuf.mac]
  7. script = """
  8. sudo npm install -g protoc-gen-ts [email protected]
  9. """
  10. script_runner = "@shell"
  11. [tasks.install_tauri_protobuf.linux]
  12. script = """
  13. sudo npm install -g protoc-gen-ts [email protected]
  14. """
  15. script_runner = "@shell"
  16. [tasks.install_flutter_protobuf]
  17. mac_alias = "install-protobuf"
  18. windows_alias = "install-protobuf-windows"
  19. linux_alias = "install-protobuf"
  20. [tasks.install-protobuf]
  21. condition_script = [
  22. """
  23. if ! command -v protoc-gen-dart
  24. then
  25. exit 0
  26. fi
  27. # installed
  28. exit 1
  29. """,
  30. ]
  31. run_task = { name = ["install_flutter_protobuf_compiler"] }
  32. [tasks.install-protobuf-windows]
  33. script = """
  34. ret = which dart
  35. if is_empty ${ret}
  36. echo Please make sure flutter/dart is properly installed and in PATH env var
  37. exit -1
  38. end
  39. ret = which protoc-gen-dart
  40. if is_empty ${ret}
  41. exec cmd.exe /c dart pub global activate protoc_plugin
  42. end
  43. ret = which protoc-gen-dart
  44. if is_empty ${ret}
  45. home_dir = get_home_dir
  46. echo Please add '${home_dir}\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\bin' into PATH env var
  47. exit -1
  48. end
  49. """
  50. script_runner = "@duckscript"
  51. [tasks.install_flutter_protobuf_compiler]
  52. script = """
  53. echo "Install protoc_plugin (Dart)"
  54. dart pub global activate protoc_plugin
  55. """
  56. script_runner = "@shell"
  57. [tasks.install_flutter_protobuf_compiler.linux]
  58. script = """
  59. echo "Install protoc_plugin (Dart)"
  60. dart pub global activate protoc_plugin
  61. """
  62. script_runner = "@shell"