Pages: 1
Author Topic: How to get the C++ sourc code of my game?  (36,625 Views)
Offline (Unknown gender) time-killer-games
Guest


Email
Posted on: June 08, 2013, 08:20:03 PM
I'd like to build an ActiveX control, but enigma doesn't allow such. Is there  a way
for me to generate the C++ source code for my game (and not compile it)?

Thanks.
TKG
Offline (Unknown gender) TheExDeus

Developer
Joined: Apr 2008
Posts: 1,860
View profile
Reply #1 Posted on: June 08, 2013, 09:53:53 PM
Your game is always made into C++ before compiling. It's in "SHELL\Preprocessor_Environment_Editable". But I doubt it will be much use. It's meant for the compiler and useful only for debugging. It's not meant to be GML to C++.
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #2 Posted on: June 08, 2013, 10:09:25 PM
You can place your own C++ functions in your game by going to ENIGMA settings -> Definitions. Just declare the C++ functions you need in there, and you will be able to use them in your game.
Offline (Unknown gender) time-killer-games
Guest


Email
Reply #3 Posted on: June 11, 2013, 03:16:16 AM
Thanks for the replies.

@Josh - I'm not trying to use c++ functions in my game, I want to get the c++ source so I can compile it to an ActiveX .ocx control in visual studio.

When I test ran my game I noticed in the temp directory where the game runs, the CPP source and header files were in there but quickly deleted after the compilation is complete, they are deleted so fast that after about 20 through of me trying to copy and paste them to a different folder I've had no success, I finally gave up and hoped I'd find an easy solution to this by starting this topic.
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #4 Posted on: June 11, 2013, 02:45:14 PM
ENIGMA does not delete the headers it generates when it is finished; we frequently ask people for copies or segments of them when something goes wrong during compile. Are you sure you're checking the right directory?
Offline (Unknown gender) TheExDeus

Developer
Joined: Apr 2008
Posts: 1,860
View profile
Reply #5 Posted on: June 11, 2013, 03:11:20 PM
killer - This ""SHELL\Preprocessor_Environment_Editable"" is not a temp directory. The files stay there. It is only what the user has made, so you cannot compile it using only the files in that folder. You must compile all the engine (basically, all SHELL folder and it's subfolders). That is what the gigantic makefiles are for.
Offline (Unknown gender) time-killer-games
Guest


Email
Reply #6 Posted on: June 11, 2013, 04:52:42 PM
The directory I'm refering to is where enigma temporarily compiles it's game to:

C:\Users\your_username\AppData\Local\Temp\

The files I'm refering to are in the red box in the image below:


If you guys still don't know how to help then just screw it, it's not that big of a deal. :)
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #7 Posted on: June 11, 2013, 05:16:35 PM
That isn't where the objects are built. You'll find them under enigma-dev/ENIGMAsystem/SHELL/Preprocessor_Environment_Editable.
Pages: 1