wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
25.25k stars 1.22k forks source link

How to call other unix files within wails #3055

Open sgx-wb opened 12 months ago

sgx-wb commented 12 months ago

Have you read the Documentation Contribution Guidelines?

Description

I created an initial wails project with only the following modifications image image The unix file I want to use is https://github.com/yt-dlp/yt-dlp/releases image Normally, the result of the call should be displayed, but now it shows that the unix file cannot be found. According to the file size, the unix file should have been built into the wails. image

Self-service

sgx-wb commented 12 months ago

myWailsTest.zip I packed the code. Can someone test it for me? the yt-dlp in static is the unix of mac. If you are using windows, you need to replace it.

stffabi commented 12 months ago

The embed assets fs.FS has no relation with what is getting packaged with your app to be stored on the local filesystem. The embed FS is a virtual filesystem in your application and is used to store files for the frontend website. If you want to execute a binary that is in your embed FS you need to first write that file to your local filesystem or package it with your app with a NSIS installer or bundling it into your macOS .app file after building has been done.

sgx-wb commented 12 months ago

@stffabi Hello, thank you for your reply. It seems that if I use wails build to generate an application and embed a Unix file, if I want to execute this Unix file on another computer, do I need to first write this Unix file locally and then call the Unix file?