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.

Newcomers DBPro Corner / Question about Media folder in exe file.

Author
Message
Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 6th Jun 2006 16:49 Edited at: 7th Jun 2006 04:34
Hi ,

As we know , when we put one file in the media folder of the
DARKBASICs Pro project , we can load a like directly from exe file.

But I have some problem.

I have one .s3m audio file attached in exes media folder.

If I have the file in the same folder of my game the audio and
other files are loaded.

But when I put my exe file in other directory some files does not
loaded and drop error about file not found.

In this case , the file is in the exe and does not need to bee in the harddisk directory , because is beeing attached in the exe file.

When I am loading the file I don't use a specific folder for the file , for example:

LOAD AUDIO music01, "the_folder\music01.s3m"

Neither folder nor drive letter.
Like this example:

LOAD AUDIO music01, "e:\the_folder\music01.s3m"
I am using file name only like this example

LOAD AUDIO music01, "music01.s3m"

So if you are in the same drive or directory , file can be found.
Or you are not in the directory on drive then file can be found from the exe file.

Why in this case file cannot be found?


Thank you very much.

Attachments

Login to view attachments
D Ogre
21
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 6th Jun 2006 22:45
If you move your exe to another folder and the media is left in its original location, the program doesn't know where to look for the files because they are not in the same folder.

Try giving the exact location both path and file for your media in the program.

Example:

"C:\Program Files\Dark Basic Software\Dark Basic Professional\Projects\Game\Media\music02.s3m"
Or whatever the actual path and file is...

If you are trying to load your media from a CD, make sure the disk is in the apropriate drive and give the drive time to read the disk before compiling your program. If you just placed the disk in the drive before compiling, you may get a DRIVE NOT READY or possibly a FILE NOT FOUND upon compilation. You have to give the CD/DVD drive time to "spool" up. Again, specify the exact path.
For included media, you still must specify the exact location for it to grab it during the inital compilization unless its in the same folder. Use the appropiate LOAD media commands in the program and then include the files in the editor under MEDIA. After this, it should be part of the executable and moving the program should make no difference.

If you have tried all of this and you still have no luck, you might have a problem with the plugin. Make sure the plugin is properly installed. That would be my guess. Does anyone have any other ideas?
Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 7th Jun 2006 00:03
In my case I have the file in the exe.
And I want , when I put the exe alone in other folder , the file will be load.

For example I have music01.s3m attached in the exe file.
If I start the game and the file will not in the folder (But it is in the exe) I suppose file will be load (Will be taken from the exe automatically) But it is not. And I need to place this file external with my exe in the same directory , but the file is internal the exe.

D Ogre
21
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 7th Jun 2006 00:37
Very strange. Did you make a reference in the program for actually loading the media (ie. Load Music "filename.mp3",1)? If you didn't and you just used the include media option in the editor, the compiler doesn't know what media number to use once you run the exe. For example PLAY MUSIC 1. The one is referencing the media number which was assigned to the file upon loading.

Try this. Compile the program without actually including any media in the exe. The program should simply load the file(s) externally during execution. Check the file size of the program. keeping the code the same, use the include option to include the media in the editor. Recompile the program and then recheck the file size. If the file size is larger, then the compiler is including it. If its the same size, then for some reason the compiler is not actually including it. If the later seems to be the case, then try reinstalling the plugin. If that doesn't work, you might need to report this problem to GameCreators. It could be a problem with the plugin or the editor. Not sure after this point.
Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 7th Jun 2006 04:17 Edited at: 7th Jun 2006 04:18
In my case the exe file is bigger and that means , the
.s3m file is included.

But only is working if I have the s3m file external.

So

I have the file in the exe and in my directory.

But I don't want to have the file out in the directory.
Why is this happened?



Attached picture in the first thread , shows my editor with the
file attached in the exe.
Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 7th Jun 2006 04:30
All of my files that , they does not loaded from exe but included in the exe are , my fonts .ttf and my musics .s3m

Whe I am include in the exe those files does not supported as the
default extension so I am selecting the *.* and I check the tick
with (Copy the media file(s) into the current project directory?)

Is this wrong?
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 7th Jun 2006 11:26
Your problem is that you are using LOAD AUDIO, this is a third-party addon and none of the third party add-ons support included media. We have just had the same problem with advanced terrain heightmaps which you also can't include in the exe.

Basically you are stuffed until TGC change things.

Boo!
D Ogre
21
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 7th Jun 2006 15:11
Thanks Spooky for clearing this issue up. I haven't used any of the plugins except for Blue GUI. So, the plugin was the issue. I had a suspicion about that.
Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 7th Jun 2006 20:49
Ahaa , Ok thank you. So do you cleared this issue , because I though I had problem in my programm.

For now I will put my other data outsite from the exe untill Lee update the compiler.

Login to post a reply

Server time is: 2024-11-27 17:53:14
Your offset time is: 2024-11-27 17:53:14