Group Abstract Group Abstract

Message Boards Message Boards

2
|
12.2K Views
|
3 Replies
|
4 Total Likes
View groups...
Share
Share this post:

What can I do with PacletInfo.m?

Posted 9 years ago
POSTED BY: Szabolcs Horvát
3 Replies

LibraryResources like Kernel is a magic folder name. This old but useful video by Adam Berry uses this terminology. Using "GeneralUtilities`" on PacletInstall and following the trail will confirm my answer. One reason for including extensions meta data seems to be ensure compatibility of paclets with different versions of Mathematica. The notebook includes details of my spelunking. $basePathMap is very instructive summary of applications related to the paclet system and It shows some of the different extensions in use.

PacletManager`Package`$defaultLibraryRoot

Dataset /@ ((Flatten@*Values@
     PacletManager`Manager`Private`$basePathMap) /. 
   Paclet[x__] :> <|x|>)

This is a list of extensions in use.

{"Application", "AutoCompletionData", "ChannelFramework", 
"Documentation", "FrontEnd", "JLink", "Kernel", "LibraryLink", 
"Path", "Resource"}

Which can be obtained by

extensionslist = 
 Query[Flatten /* Union, "Extensions", All, 1]@((Flatten@*Values@
      PacletManager`Manager`Private`$basePathMap) /. 
    Paclet[x__] :> <|x|>)
Attachments:
POSTED BY: Emerson Willard

Hi Szabolcs

Take a look at the paclets in your user base directory.

FileNames["*", FileNameJoin[{$UserBaseDirectory, "Paclets", "Repository"}]]

In typical applications like OAuth Root points to the Kernel directory. If you take a look at an application like Streaming or GitLink you will see either no mention of Root or Root is "." This seems to correlate with the different layouts of the application files. Within data paclets, Root points to the Data folder.

You will be excited to know that I posted a tutorial and have attached a notebook which detail how you can create and deploy your own paclets in the Workbench.

At present, I have created test paclets that can install and register their documentation in the Documentation Center; however, calling Needs["appname"] doesn't work. I guess if you already have an application installed it could still easily find your paclet and call it using Get. It could then reload updated code or data. Some of your questions may lead to an answer to my final problem.

Attachments:
POSTED BY: Emerson Willard

Thank you for the comments! This isn't exactly what I was asking for.

You are showing how to create a paclet using the Workbench.

What I am asking is what are the valid extensions in PacletInfo.m, and what are their effects. The Documentation extension is documented in the Workbench help, so there's no difficulty with that one. But what effect does e.g. adding the LibraryLink extension have, as you can see in GitLink's PacletInfo.m? I can of course live without this information, but I am wondering what I can achieve with it.

I believe that your question can be answered by looking at GitLink: it shows how to package up a paclet, how to install it, and how to make it loadable with Needs. All this can be done without the Workbench. If you like, I'll post step-by-step instructions tomorrow. I'm fine with this part, I was simply wondering what different settings I can change in PacletInfo.m.

POSTED BY: Szabolcs Horvát
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard