AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN

Custom Application Setup


You've written your AutoLisp and VBA routines, you've set up your Block Libraries and your Custom Partial Menu is now complete. Everything has been tested but now you hit another snag. You'd like to distribute your custom application to other drawing officers, or maybe you have 50 machines in your office that you would like to install it on but you have one big problem. Having to set up each individual machine is a real pain. There are directories to be created, support paths to be added, menu's to be loaded, etc, etc. And if you are distributing it outside the office, you now have to try and put your setup into words that can be clearly understood by the poor guy on the other end.

In this tutorial we are going to have a look at automating the whole process. We are going to make use of two remarkable software applications that will make this a breeze, namely "Inno Setup" and "Acad Install".

"Inno Setup" will be used to install our required support files, and "Acad Install" will do the job of configuring AutoCAD for us, all with a lovely user interface.

Firstly though, we have a bit of forward planning to do before we start compiling our Custom Application Setup.

Step 1

All your programs, menu's, etc. must be fully tested and free of errors. Test them on as many operating systems and AutoCAD versions as possible to ensure they are bug free.

Step 2

Create a dedicated folder, with sub-folders for your application. The example we will be using here looks like this :

This is a very simple directory structure with only three sub-folders. You can though, create as many as you wish to suit your needs. Oh, before I forget, all your files need to be placed within these folders AND, now this is important, if you want to install a partial menu, this MUST reside in the root folder. eg. afralisp2004_install.

Step 3

Now we need to download some software. Pop along to both of these sites and download the latest version of "Inno Setup" and "Acad Install".

Inno Setup

Jordan Russell's Software - http://www.jrsoftware.org


Acad Install

CADWERX - http://www.cadwerx.net/


Don't worry, they are both absolutely FREE.

Once you've download both applications install "Inno Setup" first.
Then install "Acad Install" to any directory of your choosing OTHER THAN your Application folder. Now, from this directory, copy "ACADINST.EXE" and "ACADINST.INI" to the root folder of your Application
eg. afralisp2004_install. Do not copy "ACADINST.CHM" as we do not want to include this in our compiled setup file.

In fact, now is maybe a good time to have a wee read of the "Inno Setup" and the "Acad Install" help files to familiarise yourself with the software and give yourself a basic understanding of what we are doing.

Step 4

As you have probably noticed when installing other software, during installation certain pages such as a License notice or a ReadMe notice appear. Well now we need to create 3 files to go along with our installation application - A License Notice, a Warning Notice and a Config Notice. You can use plain old Notepad for this task, saving them as straight forward TXT files. This is what our example files look like.

License Notice :

AfraLisp AutoCAD 2004 Custom Menu
==================================

Except where otherwise noted, all of the documentation
and software included in the AfraLisp AutoCAD 2004 Custom
Menu package is copyrighted by AfraLisp.

Copyright (C) 2003 AfraLisp. All rights reserved.

Be it hereby known that all the functions, programs and 
applications contained in this here menu system, together 
with but not excluding all those other parts and utterances 
thereunto, shall not be warranted against all defects, 
failures and malfunctions as shall occur between now and 
Thursday afternoon shortly before 2:00 am, during which 
time AfraLisp will maybe, at no charge to you or the other 
person who complained before you, send the culprit application 
to our Programmers, who will emerge from their caves and engage 
in rituals designed to cleanse the menu system of evil spirits. 
This warranty does not cover attractive blonde females (not male) 
who may happen to use this menu system or whatever you would like 
to call it.

Please respect the intellectual rights of others, or we will hunt 
you down and do nasty things to you!!!

=========================
AfraLisp
afralisp@mweb.com.na
http://www.afralisp.com
=========================

Warning Notice :

WARNING!
==========

Please close all Windows applications, ESPECIALLY any Autodesk 
software applications (AUTOCAD, MECHANICAL DESKTOP, etc.) 
before proceeding with installation.
---------------
If you have these applications open during the installation 
process, the software will not install or function properly.

And our Config Notice :

AfraLisp AutoCAD 2004 Custom Menu
==================================

AutoCAD has automatically been configured for the AfraLisp
2004 Custom Menu. The installer has performed the following
configuration tasks :

1)  Added the required folders to your AutoCAD Support Path.

2)  Added the AfraLisp AutoCAD 2004 Custom Menu to your menu bar,
    and installed any applicable Toolbars.

3)  Created a new AfraLisp Profile and made it current.

4)  Created an icon on your desktop which will start AutoCAD
    with the appropriate profile.


Okay, that seems to be everything ready. Let's just have a quick look at what our root folder looks like and the files therein :

Notice my Afralisp.mnu, AfraLisp.dll and AcadDoc.lsp are within this folder!!

Okay, now let's create our Setup Script. See you on the next page........


 
The AutoLisp/Visual Lisp/VBA Resource Website

Copyright 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website