Jebrew
Posts: 53
Joined: Thu Jan 18, 2007 8:53 pm

Multiple Builds confusion

I'm trying to build for multiple platforms (x86, ia64, and x64) with mostly the same prerequisites (x86 has one extra custom prerequisite and all three systems use platform specific builds of a custom executable), mostly the same files (same directory structure, but different root, all the same file names, but each executable has to be built for each specific platform), and all the same registry entries (well...the install folder will vary from system to system, but the variable name in AI is still the same).

I've found the Builds in the Media folder...now how do I use them? It appears as though I can only change options such as compression and packaging...does the multiple build stuff not extend to the entire project?

Thanks,
Jebrew
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

The connection between a build and resources is made by features. For example to incluce a file/registry, etc to a specific build add it to a feature and specify in the "Organization" page in what builds this feature will be included.

Same for prerequisites. If more than one build is present in the project the "Builds" tab will appear in the "Edit Prerequisite" dialog allowing you to include the prerequisite in required builds.

About how to use multiple builds in AI please see:
http://www.advancedinstaller.com/user-guide/media.html
http://www.advancedinstaller.com/user-g ... rties.html

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Jebrew
Posts: 53
Joined: Thu Jan 18, 2007 8:53 pm

What about the processor type?

Sweet, so just one last thing and I'm good to go: How do you set the package type in the Install Parameters page to be build specific? Presently I've got it setup to build all my stuff from one .aip, but I still have to do one at a time and modify this property...or am I missing something again?
Thanks,
Jebrew
Jebrew
Posts: 53
Joined: Thu Jan 18, 2007 8:53 pm

Still confused

Okay, so, I'm still a bit confused as to how to have some files only install under a specific feature but not under another. On all of my builds there are files that have the same name and install location, but differ in the Source from which they pull. How do I split out the features to have them grab from different directories?

If that was a bit confusing of an explanation, try this: I've got a file for the x86 platform build, we'll call it example.exe, on the x86 build it is setup to be installed in [APPDIR]\bin\example.exe, and on the local system the installer pulls the file from C:\win-ia32\bin\example.exe. The x64 and ia64 installs also contain an example.exe installed in [APPDIR]\bin\example.exe, but the ia64 Source is C:\win-ia64\bin\example.exe and the x64 one from C:\win-x64\bin\example.exe. How do I setup the features to understand that they all have the same name and all install in the same location, but each pulls from a different directory?

Thanks,
Jebrew
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
How do you set the package type in the Install Parameters page to be build specific?
I'm afraid that options like "Installation Type", "Package Type" is not build specific, but we have this on our TODO list and will be available in a future version of AI.
How do I setup the features to understand that they all have the same name and all install in the same location, but each pulls from a different directory?
In the "Files and Folders" page create specific folders (like "Windows Volume\win-ia32\bin", "Windows Volume\win-ia64\bin") for each build platform and add required files into them. In the organization page add platform specific files to the platform specific feature and specify in which builds this feature will be included.

Kind Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Jebrew
Posts: 53
Joined: Thu Jan 18, 2007 8:53 pm

So if the files in the "Files and Folders" page are in specific folders such as "Windows Volume\win-ia32\bin" and "Windows Volume\win-ia64\bin", how to I have that translate to "Application Folder\Test Tools\bin" during installation? Backward compatibility with our previous releases requires this installation directory for all three platforms.

Thanks,
Jebrew
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

In the "Install Parameters" page set the default value for the "Application Folder" to "[WindowsVolume][AI_BUILD_NAME]".

The AI_BUILD_NAME property is resolved to the name of the build. So in the "Media" page create you builds with intuitive names like (win_ia32, win_ia64, etc). Don't put characters like '-' because Windows Installer does not accept such characters in a property name.

Now in the "Files and Folders" page create a property based folder for each platform (define the properties first in the "Install Parameters" page).

In the "Custom Actions" page create two "Property Set With Formatted" custom actions under "InstallUISequence->CostInitialize" with following options:

1. Property Name: PLATFORM1 (property used for the folder of the fist platform)
Formatted Text: [APPDIR]

2. Property Name: PLATFORM2
Formatted Text: [APPDIR]

Drag this custom action (while shift key is pressed) to "InstallExecuteSequence->CostFinalize" action.

In the "Organization" page organize your files into builds as described in my previous posts.

Hope this helps,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Jebrew
Posts: 53
Joined: Thu Jan 18, 2007 8:53 pm

Awesome, thanks. Just a note for anyone trying to accomplish the same thing: The copies of the custom actions need to be in the "CostInitialize" under the "InstallExecuteSequence" and the "InstallUISequence", not the "CostFinalize"...otherwise if you choose the "Remove" option directly from the "Add/Remove" programs deal in your control panel it'll say that it can't reach the network item 'Your Value' where 'Your Value' is whatever value you initially had in the properties defined in the Install Parameters page. Otherwise it's exactly the solution I was looking for.
Thanks again gigi.
Jebrew
Jebrew
Posts: 53
Joined: Thu Jan 18, 2007 8:53 pm

Oops, spoke too soon. Now I'm having trouble with the services. The executables for the services are installed in the platform specific meta-directories (i.e. "APPDIR_X86\Test Tools\bin\maagent.exe" for the ia-32 install, and "APPDIR_X64\Test Tools\bin\maagent.exe" for the x64 install).
Presently I'm just trying to get it to run/install on the ia-32 platform. All of the correct files get put into the correct places, but when the installer tries to start the service (which is setup just as I had it in the old installer, only now with the different meta directory) it hangs for a while, then fails out asking me to make sure I have the correct privileges to start/install services. What's more, if I get this service working, how do I setup the services for the other platforms? I need the services to all have the same "Service Name" in the service properties, and they must all install in the bin directory, is this possible?
Thanks,
Jebrew
Jebrew
Posts: 53
Joined: Thu Jan 18, 2007 8:53 pm

Looks like I forgot to package the CRT libs with the installer. I packaged them and now I'm getting error 2602. Any help would be appreciated. I'll see how it fares on the 64-bit platforms and post again.
Thanks,
Jebrew
Jebrew
Posts: 53
Joined: Thu Jan 18, 2007 8:53 pm

hrmm...another issue. On the 64bit machines the installer wants to place the files into C:\Program Files(x86)\... since the [APPDIR] is using [ProgramFilesFolder] for the install. Any ideas on how to fix this?
Thanks,
Jebrew
Jebrew
Posts: 53
Joined: Thu Jan 18, 2007 8:53 pm

This seems to be becoming a blog of my trials with AI building for multiple platforms. Anyway, I fixed the program files problem using the same basic idea as you had before, gigi, for the other directories. I created a custom action in the "Begin" phase of the "InstallUISequence" and "InstallExecuteSequence" that sets ProgramFilesFolder to [WindowsVolume]Program Files\

So that problem is over and done with. Now the only thing(s) remaining is that pesky 2602 error. Expounding on that problem a bit more, it occurs during the "Copying new files" stage of the install and the specific text from the dialog is as follows:

"The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2602."

No files/folders have been copied over to the [APPDIR] at the time of the error, so I'm assuming it's while it's unpacking and setting up to copy en masse.

If anyone's got an idea of what I'm doing wrong, I'd appreciate a schooling on the subject.

Thanks,
Jebrew

Return to “Common Problems”