Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Package an addin dll

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
262 Views, 5 Replies

Package an addin dll

I have an addin written for inventor 7
i have used the tools deploy and package to make the setup and cab files.
when i run the setup to put my addin on another machine the setup works and i see the addin.dll on the other machine on the hard drive.
But when i go into inventor7 the addin is not in the tools addin area and i do not see my menu bar
Any ideas
Janice
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

I haven't used that method in a while, but I think you need to add a batch file to run the
dll registration and the install the reg file.

--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program


"jat14" wrote in message news:f17a9a6.-1@WebX.maYIadrTaRb...
> I have an addin written for inventor 7 have used the tools deploy and package to make
the setup and cab files. when i run the setup to put my addin on another machine the setup
works and i see the addin.dll on the other machine on the hard drive.
> But when i go into inventor7 the addin is not in the tools addin area and i do not see
my menu bar
> Any ideas
> Janice
Message 3 of 6
Anonymous
in reply to: Anonymous

Use Inno Setup to install and register your
addin.


--
There are 10 kinds of people. Those who understand binary and
those who don't.

 



style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
have an addin written for inventor 7 have used the tools deploy and package
to make the setup and cab files.
when i run the setup to put my addin on
another machine the setup works and i see the addin.dll on the other machine
on the hard drive.
But when i go into inventor7 the addin is not in the
tools addin area and i do not see my menu bar
Any ideas

Janice
Message 4 of 6
Anonymous
in reply to: Anonymous

The problem with VB's setup is it registers the DLL after it adds
registry entries. This is to say that the information you add for
Inventor registration is lost when the dll later registers.

Kent mentions INNO. The problem with INNO is it is for exe's and hence
puts too much in the registry and program groups. A better tool is NSIS
which can be found on SourceForge.

Below is a script which can be used as a generic script for Inventor
Addins. This particular one is for MrMacro. Just change the Defines
section to match your dll addin.

;NSIS script using Modern Interface
;Generic Setup for Inventor R6+ Addins
;Add other files into the Installer Section. Only the main dll is there
in the template
; and don't forget to add them to the uninstall section if you want
them deleted
;Check the location and name of the source License File
;Check the location of the MUI_SPECIALBITMAP
;Written by Charles Bliss

;------------------------------
;Defines for Inventor Addins

!define MUI_PRODUCT "Mr Macro" ;The Addin software version
here
!define MUI_VERSION "1.1" ;The Addin software version
here
!define ADDIN_DLL "MrMacro.dll" ;The Addin Dll
!define ADDIN_NAME "Mr Macro" ;Name that shows up in the
Registry
!define UNINST_EXE "Uninstall.exe" ;Name of the uninstall program
!define VER_GREATER_THAN "5" ;one less than the target
Inventor Version (use 5 for R6+)
;!define EXPLR_CMD "Defer-UnDefer" ;What shows up in the
Windows Context Menu
!define INST_FILE "MrMacro.exe" ;The install program name
!define ADDIN_CLSID "{AEE852E6-A10C-48F9-A3DF-1F9613252291}" ;Class ID
for the Inventor Addin
!define LIC_FILE "Bliss.txt" ;License file typically
located in NSIS\COntent\License directory
!define INST_DEF_DIR "Autodesk\Macros\MrMacro" ;C:\Program Files\ will
be prepended
;!define VIEW_DOC "ReadMe.txt" ;File to launch at Install, Comment out
and this option will not be used

;--------- End Addin Defines -------------------

!include "MUI.nsh"

;--------------------------------
;Configuration

;General
OutFile "${INST_FILE}"

;Folder selection page
InstallDir "$PROGRAMFILES\${INST_DEF_DIR}"

;Remember install folder
InstallDirRegKey HKCU "Software\${MUI_PRODUCT}" ""

;--------------------------------
;Modern UI Configuration

!define MUI_WELCOMEPAGE ;No value
!define MUI_LICENSEPAGE
; !define MUI_COMPONENTSPAGE
!define MUI_DIRECTORYPAGE

!define MUI_ABORTWARNING

!define MUI_UNINSTALLER
!define MUI_UNCONFIRMPAGE
; !define MUI_SPECIALBITMAP "AnimatorInst.bmp" ;Left Pane Bitmap

;--------------------------------
;Languages

!insertmacro MUI_LANGUAGE "English"

;--------------------------------
;Language Strings

;Description
LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy the ${INST_FILE} file
to the application folder."

