Creating a Setup Program for an IC Class Library Application This example illustrates how to use the freeware tool "Innosetup" to create setup programs for IC Imaging Control applications.
The freeware "Innosetup" is a very good way of creating setup programs for IC Imaging Control applications. It can be downloaded from http://www.jrsoftware.org/. Innosetup uses a simple script file to create the files needed for the setup program. In this sample application, a setup program will be created for "Demoapp" and will be saved in the samples\vc71\demoapp directory. The script file simplesetup.iss will also be saved here. The compiled application demoapp.exe will be written to the classlib\release directory of the IC Imaging Control installation path. The IC Imaging Control runtime files are taken from the classlib\release directory. Below is the section of the setup script that contains some general information about the application. It can be edited by hand or created by the Innosetup wizard. ; Get the source directory from the environment variable IC33PATH #define IC33PATH GetENV("IC33PATH") [Setup] AppName=DemoApp AppVerName=DemoApp 1.0 AppPublisher=The Imaging Source Europe GmbH AppPublisherURL=http://www.theimagingsource.com AppSupportURL=http://www.theimagingsource.com AppUpdatesURL=http://www.theimagingsource.com DefaultDirName={pf}\DemoApp DefaultGroupName=DemoApp OutputBaseFilename=setup Compression=lzma SolidCompression=yes [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked The application should be installed into the programs directory of the computer (e.g. C:\Program Files). The programs directory is encoded with {pf} in the script. Additionally, the sub-directory Demoapp is created for the application in the programs directory. The application will be installed in to this directory. The following [Files] section is the most interesting part. The files that are to be copied are listed below. They are copied to their destination directory in the order in which they are listed. The application's directory is represented by {app}. [Files] Source: "{#IC33PATH}\classlib\release\DemoApp.exe"; DestDir: "{app}"; Flags: ignoreversion ; The Dialogs.dll is only needed for the demoapp. Source: "{#IC33PATH}\classlib\release\Dialogs.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "{#IC33PATH}\classlib\release\TIS_UDSHL10.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "{#IC33PATH}\classlib\release\TIS_DShowLib10.dll"; DestDir: "{app}"; Flags: ignoreversion ; If frame filters are needed, uncommend the following line ;Source: "{#IC33PATH}\classlib\release\*.ftf"; DestDir: "{app}"; Flags: ignoreversion For your own applications, simply substitute the string DemoApp.exe with the name of your program. The rest of the setup script determines how the application is presented in Windows: [Icons] Name: "{group}\DemoApp"; Filename: "{app}\DemoApp.exe" Name: "{userdesktop}\DemoApp"; Filename: "{app}\DemoApp.exe"; Tasks: desktopicon [Run] Filename: "{app}\DemoApp.exe"; Description: "{cm:LaunchProgram,DemoApp}"; Flags: nowait postinstall skipifsilent In this script, \DemoApp.exe is simply exchanged with the file name of the application. |