[Gambas-user] i Build a RPM package but...

Jesus ea7dfh at ...2382...
Sun Jul 12 13:50:01 CEST 2015


El 12/7/15 a las 13:01, tsukuba GIMP user escribió:
> ... I using "mediaview" but it's no have like picture.load("xxx.png") options
> mediaview only have "mediaview.url" options i must use music = application.Path &/ "music1.mp3"
> and then it's working
> ok here is my code:
> 
> Public Sub Button1_Click()
>   Dim music As String
>     MediaView1.Stop
>   music = application.Path &/ "music1.mp3"
>   MediaView1.URL = music
>   MediaView1.play
>   
> End

Hi, tsukuba

First, you should read carefully what others have wrote in this thread.

Using "Application.Path" is not a good idea in your case, so as Tobi has
told you, put your music.mp3 file inside the Data folder in your project
tree. Now, all you should do, is changing the line:

music = application.Path &/ "music1.mp3"

to:

music = "music1.mp3"

And that's all. mp3 file is embedded into the executable and it is
anymore in the filesystem.

If you want to put it in the filesystem, I would recommend you doing
this by copying to somewhere in the user folder, for instance, in a
hidden folder like /home/your_username/.your_app_name/music.mp3 and
instruct to the packager to copy those files into this folder.

This way, in gambas you should simply use this path to access your mp3 file:

music = User.Home &/ ".your_app_name/music1.mp3"

Note two things here: ".your_app_name" should be the actual name of your
application and the . dot in front of it is what it makes a hidden
folder (or file).

Hope this clarifies something

Regards

-- 
Jesus Guardon




More information about the User mailing list