@@ -224,9 +224,10 @@ var makeUnity3d = function(runtimeInfo, gamePath, destFolder, options) {
224
224
var destPath = path . join ( destFolder , releaseUtils . safeishName ( gameId ) + platInfo . platform . zipSuffix ) ;
225
225
var binStart = "bin/" ;
226
226
var excludeRE = / ^ ( s r c | A s s e t s (? ! \/ W e b P l a y e r T e m p l a t e s ) | L i b r a r y | P r o j e c t S e t t i n g s | T e m p ) \/ / i;
227
+ var extRE = / \. ( m e t a | s l n | u s e r p r e f s | c s p r o j ) $ / i;
227
228
var filter = function ( nativeFilename , filePath , isDir ) {
228
229
var filename = nativeFilename . replace ( / \\ / g, '/' ) ;
229
- if ( excludeRE . test ( filename ) ) {
230
+ if ( excludeRE . test ( filename ) || extRE . test ( filename ) ) {
230
231
return false ;
231
232
}
232
233
if ( strings . startsWith ( filename , binStart ) ) {
@@ -244,7 +245,12 @@ var makeUnity3d = function(runtimeInfo, gamePath, destFolder, options) {
244
245
}
245
246
return pass ;
246
247
} ;
247
- promises . push ( makeZip ( gameId , gamePath , destPath , filter ) ) ;
248
+ promises . push ( makeZip ( gameId , gamePath , destPath , filter ) . then ( function ( zipFiles ) {
249
+ zipFiles . forEach ( function ( zipFile ) {
250
+ zipFile . platform = platInfo . platform . platform ;
251
+ } ) ;
252
+ return zipFiles ;
253
+ } ) ) ;
248
254
} ) ;
249
255
return Promise . all ( promises ) ;
250
256
} ) . then ( function ( zipFiles ) {
@@ -254,7 +260,7 @@ var makeUnity3d = function(runtimeInfo, gamePath, destFolder, options) {
254
260
var srcPath = path . join ( gamePath , "bin" , filename ) ;
255
261
var destPath = path . join ( destFolder , filename ) ;
256
262
fs . writeFileSync ( destPath , fs . readFileSync ( srcPath ) ) ;
257
- result . push ( { filename : destPath } ) ;
263
+ result . push ( { filename : destPath , type : "unitypackage" } ) ;
258
264
}
259
265
return Promise . resolve ( result ) ;
260
266
} ) ;
0 commit comments