Redistribution hell.

Started by
29 comments, last by Ezbez 16 years, 3 months ago
That made it compile, but I'll have to wait a while to test it...unless someone here would be willing to download the game, and tell me how it goes (assuming you don't have the dlls in your SYSTEM folder), I'd be very greatful.

Otherwise I have to wait until my sister goes to bed and use her computer.
Advertisement
For embedding the dlls as static via compiler settings, I too got linker errors. But doing a simple "Rebuild Solution" made them go away.

Also, all of my programs that I made with VC run fine on my comp without screaming for extra dlls - does installing VC automatically install the require redistributables?
Comrade, Listen! The Glorious Commonwealth's first Airship has been compromised! Who is the saboteur? Who can be saved? Uncover what the passengers are hiding and write the grisly conclusion of its final hours in an open-ended, player-driven adventure. Dziekujemy! -- Karaski: What Goes Up...
Yes. But putting them in the folder doesn't appear to b all you need.

EDIT
I can confirm, my game will not run on other computers. Still.

[Edited by - Splinter of Chaos on January 3, 2008 1:00:26 AM]
Does the fact that no one is responding mean I'm SOL? How am I supposed to distribute my game? All my hard work?
Quote:Original post by Splinter of Chaos
Thanks for all the replies. I'm going through the Microsoft documentation right now. But something strikes me as odd. I've never had to download a MSVCP-crap thing whenever I've downloaded someone else's work. And distribution shouldn't be hard. VS should be able to simulate how my program will run on other computers and configure it so it'll run without hassle. I'd consider that a F**KING CORE FEATURE! The only reason I even use VS is because, as a last resort, I tried to set SDL up with it and unlike ALL OTHER IDEs, it worked! Hooking myself up with others should be just as easy has hooking others up with me. WHY THE F**K ISN'T IT?


Anything prior to VS2008 DLLs are included in many apps for windows (and possibly in with WinXP's latest update), so most people already have them. That's probably why you're having a lot of problems now and why stuff you've downloaded always just worked.

Out of interest, have you tried static linking?
Quote:Original post by Koobazaur
Also, all of my programs that I made with VC run fine on my comp without screaming for extra dlls - does installing VC automatically install the require redistributables?
Yes, which is the whole root of this problem. Developers have additional concerns when running their program on a machine that has not had special things done to the project, or distributable files installed [which only need to be installed once]. Installing the IDE comes with these files, so the problem will not manifest itself on computers that have the ide installed.

And no, you're not out of luck. What all did you try from the msdn page on deployment for your specific language and IDE [such as the one linked to previously for vs2005 C++]? Also, did you use SDL or openGL, did you use a very recent build of directX, or anything else that would result in additional dependancies [sdl distributable dll's, openGL stuff that windows doesn't always play nicely with, or a re-install of directX respectively]. Also, is there anything that you are using in your program that you see as a possibility that the target computer can't handle [using RAW input sockets on an old windows version, for example]. What error is the target machine giving you.
Language: C++
Dependencies: SDL, SDL_Mix, SDL_Image, SDL_TTF, SDL_Timer
Error message: "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."

The MSDN page was so technical and full of confusing details that I gave up.

I don't know how to link statically.

EDIT
I tried to compile the SDL source code myself, but I couldn't figure out how to do it. There are a bunch of files neatly placed into different folders and I just don't know how to make VS recognize all of them.

[Edited by - Splinter of Chaos on January 3, 2008 3:34:33 PM]
Okay, here is a step-by-step breakdown of an easy but pretty crude deployment method for visual studio 2005 C++. This is starting with a fresh project without any weird settings in place in your previous attempts to deploy your application, such as attempting to enable static linking. [this is pretty much straight from the msdn site linked earlier]

Step 1: Create a folder, that we will call 'MyProject', and copy the release version of your project [the .exe] into that folder.

Step 2: Copy the SDL .dll's and .lib's into that same folder [without a sub-folder]. I'm pretty sure it's just SDL.dll [but it has been a long time since I had any contact with SDL. Things may have changed].

Step 3: Open the folder "Program Files\Microsoft Visual Studio 8\VC\redist\x86" [or an equivalent on your system] in a separate window.*** see bottom for a comment.

Step 3: Copy the folder "Microsoft.VC80.MFC" and "Microsoft.VC80.CRT" into the folder "MyProject" that contains your project. Note that you are copying the entire folders, not the contents of the folders.

Step 4: Copy any game assets that you're going to need into the correct places within 'MyProject'[this step depends on how you organize your game's resources. If you do not depend on any outside files, then this step is not taken]. These resources are things like textures, geometry, sounds, etc.

Step 5: Copy 'MyProject' to the target machine, and run the .exe inside.

This takes care of all the problems associated with VS2005 C++ deployment, anything else is the result of missing SDL dll's, something else missing, strange project/solution settings, or whatever. This works on any OS that supports manifest linking, which includes windows XP and on. Windows vista should actually include these redistributable files already in place as part of a past service patch [at least it does on my vista machine]. I actually can't find anywhere on SDL's site that says it even functions on vista though.. which may be a problem.

*** if you are deploying to a 64 bit environment, copy the same folders around, only take them from "Program Files\Microsoft Visual Studio 8\VC\redist\amd64" or "Program Files\Microsoft Visual Studio 8\VC\redist\ia64" instead.
Didn't work, but that might be because I didn't see any "Microsoft.VC80.MFC". The other one was there, though.

EDIT
Instead of having this cluster [insert verb] for solutions, is there anyway I can post every scrap of information on my problem online for all to see? This is a terribly ineffective way at solving the problem. It's frustrating the I can't let others see the fruits of my labor, but the only thing that makes me want to give up is how difficult Microsoft is making this.
The SVN source of SDL has a handy file titled "VisualC.html" which details how to build SDL from scratch with VC++ 5,6, or 7. I'm betting it works with 8 and 9 also (well, I have compiled it with 8, but not 9). Basically, you unzip the VisualC.zip folder and use the project file that it's got. Just make sure to change its settings to what you're now using.

Edit: I just want to add that I don't believe this is some Microsoft conspiracy out to make all us individuals pay, but rather an incompatibility between the compiler settings for the pre-compiled SDL files and the settings that you need to use to redistribute easily. The point being that I wouldn't blame Microsoft - or anyone - for this. I just wish it was more widely documented or known about.

[Edited by - Ezbez on January 4, 2008 3:47:52 PM]

This topic is closed to new replies.

Advertisement