editors/vscode: Add new port

Add vscode to the portstree. the popular editor developed by Microsoft and
based on Electron.
Many thanks to the maintainer Hiroki for his very appreciated work on it.
This commit is contained in:
Luca Pizzamiglio 2019-12-23 17:23:22 +00:00
parent e998b73dc8
commit 719fc2047b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=520731
28 changed files with 2238 additions and 0 deletions

View File

@ -248,6 +248,7 @@
SUBDIR += vim
SUBDIR += vim-console
SUBDIR += vim-tiny
SUBDIR += vscode
SUBDIR += web-mode
SUBDIR += with-editor
SUBDIR += wordgrinder

254
editors/vscode/Makefile Normal file
View File

@ -0,0 +1,254 @@
# $FreeBSD$
PORTNAME= vscode
DISTVERSION= 1.41.0
CATEGORIES= editors
MASTER_SITES= https://atom.io/download/electron/v${ELECTRON_VER}/:electron_headers \
https://github.com/electron/electron/releases/download/v${ELECTRON_VER}/:electron_linux \
https://nodejs.org/dist/v${NODE_VER}/:node_headers \
https://registry.yarnpkg.com/vscode-ripgrep/-/:vscode_ripgrep \
https://github.com/tagattie/FreeBSD-VSCode/releases/download/${DISTVERSION}/:yarn_cache
DISTFILES= node-v${ELECTRON_VER}-headers${EXTRACT_SUFX}:electron_headers \
electron-v${ELECTRON_VER}-linux-x64.zip:electron_linux \
ffmpeg-v${ELECTRON_VER}-linux-x64.zip:electron_linux \
node-v${NODE_VER}-headers${EXTRACT_SUFX}:node_headers \
vscode-ripgrep-${VSCODE_RIPGREP_VER}.tgz:vscode_ripgrep
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= tagattie@yandex.com
COMMENT= Visual Studio Code - Open Source ("Code - OSS")
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
ONLY_FOR_ARCHS= amd64
BUILD_DEPENDS= electron:devel/electron6 \
rg:textproc/ripgrep \
npm:www/npm-node10 \
yarn:www/yarn-node10
LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-atk \
libsnappy.so:archivers/snappy \
libasound.so:audio/alsa-lib \
libFLAC.so:audio/flac \
libopus.so:audio/opus \
libdbus-1.so:devel/dbus \
libinotify.so:devel/libinotify \
libnotify.so:devel/libnotify \
libpci.so:devel/libpci \
libnspr4.so:devel/nspr \
libpcre2-8.so:devel/pcre2 \
libre2.so:devel/re2 \
libdrm.so:graphics/libdrm \
libwebp.so:graphics/webp \
libavcodec.so:multimedia/ffmpeg \
libvpx.so:multimedia/libvpx \
libopenh264.so:multimedia/openh264 \
libcups.so:print/cups \
libfreetype.so:print/freetype2 \
libharfbuzz.so:print/harfbuzz \
libsecret-1.so:security/libsecret \
libnss3.so:security/nss \
libexpat.so:textproc/expat2 \
libfontconfig.so:x11-fonts/fontconfig
RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \
xdg-open:devel/xdg-utils \
bash:shells/bash
TEST_DEPENDS= electron:devel/electron6 \
bash:shells/bash
USES= desktop-file-utils gl gmake gnome jpeg pkgconfig \
python:2.7,build shebangfix xorg
USE_GITHUB= yes
GH_ACCOUNT= microsoft
SOURCE_COMMIT_HASH= 9579eda04fdb3a9bba2750f15193e5fafe16b959
BINARY_ALIAS= python=${PYTHON_CMD}
USE_XORG= x11 xcb xcomposite xcursor xdamage xext xfixes xi xkbfile \
xrandr xrender xscrnsaver xtst
USE_GL= gl glesv2
USE_GNOME= atk cairo pango gdkpixbuf2 gtk30 libxml2 libxslt
USE_LDCONFIG= ${DATADIR}
ELECTRON_VER= 6.1.6 # keep in sync with devel/electron6
NODE_VER= 12.4.0
VSCODE_RIPGREP_VER= 1.5.7
SHEBANG_FILES= extensions/vscode-test-resolver/scripts/terminateProcess.sh \
resources/linux/bin/code.sh \
scripts/test.sh
DATADIR= ${PREFIX}/share/code-oss
TMPDIR= ${WRKDIR}
MAKE_ENV+= BUILD_SOURCEVERSION=${SOURCE_COMMIT_HASH} \
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 \
XDG_CACHE_HOME=${WRKDIR}/.cache
OPTIONS_DEFINE= POUDRIERE
POUDRIERE_DESC= Support build with poudriere (KEEP THIS ON)
OPTIONS_DEFAULT= POUDRIERE
POUDRIERE_DISTFILES= yarn-offline-cache-${DISTVERSION}${EXTRACT_SUFX}:yarn_cache \
vscode-marketplace-exts-${DISTVERSION}${EXTRACT_SUFX}:yarn_cache
POUDRIERE_EXTRACT_ONLY= yarn-offline-cache-${DISTVERSION}${EXTRACT_SUFX} \
vscode-marketplace-exts-${DISTVERSION}${EXTRACT_SUFX}
POUDRIERE_EXTRA_PATCHES= ${FILESDIR}/extra-patch-build_gulpfile.extensions.js
post-extract:
${MKDIR} ${WRKDIR}/vscode-ripgrep
${TAR} -xzf ${DISTDIR}/${DIST_SUBDIR}/vscode-ripgrep-${VSCODE_RIPGREP_VER}.tgz \
--strip-components 1 -C ${WRKDIR}/vscode-ripgrep
# setup electron headers for node-gyp
${MKDIR} ${WRKDIR}/.cache/node-gyp/${ELECTRON_VER}
${TAR} -xzf ${DISTDIR}/${DIST_SUBDIR}/node-v${ELECTRON_VER}-headers${EXTRACT_SUFX} \
--strip-components 1 -C ${WRKDIR}/.cache/node-gyp/${ELECTRON_VER}
${ECHO} 9 > ${WRKDIR}/.cache/node-gyp/${ELECTRON_VER}/installVersion
# setup node headers for node-gyp
${MKDIR} ${WRKDIR}/.cache/node-gyp/${NODE_VER}
${TAR} -xzf ${DISTDIR}/${DIST_SUBDIR}/node-v${NODE_VER}-headers${EXTRACT_SUFX} \
--strip-components 1 -C ${WRKDIR}/.cache/node-gyp/${NODE_VER}
${ECHO} 9 > ${WRKDIR}/.cache/node-gyp/${NODE_VER}/installVersion
# setup download cache for gulp-atom-electron
${MKDIR} ${WRKDIR}/gulp-electron-cache/atom/electron
${CP} ${DISTDIR}/${DIST_SUBDIR}/electron-v${ELECTRON_VER}-linux-x64.zip \
${WRKDIR}/gulp-electron-cache/atom/electron
${CP} ${DISTDIR}/${DIST_SUBDIR}/ffmpeg-v${ELECTRON_VER}-linux-x64.zip \
${WRKDIR}/gulp-electron-cache/atom/electron
# setup electron download cache for UI smoke tests
# ${MKDIR} ${WRKDIR}/.cache/electron
# ${SED} -e 's/freebsd${OSREL:R}/freebsd/' ${DISTDIR}/${DIST_SUBDIR}/SHASUMS256.txt > \
# ${WRKDIR}/.cache/electron/SHASUMS256.txt-${ELECTRON_VER}
# ${CP} ${DISTDIR}/${DIST_SUBDIR}/electron-v${ELECTRON_VER}-freebsd${OSREL:R}-x64.zip \
# ${WRKDIR}/.cache/electron/electron-v${ELECTRON_VER}-freebsd-x64.zip
post-patch:
# force use of electron version matching port one
${REINPLACE_CMD} -E 's|^(target ").*(")$$|\1${ELECTRON_VER}\2|' \
${WRKSRC}/.yarnrc
# setup yarnrc for offline node_modules installation
${SED} -e 's|$${WRKDIR}|${WRKDIR}|' \
${FILESDIR}/yarnrc-offline-mirror >> ${WRKSRC}/.yarnrc
${REINPLACE_CMD} -e 's/@@NAME_LONG@@/Code - OSS/; \
s/@@NAME_SHORT@@/Code - OSS/; \
s/@@PRODNAME@@/Code - OSS/; \
s/@@NAME@@/code-oss/g; \
s|@@EXEC@@|${PREFIX}/bin/code-oss|; \
s/@@ICON@@/com.visualstudio.code.oss/; \
s/@@URLPROTOCOL@@/code-oss/; \
s/@@LICENSE@@/MIT/; \
s/@@APPNAME@@/code-oss/g; \
s|/usr/share|${PREFIX}/share|' \
${WRKSRC}/resources/completions/bash/code \
${WRKSRC}/resources/completions/zsh/_code \
${WRKSRC}/resources/linux/bin/code.sh \
${WRKSRC}/resources/linux/code.appdata.xml \
${WRKSRC}/resources/linux/code.desktop \
${WRKSRC}/resources/linux/code-url-handler.desktop
pre-build:
cd ${LOCALBASE}/share && \
${TAR} -cf - electron | ${TAR} -xf - -C ${WRKDIR}
${CP} ${FILESDIR}/package.json-build ${WRKSRC}/package.json
${CP} ${FILESDIR}/package.json-remote-build ${WRKSRC}/remote/package.json
pre-build-POUDRIERE-on:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} yarn --frozen-lockfile --offline # --no-progress
pre-build-POUDRIERE-off:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} yarn --frozen-lockfile # --no-progress
do-build:
${MKDIR} ${WRKDIR}/vscode-ripgrep/bin
${CP} ${LOCALBASE}/bin/rg ${WRKDIR}/vscode-ripgrep/bin
cd ${WRKDIR} && \
${TAR} -cf - vscode-ripgrep | ${TAR} -xf - -C ${WRKSRC}/node_modules
cd ${WRKDIR} && \
${TAR} -cf - vscode-ripgrep | ${TAR} -xf - -C ${WRKSRC}/remote/node_modules
${CP} ${FILESDIR}/package.json-package ${WRKSRC}/package.json
${CP} ${FILESDIR}/package.json-remote-package ${WRKSRC}/remote/package.json
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} yarn gulp vscode-linux-x64-min
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} yarn gulp vscode-reh-linux-x64-min
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} yarn gulp vscode-reh-web-linux-x64-min
post-build-POUDRIERE-on:
${MV} ${WRKDIR}/builtInExtensions/* ${WRKDIR}/VSCode-linux-x64/resources/app/extensions
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d
${INSTALL_DATA} ${WRKSRC}/resources/completions/bash/code \
${STAGEDIR}${PREFIX}/etc/bash_completion.d/code-oss
${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
${INSTALL_DATA} ${WRKSRC}/resources/completions/zsh/_code \
${STAGEDIR}${PREFIX}/share/zsh/site-functions/_code-oss
${MKDIR} ${STAGEDIR}${PREFIX}/share/appdata
${INSTALL_DATA} ${WRKSRC}/resources/linux/code.appdata.xml \
${STAGEDIR}${PREFIX}/share/appdata/code-oss.appdata.xml
${MKDIR} ${STAGEDIR}${PREFIX}/share/applications
.for f in code.desktop code-url-handler.desktop
${INSTALL_DATA} ${WRKSRC}/resources/linux/${f} \
${STAGEDIR}${PREFIX}/share/applications/${f:S/code/code-oss/}
.endfor
${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps
${INSTALL_DATA} ${WRKSRC}/resources/linux/code.png \
${STAGEDIR}${PREFIX}/share/pixmaps/com.visualstudio.code.oss.png
${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_PROGRAM} ${WRKDIR}/electron/electron \
${STAGEDIR}${DATADIR}/code-oss
.for f in libEGL.so libGLESv2.so
${INSTALL_LIB} ${WRKDIR}/electron/${f} ${STAGEDIR}${DATADIR}
.endfor
${MKDIR} ${STAGEDIR}${DATADIR}/swiftshader
.for f in libEGL.so libGLESv2.so
${INSTALL_LIB} ${WRKDIR}/electron/swiftshader/${f} \
${STAGEDIR}${DATADIR}/swiftshader
.endfor
.for f in chrome_100_percent.pak chrome_200_percent.pak icudtl.dat natives_blob.bin resources.pak snapshot_blob.bin v8_context_snapshot.bin
${INSTALL_DATA} ${WRKDIR}/electron/${f} ${STAGEDIR}${DATADIR}
.endfor
.for d in locales resources
cd ${WRKDIR}/electron/${d} && ${COPYTREE_SHARE} . \
${STAGEDIR}${DATADIR}/${d} "! -name default_app.asar"
.endfor
cd ${WRKDIR}/VSCode-linux-x64/bin && \
${COPYTREE_BIN} . ${STAGEDIR}${DATADIR}/bin
cd ${WRKDIR}/VSCode-linux-x64/resources/app && \
${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/resources/app
cd ${STAGEDIR}${DATADIR}/resources/app/node_modules.asar.unpacked && \
${FIND} . -type f -exec ${STRIP_CMD} {} ';' \
-exec ${CHMOD} ${BINMODE} {} ';'
${RLN} ${STAGEDIR}${DATADIR}/bin/code-oss ${STAGEDIR}${PREFIX}/bin
pre-test:
# setup electron dependency for unit tests
${MKDIR} ${WRKSRC}/.build
cd ${LOCALBASE}/share && \
${TAR} -cf - electron | ${TAR} -xf - -C ${WRKSRC}/.build
cd ${WRKSRC}/.build/electron && ${MV} -f electron code-oss
do-test:
# Note: Xvfb or something similar is necessary for headless testing
# unit tests
cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ./scripts/test.sh || ${TRUE}
# UI smoke tests
cd ${WRKSRC} && ${SETENV} ${TEST_ENV} yarn smoketest
### targets for port maintainer(s)
make-yarn-cache:
# do "make build" before executing this target
cd ${WRKDIR} && ${TAR} -czf \
yarn-offline-cache-${DISTVERSION}${EXTRACT_SUFX} yarn-offline-cache
make-marketplace-exts:
cd ${WRKSRC} && \
${SETENV} ${MAKE_ENV} yarn download-builtin-extensions && \
cd ${WRKSRC}/.build && ${TAR} -czf \
vscode-marketplace-exts-${DISTVERSION}${EXTRACT_SUFX} builtInExtensions && \
${MV} vscode-marketplace-exts-${DISTVERSION}${EXTRACT_SUFX} ${WRKDIR}
.include <bsd.port.mk>

17
editors/vscode/distinfo Normal file
View File

@ -0,0 +1,17 @@
TIMESTAMP = 1576654213
SHA256 (vscode/node-v6.1.6-headers.tar.gz) = 7abbb0c1a9871e79b70c69bacd8fb6af88b815dac87e1a83722c2d69581a81b9
SIZE (vscode/node-v6.1.6-headers.tar.gz) = 193752
SHA256 (vscode/electron-v6.1.6-linux-x64.zip) = fe73c67b2267d7f7c8c5835c2bb1cf913f1ac8dc6314f4a577c7b4502ba9d6d8
SIZE (vscode/electron-v6.1.6-linux-x64.zip) = 62392920
SHA256 (vscode/ffmpeg-v6.1.6-linux-x64.zip) = 9c15b53ac93243e355e3eabfdcb8e39fd4516a6dba54a88eea9ae970170301ed
SIZE (vscode/ffmpeg-v6.1.6-linux-x64.zip) = 3908671
SHA256 (vscode/node-v12.4.0-headers.tar.gz) = 3a5bbb6ad1a5f3ba912981c13910d7c617bb8fa6b6ae2026d6aee2edcd590a45
SIZE (vscode/node-v12.4.0-headers.tar.gz) = 549161
SHA256 (vscode/vscode-ripgrep-1.5.7.tgz) = 4a36021ab54964e7ec9c8a299129cc6a5776c56f6e9b6182698e96f6899c27da
SIZE (vscode/vscode-ripgrep-1.5.7.tgz) = 5064
SHA256 (vscode/yarn-offline-cache-1.41.0.tar.gz) = 114679510f0b32501ab3099c63e884707f72a36b3e4544759cbd4d0e41952add
SIZE (vscode/yarn-offline-cache-1.41.0.tar.gz) = 101417336
SHA256 (vscode/vscode-marketplace-exts-1.41.0.tar.gz) = b275bd73f3819e6a5f58602bdd693988e335b329a761c9742438513ec3f4fba1
SIZE (vscode/vscode-marketplace-exts-1.41.0.tar.gz) = 1604382
SHA256 (vscode/microsoft-vscode-1.41.0_GH0.tar.gz) = 53f096a29dc12ac493f46e6e743f7d3420af8104ad2de0ebcb15ffc123231ee9
SIZE (vscode/microsoft-vscode-1.41.0_GH0.tar.gz) = 9910227

View File

@ -0,0 +1,11 @@
--- build/gulpfile.extensions.js.orig 2019-12-10 21:16:00 UTC
+++ build/gulpfile.extensions.js
@@ -162,7 +162,7 @@ const cleanExtensionsBuildTask = task.define('clean-ex
const compileExtensionsBuildTask = task.define('compile-extensions-build', task.series(
cleanExtensionsBuildTask,
task.define('bundle-extensions-build', () => ext.packageLocalExtensionsStream().pipe(gulp.dest('.build'))),
- task.define('bundle-marketplace-extensions-build', () => ext.packageMarketplaceExtensionsStream().pipe(gulp.dest('.build'))),
+// task.define('bundle-marketplace-extensions-build', () => ext.packageMarketplaceExtensionsStream().pipe(gulp.dest('.build'))),
));
gulp.task(compileExtensionsBuildTask);

View File

@ -0,0 +1,166 @@
{
"name": "code-oss-dev",
"version": "1.41.0",
"distro": "17f1b806c349d58f96b4aef97ae59d836e2c5605",
"author": {
"name": "Microsoft Corporation"
},
"license": "MIT",
"main": "./out/main",
"private": true,
"scripts": {
"test": "mocha",
"preinstall": "node build/npm/preinstall.js",
"postinstall": "node build/npm/postinstall.js",
"compile": "gulp compile --max_old_space_size=4095",
"watch": "gulp watch --max_old_space_size=4095",
"watch-client": "gulp watch-client --max_old_space_size=4095",
"monaco-editor-test": "mocha --only-monaco-editor",
"precommit": "node build/gulpfile.hygiene.js",
"gulp": "gulp --max_old_space_size=8192",
"electron": "node build/lib/electron",
"7z": "7z",
"update-grammars": "node build/npm/update-all-grammars.js",
"update-localization-extension": "node build/npm/update-localization-extension.js",
"smoketest": "cd test/smoke && node test/index.js",
"download-builtin-extensions": "node build/lib/builtInExtensions.js",
"monaco-compile-check": "tsc -p src/tsconfig.monaco.json --noEmit",
"strict-function-types-watch": "tsc --watch -p src/tsconfig.json --noEmit --strictFunctionTypes",
"update-distro": "node build/npm/update-distro.js",
"web": "node scripts/code-web.js"
},
"dependencies": {
"applicationinsights": "1.0.8",
"chokidar": "3.2.3",
"graceful-fs": "4.1.11",
"http-proxy-agent": "^2.1.0",
"https-proxy-agent": "^2.2.3",
"iconv-lite": "0.5.0",
"jschardet": "2.1.1",
"keytar": "^4.11.0",
"native-is-elevated": "0.4.1",
"native-keymap": "2.1.0",
"native-watchdog": "1.3.0",
"node-pty": "^0.10.0-beta2",
"onigasm-umd": "2.2.5",
"semver-umd": "^5.5.3",
"spdlog": "^0.11.1",
"sudo-prompt": "9.1.1",
"v8-inspect-profiler": "^0.0.20",
"vscode-minimist": "^1.2.2",
"vscode-nsfw": "1.2.8",
"vscode-proxy-agent": "^0.5.2",
"vscode-sqlite3": "4.0.9",
"vscode-textmate": "4.4.0",
"xterm": "4.3.0-beta.28.vscode.1",
"xterm-addon-search": "0.4.0-beta4",
"xterm-addon-web-links": "0.2.1",
"xterm-addon-webgl": "0.4.0-beta.11",
"yauzl": "^2.9.2",
"yazl": "^2.4.3"
},
"devDependencies": {
"7zip": "0.0.6",
"@types/applicationinsights": "0.20.0",
"@types/chokidar": "2.1.3",
"@types/cookie": "^0.3.3",
"@types/graceful-fs": "4.1.2",
"@types/http-proxy-agent": "^2.0.1",
"@types/iconv-lite": "0.0.1",
"@types/keytar": "^4.4.0",
"@types/mocha": "2.2.39",
"@types/node": "^10.12.12",
"@types/semver": "^5.5.0",
"@types/sinon": "^1.16.36",
"@types/webpack": "^4.4.10",
"@types/windows-foreground-love": "^0.3.0",
"@types/windows-process-tree": "^0.2.0",
"@types/winreg": "^1.2.30",
"@types/yauzl": "^2.9.1",
"@types/yazl": "^2.4.2",
"ansi-colors": "^3.2.3",
"asar": "^0.14.0",
"chromium-pickle-js": "^0.2.0",
"copy-webpack-plugin": "^4.5.2",
"coveralls": "^2.11.11",
"cson-parser": "^1.3.3",
"debounce": "^1.0.0",
"event-stream": "3.3.4",
"express": "^4.13.1",
"fancy-log": "^1.3.3",
"fast-plist": "0.1.2",
"glob": "^5.0.13",
"gulp": "^4.0.0",
"gulp-atom-electron": "^1.22.0",
"gulp-azure-storage": "^0.10.0",
"gulp-buffer": "0.0.2",
"gulp-concat": "^2.6.1",
"gulp-cssnano": "^2.1.3",
"gulp-eslint": "^5.0.0",
"gulp-filter": "^5.1.0",
"gulp-flatmap": "^1.0.2",
"gulp-gunzip": "^1.0.0",
"gulp-json-editor": "^2.5.0",
"gulp-plumber": "^1.2.0",
"gulp-remote-retry-src": "^0.6.0",
"gulp-rename": "^1.2.0",
"gulp-replace": "^0.5.4",
"gulp-shell": "^0.6.5",
"gulp-tsb": "4.0.5",
"gulp-tslint": "^8.1.3",
"gulp-untar": "^0.0.7",
"gulp-vinyl-zip": "^2.1.2",
"husky": "^0.13.1",
"innosetup": "5.6.1",
"is": "^3.1.0",
"istanbul-lib-coverage": "^2.0.5",
"istanbul-lib-instrument": "^3.3.0",
"istanbul-lib-report": "^2.0.8",
"istanbul-lib-source-maps": "^3.0.6",
"istanbul-reports": "^2.2.6",
"jsdom-no-contextify": "^3.1.0",
"lazy.js": "^0.4.2",
"merge-options": "^1.0.1",
"mime": "^1.4.1",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.0",
"mocha": "^2.2.5",
"mocha-junit-reporter": "^1.17.0",
"opn": "^6.0.0",
"optimist": "0.3.5",
"p-all": "^1.0.0",
"pump": "^1.0.1",
"queue": "3.0.6",
"rcedit": "^1.1.0",
"rimraf": "^2.2.8",
"sinon": "^1.17.2",
"source-map": "^0.4.4",
"ts-loader": "^4.4.2",
"tslint": "^5.16.0",
"typescript": "3.7.2",
"typescript-formatter": "7.1.0",
"underscore": "^1.8.2",
"vinyl": "^2.0.0",
"vinyl-fs": "^3.0.0",
"vsce": "1.48.0",
"vscode-debugprotocol": "1.37.0",
"vscode-nls-dev": "^3.3.1",
"webpack": "^4.16.5",
"webpack-cli": "^3.3.8",
"webpack-stream": "^5.1.1"
},
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/vscode.git"
},
"bugs": {
"url": "https://github.com/Microsoft/vscode/issues"
},
"optionalDependencies": {
"vscode-windows-ca-certs": "0.2.0",
"vscode-windows-registry": "1.0.2",
"windows-foreground-love": "0.2.0",
"windows-mutex": "0.3.0",
"windows-process-tree": "0.2.4"
}
}

View File

@ -0,0 +1,167 @@
{
"name": "code-oss-dev",
"version": "1.41.0",
"distro": "17f1b806c349d58f96b4aef97ae59d836e2c5605",
"author": {
"name": "Microsoft Corporation"
},
"license": "MIT",
"main": "./out/main",
"private": true,
"scripts": {
"test": "mocha",
"preinstall": "node build/npm/preinstall.js",
"postinstall": "node build/npm/postinstall.js",
"compile": "gulp compile --max_old_space_size=4095",
"watch": "gulp watch --max_old_space_size=4095",
"watch-client": "gulp watch-client --max_old_space_size=4095",
"monaco-editor-test": "mocha --only-monaco-editor",
"precommit": "node build/gulpfile.hygiene.js",
"gulp": "gulp --max_old_space_size=8192",
"electron": "node build/lib/electron",
"7z": "7z",
"update-grammars": "node build/npm/update-all-grammars.js",
"update-localization-extension": "node build/npm/update-localization-extension.js",
"smoketest": "cd test/smoke && node test/index.js",
"download-builtin-extensions": "node build/lib/builtInExtensions.js",
"monaco-compile-check": "tsc -p src/tsconfig.monaco.json --noEmit",
"strict-function-types-watch": "tsc --watch -p src/tsconfig.json --noEmit --strictFunctionTypes",
"update-distro": "node build/npm/update-distro.js",
"web": "node scripts/code-web.js"
},
"dependencies": {
"applicationinsights": "1.0.8",
"chokidar": "3.2.3",
"graceful-fs": "4.1.11",
"http-proxy-agent": "^2.1.0",
"https-proxy-agent": "^2.2.3",
"iconv-lite": "0.5.0",
"jschardet": "2.1.1",
"keytar": "^4.11.0",
"native-is-elevated": "0.4.1",
"native-keymap": "2.1.0",
"native-watchdog": "1.3.0",
"node-pty": "^0.10.0-beta2",
"onigasm-umd": "2.2.5",
"semver-umd": "^5.5.3",
"spdlog": "^0.11.1",
"sudo-prompt": "9.1.1",
"v8-inspect-profiler": "^0.0.20",
"vscode-minimist": "^1.2.2",
"vscode-nsfw": "1.2.8",
"vscode-proxy-agent": "^0.5.2",
"vscode-ripgrep": "^1.5.7",
"vscode-sqlite3": "4.0.9",
"vscode-textmate": "4.4.0",
"xterm": "4.3.0-beta.28.vscode.1",
"xterm-addon-search": "0.4.0-beta4",
"xterm-addon-web-links": "0.2.1",
"xterm-addon-webgl": "0.4.0-beta.11",
"yauzl": "^2.9.2",
"yazl": "^2.4.3"
},
"devDependencies": {
"7zip": "0.0.6",
"@types/applicationinsights": "0.20.0",
"@types/chokidar": "2.1.3",
"@types/cookie": "^0.3.3",
"@types/graceful-fs": "4.1.2",
"@types/http-proxy-agent": "^2.0.1",
"@types/iconv-lite": "0.0.1",
"@types/keytar": "^4.4.0",
"@types/mocha": "2.2.39",
"@types/node": "^10.12.12",
"@types/semver": "^5.5.0",
"@types/sinon": "^1.16.36",
"@types/webpack": "^4.4.10",
"@types/windows-foreground-love": "^0.3.0",
"@types/windows-process-tree": "^0.2.0",
"@types/winreg": "^1.2.30",
"@types/yauzl": "^2.9.1",
"@types/yazl": "^2.4.2",
"ansi-colors": "^3.2.3",
"asar": "^0.14.0",
"chromium-pickle-js": "^0.2.0",
"copy-webpack-plugin": "^4.5.2",
"coveralls": "^2.11.11",
"cson-parser": "^1.3.3",
"debounce": "^1.0.0",
"event-stream": "3.3.4",
"express": "^4.13.1",
"fancy-log": "^1.3.3",
"fast-plist": "0.1.2",
"glob": "^5.0.13",
"gulp": "^4.0.0",
"gulp-atom-electron": "^1.22.0",
"gulp-azure-storage": "^0.10.0",
"gulp-buffer": "0.0.2",
"gulp-concat": "^2.6.1",
"gulp-cssnano": "^2.1.3",
"gulp-eslint": "^5.0.0",
"gulp-filter": "^5.1.0",
"gulp-flatmap": "^1.0.2",
"gulp-gunzip": "^1.0.0",
"gulp-json-editor": "^2.5.0",
"gulp-plumber": "^1.2.0",
"gulp-remote-retry-src": "^0.6.0",
"gulp-rename": "^1.2.0",
"gulp-replace": "^0.5.4",
"gulp-shell": "^0.6.5",
"gulp-tsb": "4.0.5",
"gulp-tslint": "^8.1.3",
"gulp-untar": "^0.0.7",
"gulp-vinyl-zip": "^2.1.2",
"husky": "^0.13.1",
"innosetup": "5.6.1",
"is": "^3.1.0",
"istanbul-lib-coverage": "^2.0.5",
"istanbul-lib-instrument": "^3.3.0",
"istanbul-lib-report": "^2.0.8",
"istanbul-lib-source-maps": "^3.0.6",
"istanbul-reports": "^2.2.6",
"jsdom-no-contextify": "^3.1.0",
"lazy.js": "^0.4.2",
"merge-options": "^1.0.1",
"mime": "^1.4.1",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.0",
"mocha": "^2.2.5",
"mocha-junit-reporter": "^1.17.0",
"opn": "^6.0.0",
"optimist": "0.3.5",
"p-all": "^1.0.0",
"pump": "^1.0.1",
"queue": "3.0.6",
"rcedit": "^1.1.0",
"rimraf": "^2.2.8",
"sinon": "^1.17.2",
"source-map": "^0.4.4",
"ts-loader": "^4.4.2",
"tslint": "^5.16.0",
"typescript": "3.7.2",
"typescript-formatter": "7.1.0",
"underscore": "^1.8.2",
"vinyl": "^2.0.0",
"vinyl-fs": "^3.0.0",
"vsce": "1.48.0",
"vscode-debugprotocol": "1.37.0",
"vscode-nls-dev": "^3.3.1",
"webpack": "^4.16.5",
"webpack-cli": "^3.3.8",
"webpack-stream": "^5.1.1"
},
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/vscode.git"
},
"bugs": {
"url": "https://github.com/Microsoft/vscode/issues"
},
"optionalDependencies": {
"vscode-windows-ca-certs": "0.2.0",
"vscode-windows-registry": "1.0.2",
"windows-foreground-love": "0.2.0",
"windows-mutex": "0.3.0",
"windows-process-tree": "0.2.4"
}
}

View File

@ -0,0 +1,33 @@
{
"name": "vscode-reh",
"version": "0.0.0",
"dependencies": {
"applicationinsights": "1.0.8",
"chokidar": "3.2.3",
"cookie": "^0.4.0",
"graceful-fs": "4.1.11",
"http-proxy-agent": "^2.1.0",
"https-proxy-agent": "^2.2.3",
"iconv-lite": "0.5.0",
"jschardet": "2.1.1",
"native-watchdog": "1.3.0",
"node-pty": "^0.10.0-beta2",
"onigasm-umd": "2.2.5",
"semver-umd": "^5.5.3",
"spdlog": "^0.11.1",
"vscode-minimist": "^1.2.2",
"vscode-nsfw": "1.2.8",
"vscode-proxy-agent": "^0.5.2",
"vscode-textmate": "4.4.0",
"xterm": "4.3.0-beta.28.vscode.1",
"xterm-addon-search": "0.4.0-beta4",
"xterm-addon-web-links": "0.2.1",
"xterm-addon-webgl": "0.4.0-beta.11",
"yauzl": "^2.9.2",
"yazl": "^2.4.3"
},
"optionalDependencies": {
"vscode-windows-ca-certs": "0.2.0",
"vscode-windows-registry": "1.0.2"
}
}

View File

@ -0,0 +1,34 @@
{
"name": "vscode-reh",
"version": "0.0.0",
"dependencies": {
"applicationinsights": "1.0.8",
"chokidar": "3.2.3",
"cookie": "^0.4.0",
"graceful-fs": "4.1.11",
"http-proxy-agent": "^2.1.0",
"https-proxy-agent": "^2.2.3",
"iconv-lite": "0.5.0",
"jschardet": "2.1.1",
"native-watchdog": "1.3.0",
"node-pty": "^0.10.0-beta2",
"onigasm-umd": "2.2.5",
"semver-umd": "^5.5.3",
"spdlog": "^0.11.1",
"vscode-minimist": "^1.2.2",
"vscode-nsfw": "1.2.8",
"vscode-proxy-agent": "^0.5.2",
"vscode-ripgrep": "^1.5.7",
"vscode-textmate": "4.4.0",
"xterm": "4.3.0-beta.28.vscode.1",
"xterm-addon-search": "0.4.0-beta4",
"xterm-addon-web-links": "0.2.1",
"xterm-addon-webgl": "0.4.0-beta.11",
"yauzl": "^2.9.2",
"yazl": "^2.4.3"
},
"optionalDependencies": {
"vscode-windows-ca-certs": "0.2.0",
"vscode-windows-registry": "1.0.2"
}
}

View File

@ -0,0 +1,11 @@
--- build/lib/snapshotLoader.ts.orig 2019-12-18 06:46:04 UTC
+++ build/lib/snapshotLoader.ts
@@ -27,7 +27,7 @@ namespace snaps {
break;
case 'win32':
- case 'linux':
+ case 'linux': case 'freebsd':
loaderFilepath = `VSCode-${process.platform}-${arch}/resources/app/out/vs/loader.js`;
startupBlobFilepath = `VSCode-${process.platform}-${arch}/snapshot_blob.bin`;
break;

View File

@ -0,0 +1,12 @@
--- build/npm/postinstall.js.orig 2019-11-13 16:23:28 UTC
+++ build/npm/postinstall.js
@@ -20,7 +20,8 @@ function yarnInstall(location, opts) {
const raw = process.env['npm_config_argv'] || '{}';
const argv = JSON.parse(raw);
const original = argv.original || [];
- const args = original.filter(arg => arg === '--ignore-optional' || arg === '--frozen-lockfile');
+ const passargs = ['--ignore-optional', '--frozen-lockfile', '--offline', '--no-progress', '--verbose'];
+ const args = original.filter(arg => passargs.includes(arg));
console.log(`Installing dependencies in ${location}...`);
console.log(`$ yarn ${args.join(' ')}`);

View File

@ -0,0 +1,11 @@
--- extensions/emmet/src/test/testUtils.ts.orig 2019-12-18 06:34:11 UTC
+++ extensions/emmet/src/test/testUtils.ts
@@ -26,7 +26,7 @@ export function createRandomFile(contents = '', fileEx
}
export function pathEquals(path1: string, path2: string): boolean {
- if (process.platform !== 'linux') {
+ if (process.platform !== 'linux' && process.platform !== 'freebsd') {
path1 = path1.toLowerCase();
path2 = path2.toLowerCase();
}

View File

@ -0,0 +1,11 @@
--- extensions/vscode-api-tests/src/utils.ts.orig 2019-12-18 06:34:54 UTC
+++ extensions/vscode-api-tests/src/utils.ts
@@ -36,7 +36,7 @@ export async function deleteFile(file: vscode.Uri): Pr
}
export function pathEquals(path1: string, path2: string): boolean {
- if (process.platform !== 'linux') {
+ if (process.platform !== 'linux' && process.platform !== 'freebsd') {
path1 = path1.toLowerCase();
path2 = path2.toLowerCase();
}

View File

@ -0,0 +1,18 @@
--- extensions/vscode-test-resolver/scripts/terminateProcess.sh.orig 2019-12-18 06:39:18 UTC
+++ extensions/vscode-test-resolver/scripts/terminateProcess.sh
@@ -1,7 +1,7 @@
#!/bin/bash
terminateTree() {
- for cpid in $(/usr/bin/pgrep -P $1); do
+ for cpid in $(/bin/pgrep -P $1); do
terminateTree $cpid
done
kill -9 $1 > /dev/null 2>&1
@@ -9,4 +9,4 @@ terminateTree() {
for pid in $*; do
terminateTree $pid
-done
\ No newline at end of file
+done

View File

@ -0,0 +1,11 @@
--- extensions/vscode-test-resolver/src/util/processes.ts.orig 2019-12-18 06:37:56 UTC
+++ extensions/vscode-test-resolver/src/util/processes.ts
@@ -20,7 +20,7 @@ export function terminateProcess(p: cp.ChildProcess, e
} catch (err) {
return { success: false, error: err };
}
- } else if (process.platform === 'darwin' || process.platform === 'linux') {
+ } else if (process.platform === 'darwin' || process.platform === 'linux' || process.platform === 'freebsd') {
try {
const cmd = path.join(extensionPath, 'scripts', 'terminateProcess.sh');
const result = cp.spawnSync(cmd, [process.pid.toString()]);

View File

@ -0,0 +1,20 @@
--- product.json.orig 2019-10-15 15:03:50 UTC
+++ product.json
@@ -22,5 +22,16 @@
"urlProtocol": "code-oss",
"extensionAllowedProposedApi": [
"ms-vscode.references-view"
- ]
+ ],
+ "documentationUrl": "https://go.microsoft.com/fwlink/?LinkID=533484",
+ "extensionsGallery": {
+ "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
+ "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
+ "itemUrl": "https://marketplace.visualstudio.com/items"
+ },
+ "introductoryVideosUrl": "https://go.microsoft.com/fwlink/?linkid=832146",
+ "keyboardShortcutsUrlLinux": "https://go.microsoft.com/fwlink/?linkid=832144",
+ "quality": "stable",
+ "requestFeatureUrl": "https://go.microsoft.com/fwlink/?LinkID=533482",
+ "tipsAndTricksUrl": "https://go.microsoft.com/fwlink/?linkid=852118"
}

View File

@ -0,0 +1,11 @@
--- resources/linux/bin/code.sh.orig 2019-11-12 10:55:03 UTC
+++ resources/linux/bin/code.sh
@@ -4,7 +4,7 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# test that VSCode wasn't installed inside WSL
-if grep -qi Microsoft /proc/version && [ -z "$DONT_PROMPT_WSL_INSTALL" ]; then
+if grep -qi Microsoft /proc/version 2> /dev/null && [ -z "$DONT_PROMPT_WSL_INSTALL" ]; then
echo "To use VS Code with the Windows Subsystem for Linux, please install VS Code in Windows and uninstall the Linux version in WSL. You can then use the '@@PRODNAME@@' command in a WSL terminal just as you would in a normal command prompt." 1>&2
read -e -p "Do you want to continue anyways ? [y/N] " YN

View File

@ -0,0 +1,11 @@
--- src/bootstrap.js.orig 2019-12-10 21:16:00 UTC
+++ src/bootstrap.js
@@ -243,7 +243,7 @@ exports.configurePortable = function () {
return process.env['VSCODE_PORTABLE'];
}
- if (process.platform === 'win32' || process.platform === 'linux') {
+ if (process.platform === 'win32' || process.platform === 'linux' || process.platform === 'freebsd') {
return path.join(getApplicationPath(), 'data');
}

View File

@ -0,0 +1,19 @@
--- src/paths.js.orig 2019-12-10 21:16:00 UTC
+++ src/paths.js
@@ -19,7 +19,8 @@ function getAppDataPath(platform) {
switch (platform) {
case 'win32': return process.env['VSCODE_APPDATA'] || process.env['APPDATA'] || path.join(process.env['USERPROFILE'], 'AppData', 'Roaming');
case 'darwin': return process.env['VSCODE_APPDATA'] || path.join(os.homedir(), 'Library', 'Application Support');
- case 'linux': return process.env['VSCODE_APPDATA'] || process.env['XDG_CONFIG_HOME'] || path.join(os.homedir(), '.config');
+ case 'linux': case 'freebsd':
+ return process.env['VSCODE_APPDATA'] || process.env['XDG_CONFIG_HOME'] || path.join(os.homedir(), '.config');
default: throw new Error('Platform not supported');
}
}
@@ -33,4 +34,4 @@ function getDefaultUserDataPath(platform) {
}
exports.getAppDataPath = getAppDataPath;
-exports.getDefaultUserDataPath = getDefaultUserDataPath;
\ No newline at end of file
+exports.getDefaultUserDataPath = getDefaultUserDataPath;

View File

@ -0,0 +1,19 @@
--- src/vs/base/common/platform.ts.orig 2019-12-10 21:16:00 UTC
+++ src/vs/base/common/platform.ts
@@ -55,14 +55,14 @@ if (typeof navigator === 'object' && !isElectronRender
_isWindows = _userAgent.indexOf('Windows') >= 0;
_isMacintosh = _userAgent.indexOf('Macintosh') >= 0;
_isIOS = _userAgent.indexOf('Macintosh') >= 0 && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0;
- _isLinux = _userAgent.indexOf('Linux') >= 0;
+ _isLinux = _userAgent.indexOf('Linux') >= 0 || _userAgent.indexOf('FreeBSD') >= 0;
_isWeb = true;
_locale = navigator.language;
_language = _locale;
} else if (typeof process === 'object') {
_isWindows = (process.platform === 'win32');
_isMacintosh = (process.platform === 'darwin');
- _isLinux = (process.platform === 'linux');
+ _isLinux = (process.platform === 'linux' || process.platform === 'freebsd');
_locale = LANGUAGE_DEFAULT;
_language = LANGUAGE_DEFAULT;
const rawNlsConfig = process.env['VSCODE_NLS_CONFIG'];

View File

@ -0,0 +1,11 @@
--- src/vs/code/electron-main/app.ts.orig 2019-12-10 21:16:00 UTC
+++ src/vs/code/electron-main/app.ts
@@ -437,7 +437,7 @@ export class CodeApplication extends Disposable {
services.set(IUpdateService, new SyncDescriptor(Win32UpdateService));
break;
- case 'linux':
+ case 'linux': case 'freebsd':
if (process.env.SNAP && process.env.SNAP_REVISION) {
services.set(IUpdateService, new SyncDescriptor(SnapUpdateService, [process.env.SNAP, process.env.SNAP_REVISION]));
} else {

View File

@ -0,0 +1,11 @@
--- src/vs/workbench/api/browser/mainThreadTask.ts.orig 2019-12-10 21:16:00 UTC
+++ src/vs/workbench/api/browser/mainThreadTask.ts
@@ -588,7 +588,7 @@ export class MainThreadTask implements MainThreadTaskS
case 'darwin':
platform = Platform.Platform.Mac;
break;
- case 'linux':
+ case 'linux': case 'freebsd':
platform = Platform.Platform.Linux;
break;
default:

View File

@ -0,0 +1,12 @@
--- src/vs/workbench/contrib/extensions/browser/extensionEditor.ts.orig 2019-12-10 21:16:00 UTC
+++ src/vs/workbench/contrib/extensions/browser/extensionEditor.ts
@@ -1361,7 +1361,8 @@ export class ExtensionEditor extends BaseEditor {
switch (platform) {
case 'win32': key = rawKeyBinding.win; break;
- case 'linux': key = rawKeyBinding.linux; break;
+ case 'linux': case 'freebsd':
+ key = rawKeyBinding.linux; break;
case 'darwin': key = rawKeyBinding.mac; break;
}

View File

@ -0,0 +1,20 @@
--- src/vs/workbench/services/extensions/node/proxyResolver.ts.orig 2019-12-10 21:16:00 UTC
+++ src/vs/workbench/services/extensions/node/proxyResolver.ts
@@ -466,7 +466,7 @@ async function readCaCertificates() {
if (process.platform === 'darwin') {
return readMacCaCertificates();
}
- if (process.platform === 'linux') {
+ if (process.platform === 'linux' || process.platform === 'freebsd') {
return readLinuxCaCertificates();
}
return undefined;
@@ -515,6 +515,8 @@ async function readMacCaCertificates() {
const linuxCaCertificatePaths = [
'/etc/ssl/certs/ca-certificates.crt',
'/etc/ssl/certs/ca-bundle.crt',
+ '/etc/ssl/cert.pem',
+ '/usr/local/share/certs/ca-root-nss.crt',
];
async function readLinuxCaCertificates() {

View File

@ -0,0 +1,20 @@
--- test/automation/src/code.ts.orig 2019-12-10 21:16:00 UTC
+++ test/automation/src/code.ts
@@ -24,7 +24,7 @@ function getDevElectronPath(): string {
switch (process.platform) {
case 'darwin':
return path.join(buildPath, 'electron', `${product.nameLong}.app`, 'Contents', 'MacOS', 'Electron');
- case 'linux':
+ case 'linux': case 'freebsd':
return path.join(buildPath, 'electron', `${product.applicationName}`);
case 'win32':
return path.join(buildPath, 'electron', `${product.nameShort}.exe`);
@@ -37,7 +37,7 @@ function getBuildElectronPath(root: string): string {
switch (process.platform) {
case 'darwin':
return path.join(root, 'Contents', 'MacOS', 'Electron');
- case 'linux': {
+ case 'linux': case 'freebsd': {
const product = require(path.join(root, 'resources', 'app', 'product.json'));
return path.join(root, product.applicationName);
}

View File

@ -0,0 +1,20 @@
--- test/smoke/src/main.ts.orig 2019-12-10 21:16:00 UTC
+++ test/smoke/src/main.ts
@@ -96,7 +96,7 @@ function getDevElectronPath(): string {
switch (process.platform) {
case 'darwin':
return path.join(buildPath, 'electron', `${product.nameLong}.app`, 'Contents', 'MacOS', 'Electron');
- case 'linux':
+ case 'linux': case 'freebsd':
return path.join(buildPath, 'electron', `${product.applicationName}`);
case 'win32':
return path.join(buildPath, 'electron', `${product.nameShort}.exe`);
@@ -109,7 +109,7 @@ function getBuildElectronPath(root: string): string {
switch (process.platform) {
case 'darwin':
return path.join(root, 'Contents', 'MacOS', 'Electron');
- case 'linux': {
+ case 'linux': case 'freebsd': {
const product = require(path.join(root, 'resources', 'app', 'product.json'));
return path.join(root, product.applicationName);
}

View File

@ -0,0 +1 @@
yarn-offline-mirror "${WRKDIR}/yarn-offline-cache"

6
editors/vscode/pkg-descr Normal file
View File

@ -0,0 +1,6 @@
VS Code is a type of tool that combines the simplicity of a code
editor with what developers need for their core edit-build-debug
cycle. It provides comprehensive editing and debugging support, an
extensibility model, and lightweight integration with existing tools.
WWW: https://code.visualstudio.com/

1300
editors/vscode/pkg-plist Normal file

File diff suppressed because it is too large Load Diff