PDA

View Full Version : Using SetupBuilder to create a C7 Accessory Menu



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"
-------------------------------------------------------------------------------------------------------

NewsArchive
05-29-2009, 05:29 AM
Thanks Charles!

Russell B. Eggen

NewsArchive
05-29-2009, 05:30 AM
Charles,

Very, very nice!

(Just showing it works on other computers besides Charles! :-D)

David

--
From David Troxell - Product Scope 7 - Encourager Software
Clarion Third Party Profile Exchange Online
http://encouragersoftware.com/profile/clarlinks.html
Profile Exchanges - www.encouragersoftware.com/profile/
http://www.profileexchanges.com/blog/


--------------------------------------------------------------------------------

NewsArchive
05-29-2009, 08:55 AM
On 29 May 2009 06:50:35 -0400, David Troxell - Encourager Software wrote:
> Very, very nice!
>
> (Just showing it works on other computers besides Charles! :-D)

Thanks David!

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"
------------------------------------------------------------------------------------------------------

NewsArchive
02-17-2011, 01:17 AM
I've attached a newer chmpdf.resources with the icons I'll be using
for, wait for it<g>, CHM and PDF links. It has a generic name so if
anyone else wants to use it feel free to do so. This one file can be
shared by all for CHM and PDF. It should be installed in the
\accessory\resources folder.

You can see what they look like in the attached screen capture.

If it's not desired I'll rename it and I'll use it, so there, HA!<g>

Maybe someone can create one for RTF and DOC files. I'll not have any
uses for it but some might. I include these file types for purposes
other than product help so they don't need to be added to the IDE.

--
Lee White

Enroll Today at http://CWaddons.com

NewsArchive
02-17-2011, 01:17 AM
> I've attached a newer chmpdf.resources with the icons I'll be using
> for, wait for it<g>, CHM and PDF links. It has a generic name so if
> anyone else wants to use it feel free to do so. This one file can be
> shared by all for CHM and PDF. It should be installed in the
> \accessory\resources folder.
>
> You can see what they look like in the attached screen capture.
>
> If it's not desired I'll rename it and I'll use it, so there, HA!<g>

Looks good to me Lee!

> Maybe someone can create one for RTF and DOC files. I'll not have any
> uses for it but some might. I include these file types for purposes
> other than product help so they don't need to be added to the IDE.

That sounds like a plan.

BTW - looking at the screen shot, I noticed that the IDE has TWO different
icons for help ( F1 and ALT+F1 ).

Of course NEITHER of those hot keys seems to work in the IDE (at least when
a app is not opened), so I'm not sure that they serve any purpose other
than to look pretty on the help menu<g>.

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"
-------------------------------------------------------------------------------------------------------

NewsArchive
02-17-2011, 01:18 AM
Charles,

> BTW - looking at the screen shot, I noticed that the IDE has TWO different
> icons for help ( F1 and ALT+F1 ).
>
> Of course NEITHER of those hot keys seems to work in the IDE (at least when
> a app is not opened), so I'm not sure that they serve any purpose other
> than to look pretty on the help menu<g>.

I've already asked why there are two since they both do the same
thing. That said I think you meant "when an app IS opened" because
they do work when an APP isn't open. My take is that Alt+F1 needs to
go bye-bye since it's not a standard for opening help!<g>

--
Lee White

Enroll Today at http://CWaddons.com

NewsArchive
02-17-2011, 01:18 AM
> I've already asked why there are two since they both do the same
> thing. That said I think you meant "when an app IS opened" because
> they do work when an APP isn't open.

Yeah - that is just weird<g>

> My take is that Alt+F1 needs to
> go bye-bye since it's not a standard for opening help!<g>

Indeed.


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"
-------------------------------------------------------------------------------------------------------

NewsArchive
02-17-2011, 01:18 AM
So, how would this work? Everybody install the same resource file, same
as with the Accessory addin?

Insofar as the resources, I would much prefer if SV agreed to support a
resource that a reasonable quorum of vendors agree on. (Or maybe they
just adopt one by fiat) We could then rely on it being there.

Your icons look great to me.
--
Phil Carroll
http://www.enablingsimplicity.com

NewsArchive
02-17-2011, 01:19 AM
Phil,

> So, how would this work? Everybody install the same resource file, same
> as with the Accessory addin?

Yep.

