Merge branch 'electron-code'
This commit is contained in:
commit
6dd65cc0c5
4 changed files with 25 additions and 12 deletions
|
@ -114,10 +114,19 @@ const config = {
|
|||
token: process.env['GITHUB_TOKEN'] || void 0
|
||||
};
|
||||
|
||||
gulp.task('electron', () => {
|
||||
// Force windows to use ia32
|
||||
const arch = process.env.VSCODE_ELECTRON_PLATFORM || (process.platform === 'win32' ? 'ia32' : process.arch);
|
||||
return electron.dest(path.join(build, 'electron'), _.extend({}, config, { arch: arch, ffmpegChromium: true }));
|
||||
const electronPath = path.join(build, 'electron');
|
||||
|
||||
gulp.task('clean-electron', util.rimraf(electronPath));
|
||||
|
||||
gulp.task('electron', ['clean-electron'], () => {
|
||||
const platform = process.platform;
|
||||
const arch = process.env.VSCODE_ELECTRON_PLATFORM || (platform === 'win32' ? 'ia32' : process.arch);
|
||||
const opts = _.extend({}, config, { platform, arch, ffmpegChromium: true, keepDefaultApp: true });
|
||||
|
||||
return gulp.src('package.json')
|
||||
.pipe(electron(opts))
|
||||
.pipe(filter(['**', '!**/app/package.json']))
|
||||
.pipe(symdest(electronPath));
|
||||
});
|
||||
|
||||
const languages = ['chs', 'cht', 'jpn', 'kor', 'deu', 'fra', 'esn', 'rus', 'ita'];
|
||||
|
@ -156,7 +165,7 @@ function packageTask(platform, arch, opts) {
|
|||
const sources = es.merge(src, extensions)
|
||||
.pipe(nlsDev.createAdditionalLanguageFiles(languages, path.join(__dirname, '..', 'i18n')))
|
||||
.pipe(filter(['**', '!**/*.js.map']))
|
||||
.pipe(util.handleAzureJson({ platform: platform }));
|
||||
.pipe(util.handleAzureJson({ platform }));
|
||||
|
||||
let version = packageJson.version;
|
||||
const quality = product.quality;
|
||||
|
@ -211,7 +220,7 @@ function packageTask(platform, arch, opts) {
|
|||
let result = all
|
||||
.pipe(util.skipDirectories())
|
||||
.pipe(util.fixWin32DirectoryPermissions())
|
||||
.pipe(electron(_.extend({}, config, { platform: platform, arch: arch, ffmpegChromium: true })))
|
||||
.pipe(electron(_.extend({}, config, { platform, arch, ffmpegChromium: true })))
|
||||
.pipe(filter(['**', '!LICENSE', '!LICENSES.chromium.html', '!version']));
|
||||
|
||||
if (platform === 'win32') {
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
"ghooks": "1.0.3",
|
||||
"glob": "^5.0.13",
|
||||
"gulp": "^3.8.9",
|
||||
"gulp-atom-electron": "^1.7.1",
|
||||
"gulp-atom-electron": "^1.9.0",
|
||||
"gulp-azure-storage": "^0.6.0",
|
||||
"gulp-bom": "^1.0.0",
|
||||
"gulp-buffer": "0.0.2",
|
||||
|
|
|
@ -9,7 +9,7 @@ pushd %~dp0\..
|
|||
if not exist node_modules call .\scripts\npm.bat install
|
||||
|
||||
:: Get electron
|
||||
if not exist .build\electron node .\node_modules\gulp\bin\gulp.js electron
|
||||
if not exist .build\electron\code-oss-dev.exe node .\node_modules\gulp\bin\gulp.js electron
|
||||
|
||||
:: Build
|
||||
if not exist out node .\node_modules\gulp\bin\gulp.js compile
|
||||
|
@ -23,7 +23,7 @@ set ELECTRON_ENABLE_LOGGING=1
|
|||
set ELECTRON_ENABLE_STACK_DUMPING=1
|
||||
|
||||
:: Launch Code
|
||||
.\.build\electron\electron.exe . %*
|
||||
.\.build\electron\code-oss-dev.exe . %*
|
||||
popd
|
||||
|
||||
endlocal
|
|
@ -14,7 +14,11 @@ function code() {
|
|||
test -d node_modules || ./scripts/npm.sh install
|
||||
|
||||
# Get electron
|
||||
test -d .build/electron || ./node_modules/.bin/gulp electron
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
test -d .build/electron/Code\ -\ OSS.app || ./node_modules/.bin/gulp electron
|
||||
else
|
||||
test -d .build/electron/code-oss || ./node_modules/.bin/gulp electron
|
||||
fi
|
||||
|
||||
# Build
|
||||
test -d out || ./node_modules/.bin/gulp compile
|
||||
|
@ -28,9 +32,9 @@ function code() {
|
|||
|
||||
# Launch Code
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
exec ./.build/electron/Electron.app/Contents/MacOS/Electron . "$@"
|
||||
exec ./.build/electron/Code\ -\ OSS.app/Contents/MacOS/Electron . "$@"
|
||||
else
|
||||
exec ./.build/electron/electron . "$@"
|
||||
exec ./.build/electron/code-oss . "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue