sandstorm-pkgdef.capnp 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. @0xeef286f78b0168e0;
  2. # When cloning the example, you'll want to replace the above file ID with a new
  3. # one generated using the `capnp id` command.
  4. using Spk = import "/sandstorm/package.capnp";
  5. using Grain = import "/sandstorm/grain.capnp";
  6. # This imports:
  7. # $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp
  8. # Check out that file to see the full, documented package definition format.
  9. const pkgdef :Spk.PackageDefinition = (
  10. # The package definition. Note that the spk tool looks specifically for the
  11. # "pkgdef" constant.
  12. id = "a3w50h1435gsxczugm16q0amwkqm9f4crykzea53sv61pt7phk8h",
  13. # The app ID is actually the public key used to sign the app package.
  14. # All packages with the same ID are versions of the same app.
  15. #
  16. # If you are working from the example, you'll need to replace the above
  17. # public key with one of your own. Use the `spk keygen` command to generate
  18. # a new one.
  19. manifest = (
  20. # This manifest is included in your app package to tell Sandstorm
  21. # about your app.
  22. appVersion = 2, # Increment this for every release.
  23. appTitle = (defaultText = "draw.io"),
  24. appMarketingVersion = (defaultText = "6.0.1.5"),
  25. actions = [
  26. # Define your "new document" handlers here.
  27. ( title = (defaultText = "New draw.io diagram"),
  28. nounPhrase = (defaultText = "diagram"),
  29. command = .myCommand
  30. # The command to run when starting for the first time. (".myCommand"
  31. # is just a constant defined at the bottom of the file.)
  32. )
  33. ],
  34. continueCommand = .myCommand,
  35. # This is the command called to start your app back up after it has been
  36. # shut down for inactivity. Here we're using the same command as for
  37. # starting a new instance, but you could use different commands for each
  38. # case.
  39. metadata = (
  40. icons = (
  41. appGrid = (png = (dpi1x = embed "client/images/drawlogo128.png")),
  42. grain = (png = (dpi1x = embed "client/images/drawlogo48.png")),
  43. market = (png = (dpi1x = embed "client/images/drawlogo256.png")),
  44. ),
  45. website = "https://www.draw.io/",
  46. codeUrl = "https://github.com/jgraph/draw.io",
  47. license = (openSource = gpl3),
  48. categories = [office, productivity],
  49. author = (
  50. upstreamAuthor = "JGraph",
  51. contactEmail = "support@draw.io",
  52. pgpSignature = embed "pgp-signature",
  53. ),
  54. pgpKeyring = embed "pgp-keyring",
  55. description = (defaultText = embed "description.md"),
  56. shortDescription = (defaultText = embed "shortDesc.txt"),
  57. screenshots = [
  58. (width = 448, height = 243, png = embed "client/images/drawio448.png")
  59. ],
  60. changeLog = (defaultText = embed "ChangeLog"),
  61. )
  62. ),
  63. sourceMap = (
  64. # Here we define where to look for files to copy into your package.
  65. searchPath = [
  66. ( packagePath = "server", sourcePath = "server" ),
  67. # Map server binary at "/server".
  68. ( packagePath = "client", sourcePath = "client" ),
  69. # Map client directory at "/client".
  70. ]
  71. ),
  72. alwaysInclude = [ "." ]
  73. # Always include all mapped files, whether or not they are opened during
  74. # "spk dev".
  75. );
  76. const appIndexViewInfo :Grain.UiView.ViewInfo = (
  77. permissions = [(name = "write", title = (defaultText = "write"),
  78. description = (defaultText = "allows editing diagrams")),
  79. (name = "read", title = (defaultText = "read"),
  80. description = (defaultText = "allows viewing diagrams"))],
  81. roles = [(title = (defaultText = "editor"),
  82. permissions = [true, true],
  83. verbPhrase = (defaultText = "can edit"),
  84. default = true),
  85. (title = (defaultText = "viewer"),
  86. permissions = [false, true],
  87. verbPhrase = (defaultText = "can view"))]
  88. );
  89. const myCommand :Spk.Manifest.Command = (
  90. # Here we define the command used to start up your server.
  91. argv = ["/server"],
  92. environ = [
  93. # Note that this defines the *entire* environment seen by your app.
  94. (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin")
  95. ]
  96. );