Now it works all how I want it to, but here what the users gets after IDE encrypts files:
=<app dir>
==users_app.exe
==app_code.txt
What I want is this:
=<app dir>
==users_app.exe
Only app.exe! I know how to embed resources and such, but I need to be able to read them and edit them, but the files only need to be edited after the file is compiled form program.cs to program.exe.
What I would prefer is something like:
Expand|Select|Wrap|Line Numbers
- string DATA;
- DATA = read_resource("data.txt");
- if (DATA=="")
- {
- string DATA2;
- //read data from externel "data.txt" file
- Write_resource("data.txt",DATA2);
- }else{
- interpret_code(DATA);
- }
The idea is this:
---User write code.
---IDE saves it as "data.txt"
---IDE copies "runner.exe" to "users_app.exe"
---IDE encrypts "data.txt"
---IDE executes "users_app.exe"
---"users_app.exe" checks if rsource file is empty, if so copies the data from "data.exe" into resource file, if not, interprets it.
---IDE removes temporary "data.txt"
--user is left with a single EXE file that has interpreted code embeded in it.
Is this possible? Or will I have to write my own code that write to the exe in binary mode and the EXE reads it?
Thanks,
~Mini12321