PDA

View Full Version : How to create a redist folder?



peterbi
06-29-2004, 07:26 PM
Hi,

My current package has been configured to contain:
- Program Files folder
- setup.exe
- prod.msi

Now I want to add some components, those components are included in the package, but won't be installed - they are just to help users to use them if they need. I know this can be done by setting a new feature and make its INSTALLLEVEL to more than the main feature.

I want to put them in a 'Redist' directory and make the Redist folder at the top level, i.e. to make the build have four itmes:
- Program Files folder
- Redist folder
- setup.exe
- prod.msi

How can I do it with ISDev7.04? I found ISDev only allows me to set a component's destination starting from [INSTALLDIR], which has been set UNDER [ProgramFilesFolder]. This setting will make the Redist a subdir of Program Files dir.

I also have similar problem to change component's Destination other than the provided list, for example, if I create a public property MYINSTALL (it's a full path, no need to prefix INSTALLDIR later on) in a CA, how can I set a component's destination to be [MYINSTALL]?

Thanks,
Peter

huntant
06-30-2004, 08:26 AM
Where do you want your Redist folder created? Depending on the starting point you can use one of the existing ones, and just add your new folder to it. This will create the directory entry for you.

With components you are not forced to use INSTALLDIR, but most of the time you would since this would be where you want your product installed. And you are allowed to create subfolders off of install dir. Just type them.

As for using a property as a destination, you need to create a custom action type 35 (set a directory).



Anthony

peterbi
06-30-2004, 12:54 PM
Anthony,

Thank you for your reply.

1) Your reply solved my first question, I now can create a 'Redist' folder, thanks.

2) I tried Type35 CA, it seems still not good enough to create a directory such as [INSTALLDIR]Test1.0, where 1.0 is from [ProductVersion] value. The TARGET field seems only accept formated string just like 'Destination' filed in Setup Design, how can I put version value into the dir name?


Thanks,
Peter

huntant
06-30-2004, 01:01 PM
Try something like this in your CA.

Directory Name - TESTDIR
Directory Value - [INSTALLDIR]Test [ProductVersion]




Anthony

peterbi
06-30-2004, 05:21 PM
I already did it with my CA, let's say the ISScript function is set_dir(), and the CA is CA_set_dir, how can I create the TESTDIR and make it available from "Setup Design->Component->Destination list"?

I tried to use type35 CA to do it, what should I give to:

SOURCE: TESTDIR?
TARGET: set_dir()?/CA_set_dir?/or else?

Also I had the same problem with 'Redist' (I thought I made it, but eventually got error ...), here is what I did:
SOURCE: REDIST
TARGET: Redist //I want the dir name to be the string 'Redist'

I got 1606 error: Full MSI Validation returns error (ICE03) on Directory table with REDIST entry, no matter what I did (delete, filling with different string values, and so on), the error remains.

Still struggling with it ...

Thanks,
Peter
Also Also

peterbi
06-30-2004, 06:21 PM
One more question: when you use type 35 CA, can you create a directory with small letters? In your example, can you create "TestDir"?

Seems to me that if I define 'TESTDIR' in SOURCE, I can get it from Destination list, but can't if I change it to 'TestDir'. I hope there is a way to do it.

Here is what I am doing and it works (just create a REDIST dir):

With Type 35 CA:
SOURCE: REDIST
TARGET: Redist //this is what I expected to show as real dir name

In Destination list, select REDIST for the Redist components.

In build, I got REDIST dir parallel to 'program files', containing redist stuff.

Still can't make version as part of a dir name work...

Thanks,
Peter

huntant
07-01-2004, 07:38 AM
For your redist folder, you don't need a CA. When you set the destination value on the component, select your starting path and add the folder name. This will update the Directory table, and the new folder will be listed in the drop down.

Ex. [INSTALLDIR]Redist

When you create the type 35 CA, it will create the entry in the Directory table. This should then automatically appear in the drop down for the destination value on a component.

Why are you using an ISScript to set the directory? If you want to write the code to do it, then you need to use an InstallScript CA.



Anthony

peterbi
07-01-2004, 11:18 AM
-------------------------------Quote-----------------------------------------
For your redist folder, you don't need a CA. When you set the destination value on the component, select yourstarting path and add the folder name. This will update the Directory table, and the new folder will be listed in the drop down.

