How to hide the code to avoid being modified

I want to protect the code. Users can only use its functions but cannot see the code or modify it. In addition, whether it is possible to generate an installation package of similar applications, just download it to generate application icons on the desktop.

There are options to hide procedures from users, run

DisplayHelpTopic "Invisible Procedure Files"

in command line. My understanding is that it will hide the procedure files from Igor GUI. These code files (text files) will be still readable on the hard drive by other tools, like text editors. Personally, I find hiding source code from users to be inappropriate in science and would not do it. 

Installation of package means placing these text files in proper locations on user hard drive. Some people let users do it manually, some use generic installer tools to package code and install it, and some wrote their "installer" using Igor Pro. I wrote https://github.com/jilavsky/SAXS_IgorInstaller which could be modified by adventurous programmer to suit their needs. Igor does have all the needed functionality to handle this - it can download data from web, it can (in version 9) unzip the data (if needed), and it can write files in proper locations. Making this push button in Igor is not that difficult. 

You can lock procedures for editing using the ModifyProcedure operation.

DisplayHelpTopic "ModifyProcedure"

I guess the only way to really hide the horrors within would be to make everything a compiled XOP, however if just editing is the concern I think ModifyProcedure will do the job. 

In addition to the suggestions already given, WaveMetrics used to also provide a way for developers to "encrypt" procedure files. The encryption would hide the code even at the Finder/File Explorer level. I believe that the method was not documented and was not available for public consumption. This link suggests as much https://www.wavemetrics.com/forum/general/minimal-install.