Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Help again! Adding media to the exe.

Author
Message
Dragon3
21
Years of Service
User Offline
Joined: 4th Feb 2004
Location:
Posted: 9th Jan 2005 05:34
Hiya ^_^

Well, I have tried to add the media of the program to the exe and it does not do it. Can anyone tell me the procedure for making an exe file with the media contained within it.

Sorry to be a pain, but hey, I'm good at it. ^_~

FF4EVA
Freddy 007
20
Years of Service
User Offline
Joined: 30th Nov 2004
Location: Denmark
Posted: 9th Jan 2005 05:47

You just click on the blue button in the bottom right corner that says "media".
Then you click on the grey "add" button and select the media you want included in your .exe, and click on "open".
WOW!
I just made a tutorial!!!
Ehh... ok... maybe not....
But i hope that it works for you now


Check out PanzerGames at http://www.freewebs.com/panzergames
Dragon3
21
Years of Service
User Offline
Joined: 4th Feb 2004
Location:
Posted: 9th Jan 2005 06:54
Thanks KLU but I did that.

Does the media need to be in a diff directory to the exe when I do it or can the media be in the same directory as the dbpro file?

FF4EVA
Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 9th Jan 2005 06:59
no, Just checking here, but did you hit F4/compile after adding the media?

Dragon3
21
Years of Service
User Offline
Joined: 4th Feb 2004
Location:
Posted: 9th Jan 2005 07:48
No I hit F5.

Why?

FF4EVA
Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 9th Jan 2005 07:55
F5 just runs it afterwards

Because someone somewhere will make the mistake of not compiling.

Does it give an error about the adding of media or just run fine?

Dragon3
21
Years of Service
User Offline
Joined: 4th Feb 2004
Location:
Posted: 9th Jan 2005 09:17
"give an error about the adding of media"

Yes it does. I did f4 like you said but it gave an error saying it could not find 100.bmp file. But the file is there.

Any help? ^_^

FF4EVA
Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 9th Jan 2005 09:28
hmm, in your code do you give absolute hard-drive locations (C:/dbp/projects/game/dir/100.bmp) or relative locations (dir/100.bmp)?

Dragon3
21
Years of Service
User Offline
Joined: 4th Feb 2004
Location:
Posted: 9th Jan 2005 22:02
Quote: "hmm, in your code do you give absolute hard-drive locations (C:/dbp/projects/game/dir/100.bmp) or relative locations (dir/100.bmp)?"


Well my program is in the same dir as the media, so if I want to load a file I just put something like... load image "x.bmp",1
I dont put the whole path.

FF4EVA
Dragon3
21
Years of Service
User Offline
Joined: 4th Feb 2004
Location:
Posted: 9th Jan 2005 23:39
So..... Anyone! Please!! ^_^

FF4EVA
Dragon3
21
Years of Service
User Offline
Joined: 4th Feb 2004
Location:
Posted: 10th Jan 2005 00:12
AAARRGGGGGGH!!!!!!!

I found out why.

When DBP puts the path in it does this:

"C:\Program Files\Dark Basic Software\Dark Basic Professional\Projects\worms\107.bmp"

If I remove the " it works without error.

Do I HAVE to do that with every single line of media I add?

If so, I may as well load the program in to DBC and let it make it an exe as DBC just added the media without all the messing about.

I am SO cross over this... I thought that something as simple as that would have been corrected with an up-date.

And I have to load all the media in one at a time cos the so-called "wildcard" does not work, or I cant make it work.

Ok, So, do I have to remove all those " signs or is there a work around?

FF4EVA
Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 10th Jan 2005 00:20
the quotes are there so you can have commars etc for multiple entries, try selecting all the things in one directory and adding at once (I can't remember if that's possible)

Reaperman
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: Kent, England
Posted: 10th Jan 2005 00:34 Edited at: 10th Jan 2005 00:35
Quote: " try selecting all the things in one directory and adding at once (I can't remember if that's possible)"


No you cant do that.

I have just taken a look at my daughters problem and I cannot see a way around it. She needs some help on this as she has about 200 media bits to add, most of which are bmp files.
Neofish
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 10th Jan 2005 00:38 Edited at: 10th Jan 2005 00:42
200! wow...

um, hang on I'll see if I can see a work around

edit: no I can't but you could do something like encypt them all and load them using a decrytion routine

the easiest would just to add them all and put up with the tediousness

pizzaman
21
Years of Service
User Offline
Joined: 18th Feb 2004
Location: Gateshead, UK
Posted: 10th Jan 2005 01:54 Edited at: 10th Jan 2005 01:57
Hi

It's easy to add multiple items this is how you do it -

1. Goto the media button then click the add button.
2. Browse for the folder of the media you want to add and select any media file.
3. Before you click on OK, delete the file's name you from the end of the text, and replace it with *.* then click OK.
4. All of the folder's contents will now be added.

Example
I had lots of media in a folder called Pictures, so I selected a file in it from the browser and the text I got was called "Picture\Start Image.png". I replaced this with "Picture\*.*" to get all my files from the folder "Picture" included in the exe.

Note: If you only want to select a certain file type to add replace *.* with *.Ext where Ext is the name of the media type, like mp3,png,jpg etc. Therefore "Picture\Start Image.png" would become "Picture\*.png" - this would include all .png files.

Hope this helps
Reaperman
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: Kent, England
Posted: 10th Jan 2005 01:59
Thank you pizzaman, I will tell her when she comes back from her friends.
the_winch
22
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 10th Jan 2005 03:34 Edited at: 10th Jan 2005 03:35
I think the old versions of the ide used to add quotes to the media filenames.
You can get the latest version from http://darkbasicpro.thegamecreators.com/?f=ide

Or just use one of the alternative ides.

Quote: "this is not a quote"
Dragon3
21
Years of Service
User Offline
Joined: 4th Feb 2004
Location:
Posted: 17th Apr 2005 20:50
pizzaman...Thanks but it dont work

I dont knwo why but it does not pick up the media even when I use the *.*

Could I be doing anything wrong? I am following what you told me to do.

Oh, and I have updated to 5.8 too. Could that be anything to do with it????

FF4EVA
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 18th Apr 2005 05:25
Works here with 5.8..exacttly as Pizzaman told
Maybe a visual example can help

Attachments

Login to view attachments

Login to post a reply

Server time is: 2025-06-03 18:16:28
Your offset time is: 2025-06-03 18:16:28