src/installer.js
function (data, callback) {
  async.parallel([
    async.apply(readMeta, data)
  ], function (err, results) {
    var pkg = results[0] || {}

    var defaults = {
      id: getAppId(pkg.name, pkg.homepage),
      productName: pkg.productName || pkg.name,
      genericName: pkg.genericName || pkg.productName || pkg.name,
      description: pkg.description,

      branch: 'master',
      arch: undefined,

      base: 'io.atom.electron.BaseApp',
      baseVersion: 'master',
      baseFlatpakref: 'https://s3-us-west-2.amazonaws.com/electron-flatpak.endlessm.com/electron-base-app-master.flatpakref',
      runtime: 'org.freedesktop.Platform',
      runtimeVersion: '1.4',
      runtimeFlatpakref: 'https://raw.githubusercontent.com/endlessm/flatpak-bundler/master/refs/freedesktop-runtime-1.4.flatpakref',
      sdk: 'org.freedesktop.Sdk',
      sdkFlatpakref: 'https://raw.githubusercontent.com/endlessm/flatpak-bundler/master/refs/freedesktop-sdk-1.4.flatpakref',
      finishArgs: [
        // X Rendering
        '--socket=x11', '--share=ipc',
        // Open GL
        '--device=dri',
        // Audio output
        '--socket=pulseaudio',
        // Read/write home directory access
        '--filesystem=home',
        // Chromium uses a socket in tmp for its singleton check
        '--filesystem=/tmp',
        // Allow communication with network
        '--share=network',
        // System notifications with libnotify
        '--talk-name=org.freedesktop.Notifications'
      ],
      modules: [],

      bin: pkg.productName || pkg.name || 'electron',
      icon: path.resolve(__dirname, '../resources/icon.png'),
      files: [],
      symlinks: [],

      categories: [
        'GNOME',
        'GTK',
        'Utility'
      ],

      mimeType: []
    }

    callback(err, defaults)
  })
}
function (data, callback) {
  async.parallel([
    async.apply(readMeta, data)
  ], function (err, results) {
    var pkg = results[0] || {}

    var defaults = {
      id: getAppId(pkg.name, pkg.homepage),
      productName: pkg.productName || pkg.name,
      genericName: pkg.genericName || pkg.productName || pkg.name,
      description: pkg.description,

      branch: 'master',
      arch: undefined,

      base: 'io.atom.electron.BaseApp',
      baseVersion: 'master',
      baseFlatpakref: 'https://s3-us-west-2.amazonaws.com/electron-flatpak.endlessm.com/electron-base-app-master.flatpakref',
      runtime: 'org.freedesktop.Platform',
      runtimeVersion: '1.4',
      runtimeFlatpakref: 'https://raw.githubusercontent.com/endlessm/flatpak-bundler/master/refs/freedesktop-runtime-1.4.flatpakref',
      sdk: 'org.freedesktop.Sdk',
      sdkFlatpakref: 'https://raw.githubusercontent.com/endlessm/flatpak-bundler/master/refs/freedesktop-sdk-1.4.flatpakref',
      finishArgs: [
        // X Rendering
        '--socket=x11', '--share=ipc',
        // Open GL
        '--device=dri',
        // Audio output
        '--socket=pulseaudio',
        // Read/write home directory access
        '--filesystem=home',
        // Chromium uses a socket in tmp for its singleton check
        '--filesystem=/tmp',
        // Allow communication with network
        '--share=network',
        // System notifications with libnotify
        '--talk-name=org.freedesktop.Notifications'
      ],
      modules: [],

      bin: pkg.productName || pkg.name || 'electron',
      icon: path.resolve(__dirname, '../resources/icon.png'),
      files: [],
      symlinks: [],

      categories: [
        'GNOME',
        'GTK',
        'Utility'
      ],

      mimeType: []
    }

    callback(err, defaults)
  })
}
function ( data , callback ) { async . parallel ( [ async . apply ( readMeta , data ) ] , function ( err , results ) { var pkg = results [ 0 ] || { } var defaults = { id : getAppId ( pkg . name , pkg . homepage ) , productName : pkg . productName || pkg . name , genericName : pkg . genericName || pkg . productName || pkg . name , description : pkg . description , branch : 'master' , arch : undefined , base : 'io.atom.electron.BaseApp' , baseVersion : 'master' , baseFlatpakref : 'https://s3-us-west-2.amazonaws.com/electron-flatpak.endlessm.com/electron-base-app-master.flatpakref' , runtime : 'org.freedesktop.Platform' , runtimeVersion : '1.4' , runtimeFlatpakref : 'https://raw.githubusercontent.com/endlessm/flatpak-bundler/master/refs/freedesktop-runtime-1.4.flatpakref' , sdk : 'org.freedesktop.Sdk' , sdkFlatpakref : 'https://raw.githubusercontent.com/endlessm/flatpak-bundler/master/refs/freedesktop-sdk-1.4.flatpakref' , finishArgs : [ // X Rendering '--socket=x11' , '--share=ipc' , // Open GL '--device=dri' , // Audio output '--socket=pulseaudio' , // Read/write home directory access '--filesystem=home' , // Chromium uses a socket in tmp for its singleton check '--filesystem=/tmp' , // Allow communication with network '--share=network' , // System notifications with libnotify '--talk-name=org.freedesktop.Notifications' ] , modules : [ ] , bin : pkg . productName || pkg . name || 'electron' , icon : path . resolve ( __dirname , '../resources/icon.png' ) , files : [ ] , symlinks : [ ] , categories : [ 'GNOME' , 'GTK' , 'Utility' ] , mimeType : [ ] } callback ( err , defaults ) } ) }
Get the hash of default options for the installer. Some come from the info
read from `package.json`, and some are hardcoded.
Get the hash of default options for the installer . Some come from the info read from package . json and some are hardcoded .