NewsArchive
05-29-2009, 05:28 AM
Hi Folks,
In the continuing saga of "How to create and manage C7 Accessory Menu
Items", here is my latest installment.
It shows how to use a SetupBuilder include script and a template file to
easily create custom .addin files for your templates that end up correctly
linked to the location where the developer installed them!
The Sample.Gif shows what the final product will look like.
Attached is a ZIP file with screen shots, sample files and these files:
"MasterProduct.Addin" - This is a special "template" file that is used by
SetupBuilder.
"MasterProductAddin.sbi" - This is a special SetupBuilder INCLUDE script
that you can insert into the BOTTOM of your SetupBuilder installer to
modify the MasterProduct.Addin file after it has been placed in the proper
folder.
Note that you will need to modify the TOP portion of the include files and
change the variables there to reflect your company and product information.
However the paths to files installed by SetupBuilder are dynamically
created and should NOT be modifed (they will be using %VARIABLE% type
names.
This example uses the new method (thanks Lee!) of having a VENDOR folder
under the Accessory\Addins folder to eliminate possible duplicate file
names.
The ZIP file has a folder structure that shows you an example of how the
files should (and will) be distributed in the C7 Accessory subfolders.
SetupBuilder Notes:
1) This is based on the C7 installer demo that Friedrich provided in the
SetupBuilder newsgroups.
2) You will need to add a target folder called %CLA_ADDINS% (see screen
shot SBNewFolders.gif) and check the box for "Absolute path" (see
SBNewFoldersAbsolute.gif).
3) You will add a VENDOR folder with your company name below the
%CLA_ADDINS% folder.
4) In your source folder, copy the MasterProduct.Addin file and rename it
as the product.addin (in my example, ProCodeBlock.Addin).
DO NOT MODIFY THIS FILE AT ALL - SetupBuilder will do that for you!
5) In your source folder, copy the SampleVendor.Addin and rename it as your
VendorName.addin.
MODIFY THIS FILE with your COMPANY information (it is the LANSRAD file for
example).
6) In your source folder, copy the AccessoryMenu.addin file.
DO NOT MODIFY THIS FILE AT ALL
7) Add your source files to the SetupBuilder project as shown in the screen
shot SBFiles1.gif and SBFiles2.gif.
8) Right-click on the AccessoryMenu.addin file after it has been added and
change the replace property to NEVER.
That will prevent the file from overwriting a file that may have been
translated.
Note: You may have to add or modify a couple of SetupBuilder variables if
your not using Friedrich's C7 script as the basis for your own work.
9) In the bottom of your installer script (in the script editor view), you
will INCLUDE the SetupBuilder script as shown in SBInclude.gif. This needs
to happen AFTER all the files have been copied.
Note: Include scripts are like a temporary branch in the execution process.
So the main installer script will simply segway into the include script,
execute the commands there and then return to the next line in the main
script.
After you include the script, it will appear at the top of the script
editor as shown in SB1.gif. Then you can edit it.
Using this system of master files and then allowing SetupBuilder to modify
them for you at install time means that it is easy to setup a new C7 menu
addin and get it right every time.
The static data about your company will not require entry each time and the
paths to your files will be inserted based on the developers install
preferences.
I have already build and added it to a test version of our ProCodeBlock
templates, so I know that it works.
Enjoy!
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------
In the continuing saga of "How to create and manage C7 Accessory Menu
Items", here is my latest installment.
It shows how to use a SetupBuilder include script and a template file to
easily create custom .addin files for your templates that end up correctly
linked to the location where the developer installed them!
The Sample.Gif shows what the final product will look like.
Attached is a ZIP file with screen shots, sample files and these files:
"MasterProduct.Addin" - This is a special "template" file that is used by
SetupBuilder.
"MasterProductAddin.sbi" - This is a special SetupBuilder INCLUDE script
that you can insert into the BOTTOM of your SetupBuilder installer to
modify the MasterProduct.Addin file after it has been placed in the proper
folder.
Note that you will need to modify the TOP portion of the include files and
change the variables there to reflect your company and product information.
However the paths to files installed by SetupBuilder are dynamically
created and should NOT be modifed (they will be using %VARIABLE% type
names.
This example uses the new method (thanks Lee!) of having a VENDOR folder
under the Accessory\Addins folder to eliminate possible duplicate file
names.
The ZIP file has a folder structure that shows you an example of how the
files should (and will) be distributed in the C7 Accessory subfolders.
SetupBuilder Notes:
1) This is based on the C7 installer demo that Friedrich provided in the
SetupBuilder newsgroups.
2) You will need to add a target folder called %CLA_ADDINS% (see screen
shot SBNewFolders.gif) and check the box for "Absolute path" (see
SBNewFoldersAbsolute.gif).
3) You will add a VENDOR folder with your company name below the
%CLA_ADDINS% folder.
4) In your source folder, copy the MasterProduct.Addin file and rename it
as the product.addin (in my example, ProCodeBlock.Addin).
DO NOT MODIFY THIS FILE AT ALL - SetupBuilder will do that for you!
5) In your source folder, copy the SampleVendor.Addin and rename it as your
VendorName.addin.
MODIFY THIS FILE with your COMPANY information (it is the LANSRAD file for
example).
6) In your source folder, copy the AccessoryMenu.addin file.
DO NOT MODIFY THIS FILE AT ALL
7) Add your source files to the SetupBuilder project as shown in the screen
shot SBFiles1.gif and SBFiles2.gif.
8) Right-click on the AccessoryMenu.addin file after it has been added and
change the replace property to NEVER.
That will prevent the file from overwriting a file that may have been
translated.
Note: You may have to add or modify a couple of SetupBuilder variables if
your not using Friedrich's C7 script as the basis for your own work.
9) In the bottom of your installer script (in the script editor view), you
will INCLUDE the SetupBuilder script as shown in SBInclude.gif. This needs
to happen AFTER all the files have been copied.
Note: Include scripts are like a temporary branch in the execution process.
So the main installer script will simply segway into the include script,
execute the commands there and then return to the next line in the main
script.
After you include the script, it will appear at the top of the script
editor as shown in SB1.gif. Then you can edit it.
Using this system of master files and then allowing SetupBuilder to modify
them for you at install time means that it is easy to setup a new C7 menu
addin and get it right every time.
The static data about your company will not require entry each time and the
paths to your files will be inserted based on the developers install
preferences.
I have already build and added it to a test version of our ProCodeBlock
templates, so I know that it works.
Enjoy!
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------