emqx / MQTTX

A Powerful and All-in-One MQTT 5.0 client toolbox for Desktop, CLI and WebSocket.
https://mqttx.app
Apache License 2.0
3.92k stars 448 forks source link

feat(desktop): support install mqttx cli one click #1712

Closed ysfscream closed 4 months ago

ysfscream commented 4 months ago

PR Checklist

If you have any questions, you can refer to the Contributing Guide

What is the current behavior?

The desktop version and the CLI version installations are relatively independent, and users need to download them separately in different scenarios.

Issue Number

Example: None

What is the new behavior?

After downloading the desktop version, allow users to directly install MQTTX CLI with one click if needed.

image image image image

image

image

Does this PR introduce a breaking change?

Specific Instructions

Are there any specific instructions or things that should be known prior to review?

Other information

Red-Asuka commented 4 months ago

@ysfscream I see that the https://github.com/jorangreef/sudo-prompt project has been archived. Is there a more suitable library that is still being maintained?

Red-Asuka commented 4 months ago

@ysfscream I noticed that it needs to be done manually on Windows, but it can be achieved by configuring system environment variables. You can refer to https://stackoverflow.com/questions/59560042/how-to-append-values-to-the-path-environment-variable-in-nodejs.

ysfscream commented 4 months ago

@ysfscream I see that the jorangreef/sudo-prompt project has been archived. Is there a more suitable library that is still being maintained?

I am still looking for a suitable replacement. Although the current project has been archived, it is still functional and stable, with 2 million weekly downloads on NPM. Please let me know if you have a suitable alternative in mind.

ysfscream commented 4 months ago

@ysfscream I noticed that it needs to be done manually on Windows, but it can be achieved by configuring system environment variables. You can refer to stackoverflow.com/questions/59560042/how-to-append-values-to-the-path-environment-variable-in-nodejs.

Thank you for the suggestion! This looks very useful. I'll try implementing this in the next PR.