Ex. [INSTALLDIR]Redist
-----------------------------------------------------------------------------------
As I said before, I don't want to put 'Redist' under any existing dir. I just want to create it on the fly and make it appear parallel to 'program files' folder in the build. It will NOT be installed either.

----------------------Quote---------------------------------------------------
When you create the type 35 CA, it will create the entry in the Directory table. This should then automatically appear in the drop down for the destination value on a component.
--------------------------------------------------------------------------------
I probably should ask: does this entry name has to be CAPITAL letters, i.e. public property? I tried small or mixed letters, it never show up in the list, only when it's capital letters.


---------------------------Quote----------------------------------------------
Why are you using an ISScript to set the directory? If you want to write the code to do it, then you need to use an InstallScript CA.
----------------------------------------------------------------------------------
You are probably reading my earlier email. I got you wrong - I thought I need to have ISScript function, then create Type35 CA using that function.

Any ideas on puting version into (as part of) a folder name?

Thanks,
Peter

huntant
07-01-2004, 11:32 AM
To create the Redist folder at the same level as Program Files, then put [WindowsVolume]Redist. Specifiying just Redist is not a valid path.

For directory properties, they have to be in all capitols. In the CA (Type 35) set the directory value to something similar to my example above. This will be set at runtime.



Anthony

peterbi
07-01-2004, 04:25 PM
-----------------------------------------------------------------------------
To create the Redist folder at the same level as Program Files, then put [WindowsVolume]Redist.
----------------------------------------------------------------------------
No, it didn't work. I have tried EACH ONE from the drop down list, none of them can create me a redist folder parallel to 'program files'. Note, I have repeated that I am only looking at the build output,, with [WindowsVolume]Redist, I got WindowsRoot dir paralel to 'program files', under WindowsRoot I got 'Redist' dir. Since I tried all of the items from the drop down list, I think there is no way you can simply create a directory parallel (again from viewing build outpput) to 'program files' at 'Setup Design'. The only way probably is Type35 CA , then I have to make the directory name CAPITAL, that's odd - capital directory name seems strange...

Thanks anyway,
Peter

huntant
07-05-2004, 07:32 AM
Sorry, for not being able to anwser your question a little more precisely, but I must not be fully understanding your problem.
What do you mean by parallel to "program files"? Is C:\Rebist and C:\Program Files not what you are looking for?

The reason for the use of all capitols, is because the directory properties are converted into public properties at runtime, this allows any directory changes to be passed to the execute sequence. Private properties are only valid in the sequence that they are created in.



Anthony

peterbi
07-06-2004, 11:35 AM
----------------------------------------------------------------------
What do you mean by parallel to "program files"? Is C:\Rebist and C:\Program Files not what you are looking for?
----------------------------------------------------------------------
I mean the two folders parallel at BUILT output, please refer to my first email, I want the built output as following:
- program files //dir containing sub dirs
- redist //containing redist stuff (possibly sub dirs)
- product.msi
- setup.exe

Again 'redist' will NOT be installed on target system.

I wish I could create the built output name as 'redist' instead of 'REDIST'...

Thanks,
Peter

peterbi
07-06-2004, 11:53 AM
To be more precise, under 'DISK1' (ISDev7.04 Basic), I would like to see:
- program files
- redist ///how to create this folder?
- product.msi
- setup.exe

Sorry for the unclear description.

Thanks,
Peter

huntant
07-06-2004, 12:35 PM
If you create the Redist folder somewhere, probably in a folder structure from where you are getting the rest of your files that you are packaging. Insert this under Disk1 in the Setup Files view.
After you build, you should find the result you are looking for.

Unfortunately the folder needs to exists for it to be added under Disk1. The only other way to do it, would be to make it part of a build script.




Anthony

peterbi
07-06-2004, 04:49 PM
Thank you, Anthony.

To make this thread long enough (;-)), can you give a bit more explanation on how to "make it part of a build script"? Do you mean using CA? Then how to create a dir under 'DISK1'? and how to make the created dir appear in 'Destination' drop-down list?

I have tried with CA and couldn't figure it out ...

Thanks,
Peter

huntant
07-07-2004, 07:33 AM
Unfortunately there is no link between the destination list and the Disk1. All folders listed in the destination list are folders that will be installed. Why do you want this to appear in the destination list? The Disk1 view contains it's own list of files/folders to include. Different then components.

By a build script, I'm just referring to a vbscript or batch file that is used to compile your project and do any additional processing that needs to be done before delivering your cd image (like adding extra folders).




Anthony