]> gitweb.factorcode.org Git - factor.git/commitdiff
vocabs: document platforms.txt
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Sun, 21 Feb 2010 07:38:09 +0000 (20:38 +1300)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Sun, 21 Feb 2010 07:38:09 +0000 (20:38 +1300)
basis/tools/deploy/deploy-docs.factor
basis/vocabs/metadata/metadata-docs.factor
core/vocabs/loader/loader-docs.factor

index a552bd04fb395cb459cf5b293e04d3b8643567e9..976fc253576204943b433cd1ae470ed5d324a028 100755 (executable)
@@ -13,7 +13,7 @@ ARTICLE: "prepare-deploy" "Preparing to deploy an application"
 ARTICLE: "deploy-resources" "Deployed resource files"
 "To include additional files in your deployed application, specify their names in a vocabulary's " { $snippet "resources.txt" } " file. The " { $snippet "resources.txt" } " file contains one glob pattern per line. These patterns are expanded relative to the vocabulary directory; files outside of the vocabulary directory cannot be referenced. If a file inside the vocabulary directory matches any of these patterns, it will be included in deployed applications that reference the vocabulary. If a subdirectory matches, its contents will be included recursively."
 $nl
-"If the deployed vocabulary includes an icon file for the current platform (" { $snippet "icon.ico" } " on Windows, or " { $snippet "icon.icns" } " on MacOS X), it will be embedded in the deployed application as its GUI icon." ;
+"If the deployed vocabulary includes an icon file for the current platform, it will be embedded in the deployed application as its GUI icon. See " { $link "vocabs.icons" } "." ;
 
 ARTICLE: "tools.deploy.usage" "Deploy tool usage"
 "Once the necessary deployment flags have been set, the application can be deployed:"
index 95c8083e0f81eebb61ec53bd8baa6df050e32095..c3dce45c09298d498239fa14b7287ad90f786f4d 100644 (file)
@@ -2,23 +2,36 @@ USING: help.markup help.syntax strings ;
 IN: vocabs.metadata
 
 ARTICLE: "vocabs.metadata" "Vocabulary metadata"
-"Vocabulary summaries:"
+"Vocabulary directories can contain text files with metadata:"
+{ $list
+    { { $snippet "authors.txt" } " - a series of lines, with one author name per line. These are listed under " { $link "vocab-authors" } "." }
+    { { $snippet "platforms.txt" } " - a series of lines, with one operating system name per line." }
+    { { $snippet "resources.txt" } " - a series of lines, with one file glob pattern per line. Files inside the vocabulary directory whose names match any of these glob patterns will be included with the compiled application as " { $link "deploy-resources" } "." }
+    { { $snippet "summary.txt" } " - a one-line description." }
+    { { $snippet "tags.txt" } " - a series of lines, with one tag per line. Tags help classify the vocabulary. Consult " { $link "vocab-tags" } " for a list of existing tags you can reuse." }
+}
+"Words for reading and writing " { $snippet "summary.txt" } ":"
 { $subsections
     vocab-summary
     set-vocab-summary
 }
-"Vocabulary authors:"
+"Words for reading and writing " { $snippet "authors.txt" } ":"
 { $subsections
     vocab-authors
     set-vocab-authors
 }
-"Vocabulary tags:"
+"Words for reading and writing " { $snippet "tags.txt" } ":"
 { $subsections
     vocab-tags
     set-vocab-tags
     add-vocab-tags
 }
