Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


creating exe file for opengl game


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
15 replies to this topic

#1 yoavi2   Members   -  Reputation: 100

Like
0Likes
Like

Posted 14 April 2011 - 06:01 PM

hi
i made a little game using opengl in c++ with visual basic 2008.
i want to create an exe file (maybe an installation) that somehow includes all the files needed to run opengl programs (dll's etc), so that people without the files on their computer could run the game without problems.
please help, thanks!

Sponsor:

#2 SimonForsman   Crossbones+   -  Reputation: 6168

Like
0Likes
Like

Posted 14 April 2011 - 06:24 PM

I'm using NSIS:
http://nsis.sourceforge.net/Main_Page

its a tool to create installers (There are other tools aswell but that one is free and fairly easy to use).
I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#3 yoavi2   Members   -  Reputation: 100

Like
0Likes
Like

Posted 14 April 2011 - 06:38 PM

i really have no clue in this, im sorry... all i have is a code in C++, which i had written in visual basic 2008, the code is accessing a simple txt file (for highscores).
i can get the exe file from the project's folder, but it won't work on computers who do no have the necessary files (you can find them here: http://www.xmission.com/~nate/glut.html).
my objective i to somehow make an installation package or a regular exe file so it would work on every computer... could you please help me?

#4 Flimflam   Members   -  Reputation: 657

Like
1Likes
Like

Posted 14 April 2011 - 10:57 PM

No one is going to do it for you. You should look into the link that Simon posted.

#5 yoavi2   Members   -  Reputation: 100

Like
0Likes
Like

Posted 15 April 2011 - 06:05 AM

i did not ask for anyone to do it for me, dont be so negative.
i only seek help as i did not understand NSIS and i couldn't find some good basic instructions as to how to do such a task

#6 BitMaster   Crossbones+   -  Reputation: 4228

Like
0Likes
Like

Posted 15 April 2011 - 06:36 AM

The link Simon posted directly links to what appears to be rather extensive documentation for NSIS. So extensive that I do not believe you could have seriously tried to read it in the 14 minutes between the link and your reply. If you are unwilling to learn about an installer creator, may I suggest using self-extracting zips or something similar?

#7 V-man   Members   -  Reputation: 805

Like
0Likes
Like

Posted 15 April 2011 - 07:21 AM

All you have to give is your exe and GLUT.dll, if you are using GLUT.

Also, I recommend reading this short link
http://www.opengl.org/wiki/FAQ#How_Does_It_Work_On_Windows.3F
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

#8 yoavi2   Members   -  Reputation: 100

Like
0Likes
Like

Posted 15 April 2011 - 07:21 AM

hey, please, i do not want this to be unpleasant.. i downloaded nsis and briefly looked at the instructions, realizing i have no clue what they're saying...
i am just a student, i don't have knowledge in many languages... i hope you see that i am not lazy or something like that, please try to understand..
as for your comment, any solution is acceptable - as long it answers my need (making the game work on every computer)..
if it is not possible with zips and only an installer, could you please at least direct me to the section where they explain how to do such a thing on Simon's line? i really have no clue what to do, sorry...

#9 Yann L   Moderators   -  Reputation: 1798

Like
2Likes
Like

Posted 15 April 2011 - 11:42 AM

Come on guys, what has become of the newbee friendliness of GDNet ? The new site is already enough of a pain, we don't really need to go Slashdot in our replies on top of that.

The OP is obviously a beginner. NSIS might be a powerful tool (although I'm not a big fan), but directing a beginner to an application whose doc starts with "To create a NSIS installer, you first have to write a NSIS script" is asking for trouble. Requiring him to learn how to write the equivalent of an installer makefile just to get such a simple task done is a bit overkill.

yoavi2, try Advanced Installer. It's a very powerful tool, similar to NSIS, but with an extremely simple to use and straightforward interface. You can build your first MSI with only a few mouse clicks in their wizard. If this is still too complex, a simple self extracting ZIP will most probably do it, as BitMaster suggested.

#10 yoavi2   Members   -  Reputation: 100

Like
0Likes
Like

Posted 15 April 2011 - 04:58 PM

Yann, thanks for understanding and sorry for being a pain in the ass..
i downloaded the software and read of it a little, i still could not understand.. (seems like it is more for building an "official" installer)
i have an working exe of the game (from the project's folder) , yet to run properly it needs the glut files i mentioned above.
even with a self extracting zip (which i also dont know how to build but i assume it is not that hard), how can i direct the certain files to their proper folders in the windows libraries? (or is there another way?)
i mean, each computer has different folder names, and im guessing gaining access to the windows folder from an external file will cause problems as well.
sorry again if i seem stupid hehe, but i would really like to make this work.. thanks in advance!

#11 V-man   Members   -  Reputation: 805

Like
0Likes
Like

Posted 16 April 2011 - 07:57 AM

Your glut32.dll should go into the same folder as your EXE. It is recommended not to put DLL into the WIndows\System32 folder.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

#12 yoavi2   Members   -  Reputation: 100

Like
0Likes
Like

Posted 16 April 2011 - 04:46 PM

i tried going by these instructions:
http://www.ferdychristant.com/blog//articles/DOMM-6XPRW9
i put the regular (debug) exe and the release exe in the same folder with glut32.dll and opengl32.dll. tried it on another computer - wont work.
after that i trued compiling again with the settings presented there:
"In the project properties Window, section C/C++ ->Code generation, set the "Runtime library" value to "Multi-threaded (/MT)" for the release configuration (upper left dropdown), and "Multi-threaded Debug (/MTd)" for the debug configuration."
and all of a sudden it wouldnt compile. the error:
1>cl : Command line error D8016 : '/MT' and '/clr' command-line options are incompatible


any thoughts?

#13 Yann L   Moderators   -  Reputation: 1798

Like
0Likes
Like

Posted 16 April 2011 - 05:14 PM

First, you should not distribute the debug executable. That's against Microsofts EULA.
Second, don't distribute opengl32.dll. That's a system DLL that comes with Windows.
Third, the problems you had are with the runtime libraries. You can solve that by static linking (as you tried), or by distributing the runtime with your game (several possibilities here). Your static linking doesn't work because you're compiling as managed code. Try removing the clr option.

#14 GothSeiDank   Members   -  Reputation: 156

Like
-1Likes
Like

Posted 16 April 2011 - 06:08 PM

If he uses .dlls like GLUT, he should not link statically. Not at all.
Instead, deliver the Microsoft Runtime Installer and link dynamically.
You said you have C++ Code in Visual Basic? That is not possible at all.
Assuming you use Visual C++ with SP1 2008 you need to give this installer with your program:
http://www.microsoft.com/Downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2
If you say "pls", because it is shorter than "please", I will say "no", because it is shorter than "yes"
http://nightlight2d.de/

#15 yoavi2   Members   -  Reputation: 100

Like
0Likes
Like

Posted 16 April 2011 - 06:33 PM

sorry, i meant visual studio. i will check the link tomorrow, thank you!

#16 V-man   Members   -  Reputation: 805

Like
0Likes
Like

Posted 17 April 2011 - 10:18 AM

http://www.opengl.org/wiki/FAQ#How_Does_It_Work_On_Windows.3F
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS