feat (blend-settings): fix issues with package installation
This commit is contained in:
parent
525fe9a269
commit
db623821ea
2 changed files with 4 additions and 5 deletions
|
@ -183,9 +183,7 @@ app.whenReady().then(() => {
|
||||||
createPackageWindow()
|
createPackageWindow()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setTimeout(() => {
|
|
||||||
createWindow()
|
createWindow()
|
||||||
}, 1000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
createTerminalWindow()
|
createTerminalWindow()
|
||||||
|
|
|
@ -132,8 +132,9 @@
|
||||||
function install_package() {
|
function install_package() {
|
||||||
if (package_type == 'apk') {
|
if (package_type == 'apk') {
|
||||||
document.getElementById('install-button').disabled = true
|
document.getElementById('install-button').disabled = true
|
||||||
require('child_process').spawnSync('waydroid', ['app', 'install', package_name])
|
require('child_process').spawnSync('waydroid', ['app', 'install', require('@electron/remote').process.argv[3]])
|
||||||
document.getElementById('install-button').innerHTML = 'Installed'
|
document.getElementById('install-button').innerHTML = 'Installed'
|
||||||
|
require('child_process').spawnSync('rm', ['-rf', install_dir])
|
||||||
} else {
|
} else {
|
||||||
package_source = document.getElementById('source_select').options[document.getElementById('source_select').selectedIndex].text.toLowerCase().replace(' ', '-')
|
package_source = document.getElementById('source_select').options[document.getElementById('source_select').selectedIndex].text.toLowerCase().replace(' ', '-')
|
||||||
timestamp = Math.floor(new Date().getTime() / 1000)
|
timestamp = Math.floor(new Date().getTime() / 1000)
|
||||||
|
@ -161,8 +162,8 @@
|
||||||
|
|
||||||
ipc.on('installation-complete', () => {
|
ipc.on('installation-complete', () => {
|
||||||
document.getElementById('install-button').innerHTML = 'Installed'
|
document.getElementById('install-button').innerHTML = 'Installed'
|
||||||
})
|
|
||||||
require('child_process').spawnSync('rm', ['-rf', install_dir])
|
require('child_process').spawnSync('rm', ['-rf', install_dir])
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue