Enable remote launcher catalog source
This commit is contained in:
@@ -17,7 +17,6 @@ logger.info('Loading..')
|
||||
|
||||
// Load ConfigManager
|
||||
ConfigManager.load()
|
||||
CatalogManager.applyConfiguredProfile()
|
||||
|
||||
// Yuck!
|
||||
// TODO Fix this
|
||||
@@ -44,20 +43,32 @@ function onDistroLoad(data){
|
||||
ipcRenderer.send('distributionIndexDone', data != null)
|
||||
}
|
||||
|
||||
// Ensure Distribution is downloaded and cached.
|
||||
DistroAPI.getDistribution()
|
||||
.then(heliosDistro => {
|
||||
logger.info('Loaded distribution index.')
|
||||
async function bootstrapDistribution(){
|
||||
try {
|
||||
await CatalogManager.getInstalledProfiles()
|
||||
} catch (err) {
|
||||
logger.warn('Unable to refresh installed profiles from catalog at startup.', err)
|
||||
}
|
||||
|
||||
onDistroLoad(heliosDistro)
|
||||
})
|
||||
.catch(err => {
|
||||
logger.info('Failed to load an older version of the distribution index.')
|
||||
logger.info('Application cannot run.')
|
||||
logger.error(err)
|
||||
CatalogManager.applyConfiguredProfile()
|
||||
|
||||
onDistroLoad(null)
|
||||
})
|
||||
// Ensure Distribution is downloaded and cached.
|
||||
DistroAPI.getDistribution()
|
||||
.then(heliosDistro => {
|
||||
logger.info('Loaded distribution index.')
|
||||
|
||||
onDistroLoad(heliosDistro)
|
||||
})
|
||||
.catch(err => {
|
||||
logger.info('Failed to load an older version of the distribution index.')
|
||||
logger.info('Application cannot run.')
|
||||
logger.error(err)
|
||||
|
||||
onDistroLoad(null)
|
||||
})
|
||||
}
|
||||
|
||||
bootstrapDistribution()
|
||||
|
||||
// Clean up temp dir incase previous launches ended unexpectedly.
|
||||
fs.remove(path.join(os.tmpdir(), ConfigManager.getTempNativeFolder()), (err) => {
|
||||
|
||||
Reference in New Issue
Block a user