Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download CRC installer binary on runtime #11

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

evidolob
Copy link
Contributor

The move CRC extension to separate repo force us to downloading CRC installation binary in runtime, after user click install button.

Note: PR uses status bar item to indicate downloading process, that should be replaced when podman-desktop/podman-desktop#1254 and podman-desktop/podman-desktop#1343 will be implemented

Demo Windows:

crc-download-install.mp4

Demo MacOS:

Screen.Recording.2023-03-13.at.12.44.11.mp4

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
@evidolob evidolob requested review from gbraad and anjannath March 13, 2023 10:56
const progressStr = /* progress.transferred + ' of ' + progress.total + ' ' + */Math.round(progress.percent * 100) + '%';
if(lastProgressStr !== progressStr) {
//TODO: show progress on UI!
this.statusBarItem.text = 'Downloading: ' + progressStr;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is allowed ;-), but the rest of the API is restrictive...

try {
if (fs.existsSync(pkgPath)) {
if (await isFileExists(pkgPath)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this related to the main ui async issue you mentioned?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I made a lot of sync code clean up, ensuring that we don’t use any synchronous code/IO operation.

@gbraad gbraad merged commit d0dc17b into crc-org:main Mar 13, 2023
@evidolob evidolob deleted the download-crc-on-runtime branch March 13, 2023 11:21
@deboer-tim
Copy link
Contributor

Not expecting it here, but is it possible to switch to silent (background) installer in the future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants