Portable Game

Hi guys, I have a game that is close to being done, and it is at jacob-hegna.github.com/Generic-RPG. There are a few bugs in this version of the relese that I am currently fixing, however I have a few questions.
1). Can I package all of the .dll's into the .exe? I heard someone saying you could do this with some java and a .jar file but I don't know how.
2). I use the .NET framework for the launcher (even though the game is in c++) and how can I package the framework with it so the user doesn't have to seperately install it?
3). Besides the annoying bugs, what do you think my game needs before the release? Try it again tonight when I update it to patch all of the bugs. There is one really annoying one that prevents the game from scrolling.
Thanks!
1. Not without rebuilding the libraries and the program and linking them statically.
2. The .NET runtime is rather large (~48 MB) and most systems already have it installed. Sure you want to do that?
1. Can you give me a link that shows the steps required to do that? Also, is there a way to have an "executable folder" that when double-clicked opens a specific .exe? I just think that this would be a nice way to package it.
2. If all else fails it would be nice to have it as a backup just in case someone does not have it installed. Ex: The computers at my school that do not have the framework installed.
To link static libraries you need to download them first of all. The steps to download and link are different depending on your OS and IDE

What is the purpose of that folder?
Also, is there a way to have an "executable folder" that when double-clicked opens a specific .exe?
No, there's no such thing.

Can you give me a link that shows the steps required to do that?
There isn't a well defined set of steps because the exact procedure depends a lot on the libraries you're using. In broad terms, you need to:

1. Download the libraries your project uses. Ideally, compiled versions for statically linking. Different compilers have different formats for static libraries, so you'll need one specific for your compiler. If there's no version for your compiler available, you'll need to download the source code. If the source is not available, you can't build statically.
If the libraries you're using use other libraries in turn, you'll have to get them, too.

2. If you had to download the sources, you'll need to build static libraries. For windows, this means building .lib files (VC++-like) or .a files (GCC-like). These files can be linked directly into a single executable, unlike DLLs.
Occasionally, you may need to modify a library and/or your own code to get it to link statically. This is because DLLs can define a special function to be called when the library loaded; this function is often used to perform certain initializations. Static libraries aren't loaded, so if the library uses this function, some changes will have to be made.
Other libraries use macros that let you tell them they're being compiled statically or dynamically. Use this rather than the above method if said macros are available.

3. Once you have all your static libraries, you'll have to link them into your program. Thankfully, this is the easiest part. The only thing to watch out for is that for some linkers, it matters in which the order you list your libraries.


Yes, linking statically is a very complicated procedure. You need to weight carefully whether it's worthwhile.


Regarding bundling the .NET runtime, how are you packaging the program? A ZIP file (or similar)? An automated installer? Something else?
There isn't a well defined set of steps because the exact procedure depends a lot on the libraries you're using.


I am using SDL. I will check their website.

Regarding bundling the .NET runtime, how are you packaging the program? A ZIP file (or similar)? An automated installer? Something else?

A .zip file. If you want to you can see the whole project at jacob-hegna.github.com/Generic-RPG
In that case, just download a redistributable of the appropriate version from Microsoft and add it to your ZIP.
Topic archived. No new replies allowed.