Jump to content
  • Advertisement
Sign in to follow this  
Posese

C++ problem playing music with shortcut

This topic is 3679 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi ^^ I have a little problem with my program. I have made a program (it doesn't matter the content)... and I have used fmod to play music. In one point of the program I say something like: "Play_song("mysong.mp3");" When I execute the program, all is ok, and music works. But, I have made an installer with Inno Setup. I have included in it the song "mysong.mp3" and the needed DLL's (in the same path as the .exe). When I install program: - If I execute C:/Program Files/My program/Executable.exe all works fine - If I use the shortcut (from desktop) music doesn't work. I think it must be something about paths, or something like that,... but I don't know how to fix it. I need help :D That's all, thanks, and bye!

Share this post


Link to post
Share on other sites
Advertisement
If the problem is that the program can't find your mp3 you can either

* Set the "Start in" property of the shortcut to where the program is installed.

* Change your program so it doesn't assume a working directory. You can for example get the path of the exe, strip the exe filename and replace it with your mp3 so you have an absolute path.

Share this post


Link to post
Share on other sites
I think you must specify in the shortcut in which directory the exe should be launched. Set it to "C:/Program Files/My program" and it should work alright.

Share this post


Link to post
Share on other sites
Quote:
Original post by Promethium

* Set the "Start in" property of the shortcut to where the program is installed.



Well, I have tried to change it manually, and now it works...

The "problem" is that I want "everybody" to be able to use this program. And changing the Start in of the shorcut manually I think it's not the best idea :P

I don't know how to tell Inno Setup to change the Start in... :(


Edit: I have been looking options in Inno Setup and I have the solution :)
Thanks for all

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!