To secure your source from prying eyes, you’ll want to encrypt it into a VLX file. Of course this isn’t 100% secure, as almost everything is hackable, but it will keep out the majority of the snoopers. Fortunately OpenDCL also gives us a means to embed our ODCL project file into our LSP source code so it will also be protected. Follow the steps below to securely embed your ODCL project into a VLX file.
Open your ODCL project in the Studio. Go to File-> Save As and change the file extension to good A good naming convention to follow is FileName.odcl.lsp, this way you know the file was generated from an ODCL file and not a typical LSP file. The Studio will encode your project to Base64 and wrapping in LSP. You can now open the intermediate .odcl.lsp file in any text editor and copy it into your LSP source file. Add a (setq) around the copied encoded string
16
OpenDCL Tutorial: DCL Has Evolved!
and replace the (dcl_Project_Load) with (dcl_project_import). It should look something like this for our AU Block Tool example:
(defun C:AUBT ( / )
(command "OPENDCL")
(setq project
'("YWt6A+2rAADje5J3BuKT5SUSaplrubH8/59gNmIW3chwX9BPCPOTpj5WcWZWXLi/uMNmLXeH8JW7"
"aGmpnnnybszkZBSMfivXPG8Ub3Rb37bD//xef9drLKtpYFSbe3tfemZyK9XU1JzgDQiT50fF4I8G"
"+KO7QP2okueHmEmhAqGB4pHEDXnBYvqWGZhkhmDqPmak3nAknsWGAWUkX36GhUp+/ewzO32BISL9"
"Nyg8X6o+Q5o9b5rco3ZzznzBw/uZdR9nANW/TbsGQGmTJDIr8Wgj1RnVeHeClj9cqLwMMM9ikVEc"
"MH8AETpEb5WuXJx0gmAHIE9MdI5Rz2SOEl3YUL4Kl07t3uqVZ4b/ex76Hmw6ccJK3WLhYphpSyGs"
"hnWyYTRtMxIS/8rfLTpNxIZBQJAd4PMxHnQmcJ0tH7FJralcreZizI2AFiCZisFpiGH6o1mSSRLR"
"S/kUUb0sAWe9Ucl58sGkrPzvG8wguBG48ccYRxUCwy2m/byAIqZjSIWzRAZlnNUXRbpVgJPOZyQf"
"XQDkH1EAVjtNChy7ZEFpMURckgMI5VShpvpJkT8ud7yJ3yA2dlL46yxyzbNiwPUxo/cxYsSn5lPg"
"is/OUXaFXR+BKKafH0MPp2VTvKBHIlnfAe3ApLqLYXeFefyhXZLTvAC3GGkE0d3vtVQsAesGWHIV"
"OQ/1zOvTEhtVJae0KMjM6+NeSEZg17Vwji7IzLlJhYHgr3l9")
)
(dcl_project_import project nil nil)
(dcl_Form_Show AUBlockTool_PalBlkTool)
(princ)
)
Note, don’t copy the encoded string above, as it’s been truncated for readability and won’t work.
Now that you’ve copied the encoded string into your LSP file, you can delete the intermediate .odcl.lsp file if you wish. Now let’s build the VLX file. In the VLIDE, save your LSP then go to File->Make Application->New Application Wizard… On the first screen select “Simple”, then hit Next. Browse to a folder to save you application. You can save it anywhere you like. Then give you application a name. We’ll use “AUBT” for this example; therefore “AUBT.VLX” will be created. Hit Next. On the third screen, hit “Add” and select your LSP source file; “AUBlockTool.lsp” in this case. Hit next again, and then on the last screen ensure “Build Application” is checked and hit the Finish button. Your application has now been compiled into a VLX file and can be distributed to the public.