Skip to main content
GameDev.net gamedev.net
🔒 Locked

stand-alone

Started by dazscott Feb 26, 2005 at 8:01 AM 2 replies 550+ views
Original Post
dazscott
dazscott
I'm developing a game in c# and managed directx.I want to create a stand-alone .exe file so I can upload it to my website to show my progress.The .exe's in the debug and release folders dont work outside their folders.Can someone explain how to do this, thanks in advance.
Supernat02
Supernat02
How does it not work? What happens when you run it?

Chris
Chris ByersMicrosoft DirectX MVP - 2005
darookie
darookie
Take a look at the way you load your resources (textures etc.). If you use relative path such as '..\..\media\texture.dds' the exe cannot work outside the bin/release or bin/debug or foo/bar folder.
Instead use a configuration file that is located in the same directory as your exe and contains the actual relative or absolute path to your resources.
This way you only need to modify this config file if you move your exe to another folder.

HTH,
Pat.
Endurion
Endurion
1) If your game is using C# and managed DirectX the end user has to have the .NET framework AND managed DirectX extensions installed.

2) Only give the .exe from the release folder to others.

3) Have a good way to handle relative paths.

I for example take the absolute (=complete) path to my exe file and build my resource file names from there. So i always build a complete path to load resources. Since i'm working from the path from the .exe i do not need any configuration, just the resource files relative to it.

4) If you need additional external libraries you need to deliver the accompanying dlls (or link them static).
Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.