;--------------------------------
;Data

LicenseData "${NSISDIR}\Contrib\Licenses\${LIC_FILE}"

;--------------------------------
;Installer Sections

Section "InstallAddin" SecCopyUI

;ADD YOUR OWN STUFF HERE!

SetOutPath "$INSTDIR"
File "${ADDIN_DLL}"
!ifdef VIEW_DOC
File /nonfatal "${VIEW_DOC}"
!endif
;Store install folder
WriteRegStr HKCU "Software\${MUI_PRODUCT}" "" $INSTDIR

;Create uninstaller
WriteUninstaller "$INSTDIR\${UNINST_EXE}"
WriteRegStr HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${ADDIN_NAME}"
"DisplayName" "${MUI_PRODUCT}"
WriteRegStr HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${ADDIN_NAME}"
"UninstallString" "$INSTDIR\${UNINST_EXE}"
SectionEnd

;----------------------
Section "Registry"
RegDLL "$INSTDIR\${ADDIN_DLL}"
Sleep 1000
WriteRegStr HKCR "CLSID\${ADDIN_CLSID}" "" "${ADDIN_NAME}"
WriteRegStr HKCR "CLSID\${ADDIN_CLSID}\Description" "" "${ADDIN_NAME}"
WriteRegStr HKCR "CLSID\${ADDIN_CLSID}\Implemented
Categories\{39AD2B5C-7A29-11D6-8E0A-0010B541CAA8}" "" ""
WriteRegStr HKCR "CLSID\${ADDIN_CLSID}\Required
Categories\{39AD2B5C-7A29-11D6-8E0A-0010B541CAA8}" "" ""
WriteRegStr HKCR "CLSID\${ADDIN_CLSID}\Settings" "LoadOnStartUp" "1"
WriteRegStr HKCR "CLSID\${ADDIN_CLSID}\Settings" "Type" "Standard"
WriteRegStr HKCR "CLSID\${ADDIN_CLSID}\Settings"
"SupportedSoftwareVersionGreaterThan" "${VER_GREATER_THAN}.."


sectionEnd

;----------------------
Section "View Help"
!ifdef VIEW_DOC
MessageBox MB_YESNO|MB_ICONQUESTION "Would you like View the
Documentation?" IDNO NoDoc
ExecShell "open" "$INSTDIR\${VIEW_DOC}"
NoDoc:
!endif
SectiOnEnd
;----------------------

;Display the Finish header
;Insert this macro after the sections if you are not using a finish page
!insertmacro MUI_SECTIONS_FINISHHEADER

;--------------------------------
;Descriptions

!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
!insertmacro MUI_FUNCTIONS_DESCRIPTION_END

;--------------------------------
;Uninstaller Section

Section "Uninstall"

;ADD YOUR OWN STUFF HERE!
UnRegDll "$INSTDIR\${ADDIN_DLL}"
Sleep 1000
Delete "$INSTDIR\${ADDIN_DLL}"
Delete "$INSTDIR\${UNINST_EXE}"
!ifdef VIEW_DOC
Delete "$INSTDIR\${VIEW_DOC}"
!endif
RMDir "$INSTDIR"

DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}"
DeleteRegKey HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${ADDIN_NAME}"
;Display the Finish header
!insertmacro MUI_UNFINISHHEADER

SectionEnd
Message 5 of 6
Anonymous
in reply to: Anonymous

Charles Bliss wrote:

> Kent mentions INNO. The problem with INNO is it is for exe's

That is incorrect. Inno can handle any file type and is quite capable of
installing and self-registering ActiveX servers.

> hence puts too much in the registry and program groups.

It puts in only what you tell it to. In this case, that would be the
additional registry entries requried for any addin.

--
There are 10 kinds of people. Those who understand binary and those who
don't.

http://code.acadx.com
Message 6 of 6
Anonymous
in reply to: Anonymous

Perhaps I should take another look at it. I thought it wanted to put
something into Program Group. I apologize for my error in judgment.

Frank Oquendo wrote:

>Charles Bliss wrote:
>
>
>
>>Kent mentions INNO. The problem with INNO is it is for exe's
>>
>>
>
>That is incorrect. Inno can handle any file type and is quite capable of
>installing and self-registering ActiveX servers.
>
>
>
>>hence puts too much in the registry and program groups.
>>
>>
>
>It puts in only what you tell it to. In this case, that would be the
>additional registry entries requried for any addin.
>
>
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report