[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to embedded file/sound into executable?
[Thread Prev] | [Thread Next]
- Subject: Re: How to embedded file/sound into executable?
- From: BB <adamnt42@xxxxxxxxx>
- Date: Sun, 24 Mar 2024 10:20:48 +1030
- To: gambas Mailing List <user@xxxxxxxxxxxxxxxxxxxxxx>
On 24/3/24 10:17 am, BB wrote:
Ah, I just realised. Because you are passing the file path to an external program (which can't see inside the executable) you need to :On 24/3/24 7:41 am, roberto.premoli@xxxxxxxxxx wrote:Try using relative paths, as explained in the "File & Directory Paths" page.Il 23.03.2024 21:27 T Lee Davidson ha scritto:On 3/23/24 15:45, roberto.premoli@xxxxxxxxxx [1]wrote:QUESTION: Is possible to "embedded" the din-din.wav file inside the executable when i compile the project and play it when needed? this will make the wav file part of the executable, so it will be always available.Yes, just place a copy of the WAV file in the top-level directory of yourproject. You see it under the Data directory of the project after a Project -> Refresh. Then just call your Exec thus: Exec ["aplay", Application.Path &/ "din-din.wav"] Wait -- Lee ---hello, it works when i am in gambas IDE. then I compile and install the .deb packege.then I start the program from command line, it pop up the window and does it works. but when the event is triggered, i have the follow feedback in command line:/usr/bin-din-ding.wav: file or directory does not exist.so gambas expect to find te sound as external file, not "inside" the executable.Robertob
on startup, copy the file from inside the executable to a Temp directory then you can refer to that file in your Exec call. b
Re: How to embedded file/sound into executable? | Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx> |
Re: How to embedded file/sound into executable? | T Lee Davidson <t.lee.davidson@xxxxxxxxx> |
How to embedded file/sound into executable? | roberto.premoli@xxxxxxxxxx |
Re: How to embedded file/sound into executable? | T Lee Davidson <t.lee.davidson@xxxxxxxxx> |
Re: How to embedded file/sound into executable? | roberto.premoli@xxxxxxxxxx |
Re: How to embedded file/sound into executable? | BB <adamnt42@xxxxxxxxx> |