Hi,
I often use NEURON to teach neuronal mechanisms and I also use it to test the students. Most of the time I use hoc code of my own to model neurons or small networks. What I would like to create is a file (for example a .exe file if I use windows) that can be launched on a system on which NEURON is not necessarily installed. Is there a way to compile such a file including all the linked libraries ? I have searched on this site and on google but I haven't find any possibility to create a standalone executable file from hoc code.
Thank you for your help,
AG.
Neuron executable files ?
Re: Neuron executable files ?
I think that is possible. But the effort might be considerable and a user inconvenience is certainly the size of the
equivalent setup.exe . Since the installer on an mswin machine currently stands at about 30MB there is a powerful
incentive to prune. e.g. getting rid of python and mpi would bring a zip file to under 5MB and of the remaining files
probably only a few are actually used by a typical model. It is likely that one could get an executable zip of about 3MB
or less and the nrniv executable could be built statically.
You can search for "executable zip" but that is also how many viruses are propagated.
As for combining hoc as part of a statically linked neuronmodel.exe, the implementation of that feature has not
been done. It would require that the model developer be able to build from sources. It is pretty tedious to put that
environment together on an mswin machine.
equivalent setup.exe . Since the installer on an mswin machine currently stands at about 30MB there is a powerful
incentive to prune. e.g. getting rid of python and mpi would bring a zip file to under 5MB and of the remaining files
probably only a few are actually used by a typical model. It is likely that one could get an executable zip of about 3MB
or less and the nrniv executable could be built statically.
You can search for "executable zip" but that is also how many viruses are propagated.
As for combining hoc as part of a statically linked neuronmodel.exe, the implementation of that feature has not
been done. It would require that the model developer be able to build from sources. It is pretty tedious to put that
environment together on an mswin machine.
Re: Neuron executable files ?
Dear Michael,
The thing is, I don't need python to be included in the executable file, just the good ol' NEURON HOC and IV. If the executable file reaches 5 MB this is not a real problem. I have searched for "executable zip" as you suggested but I found nothing I could use to produce such files. If you knew a simple procedure to compile a standalone application from NEURON/IV sources, C++ compiler and the required hoc script I would be very interested but since you mentioned that "the effort might be considerable" and that "It would require that the model developer be able to build from sources. It is pretty tedious to put that environment together on an mswin machine." I think I will just forget this idea.
Thank you once again for your fast and kind answer.
The thing is, I don't need python to be included in the executable file, just the good ol' NEURON HOC and IV. If the executable file reaches 5 MB this is not a real problem. I have searched for "executable zip" as you suggested but I found nothing I could use to produce such files. If you knew a simple procedure to compile a standalone application from NEURON/IV sources, C++ compiler and the required hoc script I would be very interested but since you mentioned that "the effort might be considerable" and that "It would require that the model developer be able to build from sources. It is pretty tedious to put that environment together on an mswin machine." I think I will just forget this idea.
Thank you once again for your fast and kind answer.