var fs=require('fs'); var path=require('path'); var exec = require('child_process').exec; global.window=global; require(__dirname+'/update.js'); require(__dirname+'/asset.js'); var updates=window.noname_update; var assetlist=''; var skinlist='window.noname_skin_list={\n'; var entrylist=[]; var entrymap={}; var get = function(dir,callback){ fs.readdir(dir,function(err,list){ var shift=function(){ if(list.length){ var filename=list.shift(); var delay=false; if(!/\.|~|_/.test(filename[0])){ var url=dir+'/'+filename; var stat=fs.statSync(url); if(stat.isFile()){ if(['.jpg','.png','.mp3','.ttf'].indexOf(path.extname(url))!=-1){ var assetentry=path.relative(path.dirname(__dirname),url); assetlist+=',\n\t\''+assetentry+'\''; entrylist.push(assetentry); } } else if(stat.isDirectory()){ if(dir==path.dirname(__dirname)+'/image/skin'){ fs.readdir(url,function(err,list){ var num=0; for(var i=0;i { var updatelist='window.noname_update={\n\tversion:\''+updates.version+'\','; updatelist+='\n\tupdate:\''+(updates.update||'')+'\','; var apply=function(name,list){ updatelist+='\n\t'+name+':[\n'; for(var i=0;i