Hi, I need a way to create an executable from another executable without doing any changes to the code.
What I mean is, most game engines have 'export' or 'build' system like in unity Engine or Godot Engine. Let's take unity for example. When we hit build project button, it creates an executable to the path we gave. Link: https://unity3d.com/learn/tutorials/projects/roll-ball-tutorial/building-game Video Time: 2:48
How do they do this? Is it a library or a few simple functions?
Note: I'll be so happy if you can post pseudo code.
I think you're referring to a dynamically loaded library (DLL) or shared library. This is a library of code that can be loaded by a program at runtime. Another possible option is a stand-along program that your program executes.
Have you heard of IDE (Integrated Development Environment)?
There could be an editor, where you can generate code and 'build'
feature to call compiler to compile that code. Some other features too.