Skip to content

Commit fc7b371

Browse files
committed
package startup scripts and latest node 14
1 parent 124c7dd commit fc7b371

File tree

7 files changed

+42
-5
lines changed

7 files changed

+42
-5
lines changed

build/gulpfile.server.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// @ts-check
66
'use strict';
77

8+
const cp = require('child_process');
89
const gulp = require('gulp');
910
const path = require('path');
1011
const es = require('event-stream');
@@ -271,12 +272,27 @@ function defineTasks(options) {
271272
const packageJsonStream = gulp.src([base + '/package.json'], { base })
272273
.pipe(json({ name, version }));
273274

275+
cp.execSync('yarn gulp node');
276+
const nodePath = cp.execSync('node ' + path.join(root, 'build/lib/node'), { encoding: 'utf-8' });
277+
const nodeStream = gulp.src([nodePath], { base: path.dirname(nodePath) });
278+
279+
const resourcesBase = path.join(root, 'resources/' + qualifier);
280+
const binStream = gulp.src([path.join(resourcesBase, '**/*.' + (process.platform === 'win32' ? 'cmd' : 'sh'))], { base: resourcesBase })
281+
.pipe(util.setExecutableBit(['**/*.sh']))
282+
.pipe(rename(path => {
283+
if (path.basename === 'code' && path.extname === '.sh') {
284+
path.extname = '';
285+
}
286+
}));
287+
274288
let all = es.merge(
275289
packageJsonStream,
276290
productJsonStream,
277291
// license,
278292
sources,
279-
runtimeDependencies
293+
runtimeDependencies,
294+
nodeStream,
295+
binStream
280296
);
281297

282298
let result = all

remote/.yarnrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
disturl "http://nodejs.org/dist"
2-
target "14.16.0"
2+
target "14.17.6"
33
runtime "node"

resources/server/bin/code.cmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@echo off
2+
setlocal
3+
set VSCODE_DEV=
4+
"%~dp0\..\node.exe" "%~dp0\..\out\server-cli.js" %*
5+
endlocal
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
if [[ "$OSTYPE" == "darwin"* ]]; then
44
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
@@ -7,4 +7,4 @@ else
77
ROOT=$(dirname "$(readlink -f $0)")
88
fi
99

10-
exec $ROOT/node/bin/node $ROOT/server-pkg/out/server.js "$@"
10+
exec $ROOT/../node $ROOT/../out/server-cli.js "$@"

resources/server/server.cmd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@echo off
2+
setlocal
3+
set VSCODE_DEV=
4+
set PATH="%~dp0\bin";%PATH%
5+
"%~dp0\node.exe" "%~dp0\out\server.js" %*
6+
endlocal

resources/server/server.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
if [[ "$OSTYPE" == "darwin"* ]]; then
4+
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
5+
ROOT=$(dirname "$(realpath "$0")")
6+
else
7+
ROOT=$(dirname "$(readlink -f $0)")
8+
fi
9+
10+
PATH=$ROOT/bin:$PATH
11+
exec $ROOT/node $ROOT/out/server.js "$@"

resources/server/startup.cmd

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)