DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Collapse DG Kernel ComponentsDG Kernel Components
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Search Documentation


Deploy Module Tutorial

This tutorial demonstrates creation of a Windows Installer package for a DG Kernel-based application using DgRedist merge module and an installer creation software like Install Shield. The tutorial is based on Setup and Deployment type of project of Microsoft Visual Studio 2008. With adjustments for different user interface the same steps are required when using different installer creation software.

The installer will install MiniCAD.exe of the MiniCAD sample. It is a native 32 bit C++ application. If the application uses .NET version of kernelCAD the only required change is described in the Registry and Properties section below

To create a 64 bit installer you need to use 64 bit DG Kernel. Assume that "_6_0" means "_x64_6_0" in the steps below in the case

A copy of the completed project is available in Samples\Deployment\DeployModule folder. 

See also: Redistribution

File System

  • In Microsoft Visual Studio 2008 select File > New > Project. In the New Project dialog expand "Other Project types" in the left panel and select "Setup and Deployment". If you do not see the project type check that you have the latest service pack for Visual Studio
  • In the right-hand side panel select "Setup Project". Select location for the project at the bottom and type "DeployModule" for the name.
  • When the project is created Visual Studio opens File System window. It can be closed and re-opened using icons on top of the Solution Explorer.
  • Select "Application Folder" in the File System window and select Action > Add > File in menu. Browse to the installation folder of DG Kernel, which is C:\Projects\DG Kernel_6_0 by default
  • Select MiniCAD.exe. Press Open. The MiniCAD.exe will appear in the right-hand side panel of the File System window.
  • Download DgRedist_6_0.zip (DgRedist_x64_6_0.zip for 64 bit installer) from download page and extract it into DgRedist_6_0 folder in a temporary location
  • Right-click DeployModule project in Solution Explorer of Visual Studio and select Add>Merge Module. Browse and select all three .msm files in the DgRedist_6_0 folder. They will appear in Solution Explorer of Visual Studio
  • Select Application Folder in the left-hand pane of the File System window and in context menu select Add > Folder. Change name of the folder to Models. The name can also be changed using the Properties Window. Add new Samples sub folder to the Models folder in the same manner.
  • Add MiniCAD.mdg from Models\Samples folder of DG Kernel_6_0 installation directory to the Bin\Models\Samples folder of the target directory
  • Add Gen.ico file located in DG Kernel_6_0\Samples\Deployment\ to the Application Folder of the target file system
  • In the Solution Explorer of the Visual Studio select the DeployModule project. If the properties window (View > Properties Window) click at the end of the AddRemoveProgramIcon line and in the appeared dialog browse to the Gen.ico
  • Select User's Programs Menu folder in File System window. Right-click into right-hand pane and select "Create New Shortcut". Select MiniCAD.exe in the dialog and press OK. Change name of the shortcut to MiniCAD. In the properties window change the Icon property to Gen.ico similar to the above

Registry and Properties

  • Open Registry Editor using icon on the top of Solution Explorer
  • Add HKEY_LOCAL_MACHINE\SOFTWARE\DInsight\KerCADe\6.0 registry key with string value named InstallDir and value [TARGETDIR] as described in Locating Model on Target Computer of Deploy tutorial. If the application relies on the .NET version of DG Kernel add HKEY_LOCAL_MACHINE\SOFTWARE\DInsight\KerCADne\6.0 instead
  • Select the Deploy node in solution explorer. Select Properties in the context menu. Click Prerequisite button. Turn on check box next to "Visual Studio Runtime Libraries (x86)" or "Visual Studio Runtime Libraries (x64)" depending on bitness of your application. 
  • Select Deploy node in solution explorer and change ProductName property in Properties Window to "MiniCAD v1.0"
  • Change the Title property to MiniCAD v1.0 Setup
  • If you are using 64 bit DG Kernel change TargetPlatform property of the project to x64

Building and testing

  • Make sure that the active configuration is Release via Build > "Configuration Manager" menu option of Visual Studio
  • Build the project with Build > Build Solution. Make sure that there are no errors in the output window
  • The DeployModule.msi and setup.exe will be created in Release folder is the output of the project. To make sure the application works without DG Kernel it is recommended to test the installer on another machine or uninstall DG Kernel temporary
  • Run setup.exe to install the application. Select MiniCAD in Start menu to test the application.
  • Uninstall the MiniCAD application using "Add or Remove Programs" from Control Panel

See also: Deploy Tutorial