PDA

View Full Version : Multiple destination folders?



NewsArchive
10-15-2009, 02:48 AM
Ok, i realize this is unusual, but i have a situation where I am trying to
install a set of support files in multiple locations.
I have a %PATH_LIST% variable (path1|path2|path3).
I tried setting a loop around the Install File lines, but I get a
decompression error on the second pass.
Any ideas?

Currently I have:

Loop (%INSTALL_LOOP_COUNTER% Times)
Set Variable %INSTALL_LOOP_POSITION% to (Increment Variable by 1)
! Set up for Single/Looped installation
Set Variable %_SB_INSTALLDIR% to FUNCTION:List Item:
Get("%INSTALLPATHLIST%", "%INSTALL_LOOP_POSITION%")
Set Progress Status Text #1 to "Please wait while the Setup Wizard
installs [PRODUCTNAME] |to %_SB_INSTALLDIR%"
Display Setup Progress Dialog

::Create Folder "%_SB_INSTALLDIR%\YADA1" (Always Install)
Delete Files "%_SB_INSTALLDIR%\Templates\yada*.yyy"
Install File "C:\dev\MyStuff\Install\YADA1\MyFile.mfi" to
"%_SB_INSTALLDIR%\YADA1\MyFile.mfi" (Always Install)

Close Setup Progress Dialog
End
! End of InstallLoop. Install Loop will install once for each path when
"All" option selected.

[ Finalize Setup ]
! Register all queued pending file operations
Register all pending file operations

! Register all queued Clarion Template files
Register all pending Clarion Templates

[ Final User Interface ]
! Final wizard dialog definition(s)
Define Wizard Dialog "#1" (Finish)

! The Wizard Loop displays the dialog screens that the user sees in the
installation
Loop Wizard (Abort Dialog Active)
End

Glenn Paschal

NewsArchive
10-15-2009, 02:49 AM
Glenn,

It's not allowed to have the "Install File" function in a Loop.

What about using the "Copy File" function to copy it to the other
destination location(s)?

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

SetupBuilder is Windows installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
10-15-2009, 02:50 AM
Copy is what i was working on as a workaround.
Is there a way to "loop thru" the installation items, so that any item added
would not have to also be added to the copy code?

Glenn Paschal

NewsArchive
10-15-2009, 02:50 AM
Found a better way.
Create a child SB installer to run with no options, only a progress.
Create a parent SB installer to collect information, including install path
list, and install the Child.
In a loop, call the child with /X %next_path% (declare the %_SB_InstallDir%

The child has it's own progress bar, and displays the path currently being
installed.
The parent has it's own progress bar updated manually by CurPos/ItemsInList.

Works like a champ, and only thing that has to be maintained is the Child.
Compile Child, Compile Parent, Ship Parent.

Glenn Paschal

NewsArchive
10-15-2009, 02:51 AM
> Works like a champ, and only thing that has to be maintained is the Child.
> Compile Child, Compile Parent, Ship Parent.

VERY COOL!!!!

Friedrich

NewsArchive
10-16-2009, 02:43 AM
Ok, so maybe that was a bit early...
I did run into a problem where some of the "finish up" code was stepping on
itself.

I took a step back, and used your original suggestion.

Created a temp folder in %temp%/MyTempInstall
Installed everything there.
CopyFolderTree to copy from there to each destination.
Delete MyTempInstall

This was WAY easier than what I had already tried with 2 installs, keeps it
in a single sb6, and keeps everything managable in the file list.

Some day, I will learn to listen to you when you suggest something!

Anyways, as always, thanks for your help.
-Glenn.

NewsArchive
10-16-2009, 02:43 AM
> Some day, I will learn to listen to you when you suggest something!
>
> Anyways, as always, thanks for your help.

;-) You are welcome!

Friedrich