Use custom IFDEF so same project is full version and lite, is it possible?

Previous topic - Next topic

Hark0

Quote from: BdR on 2012-Apr-20
Quote from: Hark0 on 2012-Apr-20
I have been readed but I no understand HOW the app knows where is his own state.  O_O

Can you explain-me?  :blink:
It's not one app that knows a DEMO and a FULL state.. The DEMO app and FULL app are two separate apps.

You as the programmer decide to create/compile the DEMO or FULL version of the program. You do this by including or not including the DEFINE line before compiling to final executable. And then the compiler will include or exclude certain parts of the code (based on the ?IFDEF ?ELSE ?ENDIF commands) to create either the DEMO app or the FULL app.

So the binary for the DEMO only contains code for the demo version, and the binary for the FULL version only contains code for the full version. So in this case, an evil hacker cannot change the DEMO app to a FULL app.

Yes yes, right! I understand...  :)
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic