PDA

View Full Version : Copy+Paste between SB6 files?



NewsArchive
05-21-2008, 02:28 AM
I've got 9 installations that share a great deal of logic. Wherever
possible, I've tried to place common sections in shared SBI files.
This doesn't work as well as with Wise Install Builder, but I've
learned to live with the limitations.

I've just decided to make a change in the interface flow, adding a few
dialogs, adding custom text and messages, etc. I've done a "proof of
concept" with one of the installs, and now it's time to apply the
changes to the rest.

I would like to save myself the trouble of reentering all of the
custom text in the other 8 apps. I've noticed the Text and Messages
section has Copy and Paste on the popup, however, I've not been able
to paste something from one SB6 to another. I suspect that SB clears
the clipboard when switching SB6 files.

There is no equivalent feature for copying my three new dialogs. This
isn't as hard to do, but it would still be nice if I could paste them
in, rather than manually adding 3 new dialogs, overriding the text
messages for 5 of the settings on each, and doing this to each of the
8 SB6 files.

Any suggestions, or should I just grit my teeth and get on with it?

Mike Hanson
www.boxsoft.net

NewsArchive
05-21-2008, 02:30 AM
Hi Mike,

Have you tried ClipMate?

Lynn Howard

NewsArchive
05-21-2008, 02:30 AM
Hi Mike,

>I would like to save myself the trouble of reentering all of the
>custom text in the other 8 apps. I've noticed the Text and Messages
>section has Copy and Paste on the popup, however, I've not been able
>to paste something from one SB6 to another. I suspect that SB clears
>the clipboard when switching SB6 files.

Works fine here with dialog code and all kinds of other code, but you
can also run two instances of SB6 and copy paste between them.

Note that I use Ctrl-C and Ctrl-V.

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
05-21-2008, 02:31 AM
Mike,

> I've got 9 installations that share a great deal of logic. Wherever
> possible, I've tried to place common sections in shared SBI files.
> This doesn't work as well as with Wise Install Builder, but I've
> learned to live with the limitations.

Where do you see a difference between a SetupBuilder (.sbi) and Wise (.wse)
include script?

> I've just decided to make a change in the interface flow, adding a few
> dialogs, adding custom text and messages, etc. I've done a "proof of
> concept" with one of the installs, and now it's time to apply the
> changes to the rest.
>
> I would like to save myself the trouble of reentering all of the
> custom text in the other 8 apps. I've noticed the Text and Messages
> section has Copy and Paste on the popup, however, I've not been able
> to paste something from one SB6 to another. I suspect that SB clears
> the clipboard when switching SB6 files.
>
> There is no equivalent feature for copying my three new dialogs. This
> isn't as hard to do, but it would still be nice if I could paste them
> in, rather than manually adding 3 new dialogs, overriding the text
> messages for 5 of the settings on each, and doing this to each of the
> 8 SB6 files.
>
> Any suggestions, or should I just grit my teeth and get on with it?

Copy and paste of dialogs works fine here. You can even open two instances
of the IDE and copy and paste from one script to another.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
05-21-2008, 05:07 AM
>Have you tried ClipMate?

Yes, I'm a long time ClipMate user, and couldn't live without it. This
would be a great opportunity for PowerPaste, but there's an
incompatibility with something else on my system, so I haven't been
able to use that very nice feature for a few years now.

I can do similar by pressing the hotkey that shifts up and down the
clip list, but that's a bit more tedious, and more prone to mistakes.
Regardless, that's how I would attack it, if there isn't a better way.

I've noticed that SB6 doesn't play nicely with the Clipboard (as far
as script lines), but it does respect Copy+Paste for text fields.

Mike Hanson
www.boxsoft.net

NewsArchive
05-21-2008, 05:08 AM
>Works fine here with dialog code and all kinds of other code, but you
>can also run two instances of SB6 and copy paste between them.
>
>Note that I use Ctrl-C and Ctrl-V.

I hadn't considered running two instances. That would probably help.

Mike Hanson
www.boxsoft.net

NewsArchive
05-21-2008, 05:09 AM
>> I've got 9 installations that share a great deal of logic. Wherever
>> possible, I've tried to place common sections in shared SBI files.
>> This doesn't work as well as with Wise Install Builder, but I've
>> learned to live with the limitations.
>
>Where do you see a difference between a SetupBuilder (.sbi) and Wise (.wse)
>include script?

With Wise, virtually everything was in the script, so I could include
anything in anything else. With SB6, all of the extra stuff (dialog
definitions, text resources, etc., are tightly tied to an SB6. It
can't be defined in an SBI (at least I couldn't get it done.

>> I've just decided to make a change in the interface flow, adding a few
>> dialogs, adding custom text and messages, etc. I've done a "proof of
>> concept" with one of the installs, and now it's time to apply the
>> changes to the rest.
>>
>> I would like to save myself the trouble of reentering all of the
>> custom text in the other 8 apps. I've noticed the Text and Messages
>> section has Copy and Paste on the popup, however, I've not been able
>> to paste something from one SB6 to another. I suspect that SB clears
>> the clipboard when switching SB6 files.
>>
>> There is no equivalent feature for copying my three new dialogs. This
>> isn't as hard to do, but it would still be nice if I could paste them
>> in, rather than manually adding 3 new dialogs, overriding the text
>> messages for 5 of the settings on each, and doing this to each of the
>> 8 SB6 files.
>>
>> Any suggestions, or should I just grit my teeth and get on with it?
>
>Copy and paste of dialogs works fine here. You can even open two instances
>of the IDE and copy and paste from one script to another.

Arnor suggest that, so I'll give it a try.

While I've got your attention, on a "Select Destination Folder"
dialog, I overrode the TEXT parameter, so that it had more than two
lines. I expected that it would shift the entry field down, but it
showed me only my first to lines. (The third line was a blank line,
so I don't know whether it would have shown that too.) Is there some
way to get it to shift that entry field down, based uon the amount of
TEXT?

Mike Hanson
www.boxsoft.net

NewsArchive
05-21-2008, 05:10 AM
> I've noticed that SB6 doesn't play nicely with the Clipboard (as far
> as script lines), but it does respect Copy+Paste for text fields.

To copy "script lines" (what you see in the Script Editor) into the
Clipboard, you have to use <right-click> and select "Copy Text to
Clipboard".

The Copy and Paste commands only work in the SetupBuilder IDE.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
05-21-2008, 05:12 AM
> With Wise, virtually everything was in the script, so I could include
> anything in anything else. With SB6, all of the extra stuff (dialog
> definitions, text resources, etc., are tightly tied to an SB6. It
> can't be defined in an SBI (at least I couldn't get it done.

Of course, it can be done in an include script.

See attached screenshot. The main script calls into an include script that
defines the dialogs. No problem at all.

Regards,

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
05-22-2008, 03:04 AM
>> I've noticed that SB6 doesn't play nicely with the Clipboard (as far
>> as script lines), but it does respect Copy+Paste for text fields.
>
>To copy "script lines" (what you see in the Script Editor) into the
>Clipboard, you have to use <right-click> and select "Copy Text to
>Clipboard".
>
>The Copy and Paste commands only work in the SetupBuilder IDE.

Yes, that's what I noticed. Clipmate doesn't see any copy/cut
operations in SB6's script editor. It only recognizes those done in a
regular entry field.

Mike Hanson
www.boxsoft.net

NewsArchive
05-22-2008, 03:05 AM
> Yes, that's what I noticed. Clipmate doesn't see any copy/cut
> operations in SB6's script editor. It only recognizes those done in a
> regular entry field.

Correct, because behind-the-scenes (behind what you see as "script line")
there is a complex structure and nothing goes into the Clipboard if you
copy/paste a script line.

The method is similar to what you have in Wise. If you copy one line from
the Wise script editor, you do not really copy one line. For example, a
"Get Registry Key Value". Under the hood, it is:

item: Get Registry Key Value
Variable=COMMON
Key=SOFTWARE\Microsoft\Windows\CurrentVersion
Default=C:\Program Files\Common Files
Value Name=CommonFilesDir
Flags=00000100
end

The same is true for SetupBuilder, but our script is a binary file to keep
the script in-sync.

Friedrich

NewsArchive
05-22-2008, 03:06 AM
>The method is similar to what you have in Wise. If you copy one line from
>the Wise script editor, you do not really copy one line. For example, a
>"Get Registry Key Value". Under the hood, it is:
>
>item: Get Registry Key Value
> Variable=COMMON
> Key=SOFTWARE\Microsoft\Windows\CurrentVersion
> Default=C:\Program Files\Common Files
> Value Name=CommonFilesDir
> Flags=00000100
>end

Yes, and I often edited those files directly (often using bulk
search&replace tools). <g>

Mike Hanson
www.boxsoft.net

NewsArchive
05-22-2008, 03:07 AM
Hi Mike,

>I hadn't considered running two instances. That would probably help.

I don't have any problems with:

1. Open a SB6 project
2. Go to the script
3. Copy a line or lines of script code
4. Close the project
5. Open another project
6. Go to the script
7. Paste the line(s) into the script

I've tried it with both dialogs and functions and it works fine
here... I'm using the latest SB6.whatever build;)

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
05-22-2008, 03:08 AM
It works in the script editor, but that didn't work in the "Text and
Messages" section (even though it's supposed to support Copy & Paste).
I'm trying to work around it now by using variables.

mIKE hANSON
WWW.BOXSOFT.NET

NewsArchive
05-22-2008, 03:09 AM
Hi Mike,

>It works in the script editor, but that didn't work in the "Text and
>Messages" section (even though it's supposed to support Copy & Paste).
>I'm trying to work around it now by using variables.

Ah, I'm sorry, I missed the "Text and Message" part:( Hardly ever use
it so I haven't tried...

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
05-22-2008, 03:09 AM
Just for the record, you can use *ALL* functions from the "Script Functions"
script editor list in an include script (.sbi). You can define dialogs,
define installer runtime variables and compiler variables, define shortcuts,
etc. Whatever you want.

And you can even use an #include item in an included script, thereby nesting
your included scripts to any level.

Friedrich

NewsArchive
05-22-2008, 03:10 AM
I was already doing a bunch of nexted includes. (Each of my SB6s uses
18 separate SBIs, many of them nested, and some repeated.) All of
these was code in the "Script Logic". You've just told me that an SBI
can also incorporate some of the non-script stuff (e.g. Setup
Appearance), which gives me an opporunity to reduce the redundancy in
my scripts.

Mike Hanson
www.boxsoft.net

NewsArchive
05-22-2008, 03:10 AM
>Of course, it can be done in an include script.
>
>See attached screenshot. The main script calls into an include script that
>defines the dialogs. No problem at all.

Interesting. If I save the chunk of the existing SB6 as an SBI, will
it carry along all of the messages (because it needs those)?

There's also one thing that I do inside the dialog loop that's
specific to each product. Will I need to create a conditional
structure (driven by [PRODUCTNAME]) that will be in the new shared
SBI?

What about all of the "General Information"? Will it be saved in the
SBI? That's the stuff that changes significantly from one SB6 to the
next.

I'm going to play with it now, so I may determine the answers to these
questions before you have a chance to get back to me. <g>

Mike Hanson
www.boxsoft.net

NewsArchive
05-22-2008, 03:12 AM
> Interesting. If I save the chunk of the existing SB6 as an SBI, will
> it carry along all of the messages (because it needs those)?

If you make use of text resources in your dialogs, then those text resources
are stored in the main script (.sb6).

You can use variables to make it completely flexible.

> There's also one thing that I do inside the dialog loop that's
> specific to each product. Will I need to create a conditional
> structure (driven by [PRODUCTNAME]) that will be in the new shared
> SBI?

It's up to you. See attached screenshot. For example, you can use compiler
variables to control the compile.

> What about all of the "General Information"? Will it be saved in the
> SBI? That's the stuff that changes significantly from one SB6 to the
> next.

Similar to what you have in all development environments (Clarion, Visual
Studio 2008, etc.) There is only one General Information section. The
information is defined in the main project.

The "Releases" feature gives you full control here (even when silently
compiled from the command line). Based on the selected "Release" you can
decide which include script is compiled.

Last month our Script Consulting developed a project for a large U.S.
company. One project file (.sb6) powers five different products now.

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
05-22-2008, 03:12 AM
Thanks for the insights. I'm playing with it now.

Mike Hanson
www.boxsoft.net

NewsArchive
05-22-2008, 03:13 AM
>
> Thanks for the insights. I'm playing with it now.
>

And if you have any question (or suggestion), just let me know. The
upcoming new SetupBuilder 7 will include numerous improvements to provide
even more flexibility (e.g. Visual Dialog Editor).

Friedrich

NewsArchive
05-22-2008, 03:13 AM
>And if you have any question (or suggestion), just let me know. The
>upcoming new SetupBuilder 7 will include numerous improvements to provide
>even more flexibility (e.g. Visual Dialog Editor).

I assume that this will let me move increase the vertical space for
"Text" on the "Select Destination Folder" dialog.

Mike Hanson
www.boxsoft.net

NewsArchive
05-22-2008, 03:14 AM
>If you make use of text resources in your dialogs, then those text resources
>are stored in the main script (.sb6).
>
>You can use variables to make it completely flexible.

So I changed some of my dialogs to use %VARIABLES% rather than text
resources. It works, except for the dialog Title, which displays the
name of the variable, rather than the contents. Have I found a bug?

I've noticed another quirk too. I saved an SB6 as an SBI, which seems
to work. This SBI #includes various other SBIs, which appear as tabs
alongt the top. However, when I attempt to click them, it flashes,
but stays in the main tab.

If, however, my main script is part of an SB6, then I can switch tabs
normally (including switching to the nested scripts that I could reach
before).

Mike Hanson
www.boxsoft.net

NewsArchive
05-22-2008, 03:15 AM
>So I changed some of my dialogs to use %VARIABLES% rather than text
>resources. It works, except for the dialog Title, which displays the
>name of the variable, rather than the contents. Have I found a bug?

So I typed text into the "Title" setting, and that worked. (I didn't
need to change the value at run-time, so I didn't really need a
variable.)

To simply things, I decided to use text in all of the settings.

Then I discovered that the Browse Dialog "Title" and "Prompt" settings
don't work with text _or_ variables. It only ignores anything except
the ID of an official Text/Message. Instead, it defaults the Title to
"Browse For Folder", and the prompt to "Change..." (the text of the
calling button).

Another bug? <g>

Mike Hanson
www.boxsoft.net

NewsArchive
05-22-2008, 03:16 AM
I've also discovered that Dialogs in SBIs cannot access custom Text
resources (those not defined as part of the default roster).
Therefore, my Browse Dialog is stuck with a single Title and Prompt
for all Destination Dialogs.

Mike Hanson
www.boxsoft.net

NewsArchive
05-22-2008, 03:17 AM
>I've also discovered that Dialogs in SBIs cannot access custom Text
>resources (those not defined as part of the default roster).
>Therefore, my Browse Dialog is stuck with a single Title and Prompt
>for all Destination Dialogs.

Sorry, my mistake. This does work, at least for the BROWSEPROMPT
resource.

The BROWSETITLE is another matter. Either it doesn't look at the text
resource from the main file, or it always says "Browse For Folder".
I've not found any way to change it from that description. It's not
crucial to me, though, as the prompt makes it clear enough for my
purposes (although I would like it to be "Browse for Folder" with a
lowercase "f" on "for" <g>).

Mike Hanson
www.boxsoft.net

NewsArchive
05-24-2008, 02:13 AM
> The BROWSETITLE is another matter. Either it doesn't look at the text
> resource from the main file, or it always says "Browse For Folder".
> I've not found any way to change it from that description. It's not
> crucial to me, though, as the prompt makes it clear enough for my
> purposes (although I would like it to be "Browse for Folder" with a
> lowercase "f" on "for" <g>).

The "Title" and "Prompt" fields in the Browse Dialog tab are obsolete in
SetupBuilder 6.7. The installer uses the SHBrowseForFolder Windows API to
display the browse dialog. Windows sets the "Browse For Folder" title
automatically (Microsoft seems to prefer "Browse For Folder" and not "Browse
for Folder" <g>).

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
05-24-2008, 02:13 AM
Correction: only the "Title" entry field is obsolete in 6.7. "Prompt" is
not obsolete, but displays the text ("Change...) for the browse button.
This is incorrect and has been fixed now (Version 6.8).

We'll see if it is possible to set the title for the SHBrowseForFolder
dialog from the installer.

Friedrich

NewsArchive
05-24-2008, 02:14 AM
>Correction: only the "Title" entry field is obsolete in 6.7. "Prompt" is
>not obsolete, but displays the text ("Change...) for the browse button.
>This is incorrect and has been fixed now (Version 6.8).

I'm running 6.7.2219. The BrowsePrompt will display the chosen value,
if you use a text resource. If, however, you try to use a variable or
constant text, it ignores it and defaults to "Change...".

>We'll see if it is possible to set the title for the SHBrowseForFolder
>dialog from the installer.

This isn't crucial (for me), as the Prompt makes the purpose clear.

Mike Hanson
www.boxsoft.net

NewsArchive
05-24-2008, 02:15 AM
>Microsoft seems to prefer "Browse For Folder"
>and not "Browse for Folder" <g>

They're not entirely consistent, as it was their own internal document
that had the best description of proper capitalization of titles.
"For" is basically a preposition, and you're not supposed to
capitalize those words unless they're at least four characters long.
But I'm getting rather picky now. <g>

Mike Hanson
www.boxsoft.net