Windows Installer for custom plugin

Windows Installer for custom plugin

Anonymous
Not applicable
2,188 Views
3 Replies
Message 1 of 4

Windows Installer for custom plugin

Anonymous
Not applicable

I have created sample plugin for autocad..It is created a classLibrary. Now i need to ship this plugin to deploy on other machine ..Am trying to make a installer using Wix. 

 

After reading few blogs , i saw that there are two ways to automatically load the dll when autocad starts up,

1) Changing Acaddoc.lisp and 

write netload as follows :

 

(command "_netload" "C:\\Users\\Test\\source\\repos\\TestPlugin\\TestPlugin\\bin\\Release\\TestPlugin.dll") and second one being tampering around with the registry ( which am not familiar with)

 

Which is the better way to make an install. In Wix while installing am thinking to execute a .bat file which will make an entry to Acaddoc.lisp

 

Is this good way to do using .bat file 

0 Likes
2,189 Views
3 Replies
Replies (3)
Message 2 of 4

_gile
Consultant
Consultant

Hi,

 

Since AutoCAD 2012, there's a third way which is, IMO, the most interesting: the autoloader mechanism.

It makes the installer easier to create: you just need to set the installation folder and build the .bundle folder directly from Visual Studio.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 3 of 4

Anonymous
Not applicable

Hi @_gile

 

Thanks a lot for the reply..If there any concrete example with .net it would be really helpful.

Is there any link to explain a bit more in detail regarding .net with Autoloader..

 

Thanks 🙂

0 Likes
Message 4 of 4

_gile
Consultant
Consultant

The Autodesk Autoloader White page is the most complete documentation I know about Autoloader.

You can also find >>this topic<< in the AutoCAD help (also read the related concepts and reference).

 

Here's a typical minimalist example with a "TestPlugin.bundle" folder created in "%appdata%\Autodesk\ApplicationPlugins" directory (or some other applicationFolder directory).

This folder only contains the PackageContents.xml file (see above) and a "Contents" sub-folder which contains the plugin file (TestPlugin.dll).

 

 

<?xml version="1.0" encoding="utf-8"?>
<ApplicationPackage
  SchemaVersion="1.0"
  AppVersion="1.0.0"
  ProductCode="{2B179147-863E-4AB5-864D-18927534C106}"
  UpgradeCode="{D6C29A5F-F9DB-4AD5-81DC-04CE681C7681}"
  Name="TestPlugin"
  AutodeskProduct="AutoCAD"
  ProductType="Application">
  <Components Description="2013 to 2019 parts">
    <RuntimeRequirements OS="Win32|Win64" Platform="AutoCAD*" SeriesMin="R19.0" SeriesMax="R23.0" />
    <ComponentEntry
      AppName="TestPlugin"
      Version="1.0.0"
      ModuleName="./Contents/TestPlugin.dll"
      AppDescription="An awesome AutoCAD plugin."
      LoadOnAutoCADStartup="True">
    </ComponentEntry>
  </Components>
</ApplicationPackage>

 

Once your bundle folder works as expected, to build your installer, you simply specify the "%appdata%\Autodesk\ApplicationPlugins" as installation folder in the properties and paste the bundle folder in the Visual Studio application folder.

You can see this short video or the above more compete screencast (in French) using the Visual Studio Installer Projects extension.

 

 

 

 



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub