From 25e31cbf9ae61a0f413ed33997ddb712019458ae Mon Sep 17 00:00:00 2001 From: abgox Date: Thu, 16 May 2024 14:02:53 +0800 Subject: [PATCH] add schema for Scoop manifest --- README-CN.md | 22 +- README.md | 24 +- Scoop/en-US/manifest-min.json | 1 + Scoop/en-US/manifest.json | 944 +++++++++++++++++++++++++++++++++ Scoop/zh-CN/manifest-min.json | 1 + Scoop/zh-CN/manifest.json | 951 ++++++++++++++++++++++++++++++++++ 6 files changed, 1925 insertions(+), 18 deletions(-) create mode 100644 Scoop/en-US/manifest-min.json create mode 100644 Scoop/en-US/manifest.json create mode 100644 Scoop/zh-CN/manifest-min.json create mode 100644 Scoop/zh-CN/manifest.json diff --git a/README-CN.md b/README-CN.md index 71fe968..daaab4e 100644 --- a/README-CN.md +++ b/README-CN.md @@ -1,12 +1,16 @@ ## 一些 json schema - `PSCompletions` - - [completion.json](./PSCompletions/completion.json) - - [zh-CN](./PSCompletions/zh-CN/completion.json) - - [en-US](./PSCompletions/en-US/completion.json) - - [completions.json](./PSCompletions/completions.json) - - [zh-CN](./PSCompletions/zh-CN/completions.json) - - [en-US](./PSCompletions/en-US/completions.json) - - [config.json](./PSCompletions/config.json) - - [zh-CN](./PSCompletions/zh-CN/config.json) - - [en-US](./PSCompletions/en-US/config.json) + - [completion.json](https://abgox.github.io/schema/PSCompletions/completion.json) + - [zh-CN](https://abgox.github.io/schema/PSCompletions/zh-CN/completion.json) + - [en-US](https://abgox.github.io/schema/PSCompletions/en-US/completion.json) + - [completions.json](https://abgox.github.io/schema/PSCompletions/completions.json) + - [zh-CN](https://abgox.github.io/schema/PSCompletions/zh-CN/completions.json) + - [en-US](https://abgox.github.io/schema/PSCompletions/en-US/completions.json) + - [config.json](https://abgox.github.io/schema/PSCompletions/config.json) + - [zh-CN](https://abgox.github.io/schema/PSCompletions/zh-CN/config.json) + - [en-US](https://abgox.github.io/schema/PSCompletions/en-US/config.json) +- `Scoop` + - manifest.json : 应用清单的 json 文件 + - [zh-CN](https://abgox.github.io/schema/scoop/zh-CN/manifest.json) + - [en-US](https://abgox.github.io/schema/scoop/en-US/manifest.json) diff --git a/README.md b/README.md index fa3d558..895fa3f 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,18 @@ ## Some json schema - `PSCompletions` - - [completion.json](./PSCompletions/completion.json) - - [zh-CN](./PSCompletions/zh-CN/completion.json) - - [en-US](./PSCompletions/en-US/completion.json) - - [completions.json](./PSCompletions/completions.json) - - [zh-CN](./PSCompletions/zh-CN/completions.json) - - [en-US](./PSCompletions/en-US/completions.json) - - [config.json](./PSCompletions/config.json) - - [zh-CN](./PSCompletions/zh-CN/config.json) - - [en-US](./PSCompletions/en-US/config.json) + + - [completion.json](https://abgox.github.io/schema/PSCompletions/completion.json) + - [zh-CN](https://abgox.github.io/schema/PSCompletions/zh-CN/completion.json) + - [en-US](https://abgox.github.io/schema/PSCompletions/en-US/completion.json) + - [completions.json](https://abgox.github.io/schema/PSCompletions/completions.json) + - [zh-CN](https://abgox.github.io/schema/PSCompletions/zh-CN/completions.json) + - [en-US](https://abgox.github.io/schema/PSCompletions/en-US/completions.json) + - [config.json](https://abgox.github.io/schema/PSCompletions/config.json) + - [zh-CN](https://abgox.github.io/schema/PSCompletions/zh-CN/config.json) + - [en-US](https://abgox.github.io/schema/PSCompletions/en-US/config.json) + +- `Scoop` + - manifest.json: The json file of an app manifest. + - [zh-CN](https://abgox.github.io/schema/scoop/zh-CN/manifest.json) + - [en-US](https://abgox.github.io/schema/scoop/en-US/manifest.json) diff --git a/Scoop/en-US/manifest-min.json b/Scoop/en-US/manifest-min.json new file mode 100644 index 0000000..265bb30 --- /dev/null +++ b/Scoop/en-US/manifest-min.json @@ -0,0 +1 @@ +{"$schema":"http://json-schema.org/draft-07/schema","type":"object","required":["version","description","homepage","license"],"dependentRequired":{"url":["hash"],"autoupdate":["checkver"]},"$defs":{"bool":{"type":"boolean","title":"Type: boolean","examples":[true,false]},"str":{"type":"string","title":"Type: string","examples":[""]},"arr_str":{"title":"Type: string or array","examples":["",[]],"oneOf":[{"type":"array","items":{"type":"string"},"minItems":1},{"type":"string"}]},"license_examples":{"type":"string","title":"Type: string or object(Available attributes:identifier,url)","examples":["","MIT","Apache","Apache License 2.0","Mozilla Public License 2.0","GNU General Public License v3.0","Freeware","Proprietary","Public Domain","Shareware","Unknown"]},"license":{"description":"A string or hash of the software license for the program. \nFor well-known licenses, please use the identifier found at https://spdx.org/licenses\nFor other licenses, use object form, including identifier and URL attributes.\nIf available, please fill the URL of the license into the URL attribute.\nOtherwise, use \"Freeware\"(free to use forever), \"Proprietary\"(must pay to use), \"Public Domain\", \"Shareware\"(free to try, must pay finally), or \"Unknown\"(unable to determine the license), as appropriate.\nIf different files have different licenses, separate licenses with a comma (,).\nIf the entire application is dual licensed, separate licenses with a pipe symbol (|).","oneOf":[{"type":"object","required":["identifier"],"examples":[{"identifier":"","url":""},{"identifier":""}],"properties":{"identifier":{"description":"The SPDX identifier, or \"Freeware\"(free to use forever), \"Proprietary\"(must pay to use), \"Public Domain\", \"Shareware\"(free to try, must pay finally), or \"Unknown\"(unable to determine the license), as appropriate.","$ref":"#/$defs/license_examples"},"url":{"description":" For non-SPDX licenses, include a link to the license.\nIt is acceptable to include links to SPDX licenses, as well.\nIf it is difficult to determine all of the different licenses, it is acceptable to add ,... at the end of the SPDX list. If there are both open-source and not open-source licenses, please list all non-open source licenses first (e.g., Freeware/Proprietary/Shareware).\nIf you are unable to determine what license the application has, use \"Unknown\".","$ref":"#/$defs/str"}}},{"$ref":"#/$defs/license_examples"}]},"architecture":{"title":"Type: object","properties":{"url":{"$ref":"#/$defs/url"},"extract_dir":{"$ref":"#/$defs/extract_dir"},"bin":{"$ref":"#/$defs/bin"},"shortcuts":{"$ref":"#/$defs/shortcuts"},"installer":{"$ref":"#/$defs/installer"},"uninstaller":{"$ref":"#/$defs/uninstaller"},"pre_install":{"$ref":"#/$defs/pre_install"},"post_install":{"$ref":"#/$defs/post_install"},"checkver":{"$ref":"#/$defs/checkver"}}},"architecture_install":{"required":["url","hash"],"allOf":[{"$ref":"#/$defs/architecture"},{"properties":{"hash":{"$ref":"#/$defs/hash"}}}]},"architecture_autoupdate":{"required":["url"],"allOf":[{"$ref":"#/$defs/architecture"},{"properties":{"hash":{"$ref":"#/$defs/get_hash"}}}]},"get_hash":{"title":"Type: object","description":"An object that defines how hashes are obtained.\nObject Available attributes: url,regex/find,mode,jp/jsonpath,xpath","required":["url"],"type":"object","properties":{"url":{"type":"string","description":"URL template for downloading RDF/JSON files or extracting hashes"},"regex":{"type":"string","description":"Alias: find\nRegEx expression to extract the hash"},"find":{"type":"string","description":"Alias: regex\nRegEx expression to extract the hash"},"mode":{"description":"extract: Extract from a plain text file or webpage by RegEx (Default, can be omitted)\njson: Extract from a JSON file by JSONPath\nxpath: Extract from a XML file by XPath\nrdf: Extract from a RDF file\nmetalink: Extract from Metalink's header or .meta4 file\nfosshub: Automatic. Predefined for FossHub\nsourceforge: Automatic. Predefined for SourceForge\ndownload: Downloads the app file and hash it locally (Fallback)","allOf":[{"examples":["extract","json","xpath","rdf","metalink","fosshub","sourceforge","download"]},{"$ref":"#/$defs/str"}]},"jp":{"type":"string","description":"Alias: jsonpath\nJSONPath expression to extract the hash"},"jsonpath":{"type":"string","description":"Alias: jp\nJSONPath expression to extract the hash"},"xpath":{"type":"string","description":"XPath expression to extract the hash"}}},"url":{"description":"The URL or URLs of files to download.\nIf there's more than one URL, you can use a JSON - array.\ne.g. \"url\": [ \"http://example.org/program.zip\", \"http://example.org/dependencies.zip\" ].\nURLs can be HTTP, HTTPS or FTP.\nTo change the filename of the downloaded URL, you can append a URL fragment (starting with #) to URLs.\ne.g. \"http://example.org/program.exe\" -> \"http://example.org/program.exe#/dl.7z\"\nNote the fragment must start with #/ for this to work.\nIn the above example, Scoop will download program.exe but save it as dl.7z, which will then be extracted automatically with 7-Zip. This technique is commonly used in Scoop manifests to bypass executable installers which might have undesirable side-effects like registry changes, files placed outside the install directory, or an admin elevation prompt.","$ref":"#/$defs/arr_str"},"hash":{"description":"A string or array of strings with a file hash for each URL in url.\nHashes are SHA256 by default, but you can use SHA512, SHA1 or MD5 by prefixing the hash string with 'sha512:', 'sha1:' or 'md5:'.","$ref":"#/$defs/arr_str"},"bin":{"title":"Type: string or array(one-dimensional or two-dimensional)","description":"A string or array of strings of programs (executables or scripts) to make available on the user's path.\nA two-dimensional array can be used to create an alias shim, which uses a different name to the real executable and (optionally) passes arguments to the executable.\nThe two-dimensional array should contain up to three strings: program name, alias, and parameters(optional).","examples":["",["",""],["",["",""]],[["",""],["",""]],[["","",""]]],"anyOf":[{"type":"array","items":{"oneOf":[{"type":"array","items":{"$ref":"#/$defs/str"},"maxItems":3},{"$ref":"#/$defs/str"}]}},{"type":"array","items":{"$ref":"#/$defs/str"}},{"type":"string"}]},"checkver":{"title":"Type: string or object","description":"App maintainers and developers can use the bin/checkver tool to check for updated versions of apps\nrequires a string or object \nString: Find the version of RegEx on the homepage\nObject: more configuration\nObject Available attributes: url,github,re/regex,jp/jsonpath,xpath,reverse,replace,useragent,script","examples":["github",{"url":"","regex":""},{"script":[""],"regex":""}],"oneOf":[{"type":"object","properties":{"url":{"description":"Page where the version can be found","$ref":"#/$defs/str"},"github":{"description":"URL to the app's Github repository","$ref":"#/$defs/str"},"re":{"description":"Alias:regex\nRegEx for finding the version","$ref":"#/$defs/str"},"regex":{"description":"RegEx for finding the version","$ref":"#/$defs/str"},"jsonpath":{"description":"JSONPath expression for finding the version","$ref":"#/$defs/str"},"jp":{"description":"Alias:jsonpath\nJSONPath expression for finding the version","$ref":"#/$defs/str"},"xpath":{"description":"XPath expression for finding the version","$ref":"#/$defs/str"},"reverse":{"description":"If or not match the last occurrence found","$ref":"#/$defs/bool"},"replace":{"description":"Replace the matched value with a calculated value","$ref":"#/$defs/str"},"useragent":{"description":"User-Agent that used to get webpage content","$ref":"#/$defs/str"},"script":{"description":"A string or array of strings that can contain PowerShell commands, useful for following multiple links","$ref":"#/$defs/arr_str"}}},{"type":"string"}]},"installer":{"title":"Type: object","description":"Instructions for running a non-MSI installer.\nCalled during both \"scoop install\" and \"scoop update\".\nObject Available attributes: file,script,args,keep","examples":[{"file":""},{"script":[""]},{"file":"","script":[""]},{"file":"","script":[""],"args":[""]}],"properties":{"file":{"description":"The installer executable file.\nFor installer this defaults to the last URL downloaded.\nMust be specified for uninstaller","$ref":"#/$defs/str"},"script":{"description":"A one-line string, or array of strings, of commands to be executed as an installer/uninstaller instead of file.\nAvailable variables: $fname (the file last downloaded), $manifest (the deserialized manifest reference), $architecture (64bit or 32bit), $dir (install directory)","$ref":"#/$defs/arr_str"},"args":{"type":"array","description":"An array of arguments to pass to the installer. Optional.","items":{"$ref":"#/$defs/str"},"minItems":1},"keep":{"description":"if the installer should be kept after running (for future uninstallation, as an example).\nIf omitted or set to any other value, the installer will be deleted after running.","$ref":"#/$defs/bool"}}},"uninstaller":{"title":"Type: object","description":"Instructions for running a non-MSI uninstaller.\nCalled during both \"scoop uninstall\" and \"scoop update\".\nObject Available attributes: file,script,args","examples":[{"file":""},{"script":[""]},{"file":"","script":[""]},{"file":"","script":[""],"args":[""]}],"properties":{"file":{"description":"The uninstaller executable file.","$ref":"#/$defs/str"},"script":{"description":"A one-line string, or array of strings, of commands to be executed as an installer/uninstaller instead of file.\nAvailable variables: $fname (the file last downloaded), $manifest (the deserialized manifest reference), $architecture (64bit or 32bit), $dir (install directory)","$ref":"#/$defs/arr_str"},"args":{"type":"array","description":"An array of arguments to pass to the installer. Optional.","items":{"type":"string"},"minItems":1}}},"pre_install":{"description":"A one-line string, or array of strings, of the commands to be executed before an application is installed.\nAvailable functions:\nappdir: Reference another scoop application\ne.g. to check if another application is installed you can use: \"if (Test-Path \"$(appdir otherapp)\\current\\otherapp.exe\") { ... }\"\nAvailable variables:\n$app: Name of application (name of manifest file)\n$architecture: The CPU architecture of the app being installed,like: 64bit/32bit/arm64\n$cmd: The subcommand that's currently being run,like: uninstall/update/install\n$cfg: Scoop configuration (powershell object),like: {SCOOP_BRANCH, SCOOP_REPO}\n$global: $true for global install\n$manifest: Deserialized manifest (powershell object),like: @{homepage=https://xxx.com/; description=xxx;...}\n$version: Version being installed,like: 1.2.3\n$dir: Application installation directory (version number directory)\n$persist_dir: Scoop Directory --- persist\n$bucketsdir: Scoop Directory --- buckets,like: C:\\Users\\username\\scoop\\buckets\n$bucket: The bucket name to which the current installed application belongs(It's invalid in pre_uninstall/post_uninstall)\n$cachedir: Scoop Directory --- cache\n$cfgpath: Path to Scoop configuration\n$globaldir: Global installation directory\n$modulesdir: Scoop Directory --- modules\n$original_dir: Application installation directory (version number directory)\n$scoopdir: Path to Scoop\n$oldscoopdir: Old path to Scoop","$ref":"#/$defs/arr_str"},"post_install":{"description":"A one-line string, or array of strings, of the commands to be executed after an application is installed.\nAvailable functions:\nappdir: Reference another scoop application\ne.g. to check if another application is installed you can use: \"if (Test-Path \"$(appdir otherapp)\\current\\otherapp.exe\") { ... }\"\nAvailable variables:\n$app: Name of application (name of manifest file)\n$architecture: The CPU architecture of the app being installed,like: 64bit/32bit/arm64\n$cmd: The subcommand that's currently being run,like: uninstall/update/install\n$cfg: Scoop configuration (powershell object),like: {SCOOP_BRANCH, SCOOP_REPO}\n$global: $true for global install\n$manifest: Deserialized manifest (powershell object),like: @{homepage=https://xxx.com/; description=xxx;...}\n$version: Version being installed,like: 1.2.3\n$dir: Application installation directory (version number directory)\n$persist_dir: Scoop Directory --- persist\n$bucketsdir: Scoop Directory --- buckets,like: C:\\Users\\username\\scoop\\buckets\n$bucket: The bucket name to which the current installed application belongs(It's invalid in pre_uninstall/post_uninstall)\n$cachedir: Scoop Directory --- cache\n$cfgpath: Path to Scoop configuration\n$globaldir: Global installation directory\n$modulesdir: Scoop Directory --- modules\n$original_dir: Application installation directory (version number directory)\n$scoopdir: Path to Scoop\n$oldscoopdir: Old path to Scoop","$ref":"#/$defs/arr_str"},"extract_dir":{"description":"If url points to a compressed file(.zip, .7z, .tar, .gz, .lzma, and .lzh are supported), Scoop will extract just the directory specified from it.","$ref":"#/$defs/arr_str"},"extract_to":{"description":"If url points to a compressed file (.zip, .7z, .tar, .gz, .lzma, and .lzh are supported), Scoop will extract all content to the directory specified.","$ref":"#/$defs/arr_str"},"shortcuts":{"type":"array","title":"Type: array(two-dimensional)","description":"Specifies the shortcut values to make available in the startmenu.\nThe two-dimensional array contains four values:\n1.Path to target file [required]\n2.Name of the shortcut(supports subdirectories: \\) [required]\n3.Start parameters [optional]\n4.Path to icon file [optional]","examples":[[["",""]],[["",""],["",""]],[["","","",""]]],"items":{"type":"array","items":{"type":"string","examples":[""]},"minItems":2,"maxItems":4},"minItems":1},"env_add_path":{"description":"Add this directory to the user's path (or system path if \"--global\" is used).\nThe directory is relative to the install directory and must be inside the install directory.","$ref":"#/$defs/arr_str"},"env_set":{"description":"Sets one or more environment variables for the user (or system if \"--global\" is used)","type":"object","examples":[{"":""}],"patternProperties":{"":{"type":"string","examples":[""]}},"minProperties":1},"persist":{"description":"A string or array (string array or two-dimensional array) of directories and files to persist inside the data directory for the app.","examples":["",[""],[["",""]]],"oneOf":[{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"array"}]}},{"type":"string"}]},"psmodule":{"type":"object","required":["name"],"examples":[{"name":""}],"title":"Type: object","description":"Install as a PowerShell module in ~/scoop/modules","properties":{"name":{"description":"the name of the module, which should match at least one file in the extracted directory for PowerShell to recognize this as a module.","$ref":"#/$defs/str"}}}},"properties":{"version":{"description":"The version of the app that this manifest installs.","allOf":[{"$ref":"#/$defs/str"},{"examples":["0.0.0"]}]},"description":{"description":"A one line string containing a short description of the program.\nDon’t include the name of the program, if it’s the same as the app’s filename.\nNot technically required, but all new or updated manifests should include a description.","$ref":"#/$defs/str"},"homepage":{"description":"The home page for the program.","$ref":"#/$defs/str"},"license":{"$ref":"#/$defs/license"},"##":{"description":"A one-line string, or array of strings, containing comments.","$ref":"#/$defs/arr_str"},"architecture":{"type":"object","title":"Type: object","description":"The architecture of the program.\nIf the app is not 32bit, architecture can be used to wrap the differences\nObject Available attributes: 64bit,32bit,arm64","examples":[{"url":"","hash":""},{"64bit":{"url":"","hash":""}},{"64bit":{"url":"","hash":""},"32bit":{"url":"","hash":""}},{"64bit":{"url":"","hash":""},"32bit":{"url":"","hash":""},"arm64":{"url":"","hash":""}}],"properties":{"64bit":{"description":"64bit\nObject Available attributes: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts,checkver","$ref":"#/$defs/architecture_install"},"32bit":{"description":"32bit\nObject Available attributes: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts,checkver","$ref":"#/$defs/architecture_install"},"arm64":{"description":"arm64\nObject Available attributes: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts,checkver","$ref":"#/$defs/architecture_install"}}},"url":{"$ref":"#/$defs/url"},"hash":{"$ref":"#/$defs/hash"},"extract_dir":{"$ref":"#/$defs/extract_dir"},"bin":{"$ref":"#/$defs/bin"},"shortcuts":{"$ref":"#/$defs/shortcuts"},"installer":{"$ref":"#/$defs/installer"},"uninstaller":{"$ref":"#/$defs/uninstaller"},"pre_install":{"$ref":"#/$defs/pre_install"},"post_install":{"$ref":"#/$defs/post_install"},"checkver":{"$ref":"#/$defs/checkver"},"notes":{"description":"A one-line string, or array of strings, with a message to be displayed after installing the app.","$ref":"#/$defs/arr_str"},"persist":{"$ref":"#/$defs/persist"},"pre_uninstall":{"description":"A one-line string, or array of strings, of the commands to be executed before an application is uninstalled.\nAvailable functions:\nappdir: Reference another scoop application\ne.g. to check if another application is installed you can use: \"if (Test-Path \"$(appdir otherapp)\\current\\otherapp.exe\") { ... }\"\nAvailable variables:\n$app:Name of application (name of manifest file)\n$architecture:The CPU architecture of the app being installed,like: 64bit/32bit/arm64\n$cmd:The subcommand that's currently being run,like: uninstall/update/install\n$cfg:Scoop configuration (powershell object),like: {SCOOP_BRANCH, SCOOP_REPO}\n$global:$true for global uninstall\n$manifest:Deserialized manifest (powershell object),like: @{homepage=https://xxx.com/; description=xxx;...}\n$version: Version being installed,like: 1.2.3\n$dir:Application installation directory (version number directory)\n$persist_dir: Scoop Directory --- persist\n$bucketsdir: Scoop Directory --- buckets,like: C:\\Users\\username\\scoop\\buckets\n$cachedir: Scoop Directory --- cache\n$cfgpath: Path to Scoop configuration\n$globaldir: Global installation directory\n$modulesdir: Scoop Directory --- modules\n$original_dir: Application installation directory (version number directory)\n$scoopdir: Path to Scoop\n$oldscoopdir: Old path to Scoop","$ref":"#/$defs/arr_str"},"post_uninstall":{"description":"A one-line string, or array of strings, of the commands to be executed after an application is uninstalled.\nAvailable functions:\nappdir: Reference another scoop application\ne.g. to check if another application is installed you can use: \"if (Test-Path \"$(appdir otherapp)\\current\\otherapp.exe\") { ... }\"\nAvailable variables:\n$app:Name of application (name of manifest file)\n$architecture:The CPU architecture of the app being installed,like: 64bit/32bit/arm64\n$cmd:The subcommand that's currently being run,like: uninstall/update/install\n$cfg:Scoop configuration (powershell object),like: {SCOOP_BRANCH, SCOOP_REPO}\n$global:$true for global uninstalls\n$manifest:Deserialized manifest (powershell object),like: @{homepage=https://xxx.com/; description=xxx;...}\n$version: Version being installed,like: 1.2.3\n$dir:Application installation directory (version number directory)\n$persist_dir: Scoop Directory --- persist\n$bucketsdir: Scoop Directory --- buckets,like: C:\\Users\\username\\scoop\\buckets\n$cachedir: Scoop Directory --- cache\n$cfgpath: Path to Scoop configuration\n$globaldir: Global installation directory\n$modulesdir: Scoop Directory --- modules\n$original_dir: Application installation directory (version number directory)\n$scoopdir: Path to Scoop\n$oldscoopdir: Old path to Scoop","$ref":"#/$defs/arr_str"},"depends":{"description":"Runtime dependencies for the app which will be installed automatically\nsuggest is an alternative to depends","$ref":"#/$defs/str"},"env_add_path":{"$ref":"#/$defs/env_add_path"},"env_set":{"$ref":"#/$defs/env_set"},"extract_to":{"$ref":"#/$defs/extract_to"},"innosetup":{"description":"Set to the boolean true if the installer is InnoSetup based.","$ref":"#/$defs/bool"},"psmodule":{"$ref":"#/$defs/psmodule"},"suggest":{"type":"object","description":"Display a message suggesting optional apps that provide complementary features.\nIf any of the apps suggested for the feature are already installed, the feature will be treated as 'fulfilled' and the user won't see any suggestions.","patternProperties":{"":{"$ref":"#/$defs/arr_str"}}},"autoupdate":{"title":"Type: object","description":"Definition of how the manifest can be updated automatically.\nObject Available attributes: note,architecture,url,hash,bin,extract_dir,extract_to,env_add_path,env_set,installer,license,persist,post_install,psmodule,shortcuts","examples":[{"note":"","url":""},{"architecture":{"64bit":{"url":""}}},{"architecture":{"64bit":{"url":"","hash":{}}}},{"architecture":{"64bit":{"url":""},"32bit":{"url":""}}},{"architecture":{"64bit":{"url":""},"32bit":{"url":""},"arm64":{"url":""}}},{"architecture":{"64bit":{"url":""},"32bit":{"url":""}},"hash":{"url":""}},{"architecture":{"64bit":{"url":""},"32bit":{"url":""},"arm64":{"url":""}},"hash":{"url":""}}],"type":"object","properties":{"note":{"description":"A one-line string, or array of strings, with a message to be displayed after autoupdating the app.","$ref":"#/$defs/str"},"architecture":{"type":"object","title":"Type: object","description":"The architecture of the program.\nIf the app is not 32bit, architecture can be used to wrap the differences\nObject Available attributes: 64bit,32bit,arm64","examples":[{"url":"","hash":{"url":""}},{"64bit":{"url":"","hash":{"url":"","regex":""}}},{"64bit":{"url":"","hash":{"url":"","regex":""}},"32bit":{"url":"","hash":{"url":"","regex":""}}},{"64bit":{"url":""},"32bit":{"url":""},"hash":{"url":"","regex":""}}],"properties":{"64bit":{"description":"64bit\nObject Available attributes: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts","$ref":"#/$defs/architecture_autoupdate"},"32bit":{"description":"32bit\nObject Available attributes: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts","$ref":"#/$defs/architecture_autoupdate"},"arm64":{"description":"arm64\nObject Available attributes: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts","$ref":"#/$defs/architecture_autoupdate"}}},"url":{"$ref":"#/$defs/url"},"hash":{"$ref":"#/$defs/get_hash"},"bin":{"$ref":"#/$defs/bin"},"extract_dir":{"$ref":"#/$defs/extract_dir"},"extract_to":{"$ref":"#/$defs/extract_to"},"env_add_path":{"$ref":"#/$defs/env_add_path"},"env_set":{"$ref":"#/$defs/env_set"},"installer":{"$ref":"#/$defs/installer"},"license":{"$ref":"#/$defs/license"},"persist":{"$ref":"#/$defs/persist"},"post_install":{"$ref":"#/$defs/post_install"},"psmodule":{"$ref":"#/$defs/psmodule"},"shortcuts":{"$ref":"#/$defs/shortcuts"}}}}} diff --git a/Scoop/en-US/manifest.json b/Scoop/en-US/manifest.json new file mode 100644 index 0000000..f534f94 --- /dev/null +++ b/Scoop/en-US/manifest.json @@ -0,0 +1,944 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "type": "object", + "required": [ + "version", + "description", + "homepage", + "license" + ], + "dependentRequired": { + "url": [ + "hash" + ], + "autoupdate": [ + "checkver" + ] + }, + "$defs": { + "bool": { + "type": "boolean", + "title": "Type: boolean", + "examples": [ + true, + false + ] + }, + "str": { + "type": "string", + "title": "Type: string", + "examples": [ + "" + ] + }, + "arr_str": { + "title": "Type: string or array", + "examples": [ + "", + [] + ], + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + { + "type": "string" + } + ] + }, + "license_examples": { + "type": "string", + "title": "Type: string or object(Available attributes:identifier,url)", + "examples": [ + "", + "MIT", + "Apache", + "Apache License 2.0", + "Mozilla Public License 2.0", + "GNU General Public License v3.0", + "Freeware", + "Proprietary", + "Public Domain", + "Shareware", + "Unknown" + ] + }, + "license": { + "description": "A string or hash of the software license for the program. \nFor well-known licenses, please use the identifier found at https://spdx.org/licenses\nFor other licenses, use object form, including identifier and URL attributes.\nIf available, please fill the URL of the license into the URL attribute.\nOtherwise, use \"Freeware\"(free to use forever), \"Proprietary\"(must pay to use), \"Public Domain\", \"Shareware\"(free to try, must pay finally), or \"Unknown\"(unable to determine the license), as appropriate.\nIf different files have different licenses, separate licenses with a comma (,).\nIf the entire application is dual licensed, separate licenses with a pipe symbol (|).", + "oneOf": [ + { + "type": "object", + "required": [ + "identifier" + ], + "examples": [ + { + "identifier": "", + "url": "" + }, + { + "identifier": "" + } + ], + "properties": { + "identifier": { + "description": "The SPDX identifier, or \"Freeware\"(free to use forever), \"Proprietary\"(must pay to use), \"Public Domain\", \"Shareware\"(free to try, must pay finally), or \"Unknown\"(unable to determine the license), as appropriate.", + "$ref": "#/$defs/license_examples" + }, + "url": { + "description": " For non-SPDX licenses, include a link to the license.\nIt is acceptable to include links to SPDX licenses, as well.\nIf it is difficult to determine all of the different licenses, it is acceptable to add ,... at the end of the SPDX list. If there are both open-source and not open-source licenses, please list all non-open source licenses first (e.g., Freeware/Proprietary/Shareware).\nIf you are unable to determine what license the application has, use \"Unknown\".", + "$ref": "#/$defs/str" + } + } + }, + { + "$ref": "#/$defs/license_examples" + } + ] + }, + "architecture": { + "title": "Type: object", + "properties": { + "url": { + "$ref": "#/$defs/url" + }, + "extract_dir": { + "$ref": "#/$defs/extract_dir" + }, + "bin": { + "$ref": "#/$defs/bin" + }, + "shortcuts": { + "$ref": "#/$defs/shortcuts" + }, + "installer": { + "$ref": "#/$defs/installer" + }, + "uninstaller": { + "$ref": "#/$defs/uninstaller" + }, + "pre_install": { + "$ref": "#/$defs/pre_install" + }, + "post_install": { + "$ref": "#/$defs/post_install" + }, + "checkver": { + "$ref": "#/$defs/checkver" + } + } + }, + "architecture_install": { + "required": [ + "url", + "hash" + ], + "allOf": [ + { + "$ref": "#/$defs/architecture" + }, + { + "properties": { + "hash": { + "$ref": "#/$defs/hash" + } + } + } + ] + }, + "architecture_autoupdate": { + "required": [ + "url" + ], + "allOf": [ + { + "$ref": "#/$defs/architecture" + }, + { + "properties": { + "hash": { + "$ref": "#/$defs/get_hash" + } + } + } + ] + }, + "get_hash": { + "title": "Type: object", + "description": "An object that defines how hashes are obtained.\nObject Available attributes: url,regex/find,mode,jp/jsonpath,xpath", + "required": [ + "url" + ], + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL template for downloading RDF/JSON files or extracting hashes" + }, + "regex": { + "type": "string", + "description": "Alias: find\nRegEx expression to extract the hash" + }, + "find": { + "type": "string", + "description": "Alias: regex\nRegEx expression to extract the hash" + }, + "mode": { + "description": "extract: Extract from a plain text file or webpage by RegEx (Default, can be omitted)\njson: Extract from a JSON file by JSONPath\nxpath: Extract from a XML file by XPath\nrdf: Extract from a RDF file\nmetalink: Extract from Metalink's header or .meta4 file\nfosshub: Automatic. Predefined for FossHub\nsourceforge: Automatic. Predefined for SourceForge\ndownload: Downloads the app file and hash it locally (Fallback)", + "allOf": [ + { + "examples": [ + "extract", + "json", + "xpath", + "rdf", + "metalink", + "fosshub", + "sourceforge", + "download" + ] + }, + { + "$ref": "#/$defs/str" + } + ] + }, + "jp": { + "type": "string", + "description": "Alias: jsonpath\nJSONPath expression to extract the hash" + }, + "jsonpath": { + "type": "string", + "description": "Alias: jp\nJSONPath expression to extract the hash" + }, + "xpath": { + "type": "string", + "description": "XPath expression to extract the hash" + } + } + }, + "url": { + "description": "The URL or URLs of files to download.\nIf there's more than one URL, you can use a JSON - array.\ne.g. \"url\": [ \"http://example.org/program.zip\", \"http://example.org/dependencies.zip\" ].\nURLs can be HTTP, HTTPS or FTP.\nTo change the filename of the downloaded URL, you can append a URL fragment (starting with #) to URLs.\ne.g. \"http://example.org/program.exe\" -> \"http://example.org/program.exe#/dl.7z\"\nNote the fragment must start with #/ for this to work.\nIn the above example, Scoop will download program.exe but save it as dl.7z, which will then be extracted automatically with 7-Zip. This technique is commonly used in Scoop manifests to bypass executable installers which might have undesirable side-effects like registry changes, files placed outside the install directory, or an admin elevation prompt.", + "$ref": "#/$defs/arr_str" + }, + "hash": { + "description": "A string or array of strings with a file hash for each URL in url.\nHashes are SHA256 by default, but you can use SHA512, SHA1 or MD5 by prefixing the hash string with 'sha512:', 'sha1:' or 'md5:'.", + "$ref": "#/$defs/arr_str" + }, + "bin": { + "title": "Type: string or array(one-dimensional or two-dimensional)", + "description": "A string or array of strings of programs (executables or scripts) to make available on the user's path.\nA two-dimensional array can be used to create an alias shim, which uses a different name to the real executable and (optionally) passes arguments to the executable.\nThe two-dimensional array should contain up to three strings: program name, alias, and parameters(optional).", + "examples": [ + "", + [ + "", + "" + ], + [ + "", + [ + "", + "" + ] + ], + [ + [ + "", + "" + ], + [ + "", + "" + ] + ], + [ + [ + "", + "", + "" + ] + ] + ], + "anyOf": [ + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/str" + }, + "maxItems": 3 + }, + { + "$ref": "#/$defs/str" + } + ] + } + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/str" + } + }, + { + "type": "string" + } + ] + }, + "checkver": { + "title": "Type: string or object", + "description": "App maintainers and developers can use the bin/checkver tool to check for updated versions of apps\nrequires a string or object \nString: Find the version of RegEx on the homepage\nObject: more configuration\nObject Available attributes: url,github,re/regex,jp/jsonpath,xpath,reverse,replace,useragent,script", + "examples": [ + "github", + { + "url": "", + "regex": "" + }, + { + "script": [ + "" + ], + "regex": "" + } + ], + "oneOf": [ + { + "type": "object", + "properties": { + "url": { + "description": "Page where the version can be found", + "$ref": "#/$defs/str" + }, + "github": { + "description": "URL to the app's Github repository", + "$ref": "#/$defs/str" + }, + "re": { + "description": "Alias:regex\nRegEx for finding the version", + "$ref": "#/$defs/str" + }, + "regex": { + "description": "RegEx for finding the version", + "$ref": "#/$defs/str" + }, + "jsonpath": { + "description": "JSONPath expression for finding the version", + "$ref": "#/$defs/str" + }, + "jp": { + "description": "Alias:jsonpath\nJSONPath expression for finding the version", + "$ref": "#/$defs/str" + }, + "xpath": { + "description": "XPath expression for finding the version", + "$ref": "#/$defs/str" + }, + "reverse": { + "description": "If or not match the last occurrence found", + "$ref": "#/$defs/bool" + }, + "replace": { + "description": "Replace the matched value with a calculated value", + "$ref": "#/$defs/str" + }, + "useragent": { + "description": "User-Agent that used to get webpage content", + "$ref": "#/$defs/str" + }, + "script": { + "description": "A string or array of strings that can contain PowerShell commands, useful for following multiple links", + "$ref": "#/$defs/arr_str" + } + } + }, + { + "type": "string" + } + ] + }, + "installer": { + "title": "Type: object", + "description": "Instructions for running a non-MSI installer.\nCalled during both \"scoop install\" and \"scoop update\".\nObject Available attributes: file,script,args,keep", + "examples": [ + { + "file": "" + }, + { + "script": [ + "" + ] + }, + { + "file": "", + "script": [ + "" + ] + }, + { + "file": "", + "script": [ + "" + ], + "args": [ + "" + ] + } + ], + "properties": { + "file": { + "description": "The installer executable file.\nFor installer this defaults to the last URL downloaded.\nMust be specified for uninstaller", + "$ref": "#/$defs/str" + }, + "script": { + "description": "A one-line string, or array of strings, of commands to be executed as an installer/uninstaller instead of file.\nAvailable variables: $fname (the file last downloaded), $manifest (the deserialized manifest reference), $architecture (64bit or 32bit), $dir (install directory)", + "$ref": "#/$defs/arr_str" + }, + "args": { + "type": "array", + "description": "An array of arguments to pass to the installer. Optional.", + "items": { + "$ref": "#/$defs/str" + }, + "minItems": 1 + }, + "keep": { + "description": "if the installer should be kept after running (for future uninstallation, as an example).\nIf omitted or set to any other value, the installer will be deleted after running.", + "$ref": "#/$defs/bool" + } + } + }, + "uninstaller": { + "title": "Type: object", + "description": "Instructions for running a non-MSI uninstaller.\nCalled during both \"scoop uninstall\" and \"scoop update\".\nObject Available attributes: file,script,args", + "examples": [ + { + "file": "" + }, + { + "script": [ + "" + ] + }, + { + "file": "", + "script": [ + "" + ] + }, + { + "file": "", + "script": [ + "" + ], + "args": [ + "" + ] + } + ], + "properties": { + "file": { + "description": "The uninstaller executable file.", + "$ref": "#/$defs/str" + }, + "script": { + "description": "A one-line string, or array of strings, of commands to be executed as an installer/uninstaller instead of file.\nAvailable variables: $fname (the file last downloaded), $manifest (the deserialized manifest reference), $architecture (64bit or 32bit), $dir (install directory)", + "$ref": "#/$defs/arr_str" + }, + "args": { + "type": "array", + "description": "An array of arguments to pass to the installer. Optional.", + "items": { + "type": "string" + }, + "minItems": 1 + } + } + }, + "pre_install": { + "description": "A one-line string, or array of strings, of the commands to be executed before an application is installed.\nAvailable functions:\nappdir: Reference another scoop application\ne.g. to check if another application is installed you can use: \"if (Test-Path \"$(appdir otherapp)\\current\\otherapp.exe\") { ... }\"\nAvailable variables:\n$app: Name of application (name of manifest file)\n$architecture: The CPU architecture of the app being installed,like: 64bit/32bit/arm64\n$cmd: The subcommand that's currently being run,like: uninstall/update/install\n$cfg: Scoop configuration (powershell object),like: {SCOOP_BRANCH, SCOOP_REPO}\n$global: $true for global install\n$manifest: Deserialized manifest (powershell object),like: @{homepage=https://xxx.com/; description=xxx;...}\n$version: Version being installed,like: 1.2.3\n$dir: Application installation directory (version number directory)\n$persist_dir: Scoop Directory --- persist\n$bucketsdir: Scoop Directory --- buckets,like: C:\\Users\\username\\scoop\\buckets\n$bucket: The bucket name to which the current installed application belongs(It's invalid in pre_uninstall/post_uninstall)\n$cachedir: Scoop Directory --- cache\n$cfgpath: Path to Scoop configuration\n$globaldir: Global installation directory\n$modulesdir: Scoop Directory --- modules\n$original_dir: Application installation directory (version number directory)\n$scoopdir: Path to Scoop\n$oldscoopdir: Old path to Scoop", + "$ref": "#/$defs/arr_str" + }, + "post_install": { + "description": "A one-line string, or array of strings, of the commands to be executed after an application is installed.\nAvailable functions:\nappdir: Reference another scoop application\ne.g. to check if another application is installed you can use: \"if (Test-Path \"$(appdir otherapp)\\current\\otherapp.exe\") { ... }\"\nAvailable variables:\n$app: Name of application (name of manifest file)\n$architecture: The CPU architecture of the app being installed,like: 64bit/32bit/arm64\n$cmd: The subcommand that's currently being run,like: uninstall/update/install\n$cfg: Scoop configuration (powershell object),like: {SCOOP_BRANCH, SCOOP_REPO}\n$global: $true for global install\n$manifest: Deserialized manifest (powershell object),like: @{homepage=https://xxx.com/; description=xxx;...}\n$version: Version being installed,like: 1.2.3\n$dir: Application installation directory (version number directory)\n$persist_dir: Scoop Directory --- persist\n$bucketsdir: Scoop Directory --- buckets,like: C:\\Users\\username\\scoop\\buckets\n$bucket: The bucket name to which the current installed application belongs(It's invalid in pre_uninstall/post_uninstall)\n$cachedir: Scoop Directory --- cache\n$cfgpath: Path to Scoop configuration\n$globaldir: Global installation directory\n$modulesdir: Scoop Directory --- modules\n$original_dir: Application installation directory (version number directory)\n$scoopdir: Path to Scoop\n$oldscoopdir: Old path to Scoop", + "$ref": "#/$defs/arr_str" + }, + "extract_dir": { + "description": "If url points to a compressed file(.zip, .7z, .tar, .gz, .lzma, and .lzh are supported), Scoop will extract just the directory specified from it.", + "$ref": "#/$defs/arr_str" + }, + "extract_to": { + "description": "If url points to a compressed file (.zip, .7z, .tar, .gz, .lzma, and .lzh are supported), Scoop will extract all content to the directory specified.", + "$ref": "#/$defs/arr_str" + }, + "shortcuts": { + "type": "array", + "title": "Type: array(two-dimensional)", + "description": "Specifies the shortcut values to make available in the startmenu.\nThe two-dimensional array contains four values:\n1.Path to target file [required]\n2.Name of the shortcut(supports subdirectories: \\) [required]\n3.Start parameters [optional]\n4.Path to icon file [optional]", + "examples": [ + [ + [ + "", + "" + ] + ], + [ + [ + "", + "" + ], + [ + "", + "" + ] + ], + [ + [ + "", + "", + "", + "" + ] + ] + ], + "items": { + "type": "array", + "items": { + "type": "string", + "examples": [ + "" + ] + }, + "minItems": 2, + "maxItems": 4 + }, + "minItems": 1 + }, + "env_add_path": { + "description": "Add this directory to the user's path (or system path if \"--global\" is used).\nThe directory is relative to the install directory and must be inside the install directory.", + "$ref": "#/$defs/arr_str" + }, + "env_set": { + "description": "Sets one or more environment variables for the user (or system if \"--global\" is used)", + "type": "object", + "examples": [ + { + "": "" + } + ], + "patternProperties": { + "": { + "type": "string", + "examples": [ + "" + ] + } + }, + "minProperties": 1 + }, + "persist": { + "description": "A string or array (string array or two-dimensional array) of directories and files to persist inside the data directory for the app.", + "examples": [ + "", + [ + "" + ], + [ + [ + "", + "" + ] + ] + ], + "oneOf": [ + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array" + } + ] + } + }, + { + "type": "string" + } + ] + }, + "psmodule": { + "type": "object", + "required": [ + "name" + ], + "examples": [ + { + "name": "" + } + ], + "title": "Type: object", + "description": "Install as a PowerShell module in ~/scoop/modules", + "properties": { + "name": { + "description": "the name of the module, which should match at least one file in the extracted directory for PowerShell to recognize this as a module.", + "$ref": "#/$defs/str" + } + } + } + }, + "properties": { + "version": { + "description": "The version of the app that this manifest installs.", + "allOf": [ + { + "$ref": "#/$defs/str" + }, + { + "examples": [ + "0.0.0" + ] + } + ] + }, + "description": { + "description": "A one line string containing a short description of the program.\nDon’t include the name of the program, if it’s the same as the app’s filename.\nNot technically required, but all new or updated manifests should include a description.", + "$ref": "#/$defs/str" + }, + "homepage": { + "description": "The home page for the program.", + "$ref": "#/$defs/str" + }, + "license": { + "$ref": "#/$defs/license" + }, + "##": { + "description": "A one-line string, or array of strings, containing comments.", + "$ref": "#/$defs/arr_str" + }, + "architecture": { + "type": "object", + "title": "Type: object", + "description": "The architecture of the program.\nIf the app is not 32bit, architecture can be used to wrap the differences\nObject Available attributes: 64bit,32bit,arm64", + "examples": [ + { + "url": "", + "hash": "" + }, + { + "64bit": { + "url": "", + "hash": "" + } + }, + { + "64bit": { + "url": "", + "hash": "" + }, + "32bit": { + "url": "", + "hash": "" + } + }, + { + "64bit": { + "url": "", + "hash": "" + }, + "32bit": { + "url": "", + "hash": "" + }, + "arm64": { + "url": "", + "hash": "" + } + } + ], + "properties": { + "64bit": { + "description": "64bit\nObject Available attributes: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts,checkver", + "$ref": "#/$defs/architecture_install" + }, + "32bit": { + "description": "32bit\nObject Available attributes: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts,checkver", + "$ref": "#/$defs/architecture_install" + }, + "arm64": { + "description": "arm64\nObject Available attributes: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts,checkver", + "$ref": "#/$defs/architecture_install" + } + } + }, + "url": { + "$ref": "#/$defs/url" + }, + "hash": { + "$ref": "#/$defs/hash" + }, + "extract_dir": { + "$ref": "#/$defs/extract_dir" + }, + "bin": { + "$ref": "#/$defs/bin" + }, + "shortcuts": { + "$ref": "#/$defs/shortcuts" + }, + "installer": { + "$ref": "#/$defs/installer" + }, + "uninstaller": { + "$ref": "#/$defs/uninstaller" + }, + "pre_install": { + "$ref": "#/$defs/pre_install" + }, + "post_install": { + "$ref": "#/$defs/post_install" + }, + "checkver": { + "$ref": "#/$defs/checkver" + }, + "notes": { + "description": "A one-line string, or array of strings, with a message to be displayed after installing the app.", + "$ref": "#/$defs/arr_str" + }, + "persist": { + "$ref": "#/$defs/persist" + }, + "pre_uninstall": { + "description": "A one-line string, or array of strings, of the commands to be executed before an application is uninstalled.\nAvailable functions:\nappdir: Reference another scoop application\ne.g. to check if another application is installed you can use: \"if (Test-Path \"$(appdir otherapp)\\current\\otherapp.exe\") { ... }\"\nAvailable variables:\n$app:Name of application (name of manifest file)\n$architecture:The CPU architecture of the app being installed,like: 64bit/32bit/arm64\n$cmd:The subcommand that's currently being run,like: uninstall/update/install\n$cfg:Scoop configuration (powershell object),like: {SCOOP_BRANCH, SCOOP_REPO}\n$global:$true for global uninstall\n$manifest:Deserialized manifest (powershell object),like: @{homepage=https://xxx.com/; description=xxx;...}\n$version: Version being installed,like: 1.2.3\n$dir:Application installation directory (version number directory)\n$persist_dir: Scoop Directory --- persist\n$bucketsdir: Scoop Directory --- buckets,like: C:\\Users\\username\\scoop\\buckets\n$cachedir: Scoop Directory --- cache\n$cfgpath: Path to Scoop configuration\n$globaldir: Global installation directory\n$modulesdir: Scoop Directory --- modules\n$original_dir: Application installation directory (version number directory)\n$scoopdir: Path to Scoop\n$oldscoopdir: Old path to Scoop", + "$ref": "#/$defs/arr_str" + }, + "post_uninstall": { + "description": "A one-line string, or array of strings, of the commands to be executed after an application is uninstalled.\nAvailable functions:\nappdir: Reference another scoop application\ne.g. to check if another application is installed you can use: \"if (Test-Path \"$(appdir otherapp)\\current\\otherapp.exe\") { ... }\"\nAvailable variables:\n$app:Name of application (name of manifest file)\n$architecture:The CPU architecture of the app being installed,like: 64bit/32bit/arm64\n$cmd:The subcommand that's currently being run,like: uninstall/update/install\n$cfg:Scoop configuration (powershell object),like: {SCOOP_BRANCH, SCOOP_REPO}\n$global:$true for global uninstalls\n$manifest:Deserialized manifest (powershell object),like: @{homepage=https://xxx.com/; description=xxx;...}\n$version: Version being installed,like: 1.2.3\n$dir:Application installation directory (version number directory)\n$persist_dir: Scoop Directory --- persist\n$bucketsdir: Scoop Directory --- buckets,like: C:\\Users\\username\\scoop\\buckets\n$cachedir: Scoop Directory --- cache\n$cfgpath: Path to Scoop configuration\n$globaldir: Global installation directory\n$modulesdir: Scoop Directory --- modules\n$original_dir: Application installation directory (version number directory)\n$scoopdir: Path to Scoop\n$oldscoopdir: Old path to Scoop", + "$ref": "#/$defs/arr_str" + }, + "depends": { + "description": "Runtime dependencies for the app which will be installed automatically\nsuggest is an alternative to depends", + "$ref": "#/$defs/str" + }, + "env_add_path": { + "$ref": "#/$defs/env_add_path" + }, + "env_set": { + "$ref": "#/$defs/env_set" + }, + "extract_to": { + "$ref": "#/$defs/extract_to" + }, + "innosetup": { + "description": "Set to the boolean true if the installer is InnoSetup based.", + "$ref": "#/$defs/bool" + }, + "psmodule": { + "$ref": "#/$defs/psmodule" + }, + "suggest": { + "type": "object", + "description": "Display a message suggesting optional apps that provide complementary features.\nIf any of the apps suggested for the feature are already installed, the feature will be treated as 'fulfilled' and the user won't see any suggestions.", + "patternProperties": { + "": { + "$ref": "#/$defs/arr_str" + } + } + }, + "autoupdate": { + "title": "Type: object", + "description": "Definition of how the manifest can be updated automatically.\nObject Available attributes: note,architecture,url,hash,bin,extract_dir,extract_to,env_add_path,env_set,installer,license,persist,post_install,psmodule,shortcuts", + "examples": [ + { + "note": "", + "url": "" + }, + { + "architecture": { + "64bit": { + "url": "" + } + } + }, + { + "architecture": { + "64bit": { + "url": "", + "hash": {} + } + } + }, + { + "architecture": { + "64bit": { + "url": "" + }, + "32bit": { + "url": "" + } + } + }, + { + "architecture": { + "64bit": { + "url": "" + }, + "32bit": { + "url": "" + }, + "arm64": { + "url": "" + } + } + }, + { + "architecture": { + "64bit": { + "url": "" + }, + "32bit": { + "url": "" + } + }, + "hash": { + "url": "" + } + }, + { + "architecture": { + "64bit": { + "url": "" + }, + "32bit": { + "url": "" + }, + "arm64": { + "url": "" + } + }, + "hash": { + "url": "" + } + } + ], + "type": "object", + "properties": { + "note": { + "description": "A one-line string, or array of strings, with a message to be displayed after autoupdating the app.", + "$ref": "#/$defs/str" + }, + "architecture": { + "type": "object", + "title": "Type: object", + "description": "The architecture of the program.\nIf the app is not 32bit, architecture can be used to wrap the differences\nObject Available attributes: 64bit,32bit,arm64", + "examples": [ + { + "url": "", + "hash": { + "url": "" + } + }, + { + "64bit": { + "url": "", + "hash": { + "url": "", + "regex": "" + } + } + }, + { + "64bit": { + "url": "", + "hash": { + "url": "", + "regex": "" + } + }, + "32bit": { + "url": "", + "hash": { + "url": "", + "regex": "" + } + } + }, + { + "64bit": { + "url": "" + }, + "32bit": { + "url": "" + }, + "hash": { + "url": "", + "regex": "" + } + } + ], + "properties": { + "64bit": { + "description": "64bit\nObject Available attributes: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts", + "$ref": "#/$defs/architecture_autoupdate" + }, + "32bit": { + "description": "32bit\nObject Available attributes: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts", + "$ref": "#/$defs/architecture_autoupdate" + }, + "arm64": { + "description": "arm64\nObject Available attributes: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts", + "$ref": "#/$defs/architecture_autoupdate" + } + } + }, + "url": { + "$ref": "#/$defs/url" + }, + "hash": { + "$ref": "#/$defs/get_hash" + }, + "bin": { + "$ref": "#/$defs/bin" + }, + "extract_dir": { + "$ref": "#/$defs/extract_dir" + }, + "extract_to": { + "$ref": "#/$defs/extract_to" + }, + "env_add_path": { + "$ref": "#/$defs/env_add_path" + }, + "env_set": { + "$ref": "#/$defs/env_set" + }, + "installer": { + "$ref": "#/$defs/installer" + }, + "license": { + "$ref": "#/$defs/license" + }, + "persist": { + "$ref": "#/$defs/persist" + }, + "post_install": { + "$ref": "#/$defs/post_install" + }, + "psmodule": { + "$ref": "#/$defs/psmodule" + }, + "shortcuts": { + "$ref": "#/$defs/shortcuts" + } + } + } + } +} diff --git a/Scoop/zh-CN/manifest-min.json b/Scoop/zh-CN/manifest-min.json new file mode 100644 index 0000000..00c0bad --- /dev/null +++ b/Scoop/zh-CN/manifest-min.json @@ -0,0 +1 @@ +{"$schema":"http://json-schema.org/draft-07/schema","type":"object","required":["version","description","homepage","license"],"dependentRequired":{"url":["hash"],"autoupdate":["checkver"]},"$defs":{"bool":{"type":"boolean","title":"类型: 布尔值","examples":[true,false]},"str":{"type":"string","title":"类型: 字符串","examples":[""]},"arr_str":{"title":"类型: 字符串或数组","examples":["",[]],"oneOf":[{"type":"array","items":{"type":"string"},"minItems":1},{"type":"string"}]},"license_examples":{"type":"string","examples":["","MIT","Apache","Apache License 2.0","Mozilla Public License 2.0","GNU General Public License v3.0","Freeware","Proprietary","Public Domain","Shareware","Unknown"]},"license":{"title":"类型: 字符串或对象(可用属性: identifier,url)","description":"程序的软件许可证的字符串或散列。\n对于知名许可证,请使用此页面中的标识符 https://spdx.org/licenses\n对于其他许可证,请尽量使用对象形式,包含 identifier、url 属性。\n如果可用,请将许可证的 URL 填入 url 属性。\n否则,请酌情使用 \"Freeware\"(永久免费)、\"Proprietary\"(必须付费使用)、\"Public Domain\"(公共领域)、\"Shareware\"(免费尝试,最终必须付费)、\"Unknown\"(无法确定许可证)。\n如果不同的文件具有不同的许可证,请用逗号(,)分隔许可证。\n如果整个应用程序是双重许可的,则使用管道符号(|)分隔许可。","oneOf":[{"type":"object","required":["identifier"],"examples":[{"identifier":"","url":""},{"identifier":""}],"properties":{"identifier":{"description":"SPDX 标识符,或者 \"Freeware\"(永久免费)、\"Proprietary\"(必须付费使用)、\"Public Domain\"(公共领域)、\"Shareware\"(免费尝试,最终必须付费)、\"Unknown\"(无法确定许可证),视情况而定。","$ref":"#/$defs/license_examples"},"url":{"description":"非 SPDX 许可证的链接。\n也可以是 SPDX 许可证的链接。\n如果难以确定所有不同的许可证,可以在 SPDX 列表末尾添加 \"......\"。如果既有开源许可又有非开源许可,请先列出所有非开源许可(如:Freeware/Proprietary/Shareware)\n如果无法确定应用程序的许可证,请使用 \"Unknown\"。","$ref":"#/$defs/str"}}},{"$ref":"#/$defs/license_examples"}]},"architecture":{"title":"类型: 对象","properties":{"url":{"$ref":"#/$defs/url"},"extract_dir":{"$ref":"#/$defs/extract_dir"},"bin":{"$ref":"#/$defs/bin"},"shortcuts":{"$ref":"#/$defs/shortcuts"},"installer":{"$ref":"#/$defs/installer"},"uninstaller":{"$ref":"#/$defs/uninstaller"},"pre_install":{"$ref":"#/$defs/pre_install"},"post_install":{"$ref":"#/$defs/post_install"},"checkver":{"$ref":"#/$defs/checkver"}}},"architecture_install":{"required":["url","hash"],"allOf":[{"$ref":"#/$defs/architecture"},{"properties":{"hash":{"$ref":"#/$defs/hash"}}}]},"architecture_autoupdate":{"required":["url"],"allOf":[{"$ref":"#/$defs/architecture"},{"properties":{"hash":{"$ref":"#/$defs/get_hash"}}}]},"get_hash":{"type":"object","title":"类型: 对象","description":"一个对象,定义哈希的获取\n对象可用属性: url,regex/find,mode,jp/jsonpath,xpath","required":["url"],"properties":{"url":{"description":"用于下载RDF/JSON文件或提取哈希的URL模板","$ref":"#/$defs/str"},"regex":{"description":"别名:find\nRegEx表达式来提取哈希","$ref":"#/$defs/str"},"find":{"description":"别名:regex\nRegEx表达式来提取哈希","$ref":"#/$defs/str"},"mode":{"description":"extract: 通过RegEx从纯文本文件或网页中提取(默认,可省略)\njson: 通过JSONPath从JSON文件中提取\nxpath: 通过XML文件提取\nrdf: 从RDF文件中提取\nmetalink: 从Metalink的头文件或 .meta4 文件中提取\nfosshub: 自动。为FossHub预定义\nsourceforge: 自动。为SourceForge预定义\ndownload: 下载应用程序文件并在本地对其进行散列(回退)","allOf":[{"examples":["extract","json","xpath","rdf","metalink","fosshub","sourceforge","download"]},{"$ref":"#/$defs/str"}]},"jp":{"description":"别名:jsonpath\nJSONPath表达式提取哈希","$ref":"#/$defs/str"},"jsonpath":{"description":"别名:jp\nJSONPath表达式提取哈希","$ref":"#/$defs/str"},"xpath":{"description":"XPath表达式来提取哈希值","$ref":"#/$defs/str"}}},"url":{"description":"要下载的文件的URL。\n如果有多个URL,可以使用JSON数组\n例如: \"url\": [\"http://example.org/program.zip\", \"http://example.org/dependencies.zip\"] 。\nURL可以是HTTP、HTTPS或FTP。\n要更改下载URL的文件名,您可以将 URL 片段以 (#) 开头)附加到 URL\n如:\"http://example.org/program.exe\" -> \"http://example.org/program.exe#/dl.7z\"\n请注意,片段必须以 #/ 开头才有效。\n在上面的例子中,Scoop将下载 program.exe ,但将其保存为 dl.7z ,然后将使用7-Zip自动提取。\n此技术通常用于 Scoop 清单中,以绕过可能具有不良副作用的可执行安装程序,如注册表更改,放置在安装目录外的文件或管理员提升提示。","$ref":"#/$defs/arr_str"},"hash":{"description":"一个字符串或字符串数组,其中包含 url 中每个 URL 的文件哈希。\n哈希值默认为 SHA 256,但你可以使用 SHA 512,SHA1 或 MD5,方法是在哈希字符串前面加上'sha 512:','sha1:'或'md5:'","$ref":"#/$defs/arr_str"},"bin":{"title":"类型: 字符串或数组(一维或二维)","description":"一个程序(可执行文件或脚本)的字符串或字符串数组,可在用户路径上使用。\n可以通过一个二维数组来创建一个别名 shim,它使用与真实的可执行文件不同的名称,并(可选地)将参数传递给可执行文件。\n二维数组应该包含最多三个字符串:程序名,别名,参数(可选)","examples":["",["",""],["",["",""]],[["",""],["",""]],[["","",""]]],"anyOf":[{"type":"array","items":{"oneOf":[{"type":"array","items":{"$ref":"#/$defs/str"},"maxItems":3},{"$ref":"#/$defs/str"}]}},{"type":"array","items":{"$ref":"#/$defs/str"}},{"type":"string"}]},"checkver":{"title":"类型: 字符串或对象","description":"应用维护者和开发者可以使用 bin/checkver 工具来检查应用的更新版本。\n字符串:在主页上查找版本的 RegEx\n对象:更丰富的配置\n对象可用属性: url,github,re/regex,jp/jsonpath,xpath,reverse,replace,useragent,script","examples":["","github",{"url":"","regex":""},{"script":[""],"regex":""}],"oneOf":[{"type":"object","properties":{"url":{"description":"版本所在页面","$ref":"#/$defs/str"},"github":{"description":"应用的 github 仓库地址","$ref":"#/$defs/str"},"re":{"description":"re 是 regex 的别名\n查找版本的 RegEx(正则表达式)","$ref":"#/$defs/str"},"regex":{"description":"查找版本的 RegEx(正则表达式)","$ref":"#/$defs/str"},"jsonpath":{"description":"使用带有 JSONPath 表达式的 JSON 端点检索版本,可以使用点标注或括号标注。","$ref":"#/$defs/str"},"jp":{"description":"jp 是 jsonpath 的别名\n使用带有 JSONPath 表达式的 JSON 端点检索版本,可以使用点标注或括号标注。","$ref":"#/$defs/str"},"xpath":{"description":"查找版本的 XPath 表达式","$ref":"#/$defs/str"},"reverse":{"description":"如果设置为 true, 则匹配最后一次出现(默认为匹配第一次出现)","$ref":"#/$defs/bool"},"replace":{"description":"用计算值替换匹配值","$ref":"#/$defs/str"},"useragent":{"description":"用于获取网页内容的 User-Agent","$ref":"#/$defs/str"},"script":{"description":"可包含 PowerShell 命令的字符串或字符串数组,用于跟踪多个链接","$ref":"#/$defs/arr_str"}}},{"type":"string"}]},"installer":{"title":"类型: 对象","description":"运行非 MSI 安装程序的说明。\n在 scoop install 和 scoop update 期间调用。\n可用属性: file,script,args,keep","examples":[{"file":""},{"script":[""]},{"file":"","script":[""]},{"file":"","script":[""],"args":[""]}],"properties":{"file":{"description":"安装程序可执行文件。对于 installer ,默认为最后下载的URL。必须为 uninstaller 指定。","$ref":"#/$defs/str"},"script":{"description":"一行字符串或字符串数组,作为安装程序而不是 file 执行。\n可用变量:$fname(上次下载的文件)、 $manifest(已验证的清单引用)、 $architecture(64bit 或 32bit)、 $dir(安装目录)","$ref":"#/$defs/arr_str"},"args":{"type":"array","description":"传递给安装程序的参数数组。可选的.","items":{"$ref":"#/$defs/str"},"minItems":1},"keep":{"description":"如果安装程序在运行后应该保留(例如,用于将来的卸载),则设置为 true。\n如果忽略或设置为任何其他值,安装程序将在运行后被删除。","$ref":"#/$defs/bool"}}},"uninstaller":{"title":"类型: 对象","description":"运行非 MSI 卸载程序的说明。\n在 scoop uninstall 和 scoop update 期间调用。\n可用属性: file,script,args","examples":[{"file":""},{"script":[""]},{"file":"","script":[""]},{"file":"","script":[""],"args":[""]}],"properties":{"file":{"description":"卸载程序可执行文件。","$ref":"#/$defs/str"},"script":{"description":"一行字符串或字符串数组,作为卸载程序而不是 file 执行。\n可用变量:$fname(上次下载的文件)、 $manifest(已验证的清单引用)、 $architecture(64bit 或 32bit)、 $dir(安装目录)","$ref":"#/$defs/arr_str"},"args":{"type":"array","description":"传递给卸载程序的参数数组。可选的","items":{"$ref":"#/$defs/str"},"minItems":1}}},"pre_install":{"description":"一行字符串或字符串数组,用于在安装应用程序之前执行命令\n可以使用的函数:\nappdir: 参考另一个独家应用程序。\n例如,要检查是否安装了另一个应用程序,可以使用 \"if (Test-Path \"$(appdir otherapp)\\current\\otherapp.exe\") { ... }\"\n可以使用的变量:\n$app: 应用程序名称(应用清单名称)\n$architecture: 所安装应用程序的 CPU 架构,如 64bit/32bit/arm64\n$cmd: 当前正在运行的子命令,如 uninstall/update/install\n$cfg: Scoop 配置(PowerShell 对象),如 {SCOOP_BRANCH, SCOOP_REPO}\n$global: 如果值为$true,则全局安装\n$manifest: 反序列化清单(PowerShell 对象),如 @{homepage=https://xxx.com/; description=xxx;...}\n$version: 正在安装的版本,如 1.2.3\n$dir: 应用程序安装目录(实际版本号目录)\n$persist_dir: 数据持久化目录\n$bucketsdir: Scoop buckets 目录,如 C:\\Users\\username\\scoop\\buckets\n$bucket: 当前安装应用所属于的 bucket 名称(pre_uninstall,post_uninstall 中不存在此变量)\n$cachedir: Scoop cache 目录\n$cfgpath: Scoop 配置的路径\n$globaldir: 全局安装目录\n$modulesdir: Scoop modules 目录\n$original_dir: 应用程序安装目录(实际版本号目录)\n$scoopdir: Scoop 所在目录\n$oldscoopdir: 旧的 Scoop 目录","$ref":"#/$defs/arr_str"},"post_install":{"description":"一行字符串或字符串数组,用于在安装应用程序之后执行命令\n可以使用的函数:\nappdir: 参考另一个独家应用程序。\n例如,要检查是否安装了另一个应用程序,可以使用 \"if (Test-Path \"$(appdir otherapp)\\current\\otherapp.exe\") { ... }\"\n可以使用的变量:\n$app: 应用程序名称(应用清单名称)\n$architecture: 所安装应用程序的 CPU 架构,如 64bit/32bit/arm64\n$cmd: 当前正在运行的子命令,如 uninstall/update/install\n$cfg: Scoop 配置(PowerShell 对象),如 {SCOOP_BRANCH, SCOOP_REPO}\n$global: 如果值为$true,则全局安装\n$manifest: 反序列化清单(PowerShell 对象),如 @{homepage=https://xxx.com/; description=xxx;...}\n$version: 正在安装的版本,如 1.2.3\n$dir: 应用程序安装目录(current 目录)\n$persist_dir: 数据持久化目录\n$bucketsdir: Scoop buckets 目录,如 C:\\Users\\username\\scoop\\buckets\n$bucket: 当前安装应用所属于的 bucket 名称(pre_uninstall,post_uninstall 中不存在此变量)\n$cachedir: Scoop cache 目录\n$cfgpath: Scoop 配置的路径\n$globaldir: 全局安装目录\n$modulesdir: Scoop modules 目录\n$original_dir: 应用程序安装目录(实际版本号目录)\n$scoopdir: Scoop 所在目录\n$oldscoopdir: 旧的 Scoop 目录","$ref":"#/$defs/arr_str"},"extract_dir":{"description":"如果 url 指向一个压缩文件(支持.zip、.7z、.tar、.gz、.lzma和.lzh),Scoop将只提取其中指定的目录","$ref":"#/$defs/arr_str"},"extract_to":{"description":"如果 url 指向压缩文件(支持.zip、.7z、.tar、.gz、.lzma和.lzh),Scoop会将所有内容提取到指定的目录","$ref":"#/$defs/arr_str"},"shortcuts":{"type":"array","title":"类型: 二维数组","description":"指定要在开始菜单中可用的快捷方式值。\n二维数组中包含四个值:\n1.目标文件的路径(必需值)\n2.快捷方式的名称(支持子目录:\\,必需值)\n3.启动参数(可选值)\n4.图标文件的路径(可选值)","examples":[[["",""]],[["",""],["",""]],[["","","",""]]],"items":{"type":"array","items":{"type":"string","examples":[""]},"minItems":2,"maxItems":4},"minItems":1},"env_add_path":{"description":"将此目录添加到用户路径(如果使用 --global ,则添加到系统路径)。\n该目录是相对于安装目录的,并且必须位于安装目录内。","$ref":"#/$defs/arr_str"},"env_set":{"description":"为用户(或系统,如果使用 --global)设置一个或多个环境变量","type":"object","examples":[{"":""}],"patternProperties":{"":{"type":"string","examples":[""]}},"minProperties":1},"persist":{"description":"目录和文件的字符串或数组(字符串数组或二维数组),用于在应用程序的数据目录中持久化。","examples":["",[""],[["",""]]],"oneOf":[{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"array"}]}},{"type":"string"}]},"psmodule":{"type":"object","required":["name"],"examples":[{"name":""}],"title":"类型: 对象","description":"在 ~/scoop/modules 中作为PowerShell模块安装。","properties":{"name":{"description":"模块的名称,它应该与提取目录中的至少一个文件匹配,以便 PowerShell 将其识别为模块。","$ref":"#/$defs/str"}}}},"properties":{"version":{"description":"此应用清单安装的应用程序的版本。","allOf":[{"$ref":"#/$defs/str"},{"examples":["0.0.0"]}]},"description":{"description":"一个单行字符串,包含程序的简短描述。\n如果程序名与此应用清单的文件名相同,请不要在描述中包含程序名。","$ref":"#/$defs/str"},"homepage":{"description":"程序的主页。","$ref":"#/$defs/str"},"license":{"$ref":"#/$defs/license"},"##":{"description":"单行字符串或字符串数组,可以将其作为注释","$ref":"#/$defs/arr_str"},"architecture":{"type":"object","title":"类型: 对象","description":"程序的体系结构。\n如果应用程序不是32位的,架构可以用来包装差异\n对象可用属性: 64bit,32bit,arm64","examples":[{"url":"","hash":""},{"64bit":{"url":"","hash":""}},{"64bit":{"url":"","hash":""},"32bit":{"url":"","hash":""}},{"64bit":{"url":"","hash":""},"32bit":{"url":"","hash":""},"arm64":{"url":"","hash":""}}],"properties":{"64bit":{"description":"64位架构\n对象可用属性: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts,checkver","$ref":"#/$defs/architecture_install"},"32bit":{"description":"32位架构\n对象可用属性: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts,checkver","$ref":"#/$defs/architecture_install"},"arm64":{"description":"arm64架构\n对象可用属性: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts,checkver","$ref":"#/$defs/architecture_install"}}},"url":{"$ref":"#/$defs/url"},"hash":{"$ref":"#/$defs/hash"},"extract_dir":{"$ref":"#/$defs/extract_dir"},"bin":{"$ref":"#/$defs/bin"},"shortcuts":{"$ref":"#/$defs/shortcuts"},"installer":{"$ref":"#/$defs/installer"},"uninstaller":{"$ref":"#/$defs/uninstaller"},"pre_install":{"$ref":"#/$defs/pre_install"},"post_install":{"$ref":"#/$defs/post_install"},"checkver":{"$ref":"#/$defs/checkver"},"notes":{"description":"一行字符串或字符串数组,安装程序之后的提示信息","$ref":"#/$defs/arr_str"},"persist":{"$ref":"#/$defs/persist"},"pre_uninstall":{"description":"一行字符串或字符串数组,用于在卸载应用程序之前执行命令\n可以使用的函数:\nappdir: 参考另一个独家应用程序。\n例如,要检查是否安装了另一个应用程序,可以使用 \"if (Test-Path \"$(appdir otherapp)\\current\\otherapp.exe\") { ... }\"\n可以使用的变量:\n$app: 应用程序名称(应用清单名称)\n$architecture: 所安装应用程序的 CPU 架构,如 64bit/32bit/arm64\n$cmd: 当前正在运行的子命令,如 uninstall/update/install\n$cfg: Scoop 配置(PowerShell 对象),如 {SCOOP_BRANCH, SCOOP_REPO}\n$global: 如果值为$true,则全局卸载\n$manifest: 反序列化清单(PowerShell 对象),如 @{homepage=https://xxx.com/; description=xxx;...}\n$version: 正在安装的版本,如 1.2.3\n$dir: 应用程序安装目录(实际版本号目录)\n$persist_dir: 数据持久化目录\n$bucketsdir: Scoop buckets 目录,如 C:\\Users\\username\\scoop\\buckets\n$cachedir: Scoop cache 目录\n$cfgpath: Scoop 配置的路径\n$globaldir: 全局安装目录\n$modulesdir: Scoop modules 目录\n$original_dir: 应用程序安装目录(实际版本号目录)\n$scoopdir: Scoop 所在目录\n$oldscoopdir: 旧的 Scoop 目录","$ref":"#/$defs/arr_str"},"post_uninstall":{"description":"一行字符串或字符串数组,用于在卸载应用程序之后执行命令\n可以使用的函数:\nappdir: 参考另一个独家应用程序。\n例如,要检查是否安装了另一个应用程序,可以使用 \"if (Test-Path \"$(appdir otherapp)\\current\\otherapp.exe\") { ... }\"\n可以使用的变量:\n$app: 应用程序名称(应用清单名称)\n$architecture: 所安装应用程序的 CPU 架构,如 64bit/32bit/arm64\n$cmd: 当前正在运行的子命令,如 uninstall/update/install\n$cfg: Scoop 配置(PowerShell 对象),如 {SCOOP_BRANCH, SCOOP_REPO}\n$global: 如果值为$true,则全局卸载\n$manifest: 反序列化清单(PowerShell 对象),如 @{homepage=https://xxx.com/; description=xxx;...}\n$version: 正在安装的版本,如 1.2.3\n$dir: 应用程序安装目录(实际版本号目录)\n$persist_dir: 数据持久化目录\n$bucketsdir: Scoop buckets 目录,如 C:\\Users\\username\\scoop\\buckets\n$cachedir: Scoop cache 目录\n$cfgpath: Scoop 配置的路径\n$globaldir: 全局安装目录\n$modulesdir: Scoop modules 目录\n$original_dir: 应用程序安装目录(实际版本号目录)\n$scoopdir: Scoop 所在目录\n$oldscoopdir: 旧的 Scoop 目录","$ref":"#/$defs/arr_str"},"depends":{"description":"suggests 是 depends 的一个替代方案\n应用的运行时依赖会被自动安装","$ref":"#/$defs/str"},"env_add_path":{"$ref":"#/$defs/env_add_path"},"env_set":{"$ref":"#/$defs/env_set"},"extract_to":{"$ref":"#/$defs/extract_to"},"innosetup":{"description":"如果安装程序基于 InnoSetup,则设置为 true","$ref":"#/$defs/bool"},"psmodule":{"$ref":"#/$defs/psmodule"},"suggest":{"type":"object","description":"显示一条消息,建议提供补充功能的可选应用程序。\n如果已经安装了针对该功能建议的任何应用程序,则该功能将被视为“已实现”,用户不会看到任何建议。","patternProperties":{"":{"$ref":"#/$defs/arr_str"}}},"autoupdate":{"title":"类型: 对象","description":"定义如何自动更新清单。\n对象可用属性: note,architecture,url,hash,bin,extract_dir,extract_to,env_add_path,env_set,installer,license,persist,post_install,psmodule,shortcuts","examples":[{"note":"","url":""},{"architecture":{"64bit":{"url":""}}},{"architecture":{"64bit":{"url":"","hash":{}}}},{"architecture":{"64bit":{"url":""},"32bit":{"url":""}}},{"architecture":{"64bit":{"url":""},"32bit":{"url":""},"arm64":{"url":""}}},{"architecture":{"64bit":{"url":""},"32bit":{"url":""}},"hash":{"url":""}},{"architecture":{"64bit":{"url":""},"32bit":{"url":""},"arm64":{"url":""}},"hash":{"url":""}}],"type":"object","properties":{"note":{"description":"自动更新完成之后的提示信息","$ref":"#/$defs/str"},"architecture":{"type":"object","title":"类型: 对象","description":"程序的体系结构。\n如果应用程序不是32位的,架构可以用来包装差异\n对象可用属性: 64bit,32bit,arm64","examples":[{"url":"","hash":{"url":""}},{"64bit":{"url":"","hash":{"url":"","regex":""}}},{"64bit":{"url":"","hash":{"url":"","regex":""}},"32bit":{"url":"","hash":{"url":"","regex":""}}},{"64bit":{"url":""},"32bit":{"url":""},"hash":{"url":"","regex":""}}],"properties":{"64bit":{"description":"64位架构\n对象可用属性: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts","$ref":"#/$defs/architecture_autoupdate"},"32bit":{"description":"32位架构\n对象可用属性: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts","required":["url"],"$ref":"#/$defs/architecture_autoupdate"},"arm64":{"description":"arm64架构\n对象可用属性: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts","required":["url"],"$ref":"#/$defs/architecture_autoupdate"}}},"url":{"$ref":"#/$defs/url"},"hash":{"$ref":"#/$defs/get_hash"},"bin":{"$ref":"#/$defs/bin"},"extract_dir":{"$ref":"#/$defs/extract_dir"},"extract_to":{"$ref":"#/$defs/extract_to"},"env_add_path":{"$ref":"#/$defs/env_add_path"},"env_set":{"$ref":"#/$defs/env_set"},"installer":{"$ref":"#/$defs/installer"},"license":{"$ref":"#/$defs/license"},"persist":{"$ref":"#/$defs/persist"},"post_install":{"$ref":"#/$defs/post_install"},"psmodule":{"$ref":"#/$defs/psmodule"},"shortcuts":{"$ref":"#/$defs/shortcuts"}}}}} diff --git a/Scoop/zh-CN/manifest.json b/Scoop/zh-CN/manifest.json new file mode 100644 index 0000000..98bccee --- /dev/null +++ b/Scoop/zh-CN/manifest.json @@ -0,0 +1,951 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "type": "object", + "required": [ + "version", + "description", + "homepage", + "license" + ], + "dependentRequired": { + "url": [ + "hash" + ], + "autoupdate": [ + "checkver" + ] + }, + "$defs": { + "bool": { + "type": "boolean", + "title": "类型: 布尔值", + "examples": [ + true, + false + ] + }, + "str": { + "type": "string", + "title": "类型: 字符串", + "examples": [ + "" + ] + }, + "arr_str": { + "title": "类型: 字符串或数组", + "examples": [ + "", + [] + ], + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + { + "type": "string" + } + ] + }, + "license_examples": { + "type": "string", + "examples": [ + "", + "MIT", + "Apache", + "Apache License 2.0", + "Mozilla Public License 2.0", + "GNU General Public License v3.0", + "Freeware", + "Proprietary", + "Public Domain", + "Shareware", + "Unknown" + ] + }, + "license": { + "title": "类型: 字符串或对象(可用属性: identifier,url)", + "description": "程序的软件许可证的字符串或散列。\n对于知名许可证,请使用此页面中的标识符 https://spdx.org/licenses\n对于其他许可证,请尽量使用对象形式,包含 identifier、url 属性。\n如果可用,请将许可证的 URL 填入 url 属性。\n否则,请酌情使用 \"Freeware\"(永久免费)、\"Proprietary\"(必须付费使用)、\"Public Domain\"(公共领域)、\"Shareware\"(免费尝试,最终必须付费)、\"Unknown\"(无法确定许可证)。\n如果不同的文件具有不同的许可证,请用逗号(,)分隔许可证。\n如果整个应用程序是双重许可的,则使用管道符号(|)分隔许可。", + "oneOf": [ + { + "type": "object", + "required": [ + "identifier" + ], + "examples": [ + { + "identifier": "", + "url": "" + }, + { + "identifier": "" + } + ], + "properties": { + "identifier": { + "description": "SPDX 标识符,或者 \"Freeware\"(永久免费)、\"Proprietary\"(必须付费使用)、\"Public Domain\"(公共领域)、\"Shareware\"(免费尝试,最终必须付费)、\"Unknown\"(无法确定许可证),视情况而定。", + "$ref": "#/$defs/license_examples" + }, + "url": { + "description": "非 SPDX 许可证的链接。\n也可以是 SPDX 许可证的链接。\n如果难以确定所有不同的许可证,可以在 SPDX 列表末尾添加 \"......\"。如果既有开源许可又有非开源许可,请先列出所有非开源许可(如:Freeware/Proprietary/Shareware)\n如果无法确定应用程序的许可证,请使用 \"Unknown\"。", + "$ref": "#/$defs/str" + } + } + }, + { + "$ref": "#/$defs/license_examples" + } + ] + }, + "architecture": { + "title": "类型: 对象", + "properties": { + "url": { + "$ref": "#/$defs/url" + }, + "extract_dir": { + "$ref": "#/$defs/extract_dir" + }, + "bin": { + "$ref": "#/$defs/bin" + }, + "shortcuts": { + "$ref": "#/$defs/shortcuts" + }, + "installer": { + "$ref": "#/$defs/installer" + }, + "uninstaller": { + "$ref": "#/$defs/uninstaller" + }, + "pre_install": { + "$ref": "#/$defs/pre_install" + }, + "post_install": { + "$ref": "#/$defs/post_install" + }, + "checkver": { + "$ref": "#/$defs/checkver" + } + } + }, + "architecture_install": { + "required": [ + "url", + "hash" + ], + "allOf": [ + { + "$ref": "#/$defs/architecture" + }, + { + "properties": { + "hash": { + "$ref": "#/$defs/hash" + } + } + } + ] + }, + "architecture_autoupdate": { + "required": [ + "url" + ], + "allOf": [ + { + "$ref": "#/$defs/architecture" + }, + { + "properties": { + "hash": { + "$ref": "#/$defs/get_hash" + } + } + } + ] + }, + "get_hash": { + "type": "object", + "title": "类型: 对象", + "description": "一个对象,定义哈希的获取\n对象可用属性: url,regex/find,mode,jp/jsonpath,xpath", + "required": [ + "url" + ], + "properties": { + "url": { + "description": "用于下载RDF/JSON文件或提取哈希的URL模板", + "$ref": "#/$defs/str" + }, + "regex": { + "description": "别名:find\nRegEx表达式来提取哈希", + "$ref": "#/$defs/str" + }, + "find": { + "description": "别名:regex\nRegEx表达式来提取哈希", + "$ref": "#/$defs/str" + }, + "mode": { + "description": "extract: 通过RegEx从纯文本文件或网页中提取(默认,可省略)\njson: 通过JSONPath从JSON文件中提取\nxpath: 通过XML文件提取\nrdf: 从RDF文件中提取\nmetalink: 从Metalink的头文件或 .meta4 文件中提取\nfosshub: 自动。为FossHub预定义\nsourceforge: 自动。为SourceForge预定义\ndownload: 下载应用程序文件并在本地对其进行散列(回退)", + "allOf": [ + { + "examples": [ + "extract", + "json", + "xpath", + "rdf", + "metalink", + "fosshub", + "sourceforge", + "download" + ] + }, + { + "$ref": "#/$defs/str" + } + ] + }, + "jp": { + "description": "别名:jsonpath\nJSONPath表达式提取哈希", + "$ref": "#/$defs/str" + }, + "jsonpath": { + "description": "别名:jp\nJSONPath表达式提取哈希", + "$ref": "#/$defs/str" + }, + "xpath": { + "description": "XPath表达式来提取哈希值", + "$ref": "#/$defs/str" + } + } + }, + "url": { + "description": "要下载的文件的URL。\n如果有多个URL,可以使用JSON数组\n例如: \"url\": [\"http://example.org/program.zip\", \"http://example.org/dependencies.zip\"] 。\nURL可以是HTTP、HTTPS或FTP。\n要更改下载URL的文件名,您可以将 URL 片段以 (#) 开头)附加到 URL\n如:\"http://example.org/program.exe\" -> \"http://example.org/program.exe#/dl.7z\"\n请注意,片段必须以 #/ 开头才有效。\n在上面的例子中,Scoop将下载 program.exe ,但将其保存为 dl.7z ,然后将使用7-Zip自动提取。\n此技术通常用于 Scoop 清单中,以绕过可能具有不良副作用的可执行安装程序,如注册表更改,放置在安装目录外的文件或管理员提升提示。", + "$ref": "#/$defs/arr_str" + }, + "hash": { + "description": "一个字符串或字符串数组,其中包含 url 中每个 URL 的文件哈希。\n哈希值默认为 SHA 256,但你可以使用 SHA 512,SHA1 或 MD5,方法是在哈希字符串前面加上'sha 512:','sha1:'或'md5:'", + "$ref": "#/$defs/arr_str" + }, + "bin": { + "title": "类型: 字符串或数组(一维或二维)", + "description": "一个程序(可执行文件或脚本)的字符串或字符串数组,可在用户路径上使用。\n可以通过一个二维数组来创建一个别名 shim,它使用与真实的可执行文件不同的名称,并(可选地)将参数传递给可执行文件。\n二维数组应该包含最多三个字符串:程序名,别名,参数(可选)", + "examples": [ + "", + [ + "", + "" + ], + [ + "", + [ + "", + "" + ] + ], + [ + [ + "", + "" + ], + [ + "", + "" + ] + ], + [ + [ + "", + "", + "" + ] + ] + ], + "anyOf": [ + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/str" + }, + "maxItems": 3 + }, + { + "$ref": "#/$defs/str" + } + ] + } + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/str" + } + }, + { + "type": "string" + } + ] + }, + "checkver": { + "title": "类型: 字符串或对象", + "description": "应用维护者和开发者可以使用 bin/checkver 工具来检查应用的更新版本。\n字符串:在主页上查找版本的 RegEx\n对象:更丰富的配置\n对象可用属性: url,github,re/regex,jp/jsonpath,xpath,reverse,replace,useragent,script", + "examples": [ + "", + "github", + { + "url": "", + "regex": "" + }, + { + "script": [ + "" + ], + "regex": "" + } + ], + "oneOf": [ + { + "type": "object", + "properties": { + "url": { + "description": "版本所在页面", + "$ref": "#/$defs/str" + }, + "github": { + "description": "应用的 github 仓库地址", + "$ref": "#/$defs/str" + }, + "re": { + "description": "re 是 regex 的别名\n查找版本的 RegEx(正则表达式)", + "$ref": "#/$defs/str" + }, + "regex": { + "description": "查找版本的 RegEx(正则表达式)", + "$ref": "#/$defs/str" + }, + "jsonpath": { + "description": "使用带有 JSONPath 表达式的 JSON 端点检索版本,可以使用点标注或括号标注。", + "$ref": "#/$defs/str" + }, + "jp": { + "description": "jp 是 jsonpath 的别名\n使用带有 JSONPath 表达式的 JSON 端点检索版本,可以使用点标注或括号标注。", + "$ref": "#/$defs/str" + }, + "xpath": { + "description": "查找版本的 XPath 表达式", + "$ref": "#/$defs/str" + }, + "reverse": { + "description": "如果设置为 true, 则匹配最后一次出现(默认为匹配第一次出现)", + "$ref": "#/$defs/bool" + }, + "replace": { + "description": "用计算值替换匹配值", + "$ref": "#/$defs/str" + }, + "useragent": { + "description": "用于获取网页内容的 User-Agent", + "$ref": "#/$defs/str" + }, + "script": { + "description": "可包含 PowerShell 命令的字符串或字符串数组,用于跟踪多个链接", + "$ref": "#/$defs/arr_str" + } + } + }, + { + "type": "string" + } + ] + }, + "installer": { + "title": "类型: 对象", + "description": "运行非 MSI 安装程序的说明。\n在 scoop install 和 scoop update 期间调用。\n可用属性: file,script,args,keep", + "examples": [ + { + "file": "" + }, + { + "script": [ + "" + ] + }, + { + "file": "", + "script": [ + "" + ] + }, + { + "file": "", + "script": [ + "" + ], + "args": [ + "" + ] + } + ], + "properties": { + "file": { + "description": "安装程序可执行文件。对于 installer ,默认为最后下载的URL。必须为 uninstaller 指定。", + "$ref": "#/$defs/str" + }, + "script": { + "description": "一行字符串或字符串数组,作为安装程序而不是 file 执行。\n可用变量:$fname(上次下载的文件)、 $manifest(已验证的清单引用)、 $architecture(64bit 或 32bit)、 $dir(安装目录)", + "$ref": "#/$defs/arr_str" + }, + "args": { + "type": "array", + "description": "传递给安装程序的参数数组。可选的.", + "items": { + "$ref": "#/$defs/str" + }, + "minItems": 1 + }, + "keep": { + "description": "如果安装程序在运行后应该保留(例如,用于将来的卸载),则设置为 true。\n如果忽略或设置为任何其他值,安装程序将在运行后被删除。", + "$ref": "#/$defs/bool" + } + } + }, + "uninstaller": { + "title": "类型: 对象", + "description": "运行非 MSI 卸载程序的说明。\n在 scoop uninstall 和 scoop update 期间调用。\n可用属性: file,script,args", + "examples": [ + { + "file": "" + }, + { + "script": [ + "" + ] + }, + { + "file": "", + "script": [ + "" + ] + }, + { + "file": "", + "script": [ + "" + ], + "args": [ + "" + ] + } + ], + "properties": { + "file": { + "description": "卸载程序可执行文件。", + "$ref": "#/$defs/str" + }, + "script": { + "description": "一行字符串或字符串数组,作为卸载程序而不是 file 执行。\n可用变量:$fname(上次下载的文件)、 $manifest(已验证的清单引用)、 $architecture(64bit 或 32bit)、 $dir(安装目录)", + "$ref": "#/$defs/arr_str" + }, + "args": { + "type": "array", + "description": "传递给卸载程序的参数数组。可选的", + "items": { + "$ref": "#/$defs/str" + }, + "minItems": 1 + } + } + }, + "pre_install": { + "description": "一行字符串或字符串数组,用于在安装应用程序之前执行命令\n可以使用的函数:\nappdir: 参考另一个独家应用程序。\n例如,要检查是否安装了另一个应用程序,可以使用 \"if (Test-Path \"$(appdir otherapp)\\current\\otherapp.exe\") { ... }\"\n可以使用的变量:\n$app: 应用程序名称(应用清单名称)\n$architecture: 所安装应用程序的 CPU 架构,如 64bit/32bit/arm64\n$cmd: 当前正在运行的子命令,如 uninstall/update/install\n$cfg: Scoop 配置(PowerShell 对象),如 {SCOOP_BRANCH, SCOOP_REPO}\n$global: 如果值为$true,则全局安装\n$manifest: 反序列化清单(PowerShell 对象),如 @{homepage=https://xxx.com/; description=xxx;...}\n$version: 正在安装的版本,如 1.2.3\n$dir: 应用程序安装目录(实际版本号目录)\n$persist_dir: 数据持久化目录\n$bucketsdir: Scoop buckets 目录,如 C:\\Users\\username\\scoop\\buckets\n$bucket: 当前安装应用所属于的 bucket 名称(pre_uninstall,post_uninstall 中不存在此变量)\n$cachedir: Scoop cache 目录\n$cfgpath: Scoop 配置的路径\n$globaldir: 全局安装目录\n$modulesdir: Scoop modules 目录\n$original_dir: 应用程序安装目录(实际版本号目录)\n$scoopdir: Scoop 所在目录\n$oldscoopdir: 旧的 Scoop 目录", + "$ref": "#/$defs/arr_str" + }, + "post_install": { + "description": "一行字符串或字符串数组,用于在安装应用程序之后执行命令\n可以使用的函数:\nappdir: 参考另一个独家应用程序。\n例如,要检查是否安装了另一个应用程序,可以使用 \"if (Test-Path \"$(appdir otherapp)\\current\\otherapp.exe\") { ... }\"\n可以使用的变量:\n$app: 应用程序名称(应用清单名称)\n$architecture: 所安装应用程序的 CPU 架构,如 64bit/32bit/arm64\n$cmd: 当前正在运行的子命令,如 uninstall/update/install\n$cfg: Scoop 配置(PowerShell 对象),如 {SCOOP_BRANCH, SCOOP_REPO}\n$global: 如果值为$true,则全局安装\n$manifest: 反序列化清单(PowerShell 对象),如 @{homepage=https://xxx.com/; description=xxx;...}\n$version: 正在安装的版本,如 1.2.3\n$dir: 应用程序安装目录(current 目录)\n$persist_dir: 数据持久化目录\n$bucketsdir: Scoop buckets 目录,如 C:\\Users\\username\\scoop\\buckets\n$bucket: 当前安装应用所属于的 bucket 名称(pre_uninstall,post_uninstall 中不存在此变量)\n$cachedir: Scoop cache 目录\n$cfgpath: Scoop 配置的路径\n$globaldir: 全局安装目录\n$modulesdir: Scoop modules 目录\n$original_dir: 应用程序安装目录(实际版本号目录)\n$scoopdir: Scoop 所在目录\n$oldscoopdir: 旧的 Scoop 目录", + "$ref": "#/$defs/arr_str" + }, + "extract_dir": { + "description": "如果 url 指向一个压缩文件(支持.zip、.7z、.tar、.gz、.lzma和.lzh),Scoop将只提取其中指定的目录", + "$ref": "#/$defs/arr_str" + }, + "extract_to": { + "description": "如果 url 指向压缩文件(支持.zip、.7z、.tar、.gz、.lzma和.lzh),Scoop会将所有内容提取到指定的目录", + "$ref": "#/$defs/arr_str" + }, + "shortcuts": { + "type": "array", + "title": "类型: 二维数组", + "description": "指定要在开始菜单中可用的快捷方式值。\n二维数组中包含四个值:\n1.目标文件的路径(必需值)\n2.快捷方式的名称(支持子目录:\\,必需值)\n3.启动参数(可选值)\n4.图标文件的路径(可选值)", + "examples": [ + [ + [ + "", + "" + ] + ], + [ + [ + "", + "" + ], + [ + "", + "" + ] + ], + [ + [ + "", + "", + "", + "" + ] + ] + ], + "items": { + "type": "array", + "items": { + "type": "string", + "examples": [ + "" + ] + }, + "minItems": 2, + "maxItems": 4 + }, + "minItems": 1 + }, + "env_add_path": { + "description": "将此目录添加到用户路径(如果使用 --global ,则添加到系统路径)。\n该目录是相对于安装目录的,并且必须位于安装目录内。", + "$ref": "#/$defs/arr_str" + }, + "env_set": { + "description": "为用户(或系统,如果使用 --global)设置一个或多个环境变量", + "type": "object", + "examples": [ + { + "": "" + } + ], + "patternProperties": { + "": { + "type": "string", + "examples": [ + "" + ] + } + }, + "minProperties": 1 + }, + "persist": { + "description": "目录和文件的字符串或数组(字符串数组或二维数组),用于在应用程序的数据目录中持久化。", + "examples": [ + "", + [ + "" + ], + [ + [ + "", + "" + ] + ] + ], + "oneOf": [ + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array" + } + ] + } + }, + { + "type": "string" + } + ] + }, + "psmodule": { + "type": "object", + "required": [ + "name" + ], + "examples": [ + { + "name": "" + } + ], + "title": "类型: 对象", + "description": "在 ~/scoop/modules 中作为PowerShell模块安装。", + "properties": { + "name": { + "description": "模块的名称,它应该与提取目录中的至少一个文件匹配,以便 PowerShell 将其识别为模块。", + "$ref": "#/$defs/str" + } + } + } + }, + "properties": { + "version": { + "description": "此应用清单安装的应用程序的版本。", + "allOf": [ + { + "$ref": "#/$defs/str" + }, + { + "examples": [ + "0.0.0" + ] + } + ] + }, + "description": { + "description": "一个单行字符串,包含程序的简短描述。\n如果程序名与此应用清单的文件名相同,请不要在描述中包含程序名。", + "$ref": "#/$defs/str" + }, + "homepage": { + "description": "程序的主页。", + "$ref": "#/$defs/str" + }, + "license": { + "$ref": "#/$defs/license" + }, + "##": { + "description": "单行字符串或字符串数组,可以将其作为注释", + "$ref": "#/$defs/arr_str" + }, + "architecture": { + "type": "object", + "title": "类型: 对象", + "description": "程序的体系结构。\n如果应用程序不是32位的,架构可以用来包装差异\n对象可用属性: 64bit,32bit,arm64", + "examples": [ + { + "url": "", + "hash": "" + }, + { + "64bit": { + "url": "", + "hash": "" + } + }, + { + "64bit": { + "url": "", + "hash": "" + }, + "32bit": { + "url": "", + "hash": "" + } + }, + { + "64bit": { + "url": "", + "hash": "" + }, + "32bit": { + "url": "", + "hash": "" + }, + "arm64": { + "url": "", + "hash": "" + } + } + ], + "properties": { + "64bit": { + "description": "64位架构\n对象可用属性: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts,checkver", + "$ref": "#/$defs/architecture_install" + }, + "32bit": { + "description": "32位架构\n对象可用属性: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts,checkver", + "$ref": "#/$defs/architecture_install" + }, + "arm64": { + "description": "arm64架构\n对象可用属性: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts,checkver", + "$ref": "#/$defs/architecture_install" + } + } + }, + "url": { + "$ref": "#/$defs/url" + }, + "hash": { + "$ref": "#/$defs/hash" + }, + "extract_dir": { + "$ref": "#/$defs/extract_dir" + }, + "bin": { + "$ref": "#/$defs/bin" + }, + "shortcuts": { + "$ref": "#/$defs/shortcuts" + }, + "installer": { + "$ref": "#/$defs/installer" + }, + "uninstaller": { + "$ref": "#/$defs/uninstaller" + }, + "pre_install": { + "$ref": "#/$defs/pre_install" + }, + "post_install": { + "$ref": "#/$defs/post_install" + }, + "checkver": { + "$ref": "#/$defs/checkver" + }, + "notes": { + "description": "一行字符串或字符串数组,安装程序之后的提示信息", + "$ref": "#/$defs/arr_str" + }, + "persist": { + "$ref": "#/$defs/persist" + }, + "pre_uninstall": { + "description": "一行字符串或字符串数组,用于在卸载应用程序之前执行命令\n可以使用的函数:\nappdir: 参考另一个独家应用程序。\n例如,要检查是否安装了另一个应用程序,可以使用 \"if (Test-Path \"$(appdir otherapp)\\current\\otherapp.exe\") { ... }\"\n可以使用的变量:\n$app: 应用程序名称(应用清单名称)\n$architecture: 所安装应用程序的 CPU 架构,如 64bit/32bit/arm64\n$cmd: 当前正在运行的子命令,如 uninstall/update/install\n$cfg: Scoop 配置(PowerShell 对象),如 {SCOOP_BRANCH, SCOOP_REPO}\n$global: 如果值为$true,则全局卸载\n$manifest: 反序列化清单(PowerShell 对象),如 @{homepage=https://xxx.com/; description=xxx;...}\n$version: 正在安装的版本,如 1.2.3\n$dir: 应用程序安装目录(实际版本号目录)\n$persist_dir: 数据持久化目录\n$bucketsdir: Scoop buckets 目录,如 C:\\Users\\username\\scoop\\buckets\n$cachedir: Scoop cache 目录\n$cfgpath: Scoop 配置的路径\n$globaldir: 全局安装目录\n$modulesdir: Scoop modules 目录\n$original_dir: 应用程序安装目录(实际版本号目录)\n$scoopdir: Scoop 所在目录\n$oldscoopdir: 旧的 Scoop 目录", + "$ref": "#/$defs/arr_str" + }, + "post_uninstall": { + "description": "一行字符串或字符串数组,用于在卸载应用程序之后执行命令\n可以使用的函数:\nappdir: 参考另一个独家应用程序。\n例如,要检查是否安装了另一个应用程序,可以使用 \"if (Test-Path \"$(appdir otherapp)\\current\\otherapp.exe\") { ... }\"\n可以使用的变量:\n$app: 应用程序名称(应用清单名称)\n$architecture: 所安装应用程序的 CPU 架构,如 64bit/32bit/arm64\n$cmd: 当前正在运行的子命令,如 uninstall/update/install\n$cfg: Scoop 配置(PowerShell 对象),如 {SCOOP_BRANCH, SCOOP_REPO}\n$global: 如果值为$true,则全局卸载\n$manifest: 反序列化清单(PowerShell 对象),如 @{homepage=https://xxx.com/; description=xxx;...}\n$version: 正在安装的版本,如 1.2.3\n$dir: 应用程序安装目录(实际版本号目录)\n$persist_dir: 数据持久化目录\n$bucketsdir: Scoop buckets 目录,如 C:\\Users\\username\\scoop\\buckets\n$cachedir: Scoop cache 目录\n$cfgpath: Scoop 配置的路径\n$globaldir: 全局安装目录\n$modulesdir: Scoop modules 目录\n$original_dir: 应用程序安装目录(实际版本号目录)\n$scoopdir: Scoop 所在目录\n$oldscoopdir: 旧的 Scoop 目录", + "$ref": "#/$defs/arr_str" + }, + "depends": { + "description": "suggests 是 depends 的一个替代方案\n应用的运行时依赖会被自动安装", + "$ref": "#/$defs/str" + }, + "env_add_path": { + "$ref": "#/$defs/env_add_path" + }, + "env_set": { + "$ref": "#/$defs/env_set" + }, + "extract_to": { + "$ref": "#/$defs/extract_to" + }, + "innosetup": { + "description": "如果安装程序基于 InnoSetup,则设置为 true", + "$ref": "#/$defs/bool" + }, + "psmodule": { + "$ref": "#/$defs/psmodule" + }, + "suggest": { + "type": "object", + "description": "显示一条消息,建议提供补充功能的可选应用程序。\n如果已经安装了针对该功能建议的任何应用程序,则该功能将被视为“已实现”,用户不会看到任何建议。", + "patternProperties": { + "": { + "$ref": "#/$defs/arr_str" + } + } + }, + "autoupdate": { + "title": "类型: 对象", + "description": "定义如何自动更新清单。\n对象可用属性: note,architecture,url,hash,bin,extract_dir,extract_to,env_add_path,env_set,installer,license,persist,post_install,psmodule,shortcuts", + "examples": [ + { + "note": "", + "url": "" + }, + { + "architecture": { + "64bit": { + "url": "" + } + } + }, + { + "architecture": { + "64bit": { + "url": "", + "hash": {} + } + } + }, + { + "architecture": { + "64bit": { + "url": "" + }, + "32bit": { + "url": "" + } + } + }, + { + "architecture": { + "64bit": { + "url": "" + }, + "32bit": { + "url": "" + }, + "arm64": { + "url": "" + } + } + }, + { + "architecture": { + "64bit": { + "url": "" + }, + "32bit": { + "url": "" + } + }, + "hash": { + "url": "" + } + }, + { + "architecture": { + "64bit": { + "url": "" + }, + "32bit": { + "url": "" + }, + "arm64": { + "url": "" + } + }, + "hash": { + "url": "" + } + } + ], + "type": "object", + "properties": { + "note": { + "description": "自动更新完成之后的提示信息", + "$ref": "#/$defs/str" + }, + "architecture": { + "type": "object", + "title": "类型: 对象", + "description": "程序的体系结构。\n如果应用程序不是32位的,架构可以用来包装差异\n对象可用属性: 64bit,32bit,arm64", + "examples": [ + { + "url": "", + "hash": { + "url": "" + } + }, + { + "64bit": { + "url": "", + "hash": { + "url": "", + "regex": "" + } + } + }, + { + "64bit": { + "url": "", + "hash": { + "url": "", + "regex": "" + } + }, + "32bit": { + "url": "", + "hash": { + "url": "", + "regex": "" + } + } + }, + { + "64bit": { + "url": "" + }, + "32bit": { + "url": "" + }, + "hash": { + "url": "", + "regex": "" + } + } + ], + "properties": { + "64bit": { + "description": "64位架构\n对象可用属性: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts", + "$ref": "#/$defs/architecture_autoupdate" + }, + "32bit": { + "description": "32位架构\n对象可用属性: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts", + "required": [ + "url" + ], + "$ref": "#/$defs/architecture_autoupdate" + }, + "arm64": { + "description": "arm64架构\n对象可用属性: url,hash,bin,extract_dir,installer,uninstaller,pre_install,post_install,shortcuts", + "required": [ + "url" + ], + "$ref": "#/$defs/architecture_autoupdate" + } + } + }, + "url": { + "$ref": "#/$defs/url" + }, + "hash": { + "$ref": "#/$defs/get_hash" + }, + "bin": { + "$ref": "#/$defs/bin" + }, + "extract_dir": { + "$ref": "#/$defs/extract_dir" + }, + "extract_to": { + "$ref": "#/$defs/extract_to" + }, + "env_add_path": { + "$ref": "#/$defs/env_add_path" + }, + "env_set": { + "$ref": "#/$defs/env_set" + }, + "installer": { + "$ref": "#/$defs/installer" + }, + "license": { + "$ref": "#/$defs/license" + }, + "persist": { + "$ref": "#/$defs/persist" + }, + "post_install": { + "$ref": "#/$defs/post_install" + }, + "psmodule": { + "$ref": "#/$defs/psmodule" + }, + "shortcuts": { + "$ref": "#/$defs/shortcuts" + } + } + } + } +}