-"Vocabulary resources:"
+"Words for reading and writing " { $snippet "platforms.txt" } ":"
+{ $subsections
+    vocab-platforms
+    set-vocab-platforms
+}
+"Words for reading and writing " { $snippet "resources.txt" } ":"
 { $subsections
     vocab-resources
     set-vocab-resources
@@ -55,6 +68,16 @@ HELP: set-vocab-tags
 { $values { "tags" "a sequence of strings" } { "vocab" "a vocabulary specifier" } }
 { $description "Stores a list of short tags classifying the vocabulary to the " { $snippet "tags.txt" } " file in the vocabulary's directory." } ;
 
+HELP: vocab-platforms
+{ $values { "vocab" "a vocabulary specifier" } { "platforms" "a sequence of operating system symbols" } }
+{ $description "Outputs a list of operating systems supported by " { $snippet "vocab" } ", as specified by the " { $snippet "platforms.txt" } " file in the vocabulary's directory. Outputs an empty array if the file doesn't exist." }
+{ $notes "Operating system symbols are defined in the " { $vocab-link "system" } " vocabulary." } ;
+
+HELP: set-vocab-platforms
+{ $values { "platforms" "a sequence of operating system symbols" } { "vocab" "a vocabulary specifier" } }
+{ $description "Stores a list of operating systems supported by " { $snippet "vocab" } " to the " { $snippet "platforms.txt" } " file in the vocabulary's directory." }
+{ $notes "Operating system symbols are defined in the " { $vocab-link "system" } " vocabulary." } ;
+
 HELP: vocab-resources
 { $values { "vocab" "a vocabulary specifier" } { "patterns" "a sequence of glob patterns" } }
 { $description "Outputs a list of glob patterns matching files that will be deployed with an application that includes " { $snippet "vocab" } ", as specified by the " { $snippet "resources.txt" } " file in the vocabulary's directory. Outputs an empty array if the file doesn't exist." }
index ce4a319a42095a3fe0d33e15c17f1596a4f0b612..08ab729b6daecd36a806459738b82c10ed8c1fac 100755 (executable)
@@ -27,10 +27,11 @@ ARTICLE: "vocabs.roots" "Vocabulary roots"
 "You can store your own vocabularies in the " { $snippet "work" } " directory."
 { $subsections "add-vocab-roots" } ;
 
+ARTICLE: "vocabs.icons" "Vocabulary icons"
+"An icon file representing the vocabulary can be provided for use by " { $link "tools.deploy" } ". A file named " { $snippet "icon.ico" } " will be used as the application icon when the application is deployed on Windows. A file named " { $snippet "icon.icns" } " will be used when the application is deployed on MacOS X." ;
+
 ARTICLE: "vocabs.loader" "Vocabulary loader"
-"The vocabulary loader combines the vocabulary system with " { $link "parser" } " in order to implement automatic loading of vocabulary source files. The vocabulary loader is implemented in the " { $vocab-link "vocabs.loader" } " vocabulary."
-$nl
-"When an attempt is made to use a vocabulary that has not been loaded into the image, the vocabulary loader is asked to locate the vocabulary's source files, and load them."
+"The " { $link POSTPONE: USE: } " and " { $link POSTPONE: USING: } " words load vocabularies using the vocabulary loader. The vocabulary loader is implemented in the " { $vocab-link "vocabs.loader" } " vocabulary."
 $nl
 "The vocabulary loader searches for vocabularies in a set of directories known as vocabulary roots."
 { $subsections "vocabs.roots" }
@@ -45,17 +46,8 @@ $nl
     { { $snippet "foo/bar/bar-docs.factor" } " - documentation, see " { $link "writing-help" } }
     { { $snippet "foo/bar/bar-tests.factor" } " - unit tests, see " { $link "tools.test" } }
 }
-"Finally, four optional text files may contain metadata:"
-{ $list
-    { { $snippet "foo/bar/authors.txt" } " - a series of lines, with one author name per line. These are listed under " { $link "vocab-authors" } "." }
-    { { $snippet "foo/bar/resources.txt" } " - a series of lines with one file glob pattern per line. Files inside the vocabulary directory whose names match any of these glob patterns will be included with the compiled application as " { $link "deploy-resources" } "." }
-    { { $snippet "foo/bar/summary.txt" } " - a one-line description." }
-    { { $snippet "foo/bar/tags.txt" } " - a whitespace-separated list of tags which classify the vocabulary. Consult " { $link "vocab-tags" } " for a list of existing tags you can reuse." }
-}
-"An icon file representing the vocabulary can also be provided. A file named " { $snippet "icon.ico" } " will be used as the application icon when the application is deployed on Windows. A file named " { $snippet "icon.icns" } " will be used when the application is deployed on MacOS X."
-$nl
-"The " { $link POSTPONE: USE: } " and " { $link POSTPONE: USING: } " words load vocabularies which have not been loaded yet, as needed."
-$nl
+"Optional text files may contain metadata."
+{ $subsections "vocabs.metadata" "vocabs.icons" }
 "Vocabularies can also be loaded at run time, without altering the vocabulary search path. This is done by calling a word which loads a vocabulary if it is not in the image, doing nothing if it is:"
 { $subsections require }
 "The above word will only ever load a vocabulary once in a given session. There is another word which unconditionally loads vocabulary from disk, regardless of whether or not is has already been loaded:"