Jump to content
  • Advertisement
Sign in to follow this  
Surg AKA Kunark

Others Running My Exes

This topic is 4864 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, so I took a class on programming. Learnt alot of cool things, and I decide I want to show my friends. So, using what I know I compile my program, setup a Release Folder instead of Debug and copy that exe to send them to show them the cool things I have learnt. Just to find out, our instructor never taught us the most important thing, how to get our programs to run on computers without visual studios!!!! Could anyone tell me how I can make my program actually run on a computer without Visual Studios, so I can show my friends everything that I have learnt. Or atleast to cool things :p If you could I would greatly appreciate it.

Share this post


Link to post
Share on other sites
Advertisement
Is this a standard-issue vanilla C++ program? If so, you can simply copy the libraries you use into the same directory as your program and then run the executable from that directory on the remote computer. If it's a .NET program, they need to have the appropriate version of the .NET framework installed.

Share this post


Link to post
Share on other sites
At a minimum, you need to zip up a folder containing the .EXE file and any data files it may be using (with the correct path).

If you have dependencies on specific DLLs that are not a standard part of Windows, then you need to include those DLLs as well. Make sure you have the right to distribute copies of those DLLs first! Typical DLLs you may depend upon include msvcr71.dll and msvcp71.dll (if you use MSVC .NET 2003 and use DLL/multi-threaded runtime); glut32.dll (if you use GLUT); etc. To find out what specific DLLs you depend on, use the "depends.exe" tool on your executable. (Note that commctl32.dll, kernel32.dll, d3d9.dll, opengl32.dll and others are standard Windows DLLs, and you don't need to include those)

To remove a dependency on a runtime, you can instead choose a statically linked runtime; that will copy the standard library code into your EXE and not need the external DLL.

If you want a better experience for the user, you should create a distributable installer, which includes the exe, dlls and data files, and which has an un-installer as well. There's a "deployment" project type in MSVC which allows you to build a simple installer.

Share this post


Link to post
Share on other sites
I'm not a moderator here, but here is some info I know.

Visual Studio 2005 likes to use arcane libraries; even our vanilla C programs require depedencies not found on computers without VS2005.

A good distributable installer is probably the only reliable way to distribute your software.

Share this post


Link to post
Share on other sites
Quote:
Original post by Thevenin
I'm not a moderator here, but here is some info I know.

Visual Studio 2005 likes to use arcane libraries; even our vanilla C programs require depedencies not found on computers without VS2005.

A good distributable installer is probably the only reliable way to distribute your software.


you dont have to be a moderater here... just there tends to be some moderators around the whole time and they are often quickest to reply...

just be sure of the paths to any media you load( if any )

Share this post


Link to post
Share on other sites
Quote:
Original post by Thevenin
I'm not a moderator here, but here is some info I know.

Visual Studio 2005 likes to use arcane libraries; even our vanilla C programs require depedencies not found on computers without VS2005.

A good distributable installer is probably the only reliable way to distribute your software.


Most of these arcane libraries are for debugging purposes so much of the problem is gone if you build in release mode.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
There was a program that I used several years ago, that would tell me all the dlls a certain process was using when running. I have forgotten that program name and have sinced formated my harddrive several times and cannot find where I backed up that program to even get the name of it.

MS Word 97 had a button or link on the about dialog window that would load a program that showed all the running programs with various other information. Not sure it it would display the dll used but it may be worth a try... I am not sure if it came with MS Word 97 or it came with the OS and it just accessed it easily.

Try Googleing for something that could do this. When you find the dlls that your program is using bundle those dlls into the same folder that your program's exe file is in and you should be good to go.

Share this post


Link to post
Share on other sites
Quote:
Original post by hplus0603
If you want a better experience for the user, you should create a distributable installer, which includes the exe, dlls and data files, and which has an un-installer as well.


Speaking as a user I have to disagree. Especially for small and simple tools I really and absolutely HATE that. Keeps you from running the program "directly" from the archive or just unzipping, testing, deleting. Or maybe I'm simply the only windows user left that opens the explorer from time to time. But in the time it takes to run the installer I could have tried the program and decided if I want to keep it or not.

Share this post


Link to post
Share on other sites
Quote:
Original post by hplus0603
[...]If you want a better experience for the user, you should create a distributable installer, which includes the exe, dlls and data files, and which has an un-installer as well.[...]
I disagree. Personally, I hate installers and things associated with them (such as reliance on application-specific registry entries) when they aren't needed. For example, UT2K4 won't run after I reformat my machine because it's missing a registry key with the game cd key or something, and instead of saying 'Missing CD-Key. Enter Your Key:' it makes me reinstall a game that takes almost a while DVD just to create that registry entry that it doesn't even need (it could store the key in a file, and use the registry ONLY so updated know where teh game is, and the game could set that key on each run of the game if it isn't set).

The only time installers are really appropriate is for massive programs that interface very closely with the OS, such as installing context handlers, drivers, or other systems. The only reason context handlers need an installer is for easy removal via the associated uninstaller, but usually uninstallers don't clean up registry entires (beyond removing the bare minimum required, such as the one that says to load the context handler, so that it's still listed but not active) so they don't help a whole lot.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!