From 0ead786b6c1608c414a383e1850484e8f38c1872 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Fri, 19 Mar 2021 17:02:21 +0100 Subject: [PATCH] - rename env variables - update doc --- DOCS.md | 37 +++++++++++++++++++++++++++++------- patches/custom-gallery.patch | 10 +++++----- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/DOCS.md b/DOCS.md index 4986740..1a3905c 100644 --- a/DOCS.md +++ b/DOCS.md @@ -41,16 +41,39 @@ The `product.json` file is set up to use [open-vsx.org](https://open-vsx.org/) a * Ask the extension maintainers to publish to [open-vsx.org](https://open-vsx.org/) in addition to the VS Code Marketplace. The publishing process is documented in the [Open VSX Wiki](https://github.com/eclipse/openvsx/wiki/Publishing-Extensions). * Create a pull request to [this repository](https://github.com/open-vsx/publish-extensions) to have the [@open-vsx](https://github.com/open-vsx) service account publish the extensions for you. * Download and [install the vsix files](https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix). -* Modify the `extensionsGallery` section of the `product.json` file in your VSCodium installation to use the VS Code Marketplace as shown below. However, note that [it is not clear whether this is legal](https://github.com/microsoft/vscode/issues/31168). - ```json - "extensionsGallery": { - "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery", - "itemUrl": "https://marketplace.visualstudio.com/items" - } - ``` See [this article](https://www.gitpod.io/blog/open-vsx/) for more information on the motivation behind Open VSX. +### How to use the VS Code Marketplace + +You can switch and use the VS Code marketplace by using the following solutions. However, note that [it is not clear whether this is legal](https://github.com/microsoft/vscode/issues/31168). + +With the following environment variables: +- `VSCODE_GALLERY_SERVICE_URL='https://marketplace.visualstudio.com/_apis/public/gallery'` +- `VSCODE_GALLERY_CACHE_URL='https://vscode.blob.core.windows.net/gallery/index'` +- `VSCODE_GALLERY_ITEM_URL='https://marketplace.visualstudio.com/items'` +- `VSCODE_GALLERY_CONTROL_URL=''` +- `VSCODE_GALLERY_RECOMMENDATIONS_URL=''` + +Or by creating a custom `product.json` at the following location: +- Windows: `%USER%\AppData\Roaming\VSCodium` +- macOS: `~/Library/Application Support/VSCodium` +- Linux: `~/.config/VSCodium` + +with the content: + +```json +{ + "extensionsGallery": { + "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery", + "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index", + "itemUrl": "https://marketplace.visualstudio.com/items", + "controlUrl": "", + "recommendationsUrl": "" + } +} +``` + ### Proprietary Debugging Tools The debugger provided with Microsoft's [C# extension](https://github.com/OmniSharp/omnisharp-vscode) as well as the (Windows) debugger provided with their [C++ extension](https://github.com/Microsoft/vscode-cpptools) are very restrictively licensed to only work with the offical Visual Studio Code build. See [this comment in the C# extension repo](https://github.com/OmniSharp/omnisharp-vscode/issues/2491#issuecomment-418811364) and [this comment in the C++ extension repo](https://github.com/Microsoft/vscode-cpptools/issues/21#issuecomment-248349017). diff --git a/patches/custom-gallery.patch b/patches/custom-gallery.patch index d6ca1df..f4c1200 100644 --- a/patches/custom-gallery.patch +++ b/patches/custom-gallery.patch @@ -49,11 +49,11 @@ index 2730ee7..4d46c23 100644 + + Object.assign(product, { + extensionsGallery: { -+ serviceUrl: env['VSCODIUM_GALLERY_SERVICE_URL'] || serviceUrl, -+ cacheUrl: env['VSCODIUM_GALLERY_CACHE_URL'] || cacheUrl, -+ itemUrl: env['VSCODIUM_GALLERY_ITEM_URL'] || itemUrl, -+ controlUrl: env['VSCODIUM_GALLERY_CONTROL_URL'] || controlUrl, -+ recommendationsUrl: env['VSCODIUM_GALLERY_RECOMMENDATIONS_URL'] || recommendationsUrl ++ serviceUrl: env['VSCODE_GALLERY_SERVICE_URL'] || serviceUrl, ++ cacheUrl: env['VSCODE_GALLERY_CACHE_URL'] || cacheUrl, ++ itemUrl: env['VSCODE_GALLERY_ITEM_URL'] || itemUrl, ++ controlUrl: env['VSCODE_GALLERY_CONTROL_URL'] || controlUrl, ++ recommendationsUrl: env['VSCODE_GALLERY_RECOMMENDATIONS_URL'] || recommendationsUrl + } + }) +