Compile filestreams of netlinx source files using a dll
GarColl
Posts: 9
Hi all
I would like to compile my source files from my own program. Also, i would like to use dlls in my program and not call the command line compiler, because if im not mistaken, i have to specify the files there. However i don't want to extract the source files to the harddrive but compile the filestream or string containing the contents of the file directly.
Is this possible somehow?
Thanks a lot for your help.
I would like to compile my source files from my own program. Also, i would like to use dlls in my program and not call the command line compiler, because if im not mistaken, i have to specify the files there. However i don't want to extract the source files to the harddrive but compile the filestream or string containing the contents of the file directly.
Is this possible somehow?
Thanks a lot for your help.
0
Comments
Here ya go:
http://www.amxforums.com/showthread.php?6077-Command-line-compile
Now as i stated before, i don't want to have the files on the harddrive, but just its contents in my program. I save a decripted version of the source file on the harddrive (which i couldn't pass to the compiler of course). Then my program decripts and compiles them, then stores the compiled files on the harddrive. Like this a customer could compile custom designed versions of my sourccode (adapt lengths of arrays for instance or add and remove defines) without seeing my sourcecode.
Is this something that could be done by coding entirely with modules? for example the module could have an array[] and the client puts in whatever size they want in the declaration. The source code is not there for them to see as the module is a .tok file.
Thanks for the answer.
Hmm... Would maybe work but would make things a bit more complicated.
One problem is that i can't pass structs into a module, so i would have to avoid using structs in my modules. I could maybe manage to reprogramm all to work without structs, but they are quite comfortable :-). Especialy if i have nested structs (struct array containing other struct arrays as members) they really make live easier.
Also i couldn't use Defines to include or exclude parts of the code of the modules, as they have to be in the module to be visible.
If there is no other way i might consider this solution though. I could write different modules for the different parts of code and then define them or not. Although this would get quite messy and hard to read code i guess... Variables are passed by reference into a module right (i can pass them into multiple modules and they update in module 2 when i change something in module 1)?
1) yes, vars are passed in by reference. and 2) a given variable in module 1 is unique and does not effect the variable in module 2 with the same name.
On the struct issue. I've found, like most things, it's just getting used to it. Once you're past the shock of not using structs and going with multi-dimension arrays, it works fine.
What you're working on sounds interesting. Personally, the idea of a client tinkering with the code gives me the willies... But, that's my world.
Well i guess we wouldnt start with the customers but use it internally first and then extend it to distributors or people we work together with. Its still a long way till the customer does it and im not sure if that is a good idea and if it will ever happen. Im just checking the possibilities.
So i guess what remains would be defines. Is it possible to 'outsource' them? Meaning the #DEFINE is in the include where the #IF_DEFINED is in the module. Problem here is that i would like to make the source as small as possible and save computing power. We are sometimes already reaching the limit of the compiled source code size which seems to be around 2 MB, and the source is not getting less .