[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to embedded file/sound into executable?


On 3/23/24 15:45, roberto.premoli@xxxxxxxxxx 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 your project. 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

--- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ----
--- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----


Follow-Ups:
Re: How to embedded file/sound into executable?roberto.premoli@xxxxxxxxxx
References:
How to embedded file/sound into executable?roberto.premoli@xxxxxxxxxx