[Bug?] Executables are looking for OGGs absolutely!

For questions about using Classic.

Post » Fri Jan 30, 2009 4:49 pm

Using 0.98.7.

As in, an executable created with Construct looks for any OGG files used by the project in the absolute directory the project was created in.

C:\Documents and Settings\Stuart\My Documents\My Code\Construct is the directory where I keep all my Construct projects and related files (PNGs, OGGs, MP3s etc etc).

So:
:arrow: I loaded up a test project and exported it to an executable in another directory.
:arrow: Next I renamed the Construct directory under My Code to something else.
:arrow: Then I attempted to run the executable. It came up with an "Unexpected error" and terminated.
:arrow: When I renamed the Construct directory back and re-ran the executable, it worked.

Note that as I only use OGGs for sound I have not tested this with other sound formats.

I am aware the priority of looking for OGGs (at least) is the executable directory then the project home directory, but I guess the real bug here is that if it can not be found in either location it shouldn't crash as it does - exit gracefully or run with no sound, I guess?
B
2
S
2
G
3
Posts: 158
Reputation: 1,566

Post » Fri Jan 30, 2009 5:59 pm

Are you using resources or loading from files?

Did you say load from file "C:\Documents and Settings\Stuart\My Documents\My Code\Construct\something.ogg" (in which case it will always look for it there no matter where you move it), or just "something.ogg" (in which case it could look anywhere), or AppPath & "something.ogg" (in which case it looks in the same directory as your app even when its moved)?
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Fri Jan 30, 2009 6:03 pm

Just "filename.ogg" it seems. Thanks for pointing that out.
B
2
S
2
G
3
Posts: 158
Reputation: 1,566


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 9 guests