tekartik / process_run.dart

Process run helper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] How to include my own ADB (or any other package) and use it in the shell?

petodavid opened this issue · comments

commented

I want to develop an application where I use ADB commands, I would like to ship my flutter application with a built in ADB so the user should not install it, it this possible?

Did you succeed?

I cannot run exe file in shell or powershell after packaging as msix

commented

How do you run commands on windows?

How do you run commands on windows?

just ues process_run package,as example

commented

Does it work only if you run the app using the IDE run? What if you start the standalone built .exe ?

Does it work only if you run the app using the IDE run? What if you start the standalone built .exe ?

yes,it work。
I did not learn how to package exe,just use msix package

commented

Did you find a solution for MSIX?

Did you find a solution for MSIX?

No, I'm busy with other work.
and it code

  //  `controller` and `errorCtrl` can listening exe out puts

final file = await executable; // copy asstes exe to temp path, and get file
var exePath = file.absolute.path; // get file absolute path
final cmd ='$exePath$arguments'; // just as input to cmd
await Shell( stdout: controller!.sink, stderr: errorCtrl!.sink, verbose: false).run(cmd); // call `run()` method