@@ -114,10 +114,19 @@ const config = {
114114 token : process . env [ 'GITHUB_TOKEN' ] || void 0
115115} ;
116116
117- gulp . task ( 'electron' , ( ) => {
118- // Force windows to use ia32
119- const arch = process . env . VSCODE_ELECTRON_PLATFORM || ( process . platform === 'win32' ? 'ia32' : process . arch ) ;
120- return electron . dest ( path . join ( build , 'electron' ) , _ . extend ( { } , config , { arch : arch , ffmpegChromium : true } ) ) ;
117+ const electronPath = path . join ( build , 'electron' ) ;
118+
119+ gulp . task ( 'clean-electron' , util . rimraf ( electronPath ) ) ;
120+
121+ gulp . task ( 'electron' , [ 'clean-electron' ] , ( ) => {
122+ const platform = process . platform ;
123+ const arch = process . env . VSCODE_ELECTRON_PLATFORM || ( platform === 'win32' ? 'ia32' : process . arch ) ;
124+ const opts = _ . extend ( { } , config , { platform, arch, ffmpegChromium : true , keepDefaultApp : true } ) ;
125+
126+ return gulp . src ( 'package.json' )
127+ . pipe ( electron ( opts ) )
128+ . pipe ( filter ( [ '**' , '!**/app/package.json' ] ) )
129+ . pipe ( symdest ( electronPath ) ) ;
121130} ) ;
122131
123132const languages = [ 'chs' , 'cht' , 'jpn' , 'kor' , 'deu' , 'fra' , 'esn' , 'rus' , 'ita' ] ;
@@ -156,7 +165,7 @@ function packageTask(platform, arch, opts) {
156165 const sources = es . merge ( src , extensions )
157166 . pipe ( nlsDev . createAdditionalLanguageFiles ( languages , path . join ( __dirname , '..' , 'i18n' ) ) )
158167 . pipe ( filter ( [ '**' , '!**/*.js.map' ] ) )
159- . pipe ( util . handleAzureJson ( { platform : platform } ) ) ;
168+ . pipe ( util . handleAzureJson ( { platform } ) ) ;
160169
161170 let version = packageJson . version ;
162171 const quality = product . quality ;
@@ -211,7 +220,7 @@ function packageTask(platform, arch, opts) {
211220 let result = all
212221 . pipe ( util . skipDirectories ( ) )
213222 . pipe ( util . fixWin32DirectoryPermissions ( ) )
214- . pipe ( electron ( _ . extend ( { } , config , { platform : platform , arch : arch , ffmpegChromium : true } ) ) )
223+ . pipe ( electron ( _ . extend ( { } , config , { platform, arch, ffmpegChromium : true } ) ) )
215224 . pipe ( filter ( [ '**' , '!LICENSE' , '!LICENSES.chromium.html' , '!version' ] ) ) ;
216225
217226 if ( platform === 'win32' ) {
0 commit comments