flutter desktop run executable file that locate in assest,

315
Process.run('C:/Users/<Ur User>/AndroidStudioProjects/web_view_test/build/windows/runner/Debug/installerX64/install.exe', [' start ']).then((ProcessResult results) {
      print(results.stdout);
    });
Share:
315
Epool Ranggi
Author by

Epool Ranggi

Updated on December 29, 2022

Comments

  • Epool Ranggi
    Epool Ranggi about 1 year

    how do I run the executable files from Flutter desktop that also store in that app itself, let say if I made a batch file that echo hello worlds. the idea is I don't want the executable file in the app itself. the only thing that I can think of is assets. I want to run the file with Process. start or run. I tried the "workingDirectory" to assets dir but it doesn't work. Any other solution or maybe I do it the wrong way.

    • Atul Chaudhary
      Atul Chaudhary about 2 years
      facing the same problem did you find any solution ??
    • Nux
      Nux almost 2 years
      facing same issue
    • Epool Ranggi
      Epool Ranggi almost 2 years
      @Nux have you tried asset bundle?. I'm moving from this issue by not implementing this related feature on that project but recently, I encounter with asset bundle. maybe you can trie it out if you still looking forward to it
  • Epool Ranggi
    Epool Ranggi almost 2 years
    I bet there is a better way than this? or not.
  • B14ck
    B14ck almost 2 years
    yes make some node js code and compile it with pkg and call it from flutter
  • B14ck
    B14ck almost 2 years
    or lock how to creat pakage and create it with c++ and invoce the function from flutter woth channel