This is mnoGoSearch's cache of https://lists.gambas-basic.org/archive/user/2024-03/0000310.html. It is a snapshot of the page as it appeared during last crawling. The current page could have changed in the meantime.

Last modified: Sat, 23 Mar 2024, 22:21:02 CET    Size: 4314
Re: How to embedded file/sound into executable?

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

Re: How to embedded file/sound into executable?

  • Subject: Re: How to embedded file/sound into executable?
  • From: T Lee Davidson <t.lee.davidson@xxxxxxxxx>
  • Date: Sat, 23 Mar 2024 16:27:12 -0400
  • To: user@xxxxxxxxxxxxxxxxxxxxxx

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