It isnt 100% fool proof, but it would require quite a bit of determination to access the files. What I have done is set up a check in our main lisp file, it checks to see if a particular network location exists. If not, it displays a message. Inside of each separate lisp file, it checks to see if a function is loaded, that is custom and only specified within our main lisp file. Then, I compile all the code to .fas files for loading on everyones machines. Fas files can be cracked, and someone could try to setup their folder structure to match that of the office (which is hard to do if you are using UNC paths), or they could create another main file that has the custom function in it (but that function would be difficult to determine the name if you dont tell anyone what it is)
This is an example of the code in our main file
Code:
(if (= (vl-file-directory-p "\\\\SERVER\FOLDER") nil)
(progn
(prompt
"\nSORRY YOU DONT HAVE PERMISSIONS TO USE THIS COMMAND\n"
) ;_ end of prompt
(princ)
)
(progn
MAIN ROUTINE LOAD CALLS
(defun c:CUSTOMFUNCTION ()
(prompt "\n\nLisp Routines loaded successfully\n")
) ;_ end of defun
) ;_ end of progn
) ;_ end of if
and then in each and every lisp routine file, I wrap our code with this:
Code:
(if (not c:CUSTOMFUNCTION)
()
(progn
LISP ROUTINE CODE
) ;_ end of progn
) ;_ end of if