> Insofar as the resources, I would much prefer if SV agreed to support a
> resource that a reasonable quorum of vendors agree on. (Or maybe they
> just adopt one by fiat) We could then rely on it being there.

So would I.

--
Lee White

Enroll Today at http://CWaddons.com

NewsArchive
02-17-2011, 01:19 AM
Charles,

I little while ago I did some work on the AccessoryMenu.addin with JP. I now
have a new version that allows the user to specify the location of the menu
item (top/bottom of help menu or as a new top level menu item) as well as
supporting translations.

At the risk of re-opening old sagas I was wondering if you, or any other
Accessory vendor, is interested an updated version? I thought maybe uploading
it as an open source project to something like Google Project Hosting might
be a good start and we can move the implementation discussion/instructions to
there?

-brahn

NewsArchive
02-17-2011, 01:20 AM
> I little while ago I did some work on the AccessoryMenu.addin with JP. I now
> have a new version that allows the user to specify the location of the menu
> item (top/bottom of help menu or as a new top level menu item) as well as
> supporting translations.
>
> At the risk of re-opening old sagas I was wondering if you, or any other
> Accessory vendor, is interested an updated version? I thought maybe uploading
> it as an open source project to something like Google Project Hosting might
> be a good start and we can move the implementation discussion/instructions to
> there?

I'd have to see what your talking about to determine if it would work for
us.

Personally I think that ALL 3rd party tools installed into the help of the
IDE should adhere to ONE standard location based on the VENDOR --> Product
levels already established.

That provides a consistent user interface that both allows developers to
know what to expect and vendors to know where to expect to find their
menus.

Opening it up to change just adds the potential for additional support
issues since no one will know where to expect to find anything on a machine
if they go to work with it.

The language translation might be useful, but since most vendors don't
speak more than one language, I am not sure of the true value there.

For example, I'd have a hard time telling someone ( IN ENGLISH ) how to
find a FRENCH or GERMAN menu item...

Sometimes a standard is just better left as a standard and adhered to by
all.

Just some thoughts...

:-)

Charles


--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.clarionproseries.com - "Get ProPath, make your Clarion programs ready
for Windows 7 and Vista!"
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 - Now with PNG support!
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
02-17-2011, 01:20 AM
Hi Charles,

Ok, so not so much interest an update. No problem :)
For the language part I guess you could always ask that they switch the IDE
back to english for the support session...

-brahn

NewsArchive
02-17-2011, 01:21 AM
The lack of interest is not a problem for me, that was why I wanted to ask
here before I went to too much effort :) If anyone else is interested though,
please let me know.

Switching languages is dead easy and doesn't even need a restart of the IDE
(tools-->options-->UI Language). I agree, only the top level of the menu
would likely need translation.

-brahn

On 16/02/2011 1:40:22 PM, Charles Edmonds wrote:
>
> On 16 Feb 2011 04:33:34 -0500, Brahn wrote:
>
>> Ok, so not so much interest an update. No problem :)
>
> Well by all means don't take it as a lack of appreciation for what you've
> been doing with the IDE<g>. You've done a lot of things that help make C7
> usable (if only the darn thing would get rid of its other problems).
>
>> For the language part I guess you could always ask that they switch the IDE
>> back to english for the support session...
>
> That might be.
>
> I have not looked at how involved it is to switch around between languages
> and of course since the current menu options are all in English, it has
> not been a problem.
>
> Also we try to use icons that make sense for the final links.
>
> So if you combine the company name and product name (that would not be
> translated anyway) and the standardized icons for the CHM, WEB, UNINSTALL
> and FOLDER (see attached), our menus make sense in any language.
>
>:-)
>
> Charles
>
>

NewsArchive
02-17-2011, 01:21 AM
Brahn,

> The lack of interest is not a problem for me, that was why I wanted to ask
> here before I went to too much effort :) If anyone else is interested though,
> please let me know.

If you can provide an easy change to the adopted addin (attached) that
would support translation of "A&amp;ccessory" it wouldn't bother me
and maybe we could adopt it.

--
Lee White

RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com

Enhanced Reporting: http://www.cpcs-inc.com


Product Release & Update Notices
http://twitter.com/DeveloperPLUS

NewsArchive
02-18-2011, 12:47 AM
Since it was easy enough to do I have uploaded the source for what I have
already done to google project hosting:

http://code.google.com/p/clarion-accessory-addin/

Sorry Lee but I didn't see any attachment with your message.

-brahn