import Path from 'path' var fs= core.System.IO.Fs.async class OsxWriter{ constructor(installer){ this.installer= installer this.conf= this.installer.getConfig() } async copy(){ var src,path, conf conf= this.conf if(this.installer.local) path= process.env.HOME + "/Applications" else path= "/Applications/" path = Path.join(path, conf.name || conf.id) path += ".app" this.path= path if(! (await fs.exists(path))) await fs.mkdir(path) src= Path.join(__dirname, "osx-apps") await this._copy(src, path) // Ajustar permisos .... await fs.chmod(Path.join(path, "Contents", "MacOS", "app"), '755') await fs.chmod(Path.join(path, "Contents", "Resources", "script"), '755') //await fs.symlink(conf.executable, Path.join(path, "Contents", "Resources", "script")) } async _copy(src, dest){ var files, file, stat, usrc, udest, icon if(!await fs.exists(dest)) await fs.mkdir(dest) files= await fs.readdir(src) for(var i=0;i